@leafer/interface
Advanced tools
+1
-1
| { | ||
| "name": "@leafer/interface", | ||
| "version": "1.0.0-beta.7", | ||
| "version": "1.0.0-beta.8", | ||
| "description": "@leafer/interface", | ||
@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan", |
@@ -66,2 +66,3 @@ import { ILeaf } from '../display/ILeaf' | ||
| waitViewLoaded(fun: IFunction): void | ||
| receiveEvent(event: IObject): void | ||
| } | ||
@@ -68,0 +69,0 @@ |
@@ -149,2 +149,3 @@ import { IObject } from '../data/IData' | ||
| bounds: IBounds | ||
| clientBounds: IBoundsData | ||
@@ -155,4 +156,4 @@ config: ILeaferCanvasConfig | ||
| view: unknown | ||
| parentView: unknown | ||
| view: any | ||
| parentView: any | ||
@@ -180,2 +181,3 @@ unreal?: boolean | ||
| updateViewSize(): void | ||
| updateClientBounds(): void | ||
@@ -193,4 +195,7 @@ // other | ||
| export type IHitCanvas = ILeaferCanvas | ||
| export interface IHitCanvas extends ILeaferCanvas { | ||
| } | ||
| export interface IBlobFunction { | ||
@@ -197,0 +202,0 @@ (blob: IBlob | null): void |
| import { IExportFileType, IExportImageType } from '../file/IFileType' | ||
| export type ICanvasType = 'skia' | 'canvas' | ||
| export type ICanvasType = 'skia' | 'canvas' | 'wx' | ||
@@ -5,0 +5,0 @@ export interface ISkiaCanvas { |
@@ -161,2 +161,4 @@ import { ILeafer } from '../app/ILeafer' | ||
| __complex?: boolean // 外观是否复杂 | ||
| __naturalWidth?: number | ||
| __naturalHeight?: number | ||
| } | ||
@@ -163,0 +165,0 @@ |
+15
-2
@@ -5,3 +5,3 @@ import { IEventer } from './IEventer' | ||
| import { ILeaf } from '../display/ILeaf' | ||
| import { IScreenSizeData } from '../math/IMath' | ||
| import { IScreenSizeData, IPointData } from '../math/IMath' | ||
@@ -99,2 +99,15 @@ export interface IEvent { | ||
| } | ||
| export type TransformMode = 'move' | 'zoom' | 'rotate' | ||
| export type TransformMode = 'move' | 'zoom' | 'rotate' | ||
| export interface IMultiTouchData { | ||
| move: IPointData, | ||
| scale: number, | ||
| angle: number, | ||
| center: IPointData | ||
| } | ||
| export interface IKeepTouchData { | ||
| from: IPointData | ||
| to: IPointData | ||
| } |
@@ -5,2 +5,4 @@ import { IObject } from '../data/IData' | ||
| import { ILeaferImage } from '../image/ILeaferImage' | ||
| import { ILeaf } from '../display/ILeaf' | ||
| import { IPointData } from '../math/IMath' | ||
@@ -26,2 +28,5 @@ export interface IUIEvent extends IEvent { | ||
| origin?: IObject | ||
| getInner?(target?: ILeaf): IPointData | ||
| getLocal?(target?: ILeaf): IPointData | ||
| } | ||
@@ -47,2 +52,5 @@ | ||
| totalY: number | ||
| getInnerMove?(target?: ILeaf): IPointData | ||
| getLocalMove?(target?: ILeaf): IPointData | ||
| } | ||
@@ -49,0 +57,0 @@ |
+2
-2
@@ -33,3 +33,3 @@ export { IApp } from './app/IApp' | ||
| export { IControl } from './control/IControl' | ||
| export { IPlatform } from './platform/IPlatform' | ||
| export { IPlatform, IMiniapp, IMiniappSelect, IMiniappSizeView } from './platform/IPlatform' | ||
| export { IPlugin } from './plugin/IPlugin' | ||
@@ -48,3 +48,3 @@ | ||
| export { InnerId, IEventer, IEventListener, IEventListenerOptions, IEventListenerMap, IEventListenerItem, IEventListenerId } from './event/IEventer' | ||
| export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, ITransformEvent, ITransformEventData, TransformMode } from './event/IEvent' | ||
| export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, ITransformEvent, ITransformEventData, TransformMode, IMultiTouchData, IKeepTouchData } from './event/IEvent' | ||
| export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IKeyEvent, IImageEvent } from './event/IUIEvent' | ||
@@ -51,0 +51,0 @@ export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, IPointerConfig } from './interaction/IInteraction' |
@@ -9,2 +9,4 @@ import { INumberFunction, IPointDataFunction } from '../function/IFunction' | ||
| import { IControl } from '../control/IControl' | ||
| import { IKeepTouchData } from '../event/IEvent' | ||
| import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
@@ -27,2 +29,4 @@ export interface IInteraction extends IControl { | ||
| receive(event: any): void | ||
| pointerDown(data: IPointerEvent): void | ||
@@ -34,2 +38,4 @@ pointerMove(data: IPointerEvent): void | ||
| multiTouch(data: IUIEvent, list: IKeepTouchData[]): void | ||
| move(data: IMoveEvent): void | ||
@@ -42,5 +48,4 @@ zoom(data: IZoomEvent): void | ||
| export interface IInteractionCanvas { | ||
| bounds: IBounds | ||
| view: unknown | ||
| export interface IInteractionCanvas extends ILeaferCanvas { | ||
| } | ||
@@ -47,0 +52,0 @@ |
@@ -5,2 +5,4 @@ import { IFunction } from '../function/IFunction' | ||
| import { IExportFileType, IExportImageType } from '../file/IFileType' | ||
| import { IBoundsData, ISizeData } from '../math/IMath' | ||
| import { IObject } from '../data/IData' | ||
@@ -26,3 +28,20 @@ export interface IPlatform { | ||
| loadImage(url: string): Promise<any> | ||
| } | ||
| }, | ||
| miniapp?: IMiniapp | ||
| } | ||
| export interface IMiniappSelect extends IObject { } | ||
| export interface IMiniappSizeView extends ISizeData { | ||
| view: any | ||
| } | ||
| export interface IMiniapp { | ||
| select(name: string): IMiniappSelect | ||
| getBounds(select: IMiniappSelect): Promise<IBoundsData> | ||
| getSizeView(select: IMiniappSelect): Promise<IMiniappSizeView> | ||
| onWindowResize(fun: IFunction): void | ||
| offWindowResize(fun: IFunction): void | ||
| saveToAlbum(path: string): Promise<any> | ||
| } |
@@ -0,1 +1,2 @@ | ||
| import { ILeafer } from '../app/ILeafer' | ||
| import { IObject } from '../data/IData' | ||
@@ -8,2 +9,3 @@ | ||
| run(LeaferUI: IObject, config: IObject): void | ||
| onLeafer?(leafer: ILeafer): void | ||
| } |
69682
2.28%1764
2.44%