Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@leafer/interface

Package Overview
Dependencies
Maintainers
1
Versions
116
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.9.12
to
1.10.0
+1
-1
package.json
{
"name": "@leafer/interface",
"version": "1.9.12",
"version": "1.10.0",
"description": "@leafer/interface",

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

@@ -452,2 +452,4 @@ import { ILeaferBase } from '../app/ILeafer'

__pathForMotion?: IMotionPathData
__clipAfterFill?: boolean // 一般用于判断是否裁剪 Box
}

@@ -454,0 +456,0 @@

@@ -54,2 +54,6 @@ import { IObject } from '../data/IData'

export interface ITouchEvent extends IUIEvent {
}
export interface IDragEvent extends IPointerEvent {

@@ -56,0 +60,0 @@ moveX: number

@@ -5,5 +5,8 @@ import { ICanvasPattern } from '../canvas/ICanvas'

import { IExportFileType } from '../file/IFileType'
import { IMatrixData } from '../math/IMath'
import { IMatrixData, IPointData } from '../math/IMath'
import { ILeaferCanvas } from '../canvas/ILeaferCanvas'
import { IProgressData } from '../event/IProgress'
import { IImageCrossOrigin } from '../platform/IPlatform'
import { ITaskItem } from '../task/ITaskProcessor'
import { IRangeSize } from '../display/ILeaf'

@@ -14,2 +17,3 @@ export interface ILeaferImageConfig {

format?: IExportFileType
crossOrigin?: IImageCrossOrigin
showProgress?: boolean // 是否显示进度

@@ -36,2 +40,22 @@ view?: IObject | ILeaferImage | ILeaferCanvas

export interface ILeaferImageSliceData {
size: number
columns: number,
total: number,
list?: ILeaferImageSlice[]
}
export interface ILeaferImageSlice {
view?: any
task?: ITaskItem
}
export interface ILeaferImageLevel {
level: number
scale: number | IPointData
view?: any
url?: string
slice?: ILeaferImageSliceData
}
export interface ILeaferImage {

@@ -52,5 +76,12 @@ readonly innerId: InnerId

loading: boolean
isPlacehold?: boolean // 是否显示占位符,一般在加载100ms后自动判断
progress: IProgressData // 加载进度
largeThumb?: ILeaferImageLevel
levels?: ILeaferImageLevel[]
levelsRange?: IRangeSize
minLevel?: number
progress?: IProgressData // 加载进度
use: number

@@ -57,0 +88,0 @@ config: ILeaferImageConfig

@@ -32,3 +32,3 @@ export { IAppBase } from './app/IApp'

export { IControl } from './control/IControl'
export { IPlatform, IMiniapp, IMiniappSelect, IMiniappSizeView } from './platform/IPlatform'
export { IPlatform, IImageCrossOrigin, IMiniapp, IMiniappSelect, IMiniappSizeView } from './platform/IPlatform'
export { IPlugin } from './plugin/IPlugin'

@@ -44,3 +44,3 @@

export { ILeaferImage, ILeaferImageConfig, ILeaferImageOnLoaded, ILeaferImageOnError, ILeaferImageCacheCanvas, ILeaferImagePatternPaint } from './image/ILeaferImage'
export { ILeaferImage, ILeaferImageConfig, ILeaferImageSliceData, ILeaferImageSlice, ILeaferImageLevel, ILeaferImageOnLoaded, ILeaferImageOnError, ILeaferImageCacheCanvas, ILeaferImagePatternPaint } from './image/ILeaferImage'
export { IResource } from './file/IResource'

@@ -52,3 +52,3 @@ export { IExportFileType, IExportImageType } from './file/IFileType'

export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IBoundsEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, IMultiTouchData, IGestureType, IKeepTouchData } from './event/IEvent'
export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IWheelEvent, IKeyEvent, IShortcutKeys, IShortcutKeysCheck, IShortcutKeyCodes, IKeyCodes, IImageEvent } from './event/IUIEvent'
export { IUIEvent, IPointerEvent, ITouchEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IWheelEvent, IKeyEvent, IShortcutKeys, IShortcutKeysCheck, IShortcutKeyCodes, IKeyCodes, IImageEvent } from './event/IUIEvent'
export { IProgressData, IProgressFunction } from './event/IProgress'

@@ -55,0 +55,0 @@

@@ -169,2 +169,3 @@ import { IFourNumber, IObject } from '../data/IData'

f: number
onlyScale?: boolean // 只有缩放值
}

@@ -171,0 +172,0 @@

@@ -5,8 +5,9 @@ import { IFunction, IStringFunction } from '../function/IFunction'

import { IExportFileType, IExportImageType } from '../file/IFileType'
import { IBoundsData, ISizeData } from '../math/IMath'
import { IBoundsData, ISizeData, IMatrixData } from '../math/IMath'
import { IObject } from '../data/IData'
import { ICanvasType } from '../canvas/ISkiaCanvas'
import { ISelector } from '../selector/ISelector'
import { IProgressFunction } from '../event/IProgress'
import { IRenderOptions } from '../renderer/IRenderer'
import { ILeaferImage } from '../image/ILeaferImage'
import { ICanvasPattern } from '../canvas/ICanvas'

@@ -46,4 +47,3 @@

download(url: string, filename: string): Promise<void>
loadImage(url: string, progressFn?: IProgressFunction): Promise<any>
loadImageWithProgress?(url: string, progressFn?: IProgressFunction): Promise<any>
loadImage(url: string, crossOrigin?: IImageCrossOrigin, leaferImage?: ILeaferImage): Promise<any>
noRepeat?: string // fix: 微信小程序 createPattern 直接使用 no-repeat 有bug,导致无法显示

@@ -73,8 +73,14 @@ Image?: any

suffix?: string // 需要带上后缀区分dom中image标签的缓存,否则会导致浏览器缓存跨域问题
crossOrigin: string | false // 跨域设置
crossOrigin: IImageCrossOrigin // 图片跨域设置
isLarge(size: ISizeData, scaleX?: number, scaleY?: number, largeSize?: number): boolean // 比 maxCacheSize 尺寸更大
isSuperLarge(size: ISizeData, scaleX?: number, scaleY?: number): boolean // 比 maxPatternSize 尺寸更大
getRealURL: IStringFunction // 处理前缀、后缀
resize(image: any, width: number, height: number, xGap?: number, yGap?: number, clip?: IBoundsData, smooth?: boolean, opacity?: number, filters?: IObject): any
setPatternTransform(pattern: ICanvasPattern, transform?: IMatrixData, paint?: IObject): void
}
}
export type IImageCrossOrigin = 'anonymous' | 'use-credentials' // 图片跨域设置
export interface IMiniappSelect extends IObject { }

@@ -81,0 +87,0 @@

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

stop(): void
add(taskCallback: IFunction, options?: ITaskOptions | number): ITaskItem
add(taskCallback: IFunction, options?: ITaskOptions | number, canUse?: IFunction): ITaskItem
destroy(): void

@@ -35,2 +35,3 @@ }

time: number
canUse?: IFunction
run(): Promise<void>

@@ -46,2 +47,3 @@ complete(): void

delay?: number // default 0
canUse?: IFunction
}

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