react-native-ui-blueprint
Version:
To develop pixel perfect apps.
79 lines (78 loc) • 2.16 kB
TypeScript
import React from 'react';
import { ImageRequireSource, ImageURISource } from 'react-native';
import { GridLines, Guides } from "./Grid";
import { ImageInfo, ImageInfoAsync } from "./ImageSelect";
export declare type BlueprintProps = {
/**
* Desabilita completamente o Blueprint
*/
disabled?: boolean;
/**
* Add guides on screen. Percentual, points or pixel. Ex. v50%, h50%, v10px, v10p
*/
guides?: Guides | false;
/**
* Allows you to add regularly spaced marker lines on the screen
*/
grid?: GridLines | false;
/**
* Server images
*/
imagesAsync?: () => Promise<Array<ImageInfoAsync>>;
/**
* Add image to pixel-perfect
*/
images?: Array<ImageURISource | ImageRequireSource>;
};
declare type BlueprintState = {
zoom: boolean;
ruler: boolean;
gridAlign: 'side' | 'center' | 'left' | 'right' | 'hidden';
showSelectImageModal: boolean;
image?: ImageInfo;
packagerRunning: boolean;
};
/**
* Add guidelines on screen
*/
export default class Blueprint extends React.PureComponent<BlueprintProps, BlueprintState> {
state: BlueprintState;
private interacting;
private zoomXValue;
private zoomYValue;
private zoomScaleValue;
private zoomX;
private zoomY;
private zoomScale;
private zoomXInit;
private zoomYInit;
private zoomScaleInit;
private imageScaleValue;
private imageOpacityValue;
private imageXValue;
private imageYValue;
private imageX;
private imageY;
private imageScale;
private imageOpacity;
private imageXInit;
private imageYInit;
private imageScaleInit;
private imageOpacityInit;
private animatedVisibility;
private visible;
private ruler?;
private timeout;
private zoomScalePan;
private zoomXYPan;
private imageOpacityPan;
private imageScalePan;
private imageXYPan;
/**
* Schedule to hide Buttons after 4 seconds
*/
private hideSchedule;
componentDidMount(): void;
render(): {} | null | undefined;
}
export {};