intentful
Version:
Create Custom Skills with less headache
87 lines (86 loc) • 3.02 kB
TypeScript
import { LabeledRequestHandler } from '../../../skill/models';
import { Calculable } from '../../../types';
import { Command, CommandModel, CommandProps } from '../../commands';
import { Gesture, GestureModel, GestureProps } from '../../gestures';
import { ImageAlign, KeyboardHandlerProps, Scale, Source } from '../../interfaces';
import { APLBaseComponentModel, APLBaseComponentProps, APLComponent } from '../component';
export interface APLVectorGraphicModel extends APLBaseComponentModel, APLVectorGraphicProps {
}
export interface APLVectorGraphicProps extends APLBaseComponentProps {
/**
* How the graphic should be aligned in the current box
*/
align?: ImageAlign;
/**
* The URL or direct reference to a vector graphic.
*/
source?: Source;
/**
* How the image should be scaled to fill the current box.
*/
scale?: Scale;
/**
* Command to execute when the component receives focus.
*/
onFocus?: Command<CommandModel, CommandProps>[];
/**
* Command to execute when the component loses focus.
*/
onBlur?: Command<CommandModel, CommandProps>[];
handleKeyDown?: KeyboardHandlerProps[];
handleKeyUp?: KeyboardHandlerProps[];
/**
* The component to focus if the down key is pressed.
*/
nextFocusDown?: Calculable<string>;
/**
* The component to focus if the tab key is pressed.
*/
nextFocusForward?: Calculable<string>;
/**
* The component to focus if the left key is pressed.
*/
nextFocusLeft?: Calculable<string>;
/**
* The component to focus if the right key is pressed.
*/
nextFocusRight?: Calculable<string>;
/**
* The component to focus if the up key is pressed.
*/
nextFocusUp?: Calculable<string>;
gestures?: Gesture<GestureModel, GestureProps>[];
/**
* Commands to execute when a gesture takes over the pointer.
*/
onCancel?: Command<CommandModel, CommandProps>[];
/**
* Commands to execute when a pointer down event occurs.
*/
onDown?: Command<CommandModel, CommandProps>[];
/**
* Commands to execute while moving the pointer.
*/
onMove?: Command<CommandModel, CommandProps>[];
/**
* Commands to execute for a pointer down followed by an up.
*/
onPress?: Command<CommandModel, CommandProps>[];
/**
* Commands to execute when releasing the pointer.
*/
onUp?: Command<CommandModel, CommandProps>[];
/**
* Command(s) to execute when all sources have loaded
*/
onLoad?: Command<CommandModel, CommandProps>[];
/**
* Command(s) to execute if any source fails to load
*/
onFail?: Command<CommandModel, CommandProps>[];
}
export declare class APLVectorGraphic extends APLComponent<APLVectorGraphicModel, APLVectorGraphicProps> {
constructor(props: APLVectorGraphicProps);
componentSpecificModel(): APLVectorGraphicModel;
componentSpecificRequestHandlers(): LabeledRequestHandler[];
}