You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/interface

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/interface - npm Package Compare versions

Comparing version
1.0.0-rc.6
to
1.0.0-rc.7
+1
-1
package.json
{
"name": "@leafer/interface",
"version": "1.0.0-rc.6",
"version": "1.0.0-rc.7",
"description": "@leafer/interface",

@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan",

@@ -1,6 +0,6 @@

import { ILeafer } from './ILeafer'
import { ILeaferBase } from './ILeafer'
export interface IApp extends ILeafer {
children: ILeafer[]
export interface IAppBase extends ILeaferBase {
children: ILeaferBase[]
realCanvas: boolean
}

@@ -14,3 +14,3 @@ import { ILeaf } from '../display/ILeaf'

import { IZoomView } from '../display/IView'
import { IApp } from './IApp'
import { IAppBase } from './IApp'
import { ILeaferImage, ILeaferImageConfig } from '../image/ILeaferImage'

@@ -28,8 +28,3 @@ import { IControl } from '../control/IControl'

export interface ILeafer extends IZoomView, IControl {
readonly isApp: boolean
readonly app: ILeafer
parent?: IApp
export interface ILeaferAttrData {
running: boolean

@@ -40,2 +35,3 @@ created: boolean

viewCompleted: boolean
layoutLocked: boolean

@@ -68,3 +64,10 @@ pixelRatio: number

init(userConfig?: ILeaferConfig, parentApp?: IApp): void
init(userConfig?: ILeaferConfig, parentApp?: IAppBase): void
start(): void
stop(): void
unlockLayout(): void
lockLayout(): void
setZoomLayer(zoomLayer: ILeaf): void

@@ -80,10 +83,16 @@ forceFullRender(): void

export interface ILeaferBase extends IZoomView, IControl, ILeaferAttrData {
readonly isApp: boolean
readonly app: ILeaferBase
parent?: IAppBase
}
export interface ILeaferTypeCreator {
list: ILeaferTypeList
register(name: string, fn: ILeaferTypeFunction): void
run(name: string, leafer: ILeafer): void
run(name: string, leafer: ILeaferBase): void
}
export interface ILeaferTypeFunction {
(leafer: ILeafer): void
(leafer: ILeaferBase): void
}

@@ -106,2 +115,4 @@

interaction?(target: ILeaf, canvas: IInteractionCanvas, selector: ISelector, options?: IInteractionConfig): IInteraction
editor?(options?: IObject): ILeaf
}

@@ -108,0 +119,0 @@

@@ -186,3 +186,3 @@ import { IObject } from '../data/IData'

isSameSize(options: ILeaferCanvasConfig): boolean
getSameCanvas(useSameWorldTransform?: boolean): ILeaferCanvas
getSameCanvas(useSameWorldTransform?: boolean, useSameSmooth?: boolean): ILeaferCanvas
getBiggerCanvas(addWidth: number, addHeight: number): ILeaferCanvas

@@ -189,0 +189,0 @@ recycle(): void

@@ -1,6 +0,5 @@

export type __Number = number // number | string will convert to number
export type __Boolean = boolean // boolean | string will convert to boolean
export type __String = string // string | other will convert to string
export type __Object = IObject // will convert to object
export type __Value = __Number | __Boolean | __String | __Object //
export type INumber = number // number | string will convert to number
export type IBoolean = boolean // boolean | string will convert to boolean
export type IString = string // string | other will convert to string
export type IValue = INumber | IBoolean | IString | IObject //
export type ITimer = any

@@ -7,0 +6,0 @@

import { ILeaf, ILeafComputedData } from '../display/ILeaf'
import { IObject } from './IData'
export interface IDataProcessor extends IObject {
export interface IDataProcessor {
__leaf: ILeaf

@@ -13,2 +13,3 @@ __input: IObject

__get(name: string): any
__getData(): IObject

@@ -18,3 +19,3 @@ __setInput(name: string, value: any): void

__removeInput(name: string): void
__getInputData(options?: ILeafDataOptions): IObject
__getInputData(): IObject

@@ -21,0 +22,0 @@ __setMiddle(name: string, value: any): void

@@ -21,9 +21,12 @@ import { ILeaf } from '../display/ILeaf'

indexOf(leaf: ILeaf): number
unshift(leaf: ILeaf): void
pushList(list: ILeaf[]): void
push(leaf: ILeaf): void
sort(reverse?: boolean): void
add(leaf: ILeaf): void
addAt(leaf: ILeaf, index: number): void
addList(list: ILeaf[]): void
remove(leaf: ILeaf): void
forEach(itemCallback: ILeafListItemCallback): void
sort(reverse?: boolean): void
clone(): ILeafList
update(): void
reset(): void

@@ -41,4 +44,4 @@ destroy(): void

sort(reverse?: boolean): void
pushList(list: ILeaf[]): void
push(leaf: ILeaf): void
addList(list: ILeaf[]): void
add(leaf: ILeaf): void
forEach(itemCallback: ILeafListItemCallback): void

@@ -45,0 +48,0 @@ reset(): void

@@ -1,2 +0,2 @@

import { ILeafer } from '../app/ILeafer'
import { ILeaferBase } from '../app/ILeafer'
import { IEventer } from '../event/IEventer'

@@ -7,4 +7,4 @@

import { IObject, __Number, __Boolean, __Value, __String } from '../data/IData'
import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, IMatrixDecompositionAttr, IMatrixWithLayoutData } from '../math/IMath'
import { IObject, INumber, IBoolean, IValue, IString } from '../data/IData'
import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, ILayoutAttr, IMatrixWithLayoutData, ILayoutBoundsData, IMatrixData } from '../math/IMath'
import { IFunction } from '../function/IFunction'

@@ -15,7 +15,7 @@

import { ILeafBounds } from './module/ILeafBounds'
import { ILeafLayout, ILayoutBoundsType, ILayoutLocationType } from '../layout/ILeafLayout'
import { ILeafLayout, IBoundsType, ILocationType } from '../layout/ILeafLayout'
import { ILeafHit } from './module/ILeafHit'
import { ILeafRender } from './module/ILeafRender'
import { ILeafMask } from './module/ILeafMask'
import { ILeafData, ILeafDataOptions } from '../data/ILeafData'
import { ILeafData } from '../data/ILeafData'
import { IFindMethod } from '../selector/ISelector'

@@ -33,36 +33,40 @@

// layer data
id: __String
name: __String
className: __String
id: IString
name: IString
className: IString
blendMode: IBlendMode
opacity: __Number
visible: __Boolean
isMask: __Boolean
isEraser: __Boolean
zIndex: __Number
opacity: INumber
visible: IBoolean
isMask: IBoolean
isEraser: IBoolean
locked: IBoolean
zIndex: INumber
// layout data
x: __Number
y: __Number
width: __Number
height: __Number
scaleX: __Number
scaleY: __Number
rotation: __Number
skewX: __Number
skewY: __Number
x: INumber
y: INumber
width: INumber
height: INumber
scaleX: INumber
scaleY: INumber
rotation: INumber
skewX: INumber
skewY: INumber
scale: __Number | IPointData // helper
around: 'center' | IPointData
scale: INumber | IPointData // helper
around: IAround
draggable: __Boolean
draggable: IBoolean
hittable: __Boolean
editable: IBoolean
editSize?: IEditSize
hittable: IBoolean
hitFill: IHitType
hitStroke: IHitType
hitBox: __Boolean
hitChildren: __Boolean
hitSelf: __Boolean
hitRadius: __Number
hitBox: IBoolean
hitChildren: IBoolean
hitSelf: IBoolean
hitRadius: INumber

@@ -106,3 +110,3 @@ cursor: ICursorType | ICursorType[]

export type IResizeType = 'size' | 'scale'
export type IEditSize = 'size' | 'scale'
export interface IImageCursor {

@@ -114,3 +118,5 @@ url: string

export type IAround = 'center' | IPointData
export type IAround =
| 'center'
| IPointData

@@ -160,40 +166,44 @@ export type ICursorType =

}
export interface ILeafInputData extends IObject {
export interface ILeafInputData {
tag?: string
// layer data
id?: __String
name?: __String
className?: __String
id?: IString
name?: IString
className?: IString
blendMode?: IBlendMode
opacity?: __Number
visible?: __Boolean
isMask?: __Boolean
isEraser?: __Boolean
zIndex?: __Number
opacity?: INumber
visible?: IBoolean
isMask?: IBoolean
isEraser?: IBoolean
locked?: IBoolean
zIndex?: INumber
// layout data
x?: __Number
y?: __Number
width?: __Number
height?: __Number
scaleX?: __Number
scaleY?: __Number
rotation?: __Number
skewX?: __Number
skewY?: __Number
x?: INumber
y?: INumber
width?: INumber
height?: INumber
scaleX?: INumber
scaleY?: INumber
rotation?: INumber
skewX?: INumber
skewY?: INumber
scale?: __Number | IPointData // helper
scale?: INumber | IPointData // helper
around?: IAround
draggable?: __Boolean
draggable?: IBoolean
hittable?: __Boolean
editable?: IBoolean
editSize?: IEditSize
hittable?: IBoolean
hitFill?: IHitType
hitStroke?: IHitType
hitBox?: __Boolean
hitChildren?: __Boolean
hitSelf?: __Boolean
hitRadius?: __Number
hitBox?: IBoolean
hitChildren?: IBoolean
hitSelf?: IBoolean
hitRadius?: INumber

@@ -203,2 +213,5 @@ cursor?: ICursorType | ICursorType[]

children?: ILeafInputData[]
// other
noBounds?: boolean
}

@@ -216,2 +229,3 @@ export interface ILeafComputedData {

isEraser?: boolean
locked?: boolean
zIndex?: number

@@ -234,2 +248,5 @@

editable?: boolean
editSize?: IEditSize
hittable?: boolean

@@ -260,3 +277,4 @@ hitFill?: IHitType

leafer?: ILeafer
readonly app?: ILeaferBase
leafer?: ILeaferBase
parent?: ILeaf

@@ -270,3 +288,5 @@

__: ILeafData
proxyData?: ILeafInputData
__proxyData?: ILeafInputData

@@ -276,4 +296,7 @@ __layout: ILeafLayout

__world: IMatrixWithLayoutData
__local: IMatrixWithBoundsData
__local?: IMatrixWithBoundsData
readonly __localMatrix: IMatrixData
readonly __localBounds: IBoundsData
__worldOpacity: number

@@ -294,6 +317,5 @@

readonly resizeable: boolean
readonly __worldFlipped: boolean
readonly __hasMirror: boolean
__hasAutoLayout?: boolean
__hasMask?: boolean

@@ -318,6 +340,6 @@ __hasEraser?: boolean

__bindLeafer(leafer: ILeafer | null): void
__bindLeafer(leafer: ILeaferBase | null): void
set(data: IObject): void
get(options?: ILeafDataOptions): ILeafInputData
get(): ILeafInputData
toJSON(): IObject

@@ -327,13 +349,15 @@ toString(): string

// ILeafData ->
__setAttr(attrName: string, newValue: __Value): void
__getAttr(attrName: string): __Value
setProxyAttr(name: string, newValue: __Value): void
getProxyAttr(name: string): __Value
__setAttr(attrName: string, newValue: IValue): void
__getAttr(attrName: string): IValue
setProxyAttr(name: string, newValue: IValue): void
getProxyAttr(name: string): IValue
// find
find(condition: number | string | IFindMethod): ILeaf[]
findOne(condition: number | string | IFindMethod): ILeaf
find(condition: number | string | IFindMethod, options?: any): ILeaf[]
findOne(condition: number | string | IFindMethod, options?: any): ILeaf
forceUpdate(attrName?: string): void
updateLayout(): void
// ILeafMatrix ->

@@ -345,2 +369,3 @@ __updateWorldMatrix(): void

__updateWorldBounds(): void
__updateLocalBounds(): void

@@ -355,2 +380,3 @@ __updateLocalBoxBounds(): void

__updateAutoLayout(): void
__updateNaturalSize(): void

@@ -370,4 +396,5 @@

// convert
getWorld(attrName: IMatrixDecompositionAttr): number
getBounds(type: ILayoutBoundsType, locationType?: ILayoutLocationType): IBoundsData
getWorld(attrName: ILayoutAttr): number
getBounds(type?: IBoundsType, relative?: ILocationType | ILeaf): IBoundsData
getLayoutBounds(type?: IBoundsType, relative?: ILocationType | ILeaf, unscale?: boolean): ILayoutBoundsData

@@ -386,7 +413,14 @@ worldToLocal(world: IPointData, to?: IPointData, distance?: boolean, relative?: ILeaf): void

// transform
setTransform(transform?: IMatrixData, resize?: boolean): void
transform(transform?: IMatrixData, resize?: boolean): void
move(x: number, y?: number): void
scaleOf(origin: IPointData, x: number, y?: number): void
scaleOf(origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void
rotateOf(origin: IPointData, rotation: number): void
skewOf(origin: IPointData, x: number, y: number): void
skewOf(origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void
scaleResize(scaleX: number, scaleY: number, noResize?: boolean): void
__scaleResize(scaleX: number, scaleY: number): void
// ILeafHit ->

@@ -420,2 +454,3 @@ __hitWorld(point: IRadiusPointData): boolean

remove(child?: ILeaf, destroy?: boolean): void
dropTo(parent: ILeaf, index?: number, resize?: boolean): void
}

@@ -7,2 +7,3 @@ import { ILeaf } from '../ILeaf'

__updateWorldBounds?(): void
__updateLocalBounds?(): void

@@ -17,2 +18,3 @@ __updateLocalBoxBounds?(): void

__updateAutoLayout?(): void
__updateNaturalSize?(): void

@@ -19,0 +21,0 @@

import { ILeaf } from '../ILeaf'
import { __Value } from '../../data/IData'
import { IValue } from '../../data/IData'

@@ -7,7 +7,7 @@ export type ILeafDataProxyModule = ILeafDataProxy & ThisType<ILeaf>

export interface ILeafDataProxy {
__setAttr?(name: string, newValue: __Value): void
__getAttr?(name: string): __Value
setProxyAttr?(name: string, newValue: __Value): void
getProxyAttr?(name: string): __Value
__setAttr?(name: string, newValue: IValue): void
__getAttr?(name: string): IValue
setProxyAttr?(name: string, newValue: IValue): void
getProxyAttr?(name: string): IValue
}

@@ -1,4 +0,8 @@

import { IEvent, IFunction, IObject } from '@leafer/interface'
import { ILeafEventer } from '../display/module/ILeafEventer'
import { ILeaf } from '../display/ILeaf'
import { IFunction } from '../function/IFunction'
import { IEvent } from './IEvent'
import { IObject } from '../data/IData'
export type IEventListener = IFunction

@@ -21,2 +25,3 @@

type: string | string[]
current: ILeaf
listener: IEventListener

@@ -23,0 +28,0 @@ options?: IEventListenerOptions | boolean

@@ -13,2 +13,11 @@ import { IPointData } from '../math/IMath'

(...arg: any): IPointData
}
export interface IAttrDecorator {
(...arg: any): IAttrDecoratorInner
}
interface IAttrDecoratorInner {
(target: any, key: string): any
}

@@ -1,4 +0,4 @@

export { IApp } from './app/IApp'
export { ILeafer, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator } from './app/ILeafer'
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IBlendMode, IResizeType, ICursorType, ICursorTypeMap, IAround } from './display/ILeaf'
export { IAppBase } from './app/IApp'
export { ILeaferBase, ILeaferAttrData, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator } from './app/ILeafer'
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IBlendMode, IEditSize, ICursorType, ICursorTypeMap, IAround } from './display/ILeaf'
export { IBranch } from './display/IBranch'

@@ -9,3 +9,3 @@ export { IZoomView } from './display/IView'

export { ILeafData, IDataProcessor, ILeafDataOptions } from './data/ILeafData'
export { ILeafLayout, ILayoutLocationType, ILayoutBoundsType } from './layout/ILeafLayout'
export { ILeafLayout, ILocationType, IBoundsType } from './layout/ILeafLayout'

@@ -24,3 +24,3 @@ export { ILeafDataProxy, ILeafDataProxyModule } from './display/module/ILeafDataProxy'

export { ILayouter, ILayoutChangedData, ILayoutBlockData, ILayouterConfig, IPartLayoutConfig } from './layouter/ILayouter'
export { ISelector, ISelectorConfig, IFindMethod, ISelectPathResult, ISelectPathOptions } from './selector/ISelector'
export { ISelector, ISelectorConfig, ISelectorProxy, IFindMethod, ISelectPathResult, ISelectPathOptions, AnswerType } from './selector/ISelector'

@@ -54,5 +54,5 @@ export { ICanvasManager } from './canvas/ICanvasManager'

export { __Number, __Boolean, __String, __Object, __Value, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IDataTypeHandle } from './data/IData'
export { INumber, IBoolean, IString, IValue, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IDataTypeHandle } from './data/IData'
export { ILeafList, ILeafArrayMap, ILeafMap, ILeafLevelList, ILeafListItemCallback } from './data/IList'
export { IPoint, IPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataHandle, IOffsetBoundsData, ITwoPointBounds, ITwoPointBoundsData, IAutoBounds, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithLayoutData, IMatrixDecompositionData, IMatrixDecompositionAttr } from './math/IMath'
export { IFunction } from './function/IFunction'
export { IPoint, IPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, ITwoPointBoundsData, IAutoBounds, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath'
export { IFunction, IAttrDecorator } from './function/IFunction'

@@ -20,2 +20,3 @@ import { INumberFunction, IPointDataFunction } from '../function/IFunction'

readonly dragging: boolean
readonly isDragEmpty: boolean
readonly moveMode: boolean

@@ -81,2 +82,3 @@

holdSpaceKey?: boolean
drag?: boolean
dragEmpty?: boolean

@@ -83,0 +85,0 @@ dragOut?: boolean

@@ -1,6 +0,6 @@

import { IBoundsData, IMatrixData } from '../math/IMath'
import { IBoundsData, IMatrixData, ILayoutBoundsData, IPointData } from '../math/IMath'
import { ILeaf } from '../display/ILeaf'
export type ILayoutLocationType = 'world' | 'local' | 'inner'
export type ILayoutBoundsType = 'content' | 'box' | 'stroke' | 'margin' | 'render'
export type ILocationType = 'world' | 'local' | 'inner'
export type IBoundsType = 'content' | 'box' | 'stroke' | 'margin' | 'render'

@@ -26,6 +26,8 @@ export interface ILeafLayout {

//localBoxBounds: IBoundsData = leaf.__local
localStrokeBounds: IBoundsData
localRenderBounds: IBoundsData
localStrokeBounds?: IBoundsData
localRenderBounds?: IBoundsData
// state
resized: boolean
waitAutoLayout: boolean

@@ -64,7 +66,17 @@ // matrix changed

checkUpdate(force?: boolean): void
// temp local
a: number
b: number
c: number
d: number
e: number
f: number
getTransform(locationType: ILayoutLocationType): IMatrixData
getBounds(type: ILayoutBoundsType, locationType: ILayoutLocationType): IBoundsData
update(): void
getTransform(relative?: ILocationType | ILeaf): IMatrixData
getBounds(type?: IBoundsType, relative?: ILocationType | ILeaf): IBoundsData
getLayoutBounds(type?: IBoundsType, relative?: ILocationType | ILeaf, unscale?: boolean): ILayoutBoundsData
getLayoutPoints(type?: IBoundsType, relative?: ILocationType | ILeaf): IPointData[]
// 独立 / 引用 boxBounds

@@ -71,0 +83,0 @@ spreadStroke(): void

@@ -37,2 +37,3 @@ import { IBounds } from '../math/IMath'

layoutedBlocks: ILayoutBlockData[]
extraBlock: ILayoutBlockData

@@ -58,2 +59,4 @@ totalTimes: number

addExtra(leaf: ILeaf): void
createBlock(data: ILeafList | ILeaf[]): ILayoutBlockData

@@ -60,0 +63,0 @@ getBlocks(list: ILeafList): ILayoutBlockData[]

@@ -9,7 +9,9 @@ import { IObject } from '../data/IData'

export interface IPoint extends IPointData {
set(x?: number, y?: number): void
copy(point: IPointData): IPoint
set(x?: number | IPointData, y?: number): IPoint
get(): IPointData
clone(): IPoint
rotate(angle: number, center?: IPointData): IPoint
rotate(rotation: number, origin?: IPointData): IPoint
rotateOf(origin: IPointData, rotation: number): IPoint
getRotation(origin: IPointData, to: IPointData, toOrigin?: IPointData): number

@@ -19,8 +21,10 @@ toInnerOf(matrix: IMatrixData, to?: IPointData): IPoint

getCenter(to: IPointData): IPointData
getCenter(to: IPointData): IPoint
getDistance(to: IPointData): number
getDistancePoint(to: IPointData, distance: number): IPoint
getAngle(to: IPointData): number
getAtan2(to: IPointData): number
reset(): void
reset(): IPoint
}

@@ -52,9 +56,9 @@

export interface IBoundsDataHandle {
export interface IBoundsDataFn {
(target: any): IBoundsData
}
export interface IBounds extends IBoundsData {
set(x?: number, y?: number, width?: number, height?: number): void
copy(bounds: IBoundsData): IBounds
export interface IBounds extends IBoundsData, ITwoPointBoundsData {
set(x?: number | IBoundsData, y?: number, width?: number, height?: number): IBounds
get(): IBoundsData
clone(): IBounds

@@ -72,8 +76,10 @@

add(bounds: IBoundsData): IBounds
addList(boundsList: IBounds[]): IBounds
setByList(boundsList: IBounds[], addMode?: boolean): IBounds
addListWithHandle(list: IObject[], boundsDataHandle: IBoundsDataHandle): IBounds
setByListWithHandle(list: IObject[], boundsDataHandle: IBoundsDataHandle, addMode: boolean): IBounds
setByPoints(points: IPointData[]): IBounds
addList(boundsList: IBoundsData[]): IBounds
setList(boundsList: IBoundsData[]): IBounds
addListWithFn(list: IObject[], boundsDataHandle: IBoundsDataFn): IBounds
setListWithFn(list: IObject[], boundsDataHandle: IBoundsDataFn): IBounds
setPoints(points: IPointData[]): IBounds
getPoints(): IPointData[] // topLeft, topRight, bottomRight, bottomLeft
hitPoint(point: IPointData, pointMatrix?: IMatrixData): boolean

@@ -99,9 +105,3 @@ hitRadiusPoint(point: IRadiusPointData, pointMatrix?: IMatrixWithLayoutData): boolean

export interface ITwoPointBounds extends ITwoPointBoundsData {
addPoint(x: number, y: number): void
addBounds(x: number, y: number, width: number, height: number): void
add(pointBounds: ITwoPointBoundsData): void
}
export interface IAutoBoundsData {

@@ -134,8 +134,12 @@ top?: number

export interface IMatrixDecompositionData {
x: number
y: number
export interface IScaleData {
scaleX: number
scaleY: number
}
export interface IScaleRotationData extends IScaleData {
rotation: number
}
export interface ISkewData {
skewX: number

@@ -145,3 +149,6 @@ skewY: number

export type IMatrixDecompositionAttr =
export interface ILayoutData extends IScaleRotationData, ISkewData, IPointData {
}
export type ILayoutAttr =
| 'x'

@@ -155,5 +162,8 @@ | 'y'

export interface ILayoutBoundsData extends ILayoutData, IBoundsData {
}
export interface IMatrix extends IMatrixData {
set(a: number, b: number, c: number, d: number, e: number, f: number): void
copy(matrix: IMatrixData): IMatrix
set(a: number | IMatrixData, b: number, c: number, d: number, e: number, f: number): IMatrix
get(): IMatrixData
clone(): IMatrix

@@ -176,5 +186,7 @@

multiply(matrix: IMatrixData): IMatrix
divide(matrix: IMatrixData): IMatrix
preMultiply(matrix: IMatrixData): IMatrix
multiply(child: IMatrixData): IMatrix
multiplyParent(parent: IMatrixData): IMatrix
divide(child: IMatrixData): IMatrix
divideParent(parent: IMatrixData): IMatrix
invert(): IMatrix

@@ -185,3 +197,4 @@

decompose(): IMatrixDecompositionData
setLayout(data: ILayoutData, origin?: IPointData): IMatrix
getLayout(origin?: IPointData, firstSkewY?: boolean): ILayoutData

@@ -193,2 +206,4 @@ reset(): void

export interface IMatrixWithLayoutData extends IMatrixData, IMatrixDecompositionData, IBoundsData { }
export interface IMatrixWithScaleData extends IMatrixData, IScaleData { }
export interface IMatrixWithLayoutData extends IMatrixData, ILayoutBoundsData { }

@@ -24,3 +24,2 @@ import { IFunction } from '../function/IFunction'

layout?(target: ILeaf): void
realtimeLayout?: boolean
origin?: {

@@ -42,3 +41,7 @@ createCanvas(width: number, height: number, format?: 'svg' | 'pdf'): any

miniapp?: IMiniapp
imageSuffix?: string // 需要带上后缀区分dom中image标签的缓存,否则会导致浏览器缓存跨域问题
image: {
maxCacheSize: number // 最大等级缓存,一般取当前屏幕大小,默认2k: 2560 * 1600
maxPatternSize: number // 最大repeat pattern缓存, 默认4k: 4096 * 2160
suffix: string // 需要带上后缀区分dom中image标签的缓存,否则会导致浏览器缓存跨域问题
}
}

@@ -45,0 +48,0 @@

@@ -1,2 +0,2 @@

import { ILeafer } from '../app/ILeafer'
import { ILeaferBase } from '../app/ILeafer'
import { IObject } from '../data/IData'

@@ -9,3 +9,3 @@

run(LeaferUI: IObject, config: IObject): void
onLeafer?(leafer: ILeafer): void
onLeafer?(leafer: ILeaferBase): void
}

@@ -22,10 +22,21 @@ import { ILeaf } from '../display/ILeaf'

export enum AnswerType {
No = 0,
Yes = 1,
NoAndSkip = 2,
YesAndSkip = 3
}
export interface IFindMethod {
(leaf: ILeaf, options?: any): any
(leaf: ILeaf, options?: any): AnswerType
}
export interface ISelectorProxy {
list: ILeaf[]
}
export interface ISelector {
target: ILeaf
list: ILeafList
proxy?: ISelectorProxy

@@ -32,0 +43,0 @@ config: ISelectorConfig

Sorry, the diff of this file is too big to display