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

@leafer-ui/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-ui/interface - npm Package Compare versions

Comparing version
1.0.0-rc.9
to
1.0.0-rc.10
+2
-2
package.json
{
"name": "@leafer-ui/interface",
"version": "1.0.0-rc.9",
"version": "1.0.0-rc.10",
"description": "@leafer-ui/interface",

@@ -25,4 +25,4 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/interface": "1.0.0-rc.9"
"@leafer/interface": "1.0.0-rc.10"
}
}

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

import { IControl, ILeaferAttrData, ILeaferConfig } from '@leafer/interface'
import { IControl, ILeaferAttrData, ILeaferConfig, ILeaferType } from '@leafer/interface'
import { IApp } from './IApp'

@@ -18,2 +18,5 @@ import { IGroup } from '../IUI'

userConfig?: ILeaferConfig
onInit(): void
initType(type: ILeaferType): void
}

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

import { IGroup, IUI, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, IObject, IBoxInputData } from '@leafer-ui/interface'
import { IGroup, IUI, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, IObject, IBoxInputData, IGroupInputData, IImageCursor } from '@leafer-ui/interface'

@@ -39,4 +39,4 @@ export interface IEditorBase extends IGroup, ISelectorProxy {

group(): void
ungroup(): void
group(group?: IGroup | IGroupInputData): IGroup
ungroup(): IUI[]

@@ -74,4 +74,5 @@ lock(): void

moveCursor?: ICursorType
resizeCursor?: ICursorType[]
rotateCursor?: ICursorType[]
resizeCursor?: IImageCursor
rotateCursor?: IImageCursor
skewCursor?: IImageCursor

@@ -78,0 +79,0 @@ around?: IAround

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

import { INumber, IBoolean, IString } from '@leafer/interface'
import { IStrokeAlign, IStrokeCap, IStrokeJoin, IBlurEffect, IFontWeight, ITextCase, ITextDecoration, IShadowEffect, IGrayscaleEffect, ITextAlign, IVerticalAlign, IOverflow, IUnitData, ITextWrap, IStroke, IFill, IArrowType } from './type/IType'

@@ -5,10 +6,11 @@ import { ILeafStrokePaint, ILeafShadowEffect, ILeafPaint } from './type/IComputedType'

// corner---
export interface ICornerRadiusAttrData {
cornerRadius: number | number[] | ICornerRadiusString
cornerSmoothing: number
cornerRadius: INumber | INumber[] | ICornerRadiusString
cornerSmoothing: INumber
}
export interface ICornerRadiusInputData {
cornerRadius?: number | number[] | ICornerRadiusString
cornerSmoothing?: number
cornerRadius?: INumber | INumber[] | ICornerRadiusString
cornerSmoothing?: INumber
}

@@ -42,8 +44,9 @@ export interface ICornerRadiusComputedData {

strokeAlign: IStrokeAlign
strokeWidth: number | number[] | IStrokeWidthString
strokeWidth: INumber | INumber[] | IStrokeWidthString
strokeWidthFixed: IBoolean
strokeCap: IStrokeCap
strokeJoin: IStrokeJoin
dashPattern: number[] | IDashPatternString
dashOffset: number
miterLimit: number
dashPattern: INumber[] | IDashPatternString
dashOffset: INumber
miterLimit: INumber

@@ -57,8 +60,9 @@ startArrow: IArrowType

strokeAlign?: IStrokeAlign
strokeWidth?: number | number[] | IStrokeWidthString
strokeWidth?: INumber | INumber[] | IStrokeWidthString
strokeWidthFixed?: IBoolean
strokeCap?: IStrokeCap
strokeJoin?: IStrokeJoin
dashPattern?: number[] | IDashPatternString
dashOffset?: number
miterLimit?: number
dashPattern?: INumber[] | IDashPatternString
dashOffset?: INumber
miterLimit?: INumber

@@ -74,2 +78,3 @@ startArrow?: IArrowType

strokeWidths?: number[]
strokeWidthFixed?: boolean
strokeCap?: IStrokeCap

@@ -84,13 +89,13 @@ strokeJoin?: IStrokeJoin

export interface ITextStyleAttrData {
fontFamily: string
fontSize: number
fontFamily: IString
fontSize: INumber
fontWeight: IFontWeight
italic: boolean
italic: IBoolean
textCase: ITextCase
textDecoration: ITextDecoration
letterSpacing: number | IUnitData
lineHeight: number | IUnitData
letterSpacing: INumber | IUnitData
lineHeight: INumber | IUnitData
paraIndent: number
paraSpacing: number
paraIndent: INumber
paraSpacing: INumber

@@ -104,13 +109,13 @@ textAlign: ITextAlign

export interface ITextStyleInputData {
fontFamily?: string
fontSize?: number
fontFamily?: IString
fontSize?: INumber
fontWeight?: IFontWeight
italic?: boolean
italic?: IBoolean
textCase?: ITextCase
textDecoration?: ITextDecoration
letterSpacing?: number | IUnitData
lineHeight?: number | IUnitData
letterSpacing?: INumber | IUnitData
lineHeight?: INumber | IUnitData
paraIndent?: number
paraSpacing?: number
paraIndent?: INumber
paraSpacing?: INumber

@@ -147,5 +152,5 @@ textAlign?: ITextAlign

innerShadow: IShadowEffect | IShadowEffect[] | IShadowString
blur: number | IBlurEffect
backgroundBlur: number | IBlurEffect
grayscale: number | IGrayscaleEffect
blur: INumber | IBlurEffect
backgroundBlur: INumber | IBlurEffect
grayscale: INumber | IGrayscaleEffect
}

@@ -155,5 +160,5 @@ export interface IEffectInputData {

innerShadow?: IShadowEffect | IShadowEffect[] | IShadowString
blur?: number | IBlurEffect
backgroundBlur?: number | IBlurEffect
grayscale?: number | IGrayscaleEffect
blur?: INumber | IBlurEffect
backgroundBlur?: INumber | IBlurEffect
grayscale?: INumber | IGrayscaleEffect
}

@@ -160,0 +165,0 @@ export interface IEffectComputedData {

@@ -27,3 +27,3 @@ export * from '@leafer/interface'

export { IUnitData, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IFill, IStroke, IStrokeAlign, IStrokeJoin, IStrokeCap, IArrowType, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow, ITextWrap, IRepeat } from './type/IType'
export { IUnitData, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IFill, IStroke, IPaintAttr, IStrokeAlign, IStrokeJoin, IStrokeCap, IArrowType, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow, ITextWrap, IRepeat } from './type/IType'
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString } from './type/IStringType'

@@ -37,5 +37,5 @@ export { ILeafFill, ILeafPaint, ILeafPaintPatternData, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'

export { IColorConvertModule } from './module/IColorConvert'
export { IExportModule, IExportOptions, IExportResult, IExportResultFunction } from './module/IExport'
export { IExportModule } from './module/IExport'
export { IPaintModule } from './module/IPaint'
export { IPaintModule, IPaintImageModule, IPaintGradientModule } from './module/IPaint'
export { IEffectModule } from './module/IEffect'

@@ -42,0 +42,0 @@ export { ICachedShape } from './ICachedShape'

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

import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IPathDrawer, IPointData, IPath2D, IPathCommandData, IWindingRule, ILeaferImageConfig, IBoundsData, IObject, IPathString, ILeaferImage, IBlob, IPathCreator, AnswerType } from '@leafer/interface'
import { ILeaf, ILeafComputedData, ILeafData, ILeafInputData, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPathDrawer, IPointData, IPath2D, IPathCommandData, IWindingRule, ILeaferImageConfig, IBoundsData, IObject, IPathString, ILeaferImage, IPathCreator, IAnswer, IPickOptions, IPickResult } from '@leafer/interface'

@@ -12,6 +12,4 @@ import {

import { IOverflow } from './type/IType'
import { IExportOptions } from './module/IExport'
import { ILeafer } from './app/ILeafer'
// Line

@@ -272,3 +270,3 @@ export interface ILine extends IUI {

children: IUI[]
mask?: IUI
pick(hitPoint: IPointData, options?: IPickOptions): IPickResult
add(child: IUI, index?: number): void

@@ -281,2 +279,3 @@ addAt(child: IUI, index: number): void

removeAll(): void
clear(): void
}

@@ -318,3 +317,3 @@ export interface IGroupData extends IUIData { }

export(filename: string, options?: IExportOptions | number): Promise<IBlob | string | boolean>
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>
clone(): IUI

@@ -324,3 +323,3 @@ }

export interface IFindUIMethod {
(leaf: IUI, options?: any): AnswerType
(leaf: IUI, options?: any): IAnswer
}

@@ -337,2 +336,4 @@

readonly __strokeWidth: number
__pixelFill?: boolean // png / svg / webp

@@ -367,2 +368,5 @@ __pixelStroke?: boolean

__needComputePaint: boolean
__computePaint(): void
}

@@ -369,0 +373,0 @@ export interface IUIComputedData extends IFillComputedData, IBorderComputedData, IStrokeComputedData, ITextStyleComputedData, ICornerRadiusComputedData, IEffectComputedData, ILeafComputedData {

import { IColor } from '../type/IType'
export interface IColorConvertModule {
string?(color: IColor, opacity?: number): string
string(color: IColor, opacity?: number): string
}

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

import { ILeaferCanvas, IRenderOptions } from '@leafer/interface'
import { ILeaferCanvas } from '@leafer/interface'

@@ -8,6 +8,6 @@ import { IUI } from '../IUI'

export interface IEffectModule {
shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, renderOptions: IRenderOptions): void
backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
blur(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
}

@@ -1,20 +0,7 @@

import { ILeaf, IExportFileType, IBlob } from '@leafer/interface'
import { ILeaf, IExportFileType, IExportOptions, IExportResult } from '@leafer/interface'
export interface IExportOptions {
quality?: number
blob?: boolean
}
export interface IExportResult {
data: IBlob | string | boolean
}
export interface IExportResultFunction {
(data: IExportResult): void
}
export interface IExportModule {
running?: boolean
export?(leaf: ILeaf, filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>
export(leaf: ILeaf, filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>
}

@@ -1,26 +0,42 @@

import { ILeaferCanvas, IRenderOptions, IBooleanMap } from '@leafer/interface'
import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage } from '@leafer/interface'
import { ILeafPaint } from '../type/IComputedType'
import { ILeafPaint, ILeafPaintPatternData } from '../type/IComputedType'
import { IUI, IUIData } from '../IUI'
import { ICachedShape } from '../ICachedShape'
import { IGradientPaint, IImagePaint, IImagePaintMode, IPaintAttr } from '../type/IType'
export interface IPaintModule {
compute?(attrName: 'fill' | 'stroke', ui: IUI): void
compute(attrName: IPaintAttr, ui: IUI): void
fill?(fill: string, ui: IUI, canvas: ILeaferCanvas,): void
fills?(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
fill(fill: string, ui: IUI, canvas: ILeaferCanvas,): void
fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
fillText?(ui: IUI, canvas: ILeaferCanvas): void
fillText(ui: IUI, canvas: ILeaferCanvas): void
stroke?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
strokes?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
strokeText?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
strokesText?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void
drawTextStroke?(ui: IUI, canvas: ILeaferCanvas): void
shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape
}
shape?(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape
recycleImage?(attrName: 'fill' | 'stroke', data: IUIData): IBooleanMap
export interface IPaintImageModule {
image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint
checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean
createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean
recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void
fillOrFitMode(data: ILeafPaintPatternData, mode: IImagePaintMode, box: IBoundsData, width: number, height: number, rotation: number): void
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void
}
export interface IPaintGradientModule {
linearGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint
radialGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint
conicGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint
}
import { ITextData, ITextDrawData } from '../IUI'
export interface ITextConvertModule {
getDrawData?(content: string, style: ITextData): ITextDrawData
getDrawData(content: string, style: ITextData): ITextDrawData
}

@@ -15,2 +15,4 @@ import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData } from '@leafer/interface'

export type IPaintAttr = 'fill' | 'stroke'
export interface IPaintBase {

@@ -17,0 +19,0 @@ type: IPaintType

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

import { IPointData, IExportFileType, ISizeData, IWindingRule, IPathCommandData, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, IBlob, ILeaf, IPathString, IPathCreator, IBoundsData, ILeaferImageConfig, ILeaferCanvas, IRenderOptions, IPathDrawer, AnswerType, ILeafData, IPath2D, ILeafComputedData, ILeafInputData, IObject, ILeaferAttrData, IControl, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IBooleanMap } from '@leafer/interface';
import { IPointData, IExportFileType, ISizeData, IWindingRule, IPathCommandData, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, INumber, IBoolean, IString, IPathString, IPathCreator, IBoundsData, ILeaferImageConfig, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, IPath2D, ILeafComputedData, ILeafInputData, IObject, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IBooleanMap } from '@leafer/interface';
export * from '@leafer/interface';
import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, IObject as IObject$1, ILeaf as ILeaf$1, IEditSize, IDragEvent, IRotateEvent, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, ICursorType, IAround } from '@leafer-ui/interface';
import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, IObject as IObject$1, ILeaf as ILeaf$1, IEditSize, IDragEvent, IRotateEvent, IGroupInputData as IGroupInputData$1, IStroke as IStroke$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, ICursorType, IImageCursor, IAround } from '@leafer-ui/interface';

@@ -23,2 +23,3 @@ type IPercent = string;

type IStroke = IPaint | IPaint[] | IPaintString;
type IPaintAttr = 'fill' | 'stroke';
interface IPaintBase {

@@ -159,8 +160,8 @@ type: IPaintType;

interface ICornerRadiusAttrData {
cornerRadius: number | number[] | ICornerRadiusString;
cornerSmoothing: number;
cornerRadius: INumber | INumber[] | ICornerRadiusString;
cornerSmoothing: INumber;
}
interface ICornerRadiusInputData {
cornerRadius?: number | number[] | ICornerRadiusString;
cornerSmoothing?: number;
cornerRadius?: INumber | INumber[] | ICornerRadiusString;
cornerSmoothing?: INumber;
}

@@ -187,8 +188,9 @@ interface ICornerRadiusComputedData {

strokeAlign: IStrokeAlign;
strokeWidth: number | number[] | IStrokeWidthString;
strokeWidth: INumber | INumber[] | IStrokeWidthString;
strokeWidthFixed: IBoolean;
strokeCap: IStrokeCap;
strokeJoin: IStrokeJoin;
dashPattern: number[] | IDashPatternString;
dashOffset: number;
miterLimit: number;
dashPattern: INumber[] | IDashPatternString;
dashOffset: INumber;
miterLimit: INumber;
startArrow: IArrowType;

@@ -200,8 +202,9 @@ endArrow: IArrowType;

strokeAlign?: IStrokeAlign;
strokeWidth?: number | number[] | IStrokeWidthString;
strokeWidth?: INumber | INumber[] | IStrokeWidthString;
strokeWidthFixed?: IBoolean;
strokeCap?: IStrokeCap;
strokeJoin?: IStrokeJoin;
dashPattern?: number[] | IDashPatternString;
dashOffset?: number;
miterLimit?: number;
dashPattern?: INumber[] | IDashPatternString;
dashOffset?: INumber;
miterLimit?: INumber;
startArrow?: IArrowType;

@@ -215,2 +218,3 @@ endArrow?: IArrowType;

strokeWidths?: number[];
strokeWidthFixed?: boolean;
strokeCap?: IStrokeCap;

@@ -223,12 +227,12 @@ strokeJoin?: IStrokeJoin;

interface ITextStyleAttrData {
fontFamily: string;
fontSize: number;
fontFamily: IString;
fontSize: INumber;
fontWeight: IFontWeight;
italic: boolean;
italic: IBoolean;
textCase: ITextCase;
textDecoration: ITextDecoration;
letterSpacing: number | IUnitData;
lineHeight: number | IUnitData;
paraIndent: number;
paraSpacing: number;
letterSpacing: INumber | IUnitData;
lineHeight: INumber | IUnitData;
paraIndent: INumber;
paraSpacing: INumber;
textAlign: ITextAlign;

@@ -240,12 +244,12 @@ verticalAlign: IVerticalAlign;

interface ITextStyleInputData {
fontFamily?: string;
fontSize?: number;
fontFamily?: IString;
fontSize?: INumber;
fontWeight?: IFontWeight;
italic?: boolean;
italic?: IBoolean;
textCase?: ITextCase;
textDecoration?: ITextDecoration;
letterSpacing?: number | IUnitData;
lineHeight?: number | IUnitData;
paraIndent?: number;
paraSpacing?: number;
letterSpacing?: INumber | IUnitData;
lineHeight?: INumber | IUnitData;
paraIndent?: INumber;
paraSpacing?: INumber;
textAlign?: ITextAlign;

@@ -275,5 +279,5 @@ verticalAlign?: IVerticalAlign;

innerShadow: IShadowEffect | IShadowEffect[] | IShadowString;
blur: number | IBlurEffect;
backgroundBlur: number | IBlurEffect;
grayscale: number | IGrayscaleEffect;
blur: INumber | IBlurEffect;
backgroundBlur: INumber | IBlurEffect;
grayscale: INumber | IGrayscaleEffect;
}

@@ -283,5 +287,5 @@ interface IEffectInputData {

innerShadow?: IShadowEffect | IShadowEffect[] | IShadowString;
blur?: number | IBlurEffect;
backgroundBlur?: number | IBlurEffect;
grayscale?: number | IGrayscaleEffect;
blur?: INumber | IBlurEffect;
backgroundBlur?: INumber | IBlurEffect;
grayscale?: INumber | IGrayscaleEffect;
}

@@ -296,17 +300,2 @@ interface IEffectComputedData {

interface IExportOptions {
quality?: number;
blob?: boolean;
}
interface IExportResult {
data: IBlob | string | boolean;
}
interface IExportResultFunction {
(data: IExportResult): void;
}
interface IExportModule {
running?: boolean;
export?(leaf: ILeaf, filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
}
interface ILine extends IUI {

@@ -527,3 +516,3 @@ __: ILineData;

children: IUI[];
mask?: IUI;
pick(hitPoint: IPointData, options?: IPickOptions): IPickResult;
add(child: IUI, index?: number): void;

@@ -536,2 +525,3 @@ addAt(child: IUI, index: number): void;

removeAll(): void;
clear(): void;
}

@@ -563,7 +553,7 @@ interface IGroupData extends IUIData {

__drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
export(filename: string, options?: IExportOptions | number): Promise<IBlob | string | boolean>;
export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
clone(): IUI;
}
interface IFindUIMethod {
(leaf: IUI, options?: any): AnswerType;
(leaf: IUI, options?: any): IAnswer;
}

@@ -575,2 +565,3 @@ interface IUIData extends IUIComputedData, ILeafData {

__isStrokes?: boolean;
readonly __strokeWidth: number;
__pixelFill?: boolean;

@@ -594,2 +585,4 @@ __pixelStroke?: boolean;

__textDrawData?: ITextDrawData;
__needComputePaint: boolean;
__computePaint(): void;
}

@@ -635,4 +628,4 @@ interface IUIComputedData extends IFillComputedData, IBorderComputedData, IStrokeComputedData, ITextStyleComputedData, ICornerRadiusComputedData, IEffectComputedData, ILeafComputedData {

onSkew(e: IDragEvent): void;
group(): void;
ungroup(): void;
group(group?: IGroup$1 | IGroupInputData$1): IGroup$1;
ungroup(): IUI$1[];
lock(): void;

@@ -660,4 +653,5 @@ unlock(): void;

moveCursor?: ICursorType;
resizeCursor?: ICursorType[];
rotateCursor?: ICursorType[];
resizeCursor?: IImageCursor;
rotateCursor?: IImageCursor;
skewCursor?: IImageCursor;
around?: IAround;

@@ -684,2 +678,4 @@ lockRatio?: boolean;

userConfig?: ILeaferConfig;
onInit(): void;
initType(type: ILeaferType): void;
}

@@ -725,9 +721,14 @@

interface ITextConvertModule {
getDrawData?(content: string, style: ITextData): ITextDrawData;
getDrawData(content: string, style: ITextData): ITextDrawData;
}
interface IColorConvertModule {
string?(color: IColor, opacity?: number): string;
string(color: IColor, opacity?: number): string;
}
interface IExportModule {
running?: boolean;
export(leaf: ILeaf, filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
}
interface ICachedShape extends ICachedLeaf {

@@ -741,22 +742,35 @@ worldCanvas?: ILeaferCanvas;

interface IPaintModule {
compute?(attrName: 'fill' | 'stroke', ui: IUI): void;
fill?(fill: string, ui: IUI, canvas: ILeaferCanvas): void;
fills?(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
fillText?(ui: IUI, canvas: ILeaferCanvas): void;
stroke?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
strokes?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
strokeText?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
strokesText?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
drawTextStroke?(ui: IUI, canvas: ILeaferCanvas): void;
shape?(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
recycleImage?(attrName: 'fill' | 'stroke', data: IUIData): IBooleanMap;
compute(attrName: IPaintAttr, ui: IUI): void;
fill(fill: string, ui: IUI, canvas: ILeaferCanvas): void;
fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
fillText(ui: IUI, canvas: ILeaferCanvas): void;
stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void;
strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void;
shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
}
interface IPaintImageModule {
image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint;
checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean;
createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean;
recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap;
createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void;
fillOrFitMode(data: ILeafPaintPatternData, mode: IImagePaintMode, box: IBoundsData, width: number, height: number, rotation: number): void;
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
}
interface IPaintGradientModule {
linearGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
radialGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
conicGradient(paint: IGradientPaint, box: IBoundsData): ILeafPaint;
}
interface IEffectModule {
shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, renderOptions: IRenderOptions): void;
backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
blur(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void;
backgroundBlur(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void;
}
export type { IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, ICornerRadiusString, IDashPatternString, IEditorBase, IEditorConfig, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IExportOptions, IExportResult, IExportResultFunction, IFill, IFindUIMethod, IFontWeight, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintModule, IPaintString, IPath, IPathData, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IShadowEffect, IShadowString, IStar, IStarData, IStarInputData, IStroke, IStrokeAlign, IStrokeCap, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IUnitData, IVectorPath, IVerticalAlign };
export type { IApp, IAppConfig, IAppData, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, ICornerRadiusString, IDashPatternString, IEditorBase, IEditorConfig, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFindUIMethod, IFontWeight, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPath, IPathData, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IShadowEffect, IShadowString, IStar, IStarData, IStarInputData, IStroke, IStrokeAlign, IStrokeCap, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextWordData, ITextWrap, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IUnitData, IVectorPath, IVerticalAlign };