Comparing version 8.0.0-canary.0 to 8.0.0
@@ -5,16 +5,75 @@ /*! | ||
*/ | ||
import * as Types from "./Types"; | ||
export declare const TabsterAttributeName: "data-tabster"; | ||
export declare const TabsterDummyInputAttributeName: "data-tabster-dummy"; | ||
export declare const FocusableSelector: string; | ||
export declare const AsyncFocusSources: Types.AsyncFocusSources; | ||
export declare const ObservedElementAccesibilities: Types.ObservedElementAccesibilities; | ||
export declare const RestoreFocusOrders: Types.RestoreFocusOrders; | ||
export declare const DeloserStrategies: Types.DeloserStrategies; | ||
export declare const Visibilities: Types.Visibilities; | ||
export declare const RestorerTypes: Types.RestorerTypes; | ||
export declare const MoverDirections: Types.MoverDirections; | ||
export declare const MoverKeys: Types.MoverKeys; | ||
export declare const GroupperTabbabilities: Types.GroupperTabbabilities; | ||
export declare const GroupperMoveFocusActions: Types.GroupperMoveFocusActions; | ||
export declare const SysDummyInputsPositions: Types.SysDummyInputsPositions; | ||
export declare const TABSTER_ATTRIBUTE_NAME: "data-tabster"; | ||
export declare const TABSTER_DUMMY_INPUT_ATTRIBUTE_NAME: "data-tabster-dummy"; | ||
export declare const FOCUSABLE_SELECTOR: string; | ||
export declare const AsyncFocusSources: { | ||
readonly EscapeGroupper: 1; | ||
readonly Restorer: 2; | ||
readonly Deloser: 3; | ||
}; | ||
export declare const ObservedElementAccessibilities: { | ||
readonly Any: 0; | ||
readonly Accessible: 1; | ||
readonly Focusable: 2; | ||
}; | ||
export declare const RestoreFocusOrders: { | ||
readonly History: 0; | ||
readonly DeloserDefault: 1; | ||
readonly RootDefault: 2; | ||
readonly DeloserFirst: 3; | ||
readonly RootFirst: 4; | ||
}; | ||
export declare const DeloserStrategies: { | ||
/** | ||
* If the focus is lost, the focus will be restored automatically using all available focus history. | ||
* This is the default strategy. | ||
*/ | ||
readonly Auto: 0; | ||
/** | ||
* If the focus is lost from this Deloser instance, the focus will not be restored automatically. | ||
* The application might listen to the event and restore the focus manually. | ||
* But if it is lost from another Deloser instance, the history of this Deloser could be used finding | ||
* the element to focus. | ||
*/ | ||
readonly Manual: 1; | ||
}; | ||
export declare const Visibilities: { | ||
readonly Invisible: 0; | ||
readonly PartiallyVisible: 1; | ||
readonly Visible: 2; | ||
}; | ||
export declare const RestorerTypes: { | ||
readonly Source: 0; | ||
readonly Target: 1; | ||
}; | ||
export declare const MoverDirections: { | ||
readonly Both: 0; | ||
readonly Vertical: 1; | ||
readonly Horizontal: 2; | ||
readonly Grid: 3; | ||
readonly GridLinear: 4; | ||
}; | ||
export declare const MoverKeys: { | ||
readonly ArrowUp: 1; | ||
readonly ArrowDown: 2; | ||
readonly ArrowLeft: 3; | ||
readonly ArrowRight: 4; | ||
readonly PageUp: 5; | ||
readonly PageDown: 6; | ||
readonly Home: 7; | ||
readonly End: 8; | ||
}; | ||
export declare const GroupperTabbabilities: { | ||
readonly Unlimited: 0; | ||
readonly Limited: 1; | ||
readonly LimitedTrapFocus: 2; | ||
}; | ||
export declare const GroupperMoveFocusActions: { | ||
readonly Enter: 1; | ||
readonly Escape: 2; | ||
}; | ||
export declare const SysDummyInputsPositions: { | ||
readonly Auto: 0; | ||
readonly Inside: 1; | ||
readonly Outside: 2; | ||
}; |
@@ -107,4 +107,4 @@ /*! | ||
constructor(tabster: Types.TabsterCore, transactions: CrossOriginTransactions); | ||
getElement(observedName: string, accessibility?: Types.ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: Types.ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
getElement(observedName: string, accessibility?: Types.ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: Types.ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
requestFocus(observedName: string, timeout: number): Promise<boolean>; | ||
@@ -111,0 +111,0 @@ static trigger(instance: Types.CrossOriginObservedElementState, element: CrossOriginElement, details: Types.ObservedElementProps): void; |
@@ -12,17 +12,17 @@ /*! | ||
} | ||
export type MoverMoveFocusEventDetail = { | ||
export interface MoverMoveFocusEventDetail { | ||
key: Types.MoverKey; | ||
}; | ||
} | ||
export interface MoverMemorizedElementEventDetail { | ||
memorizedElement: HTMLElement | undefined; | ||
} | ||
export type GroupperMoveFocusEventDetail = { | ||
export interface GroupperMoveFocusEventDetail { | ||
action: Types.GroupperMoveFocusAction; | ||
}; | ||
export type ModalizerEventDetail = { | ||
} | ||
export interface ModalizerEventDetail { | ||
id: string; | ||
element: HTMLElement; | ||
}; | ||
} | ||
export interface RootFocusEventDetail { | ||
element: HTMLElement; | ||
} |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
export { createTabster, getTabster, disposeTabster, forceCleanup, getGroupper, getMover, getCrossOrigin, getDeloser, getModalizer, getObservedElement, getOutline, getInternal, getRestorer, makeNoOp, isNoOp, getShadowDOMAPI, } from "./Tabster"; | ||
export { createTabster, disposeTabster, forceCleanup, getCrossOrigin, getDeloser, getDummyInputContainer, getGroupper, getInternal, getModalizer, getMover, getObservedElement, getOutline, getRestorer, getShadowDOMAPI, getTabster, isNoOp, makeNoOp, } from "./Tabster"; | ||
export * from "./AttributeHelpers"; | ||
@@ -8,0 +8,0 @@ export * as Types from "./Types"; |
@@ -20,1 +20,2 @@ /*! | ||
export declare function getSelection(ref: Node): Selection | null; | ||
export declare function getElementsByName(referenceElement: HTMLElement, name: string): NodeListOf<HTMLElement>; |
@@ -7,3 +7,3 @@ /*! | ||
export { createShadowMutationObserver as createMutationObserver } from "./ShadowMutationObserver"; | ||
export { appendChild, getActiveElement, getFirstChild, getFirstElementChild, getLastChild, getLastElementChild, getNextElementSibling, getNextSibling, getParentElement, getParentNode, getPreviousElementSibling, getPreviousSibling, getSelection, insertBefore, nodeContains, } from "./DOMFunctions"; | ||
export { appendChild, getActiveElement, getFirstChild, getFirstElementChild, getLastChild, getLastElementChild, getNextElementSibling, getNextSibling, getParentElement, getParentNode, getPreviousElementSibling, getPreviousSibling, getSelection, getElementsByName, insertBefore, nodeContains, } from "./DOMFunctions"; | ||
export { getElementById, querySelector, querySelectorAll, } from "./querySelector"; |
@@ -28,3 +28,3 @@ /*! | ||
*/ | ||
getElement(observedName: string, accessibility?: Types.ObservedElementAccesibility): HTMLElement | null; | ||
getElement(observedName: string, accessibility?: Types.ObservedElementAccessibility): HTMLElement | null; | ||
/** | ||
@@ -38,3 +38,3 @@ * Waits for the element to appear in the DOM and returns it. | ||
*/ | ||
waitElement(observedName: string, timeout: number, accessibility?: Types.ObservedElementAccesibility): Types.ObservedElementAsyncRequest<HTMLElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: Types.ObservedElementAccessibility): Types.ObservedElementAsyncRequest<HTMLElement | null>; | ||
requestFocus(observedName: string, timeout: number): Types.ObservedElementAsyncRequest<boolean>; | ||
@@ -41,0 +41,0 @@ onObservedElementUpdate: (element: HTMLElement) => void; |
@@ -6,2 +6,4 @@ /*! | ||
import * as Types from "./Types"; | ||
import { getDummyInputContainer } from "./Utils"; | ||
export { getDummyInputContainer }; | ||
export declare function forceCleanup(tabster: Types.Tabster): void; | ||
@@ -8,0 +10,0 @@ /** |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import type { TabsterAttributeName } from "./Consts"; | ||
import type { TABSTER_ATTRIBUTE_NAME } from "./Consts"; | ||
export interface HTMLElementWithTabsterFlags extends HTMLElement { | ||
@@ -17,3 +17,3 @@ __tabsterElementFlags?: { | ||
export interface TabsterDOMAttribute { | ||
[TabsterAttributeName]: string | undefined; | ||
[TABSTER_ATTRIBUTE_NAME]: string | undefined; | ||
} | ||
@@ -78,2 +78,3 @@ export interface TabsterCoreProps { | ||
getSelection(ref: Node): Selection | null; | ||
getElementsByName(referenceElement: HTMLElement, name: string): NodeListOf<HTMLElement>; | ||
} | ||
@@ -98,7 +99,4 @@ export type GetTabster = () => TabsterCore; | ||
} | ||
export interface AsyncFocusSources { | ||
EscapeGroupper: 1; | ||
Restorer: 2; | ||
Deloser: 3; | ||
} | ||
import { AsyncFocusSources as _AsyncFocusSources } from "./Consts"; | ||
export type AsyncFocusSources = typeof _AsyncFocusSources; | ||
export type AsyncFocusSource = AsyncFocusSources[keyof AsyncFocusSources]; | ||
@@ -135,10 +133,7 @@ export interface FocusedElementState extends Subscribable<HTMLElement | undefined, FocusedElementDetail>, Disposable { | ||
export interface ObservedElementDetails extends ObservedElementProps { | ||
accessibility?: ObservedElementAccesibility; | ||
accessibility?: ObservedElementAccessibility; | ||
} | ||
export interface ObservedElementAccesibilities { | ||
Any: 0; | ||
Accessible: 1; | ||
Focusable: 2; | ||
} | ||
export type ObservedElementAccesibility = ObservedElementAccesibilities[keyof ObservedElementAccesibilities]; | ||
import { ObservedElementAccessibilities as _ObservedElementAccessibilities } from "./Consts"; | ||
export type ObservedElementAccessibilities = typeof _ObservedElementAccessibilities; | ||
export type ObservedElementAccessibility = ObservedElementAccessibilities[keyof ObservedElementAccessibilities]; | ||
export interface ObservedElementAsyncRequest<T> { | ||
@@ -151,4 +146,4 @@ result: Promise<T>; | ||
export interface ObservedElementAPI extends Subscribable<HTMLElement, ObservedElementDetails>, Disposable, ObservedElementAPIInternal { | ||
getElement(observedName: string, accessibility?: ObservedElementAccesibility): HTMLElement | null; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccesibility): ObservedElementAsyncRequest<HTMLElement | null>; | ||
getElement(observedName: string, accessibility?: ObservedElementAccessibility): HTMLElement | null; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccessibility): ObservedElementAsyncRequest<HTMLElement | null>; | ||
requestFocus(observedName: string, timeout: number): ObservedElementAsyncRequest<boolean>; | ||
@@ -200,4 +195,4 @@ } | ||
export interface CrossOriginObservedElementState extends Subscribable<CrossOriginElement, ObservedElementProps>, Disposable { | ||
getElement(observedName: string, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
getElement(observedName: string, accessibility?: ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
requestFocus(observedName: string, timeout: number): Promise<boolean>; | ||
@@ -233,24 +228,7 @@ } | ||
} | ||
export interface RestoreFocusOrders { | ||
History: 0; | ||
DeloserDefault: 1; | ||
RootDefault: 2; | ||
DeloserFirst: 3; | ||
RootFirst: 4; | ||
} | ||
import { RestoreFocusOrders as _RestoreFocusOrders } from "./Consts"; | ||
export type RestoreFocusOrders = typeof _RestoreFocusOrders; | ||
export type RestoreFocusOrder = RestoreFocusOrders[keyof RestoreFocusOrders]; | ||
export interface DeloserStrategies { | ||
/** | ||
* If the focus is lost, the focus will be restored automatically using all available focus history. | ||
* This is the default strategy. | ||
*/ | ||
Auto: 0; | ||
/** | ||
* If the focus is lost from this Deloser instance, the focus will not be restored automatically. | ||
* The application might listen to the event and restore the focus manually. | ||
* But if it is lost from another Deloser instance, the history of this Deloser could be used finding | ||
* the element to focus. | ||
*/ | ||
Manual: 1; | ||
} | ||
import { DeloserStrategies as _DeloserStrategies } from "./Consts"; | ||
export type DeloserStrategies = typeof _DeloserStrategies; | ||
export type DeloserStrategy = DeloserStrategies[keyof DeloserStrategies]; | ||
@@ -314,2 +292,7 @@ export interface DeloserProps { | ||
} | ||
export interface RadioButtonGroup { | ||
name: string; | ||
buttons: Set<HTMLInputElement>; | ||
checked?: HTMLInputElement; | ||
} | ||
export interface FocusableAcceptElementState { | ||
@@ -337,2 +320,5 @@ container: HTMLElement; | ||
}; | ||
cachedRadioGroups: { | ||
[name: string]: RadioButtonGroup; | ||
}; | ||
isFindAll?: boolean; | ||
@@ -432,7 +418,4 @@ /** | ||
} | ||
export interface Visibilities { | ||
Invisible: 0; | ||
PartiallyVisible: 1; | ||
Visible: 2; | ||
} | ||
import { Visibilities as _Visibilities } from "./Consts"; | ||
export type Visibilities = typeof _Visibilities; | ||
export type Visibility = Visibilities[keyof Visibilities]; | ||
@@ -443,20 +426,13 @@ export interface MoverElementState { | ||
} | ||
export interface MoverDirections { | ||
Both: 0; | ||
Vertical: 1; | ||
Horizontal: 2; | ||
Grid: 3; | ||
GridLinear: 4; | ||
} | ||
export interface RestorerTypes { | ||
Source: 0; | ||
Target: 1; | ||
} | ||
import { RestorerTypes as _RestorerTypes } from "./Consts"; | ||
export type RestorerTypes = typeof _RestorerTypes; | ||
export type RestorerType = RestorerTypes[keyof RestorerTypes]; | ||
import { MoverDirections as _MoverDirections } from "./Consts"; | ||
export type MoverDirections = typeof _MoverDirections; | ||
export type MoverDirection = MoverDirections[keyof MoverDirections]; | ||
export type NextTabbable = { | ||
export interface NextTabbable { | ||
element: HTMLElement | null | undefined; | ||
uncontrolled?: HTMLElement | null; | ||
outOfDOMOrder?: boolean; | ||
}; | ||
} | ||
export interface MoverProps { | ||
@@ -516,20 +492,9 @@ direction?: MoverDirection; | ||
} | ||
export interface MoverKeys { | ||
ArrowUp: 1; | ||
ArrowDown: 2; | ||
ArrowLeft: 3; | ||
ArrowRight: 4; | ||
PageUp: 5; | ||
PageDown: 6; | ||
Home: 7; | ||
End: 8; | ||
} | ||
import { MoverKeys as _MoverKeys } from "./Consts"; | ||
export type MoverKeys = typeof _MoverKeys; | ||
export type MoverKey = MoverKeys[keyof MoverKeys]; | ||
export interface MoverAPI extends MoverAPIInternal, Disposable { | ||
} | ||
export interface GroupperTabbabilities { | ||
Unlimited: 0; | ||
Limited: 1; | ||
LimitedTrapFocus: 2; | ||
} | ||
import { GroupperTabbabilities as _GroupperTabbabilities } from "./Consts"; | ||
export type GroupperTabbabilities = typeof _GroupperTabbabilities; | ||
export type GroupperTabbability = GroupperTabbabilities[keyof GroupperTabbabilities]; | ||
@@ -552,6 +517,4 @@ export interface GroupperProps { | ||
} | ||
export interface GroupperMoveFocusActions { | ||
Enter: 1; | ||
Escape: 2; | ||
} | ||
import { GroupperMoveFocusActions as _GroupperMoveFocusActions } from "./Consts"; | ||
export type GroupperMoveFocusActions = typeof _GroupperMoveFocusActions; | ||
export type GroupperMoveFocusAction = GroupperMoveFocusActions[keyof GroupperMoveFocusActions]; | ||
@@ -594,7 +557,4 @@ export interface GroupperAPI extends GroupperAPIInternal, Disposable { | ||
export type RootConstructor = (tabster: TabsterCore, element: HTMLElement, props: RootProps) => Root; | ||
export interface SysDummyInputsPositions { | ||
Auto: 0; | ||
Inside: 1; | ||
Outside: 2; | ||
} | ||
import { SysDummyInputsPositions as _SysDummyInputsPositions } from "./Consts"; | ||
export type SysDummyInputsPositions = typeof _SysDummyInputsPositions; | ||
export type SysDummyInputsPosition = SysDummyInputsPositions[keyof SysDummyInputsPositions]; | ||
@@ -601,0 +561,0 @@ /** |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { DummyInputObserver as DummyInputObserverInterface, GetWindow, SysProps, TabsterAttributeProps, TabsterCore, TabsterPart as TabsterPartInterface, Visibility, WeakHTMLElement as WeakHTMLElementInterface } from "./Types"; | ||
import { DummyInputObserver as DummyInputObserverInterface, GetWindow, RadioButtonGroup, SysProps, TabsterAttributeProps, TabsterCore, TabsterPart as TabsterPartInterface, Visibility, WeakHTMLElement as WeakHTMLElementInterface } from "./Types"; | ||
interface HTMLElementWithBoundingRectCacheId extends HTMLElement { | ||
@@ -16,5 +16,2 @@ __tabsterCacheId?: string; | ||
} | ||
export interface HTMLElementWithDummyContainer extends HTMLElement { | ||
__tabsterDummyContainer?: WeakHTMLElement; | ||
} | ||
export interface TabsterDOMRect { | ||
@@ -127,6 +124,6 @@ bottom: number; | ||
export declare const DummyInputManagerPriorities: { | ||
Root: number; | ||
Modalizer: number; | ||
Mover: number; | ||
Groupper: number; | ||
readonly Root: 1; | ||
readonly Modalizer: 2; | ||
readonly Mover: 3; | ||
readonly Groupper: 4; | ||
}; | ||
@@ -177,2 +174,10 @@ export declare class DummyInputManager { | ||
export declare function isDisplayNone(element: HTMLElement): boolean; | ||
export declare function isRadio(element: HTMLElement): boolean; | ||
export declare function getRadioButtonGroup(element: HTMLElement): RadioButtonGroup | undefined; | ||
/** | ||
* If the passed element is Tabster dummy input, returns the container element this dummy input belongs to. | ||
* @param element Element to check for being dummy input. | ||
* @returns Dummy input container element (if the passed element is a dummy input) or null. | ||
*/ | ||
export declare function getDummyInputContainer(element: HTMLElement | null | undefined): HTMLElement | null; | ||
export {}; |
@@ -5,18 +5,77 @@ /*! | ||
*/ | ||
declare const TABSTER_ATTRIBUTE_NAME: "data-tabster"; | ||
declare const TABSTER_DUMMY_INPUT_ATTRIBUTE_NAME: "data-tabster-dummy"; | ||
declare const FOCUSABLE_SELECTOR: string; | ||
declare const AsyncFocusSources$1: { | ||
readonly EscapeGroupper: 1; | ||
readonly Restorer: 2; | ||
readonly Deloser: 3; | ||
}; | ||
declare const ObservedElementAccessibilities$1: { | ||
readonly Any: 0; | ||
readonly Accessible: 1; | ||
readonly Focusable: 2; | ||
}; | ||
declare const RestoreFocusOrders$1: { | ||
readonly History: 0; | ||
readonly DeloserDefault: 1; | ||
readonly RootDefault: 2; | ||
readonly DeloserFirst: 3; | ||
readonly RootFirst: 4; | ||
}; | ||
declare const DeloserStrategies$1: { | ||
/** | ||
* If the focus is lost, the focus will be restored automatically using all available focus history. | ||
* This is the default strategy. | ||
*/ | ||
readonly Auto: 0; | ||
/** | ||
* If the focus is lost from this Deloser instance, the focus will not be restored automatically. | ||
* The application might listen to the event and restore the focus manually. | ||
* But if it is lost from another Deloser instance, the history of this Deloser could be used finding | ||
* the element to focus. | ||
*/ | ||
readonly Manual: 1; | ||
}; | ||
declare const Visibilities$1: { | ||
readonly Invisible: 0; | ||
readonly PartiallyVisible: 1; | ||
readonly Visible: 2; | ||
}; | ||
declare const RestorerTypes$1: { | ||
readonly Source: 0; | ||
readonly Target: 1; | ||
}; | ||
declare const MoverDirections$1: { | ||
readonly Both: 0; | ||
readonly Vertical: 1; | ||
readonly Horizontal: 2; | ||
readonly Grid: 3; | ||
readonly GridLinear: 4; | ||
}; | ||
declare const MoverKeys$1: { | ||
readonly ArrowUp: 1; | ||
readonly ArrowDown: 2; | ||
readonly ArrowLeft: 3; | ||
readonly ArrowRight: 4; | ||
readonly PageUp: 5; | ||
readonly PageDown: 6; | ||
readonly Home: 7; | ||
readonly End: 8; | ||
}; | ||
declare const GroupperTabbabilities$1: { | ||
readonly Unlimited: 0; | ||
readonly Limited: 1; | ||
readonly LimitedTrapFocus: 2; | ||
}; | ||
declare const GroupperMoveFocusActions$1: { | ||
readonly Enter: 1; | ||
readonly Escape: 2; | ||
}; | ||
declare const SysDummyInputsPositions$1: { | ||
readonly Auto: 0; | ||
readonly Inside: 1; | ||
readonly Outside: 2; | ||
}; | ||
declare const TabsterAttributeName: "data-tabster"; | ||
declare const TabsterDummyInputAttributeName: "data-tabster-dummy"; | ||
declare const FocusableSelector: string; | ||
declare const AsyncFocusSources$1: AsyncFocusSources; | ||
declare const ObservedElementAccesibilities$1: ObservedElementAccesibilities; | ||
declare const RestoreFocusOrders$1: RestoreFocusOrders; | ||
declare const DeloserStrategies$1: DeloserStrategies; | ||
declare const Visibilities$1: Visibilities; | ||
declare const RestorerTypes$1: RestorerTypes; | ||
declare const MoverDirections$1: MoverDirections; | ||
declare const MoverKeys$1: MoverKeys; | ||
declare const GroupperTabbabilities$1: GroupperTabbabilities; | ||
declare const GroupperMoveFocusActions$1: GroupperMoveFocusActions; | ||
declare const SysDummyInputsPositions$1: SysDummyInputsPositions; | ||
/*! | ||
@@ -37,3 +96,3 @@ * Copyright (c) Microsoft Corporation. All rights reserved. | ||
interface TabsterDOMAttribute { | ||
[TabsterAttributeName]: string | undefined; | ||
[TABSTER_ATTRIBUTE_NAME]: string | undefined; | ||
} | ||
@@ -98,2 +157,3 @@ interface TabsterCoreProps { | ||
getSelection(ref: Node): Selection | null; | ||
getElementsByName(referenceElement: HTMLElement, name: string): NodeListOf<HTMLElement>; | ||
} | ||
@@ -118,7 +178,4 @@ type GetTabster = () => TabsterCore; | ||
} | ||
interface AsyncFocusSources { | ||
EscapeGroupper: 1; | ||
Restorer: 2; | ||
Deloser: 3; | ||
} | ||
type AsyncFocusSources = typeof AsyncFocusSources$1; | ||
type AsyncFocusSource = AsyncFocusSources[keyof AsyncFocusSources]; | ||
@@ -155,10 +212,7 @@ interface FocusedElementState extends Subscribable<HTMLElement | undefined, FocusedElementDetail>, Disposable { | ||
interface ObservedElementDetails extends ObservedElementProps { | ||
accessibility?: ObservedElementAccesibility; | ||
accessibility?: ObservedElementAccessibility; | ||
} | ||
interface ObservedElementAccesibilities { | ||
Any: 0; | ||
Accessible: 1; | ||
Focusable: 2; | ||
} | ||
type ObservedElementAccesibility = ObservedElementAccesibilities[keyof ObservedElementAccesibilities]; | ||
type ObservedElementAccessibilities = typeof ObservedElementAccessibilities$1; | ||
type ObservedElementAccessibility = ObservedElementAccessibilities[keyof ObservedElementAccessibilities]; | ||
interface ObservedElementAsyncRequest<T> { | ||
@@ -171,4 +225,4 @@ result: Promise<T>; | ||
interface ObservedElementAPI extends Subscribable<HTMLElement, ObservedElementDetails>, Disposable, ObservedElementAPIInternal { | ||
getElement(observedName: string, accessibility?: ObservedElementAccesibility): HTMLElement | null; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccesibility): ObservedElementAsyncRequest<HTMLElement | null>; | ||
getElement(observedName: string, accessibility?: ObservedElementAccessibility): HTMLElement | null; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccessibility): ObservedElementAsyncRequest<HTMLElement | null>; | ||
requestFocus(observedName: string, timeout: number): ObservedElementAsyncRequest<boolean>; | ||
@@ -220,4 +274,4 @@ } | ||
interface CrossOriginObservedElementState extends Subscribable<CrossOriginElement, ObservedElementProps>, Disposable { | ||
getElement(observedName: string, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>; | ||
getElement(observedName: string, accessibility?: ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
waitElement(observedName: string, timeout: number, accessibility?: ObservedElementAccessibility): Promise<CrossOriginElement | null>; | ||
requestFocus(observedName: string, timeout: number): Promise<boolean>; | ||
@@ -253,24 +307,7 @@ } | ||
} | ||
interface RestoreFocusOrders { | ||
History: 0; | ||
DeloserDefault: 1; | ||
RootDefault: 2; | ||
DeloserFirst: 3; | ||
RootFirst: 4; | ||
} | ||
type RestoreFocusOrders = typeof RestoreFocusOrders$1; | ||
type RestoreFocusOrder = RestoreFocusOrders[keyof RestoreFocusOrders]; | ||
interface DeloserStrategies { | ||
/** | ||
* If the focus is lost, the focus will be restored automatically using all available focus history. | ||
* This is the default strategy. | ||
*/ | ||
Auto: 0; | ||
/** | ||
* If the focus is lost from this Deloser instance, the focus will not be restored automatically. | ||
* The application might listen to the event and restore the focus manually. | ||
* But if it is lost from another Deloser instance, the history of this Deloser could be used finding | ||
* the element to focus. | ||
*/ | ||
Manual: 1; | ||
} | ||
type DeloserStrategies = typeof DeloserStrategies$1; | ||
type DeloserStrategy = DeloserStrategies[keyof DeloserStrategies]; | ||
@@ -334,2 +371,7 @@ interface DeloserProps { | ||
} | ||
interface RadioButtonGroup { | ||
name: string; | ||
buttons: Set<HTMLInputElement>; | ||
checked?: HTMLInputElement; | ||
} | ||
interface FocusableAcceptElementState { | ||
@@ -357,2 +399,5 @@ container: HTMLElement; | ||
}; | ||
cachedRadioGroups: { | ||
[name: string]: RadioButtonGroup; | ||
}; | ||
isFindAll?: boolean; | ||
@@ -452,7 +497,4 @@ /** | ||
} | ||
interface Visibilities { | ||
Invisible: 0; | ||
PartiallyVisible: 1; | ||
Visible: 2; | ||
} | ||
type Visibilities = typeof Visibilities$1; | ||
type Visibility = Visibilities[keyof Visibilities]; | ||
@@ -463,20 +505,13 @@ interface MoverElementState { | ||
} | ||
interface MoverDirections { | ||
Both: 0; | ||
Vertical: 1; | ||
Horizontal: 2; | ||
Grid: 3; | ||
GridLinear: 4; | ||
} | ||
interface RestorerTypes { | ||
Source: 0; | ||
Target: 1; | ||
} | ||
type RestorerTypes = typeof RestorerTypes$1; | ||
type RestorerType = RestorerTypes[keyof RestorerTypes]; | ||
type MoverDirections = typeof MoverDirections$1; | ||
type MoverDirection = MoverDirections[keyof MoverDirections]; | ||
type NextTabbable = { | ||
interface NextTabbable { | ||
element: HTMLElement | null | undefined; | ||
uncontrolled?: HTMLElement | null; | ||
outOfDOMOrder?: boolean; | ||
}; | ||
} | ||
interface MoverProps { | ||
@@ -536,20 +571,9 @@ direction?: MoverDirection; | ||
} | ||
interface MoverKeys { | ||
ArrowUp: 1; | ||
ArrowDown: 2; | ||
ArrowLeft: 3; | ||
ArrowRight: 4; | ||
PageUp: 5; | ||
PageDown: 6; | ||
Home: 7; | ||
End: 8; | ||
} | ||
type MoverKeys = typeof MoverKeys$1; | ||
type MoverKey = MoverKeys[keyof MoverKeys]; | ||
interface MoverAPI extends MoverAPIInternal, Disposable { | ||
} | ||
interface GroupperTabbabilities { | ||
Unlimited: 0; | ||
Limited: 1; | ||
LimitedTrapFocus: 2; | ||
} | ||
type GroupperTabbabilities = typeof GroupperTabbabilities$1; | ||
type GroupperTabbability = GroupperTabbabilities[keyof GroupperTabbabilities]; | ||
@@ -570,6 +594,4 @@ interface GroupperProps { | ||
type GroupperConstructor = (tabster: TabsterCore, element: HTMLElement, props: GroupperProps) => Groupper; | ||
interface GroupperMoveFocusActions { | ||
Enter: 1; | ||
Escape: 2; | ||
} | ||
type GroupperMoveFocusActions = typeof GroupperMoveFocusActions$1; | ||
type GroupperMoveFocusAction = GroupperMoveFocusActions[keyof GroupperMoveFocusActions]; | ||
@@ -614,7 +636,4 @@ interface GroupperAPI extends GroupperAPIInternal, Disposable { | ||
type RootConstructor = (tabster: TabsterCore, element: HTMLElement, props: RootProps) => Root; | ||
interface SysDummyInputsPositions { | ||
Auto: 0; | ||
Inside: 1; | ||
Outside: 2; | ||
} | ||
type SysDummyInputsPositions = typeof SysDummyInputsPositions$1; | ||
type SysDummyInputsPosition = SysDummyInputsPositions[keyof SysDummyInputsPositions]; | ||
@@ -835,4 +854,4 @@ /** | ||
type Types_d_ObservedElementDetails = ObservedElementDetails; | ||
type Types_d_ObservedElementAccesibilities = ObservedElementAccesibilities; | ||
type Types_d_ObservedElementAccesibility = ObservedElementAccesibility; | ||
type Types_d_ObservedElementAccessibilities = ObservedElementAccessibilities; | ||
type Types_d_ObservedElementAccessibility = ObservedElementAccessibility; | ||
type Types_d_ObservedElementAsyncRequest<T> = ObservedElementAsyncRequest<T>; | ||
@@ -863,2 +882,3 @@ type Types_d_ObservedElementAPI = ObservedElementAPI; | ||
type Types_d_FocusableProps = FocusableProps; | ||
type Types_d_RadioButtonGroup = RadioButtonGroup; | ||
type Types_d_FocusableAcceptElementState = FocusableAcceptElementState; | ||
@@ -877,5 +897,5 @@ type Types_d_FindFocusableProps = FindFocusableProps; | ||
type Types_d_MoverElementState = MoverElementState; | ||
type Types_d_MoverDirections = MoverDirections; | ||
type Types_d_RestorerTypes = RestorerTypes; | ||
type Types_d_RestorerType = RestorerType; | ||
type Types_d_MoverDirections = MoverDirections; | ||
type Types_d_MoverDirection = MoverDirection; | ||
@@ -964,4 +984,4 @@ type Types_d_NextTabbable = NextTabbable; | ||
Types_d_ObservedElementDetails as ObservedElementDetails, | ||
Types_d_ObservedElementAccesibilities as ObservedElementAccesibilities, | ||
Types_d_ObservedElementAccesibility as ObservedElementAccesibility, | ||
Types_d_ObservedElementAccessibilities as ObservedElementAccessibilities, | ||
Types_d_ObservedElementAccessibility as ObservedElementAccessibility, | ||
Types_d_ObservedElementAsyncRequest as ObservedElementAsyncRequest, | ||
@@ -992,2 +1012,3 @@ Types_d_ObservedElementAPI as ObservedElementAPI, | ||
Types_d_FocusableProps as FocusableProps, | ||
Types_d_RadioButtonGroup as RadioButtonGroup, | ||
Types_d_FocusableAcceptElementState as FocusableAcceptElementState, | ||
@@ -1006,5 +1027,5 @@ Types_d_FindFocusableProps as FindFocusableProps, | ||
Types_d_MoverElementState as MoverElementState, | ||
Types_d_MoverDirections as MoverDirections, | ||
Types_d_RestorerTypes as RestorerTypes, | ||
Types_d_RestorerType as RestorerType, | ||
Types_d_MoverDirections as MoverDirections, | ||
Types_d_MoverDirection as MoverDirection, | ||
@@ -1079,2 +1100,14 @@ Types_d_NextTabbable as NextTabbable, | ||
/** | ||
* If the passed element is Tabster dummy input, returns the container element this dummy input belongs to. | ||
* @param element Element to check for being dummy input. | ||
* @returns Dummy input container element (if the passed element is a dummy input) or null. | ||
*/ | ||
declare function getDummyInputContainer(element: HTMLElement | null | undefined): HTMLElement | null; | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
declare function forceCleanup(tabster: Tabster): void; | ||
@@ -1176,15 +1209,15 @@ /** | ||
} | ||
type MoverMoveFocusEventDetail = { | ||
interface MoverMoveFocusEventDetail { | ||
key: MoverKey; | ||
}; | ||
} | ||
interface MoverMemorizedElementEventDetail { | ||
memorizedElement: HTMLElement | undefined; | ||
} | ||
type GroupperMoveFocusEventDetail = { | ||
interface GroupperMoveFocusEventDetail { | ||
action: GroupperMoveFocusAction; | ||
}; | ||
type ModalizerEventDetail = { | ||
} | ||
interface ModalizerEventDetail { | ||
id: string; | ||
element: HTMLElement; | ||
}; | ||
} | ||
interface RootFocusEventDetail { | ||
@@ -1346,2 +1379,2 @@ element: HTMLElement; | ||
export { AsyncFocusSources$1 as AsyncFocusSources, DeloserFocusLostEvent, DeloserFocusLostEventName, DeloserRestoreFocusEvent, DeloserRestoreFocusEventName, DeloserStrategies$1 as DeloserStrategies, EventsTypes_d as EventsTypes, FocusableSelector, GroupperMoveFocusActions$1 as GroupperMoveFocusActions, GroupperMoveFocusEvent, GroupperMoveFocusEventName, GroupperTabbabilities$1 as GroupperTabbabilities, ModalizerActiveEvent, ModalizerActiveEventName, ModalizerFocusInEventName, ModalizerFocusOutEventName, ModalizerInactiveEvent, ModalizerInactiveEventName, MoverDirections$1 as MoverDirections, MoverKeys$1 as MoverKeys, MoverMemorizedElementEvent, MoverMemorizedElementEventName, MoverMoveFocusEvent, MoverMoveFocusEventName, MoverStateEvent, MoverStateEventName, ObservedElementAccesibilities$1 as ObservedElementAccesibilities, RestoreFocusOrders$1 as RestoreFocusOrders, RestorerRestoreFocusEvent, RestorerRestoreFocusEventName, RestorerTypes$1 as RestorerTypes, RootBlurEvent, RootBlurEventName, RootFocusEvent, RootFocusEventName, SysDummyInputsPositions$1 as SysDummyInputsPositions, TabsterAttributeName, TabsterCustomEvent, TabsterDummyInputAttributeName, TabsterFocusInEvent, TabsterFocusInEventName, TabsterFocusOutEvent, TabsterFocusOutEventName, TabsterMoveFocusEvent, TabsterMoveFocusEventName, Types_d as Types, Visibilities$1 as Visibilities, createTabster, dispatchGroupperMoveFocusEvent, dispatchMoverMemorizedElementEvent, dispatchMoverMoveFocusEvent, disposeTabster, forceCleanup, getCrossOrigin, getDeloser, getGroupper, getInternal, getModalizer, getMover, getObservedElement, getOutline, getRestorer, getShadowDOMAPI, getTabster, getTabsterAttribute, isNoOp, makeNoOp, mergeTabsterProps, setTabsterAttribute }; | ||
export { AsyncFocusSources$1 as AsyncFocusSources, DeloserFocusLostEvent, DeloserFocusLostEventName, DeloserRestoreFocusEvent, DeloserRestoreFocusEventName, DeloserStrategies$1 as DeloserStrategies, EventsTypes_d as EventsTypes, FOCUSABLE_SELECTOR, GroupperMoveFocusActions$1 as GroupperMoveFocusActions, GroupperMoveFocusEvent, GroupperMoveFocusEventName, GroupperTabbabilities$1 as GroupperTabbabilities, ModalizerActiveEvent, ModalizerActiveEventName, ModalizerFocusInEventName, ModalizerFocusOutEventName, ModalizerInactiveEvent, ModalizerInactiveEventName, MoverDirections$1 as MoverDirections, MoverKeys$1 as MoverKeys, MoverMemorizedElementEvent, MoverMemorizedElementEventName, MoverMoveFocusEvent, MoverMoveFocusEventName, MoverStateEvent, MoverStateEventName, ObservedElementAccessibilities$1 as ObservedElementAccessibilities, RestoreFocusOrders$1 as RestoreFocusOrders, RestorerRestoreFocusEvent, RestorerRestoreFocusEventName, RestorerTypes$1 as RestorerTypes, RootBlurEvent, RootBlurEventName, RootFocusEvent, RootFocusEventName, SysDummyInputsPositions$1 as SysDummyInputsPositions, TABSTER_ATTRIBUTE_NAME, TABSTER_DUMMY_INPUT_ATTRIBUTE_NAME, TabsterCustomEvent, TabsterFocusInEvent, TabsterFocusInEventName, TabsterFocusOutEvent, TabsterFocusOutEventName, TabsterMoveFocusEvent, TabsterMoveFocusEventName, Types_d as Types, Visibilities$1 as Visibilities, createTabster, dispatchGroupperMoveFocusEvent, dispatchMoverMemorizedElementEvent, dispatchMoverMoveFocusEvent, disposeTabster, forceCleanup, getCrossOrigin, getDeloser, getDummyInputContainer, getGroupper, getInternal, getModalizer, getMover, getObservedElement, getOutline, getRestorer, getShadowDOMAPI, getTabster, getTabsterAttribute, isNoOp, makeNoOp, mergeTabsterProps, setTabsterAttribute }; |
{ | ||
"name": "tabster", | ||
"version": "8.0.0-canary.0", | ||
"version": "8.0.0", | ||
"description": "Focus Management Tools for Web", | ||
@@ -5,0 +5,0 @@ "author": "Marat Abdullin <marata@microsoft.com>", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2276904
19858
1