@leafer-ui/display
Advanced tools
+8
-8
| { | ||
| "name": "@leafer-ui/display", | ||
| "version": "1.9.4", | ||
| "version": "1.9.5", | ||
| "description": "@leafer-ui/display", | ||
@@ -25,12 +25,12 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/core": "1.9.4", | ||
| "@leafer-ui/data": "1.9.4", | ||
| "@leafer-ui/display-module": "1.9.4", | ||
| "@leafer-ui/decorator": "1.9.4", | ||
| "@leafer-ui/external": "1.9.4" | ||
| "@leafer/core": "1.9.5", | ||
| "@leafer-ui/data": "1.9.5", | ||
| "@leafer-ui/display-module": "1.9.5", | ||
| "@leafer-ui/decorator": "1.9.5", | ||
| "@leafer-ui/external": "1.9.5" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.9.4", | ||
| "@leafer-ui/interface": "1.9.4" | ||
| "@leafer/interface": "1.9.5", | ||
| "@leafer-ui/interface": "1.9.5" | ||
| } | ||
| } |
+2
-2
@@ -16,3 +16,3 @@ import { ILeaferCanvas, IRenderOptions, IBoolean, INumber, IScrollPointData } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Box extends Group implements IBox { | ||
| export class Box<TInputData = IBoxInputData> extends Group<TInputData> implements IBox { | ||
@@ -50,3 +50,3 @@ public get __tag() { return 'Box' } | ||
| constructor(data?: IBoxInputData) { | ||
| constructor(data?: TInputData) { | ||
| super(data) | ||
@@ -53,0 +53,0 @@ this.__layout.renderChanged || this.__layout.renderChange() |
+3
-3
@@ -12,3 +12,3 @@ import { ILeaferCanvas, ILeaferCanvasConfig, INumber, IRenderOptions, IPointData, ICanvasContext2D, ICanvasContext2DSettings, IScreenSizeData } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Canvas extends Rect implements ICanvas { | ||
| export class Canvas<TInputData = ICanvasInputData> extends Rect<TInputData> implements ICanvas { | ||
@@ -46,6 +46,6 @@ public get __tag() { return 'Canvas' } | ||
| constructor(data?: ICanvasInputData) { | ||
| constructor(data?: TInputData) { | ||
| super(data) | ||
| this.canvas = Creator.canvas(this.__ as ILeaferCanvasConfig) | ||
| if (data && data.url) this.drawImage(data.url) | ||
| if (data && (data as ICanvasInputData).url) this.drawImage((data as ICanvasInputData).url) | ||
| } | ||
@@ -52,0 +52,0 @@ |
+1
-4
@@ -13,3 +13,3 @@ import { INumber } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Ellipse extends UI implements IEllipse { | ||
| export class Ellipse<TInputData = IEllipseInputData> extends UI<TInputData> implements IEllipse { | ||
@@ -30,5 +30,2 @@ public get __tag() { return 'Ellipse' } | ||
| constructor(data?: IEllipseInputData) { | ||
| super(data) | ||
| } | ||
@@ -35,0 +32,0 @@ public __updatePath(): void { |
+1
-4
@@ -10,3 +10,3 @@ import { dataProcessor, registerUI, affectRenderBoundsType, surfaceType } from '@leafer/core' | ||
| @registerUI() | ||
| export class Frame extends Box implements IFrame { | ||
| export class Frame<TInputData = IFrameInputData> extends Box<TInputData> implements IFrame { | ||
@@ -26,5 +26,2 @@ public get __tag() { return 'Frame' } | ||
| constructor(data?: IFrameInputData) { | ||
| super(data) | ||
| } | ||
| } |
+1
-4
@@ -12,3 +12,3 @@ import { IJSONOptions, IPickOptions, IPickResult, IPointData, INumber, ITransition } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Group extends UI implements IGroup { // tip: rewrited Box | ||
| export class Group<TInputData = IGroupInputData> extends UI<TInputData> implements IGroup { // tip: rewrited Box | ||
@@ -35,5 +35,2 @@ public get __tag() { return 'Group' } | ||
| constructor(data?: IGroupInputData) { | ||
| super(data) | ||
| } | ||
@@ -40,0 +37,0 @@ public reset(data?: IGroupInputData): void { |
+1
-5
@@ -11,3 +11,3 @@ import { ILeaferImage, IString } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Image extends Rect implements IImage { | ||
| export class Image<TInputData = IImageInputData> extends Rect<TInputData> implements IImage { | ||
@@ -26,8 +26,4 @@ public get __tag() { return 'Image' } | ||
| constructor(data?: IImageInputData) { | ||
| super(data) | ||
| } | ||
| } | ||
| export const MyImage = Image |
+13
-10
@@ -1,2 +0,2 @@ | ||
| import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IZoomOptions, IFourNumber, IBounds, IClientPointData, ITransition } from '@leafer/interface' | ||
| import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IZoomOptions, IFourNumber, IBounds, IClientPointData, ITransition, ICanvasSizeAttr } from '@leafer/interface' | ||
| import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, ImageManager, Resource, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, WaitHelper, WatchEvent, Bounds, LeafList, Plugin, getBoundsData } from '@leafer/core' | ||
@@ -68,2 +68,3 @@ | ||
| lazySpeard: 100, | ||
| // maxFPS: 120, // 最大的运行帧率 | ||
| // pixelSnap: false // 是否对齐像素,避免图片存在浮点坐标导致模糊 | ||
@@ -127,3 +128,3 @@ } | ||
| if (this.isApp) this.__setApp() | ||
| this.__checkAutoLayout(config, parentApp) | ||
| this.__checkAutoLayout() | ||
| this.view = canvas.view | ||
@@ -252,3 +253,4 @@ | ||
| protected __checkAutoLayout(config: ILeaferConfig, parentApp?: IApp): void { | ||
| protected __checkAutoLayout(): void { | ||
| const { config, parentApp } = this | ||
| if (!parentApp) { | ||
@@ -264,3 +266,3 @@ if (!config.width || !config.height) this.autoLayout = new AutoBounds(config) | ||
| // if (!newValue) debug.warn(attrName + ' is 0') | ||
| this.__changeCanvasSize(attrName, newValue as number) | ||
| this.__changeCanvasSize(attrName as ICanvasSizeAttr, newValue as number) | ||
| } else if (attrName === 'fill') { | ||
@@ -283,6 +285,7 @@ this.__changeFill(newValue as string) | ||
| protected __changeCanvasSize(attrName: string, newValue: number): void { | ||
| const data = DataHelper.copyAttrs({}, this.canvas, canvasSizeAttrs) | ||
| data[attrName] = (this.config as IObject)[attrName] = newValue | ||
| if (newValue) this.canvas.stopAutoLayout() | ||
| protected __changeCanvasSize(attrName: ICanvasSizeAttr, newValue: number): void { | ||
| const { config, canvas } = this | ||
| const data = DataHelper.copyAttrs({}, canvas, canvasSizeAttrs) | ||
| data[attrName] = config[attrName] = newValue | ||
| config.width && config.height ? canvas.stopAutoLayout() : this.__checkAutoLayout() | ||
| this.__doResize(data as IScreenSizeData) | ||
@@ -463,6 +466,6 @@ } | ||
| if (this.hitCanvasManager) this.hitCanvasManager.destroy() | ||
| this.canvasManager.destroy() | ||
| if (this.canvasManager) this.canvasManager.destroy() | ||
| } | ||
| this.canvas.destroy() | ||
| if (this.canvas) this.canvas.destroy() | ||
@@ -469,0 +472,0 @@ this.config.view = this.view = this.parentApp = null |
+3
-23
| import { IPointData, INumber } from '@leafer/interface' | ||
| import { PathBounds, PathCommandDataHelper, PointHelper, boundsType, pathType, affectStrokeBoundsType, dataProcessor, registerUI, getPointData } from '@leafer/core' | ||
| import { PathCommandDataHelper, PointHelper, boundsType, pathType, affectStrokeBoundsType, dataProcessor, registerUI, getPointData } from '@leafer/core' | ||
@@ -8,3 +8,2 @@ import { ILine, ILineData, ILineInputData, IStrokeAlign } from '@leafer-ui/interface' | ||
| import { UI } from './UI' | ||
| import { PathArrow } from '@leafer-ui/external' | ||
@@ -14,7 +13,6 @@ | ||
| const { rotate, getAngle, getDistance, defaultPoint } = PointHelper | ||
| const { toBounds } = PathBounds | ||
| @registerUI() | ||
| export class Line extends UI implements ILine { // tip: rewrited Polygon | ||
| export class Line<TInputData = ILineInputData> extends UI<TInputData> implements ILine { // tip: rewrited Polygon | ||
@@ -58,6 +56,2 @@ public get __tag() { return 'Line' } | ||
| constructor(data?: ILineInputData) { | ||
| super(data) | ||
| } | ||
| public __updatePath(): void { | ||
@@ -70,3 +64,3 @@ | ||
| drawPoints(path, data.points, false, data.closed) | ||
| drawPoints(path, data.points, data.curve, data.closed) | ||
@@ -81,16 +75,2 @@ } else { | ||
| public __updateRenderPath(): void { | ||
| const data = this.__ | ||
| if (!this.pathInputed && data.points && data.curve) { | ||
| drawPoints(data.__pathForRender = [], data.points, data.curve, data.closed) | ||
| if (data.__useArrow) PathArrow.addArrows(this, false) | ||
| } else super.__updateRenderPath() | ||
| } | ||
| public __updateBoxBounds(): void { | ||
| if (this.points) { | ||
| toBounds(this.__.__pathForRender, this.__layout.boxBounds) | ||
| } else super.__updateBoxBounds() | ||
| } | ||
| } |
+1
-5
@@ -10,3 +10,3 @@ import { dataProcessor, affectStrokeBoundsType, registerUI } from '@leafer/core' | ||
| @registerUI() | ||
| export class Path extends UI implements IPath { | ||
| export class Path<TInputData = IPathInputData> extends UI<TInputData> implements IPath { | ||
@@ -21,6 +21,2 @@ public get __tag() { return 'Path' } | ||
| constructor(data?: IPathInputData) { | ||
| super(data) | ||
| } | ||
| } |
+1
-4
@@ -11,3 +11,3 @@ import { PathCreator, dataProcessor, defineKey, registerUI, useModule } from '@leafer/core' | ||
| @registerUI() | ||
| export class Pen extends Group implements IPen { | ||
| export class Pen<TInputData = IPenInputData> extends Group<TInputData> implements IPen { | ||
@@ -27,5 +27,2 @@ public get __tag() { return 'Pen' } | ||
| constructor(data?: IPenInputData) { | ||
| super(data) | ||
| } | ||
@@ -32,0 +29,0 @@ public setStyle(data: IPathInputData): Pen { |
+6
-8
@@ -17,3 +17,3 @@ import { INumber, IPointData } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Polygon extends UI implements IPolygon { | ||
| export class Polygon<TInputData = IPolygonInputData> extends UI<TInputData> implements IPolygon { | ||
@@ -34,17 +34,15 @@ public get __tag() { return 'Polygon' } | ||
| constructor(data?: IPolygonInputData) { | ||
| super(data) | ||
| } | ||
| public __updatePath(): void { | ||
| const path: number[] = this.__.path = [] | ||
| const data = this.__ | ||
| const path: number[] = data.path = [] | ||
| if (this.__.points) { | ||
| if (data.points) { | ||
| drawPoints(path, this.__.points, false, true) | ||
| drawPoints(path, data.points, data.curve, true) | ||
| } else { | ||
| const { width, height, sides } = this.__ | ||
| const { width, height, sides } = data | ||
| const rx = width / 2, ry = height / 2 | ||
@@ -51,0 +49,0 @@ |
+1
-5
@@ -13,3 +13,3 @@ import { dataProcessor, registerUI, rewriteAble, useModule } from '@leafer/core' | ||
| @registerUI() | ||
| export class Rect extends UI implements IRect { // tip: rewrited Box | ||
| export class Rect<TInputData = IRectInputData> extends UI<TInputData> implements IRect { // tip: rewrited Box | ||
@@ -21,6 +21,2 @@ public get __tag() { return 'Rect' } | ||
| constructor(data?: IRectInputData) { | ||
| super(data) | ||
| } | ||
| } |
+1
-4
@@ -15,3 +15,3 @@ import { INumber } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Star extends UI implements IStar { | ||
| export class Star<TInputData = IStarInputData> extends UI<TInputData> implements IStar { | ||
@@ -29,5 +29,2 @@ public get __tag() { return 'Star' } | ||
| constructor(data?: IStarInputData) { | ||
| super(data) | ||
| } | ||
@@ -34,0 +31,0 @@ public __updatePath() { |
+1
-5
@@ -15,3 +15,3 @@ import { ILeaferCanvas, IBoolean, INumber, IString, IBoundsData, IUnitData, IRenderOptions } from '@leafer/interface' | ||
| @registerUI() | ||
| export class Text extends UI implements IText { | ||
| export class Text<TConstructorData = ITextInputData> extends UI<TConstructorData> implements IText { | ||
@@ -107,6 +107,2 @@ public get __tag() { return 'Text' } | ||
| constructor(data?: ITextInputData) { | ||
| super(data) | ||
| } | ||
| public __updateTextDrawData(): void { | ||
@@ -113,0 +109,0 @@ const data = this.__ |
+11
-21
| import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject, IScaleData, IUnitData, IPathCommandObject, ITransition, IFilter, ILeaferImage, IScaleFixed, IDragBoundsType } from '@leafer/interface' | ||
| import { Leaf, PathDrawer, surfaceType, dataType, positionType, scrollType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType, MathHelper, Plugin, DataHelper, affectRenderBoundsType, isString, isNumber } from '@leafer/core' | ||
| import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowType, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, IAnimateType, IStateStyle, IColorString, IAnimateList } from '@leafer-ui/interface' | ||
| import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowStyle, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, IAnimateType, IStateStyle, IColorString, IAnimateList } from '@leafer-ui/interface' | ||
| import { effectType, zoomLayerType } from '@leafer-ui/decorator' | ||
@@ -16,3 +16,3 @@ | ||
| @rewriteAble() | ||
| export class UI extends Leaf implements IUI { // tip: rewrited Box | ||
| export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements IUI { // tip: rewrited Box | ||
@@ -276,5 +276,5 @@ @dataProcessor(UIData) | ||
| public startArrow?: IArrowType | ||
| public startArrow?: IArrowStyle | ||
| public endArrow?: IArrowType | ||
| public endArrow?: IArrowStyle | ||
@@ -404,7 +404,2 @@ // corner | ||
| constructor(data?: IUIInputData) { | ||
| super(data) | ||
| } | ||
| // data | ||
@@ -416,12 +411,6 @@ | ||
| public set(data: IUIInputData, transition?: ITransition | 'temp'): void { | ||
| if (data) { | ||
| if (transition) { | ||
| if (transition === 'temp') { | ||
| this.lockNormalStyle = true | ||
| Object.assign(this, data) | ||
| this.lockNormalStyle = false | ||
| } else this.animate(data, transition) | ||
| } else Object.assign(this, data) | ||
| } | ||
| // @leafer-in/animate will rewrite | ||
| public set(data: IUIInputData, _transition?: ITransition | 'temp'): void { | ||
| if (data) Object.assign(this, data) | ||
| } | ||
@@ -476,3 +465,3 @@ | ||
| data.__pathForRender = data.cornerRadius ? PathCorner.smooth(data.path, data.cornerRadius, data.cornerSmoothing) : data.path | ||
| if (data.__useArrow) PathArrow.addArrows(this, !data.cornerRadius) | ||
| if (data.__useArrow) PathArrow.addArrows(this) | ||
| } else data.__pathForRender && (data.__pathForRender = undefined) | ||
@@ -509,3 +498,4 @@ } | ||
| public animate(_keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate { | ||
| public animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate { | ||
| this.set(keyframe as IUIInputData) | ||
| return Plugin.need('animate') | ||
@@ -512,0 +502,0 @@ } |
+24
-38
@@ -1,6 +0,6 @@ | ||
| import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathCommandObject, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IDragBoundsType, IHitType, ICursorType, IScaleFixed, IFilter, ITransition, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, ILeaferImage, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IZoomOptions, IClientPointData, IRenderOptions, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface'; | ||
| import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathCommandObject, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IDragBoundsType, IHitType, ICursorType, IScaleFixed, IFilter, ITransition, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, ILeaferImage, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, ICanvasSizeAttr, IZoomType, IZoomOptions, IClientPointData, IRenderOptions, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface'; | ||
| import { Leaf, LeafList } from '@leafer/core'; | ||
| import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IAnimation, IStates, IStateName, IStateStyle, IColorString, IEditorConfig, IAnimate, IAnimateList, IFindUIMethod, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, IUIJSONData, IFindCondition as IFindCondition$1, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, IScrollConfig, IScroller, IBoxInputData, IFrame, IFrameData, IFrameInputData, IRect, IRectData, IRectInputData, IEllipse, IEllipseData, IEllipseInputData, IPolygon, IPolygonData, IPolygonInputData, IStar, IStarData, IStarInputData, ILine, ILineData, ILineInputData, IImage, IImageData, IImageInputData, ICanvas, ICanvasData, ICanvasInputData, IText, ITextData, IBackgroundBoxStyle, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, IWritingMode, ITextAlign, IVerticalAlign, ITextWrap, ITextOverflow, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData, IPointData as IPointData$1 } from '@leafer-ui/interface'; | ||
| import { IUIInputData, IUI, IUIData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowStyle, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IAnimation, IStates, IStateName, IStateStyle, IColorString, IEditorConfig, IAnimate, IAnimateList, IFindUIMethod, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupInputData, IGroupData, IUIJSONData, IFindCondition as IFindCondition$1, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBoxInputData, IBox, IBoxData, IOverflow, IScrollConfig, IScroller, IFrameInputData, IFrame, IFrameData, IRectInputData, IRect, IRectData, IEllipseInputData, IEllipse, IEllipseData, IPolygonInputData, IPolygon, IPolygonData, IStarInputData, IStar, IStarData, ILineInputData, ILine, ILineData, IImageInputData, IImage, IImageData, ICanvasInputData, ICanvas, ICanvasData, ITextInputData, IText, ITextData, IBackgroundBoxStyle, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, IWritingMode, ITextAlign, IVerticalAlign, ITextWrap, ITextOverflow, ITextDrawData, IPathInputData, IPath, IPathData, IPenInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPointData as IPointData$1 } from '@leafer-ui/interface'; | ||
| declare class UI extends Leaf implements IUI { | ||
| declare class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements IUI { | ||
| __: IUIData; | ||
@@ -83,4 +83,4 @@ proxyData?: IUIInputData; | ||
| miterLimit?: INumber; | ||
| startArrow?: IArrowType; | ||
| endArrow?: IArrowType; | ||
| startArrow?: IArrowStyle; | ||
| endArrow?: IArrowStyle; | ||
| cornerRadius?: IFourNumber | ICornerRadiusString; | ||
@@ -128,5 +128,4 @@ cornerSmoothing?: INumber; | ||
| get pen(): IPathCreator; | ||
| constructor(data?: IUIInputData); | ||
| reset(_data?: IUIInputData): void; | ||
| set(data: IUIInputData, transition?: ITransition | 'temp'): void; | ||
| set(data: IUIInputData, _transition?: ITransition | 'temp'): void; | ||
| get(name?: string | string[] | IUIInputData): IUIInputData | IValue; | ||
@@ -148,3 +147,3 @@ createProxyData(): IUIInputData; | ||
| drawImagePlaceholder(canvas: ILeaferCanvas, _image?: ILeaferImage): void; | ||
| animate(_keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate; | ||
| animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate; | ||
| killAnimate(_type?: IAnimateType, _nextStyle?: IUIInputData): void; | ||
@@ -163,3 +162,3 @@ export(_filename: IExportFileType | string, _options?: IExportOptions | number | boolean): Promise<IExportResult>; | ||
| declare class Group extends UI implements IGroup { | ||
| declare class Group<TInputData = IGroupInputData> extends UI<TInputData> implements IGroup { | ||
| get __tag(): string; | ||
@@ -173,3 +172,2 @@ get isBranch(): boolean; | ||
| childlessJSON?: boolean; | ||
| constructor(data?: IGroupInputData); | ||
| reset(data?: IGroupInputData): void; | ||
@@ -253,6 +251,6 @@ __setBranch(): void; | ||
| __setLeafer(leafer: ILeafer): void; | ||
| protected __checkAutoLayout(config: ILeaferConfig, parentApp?: IApp): void; | ||
| protected __checkAutoLayout(): void; | ||
| __setAttr(attrName: string, newValue: IValue): boolean; | ||
| __getAttr(attrName: string): IValue; | ||
| protected __changeCanvasSize(attrName: string, newValue: number): void; | ||
| protected __changeCanvasSize(attrName: ICanvasSizeAttr, newValue: number): void; | ||
| protected __changeFill(newValue: string): void; | ||
@@ -285,3 +283,3 @@ protected __onCreated(): void; | ||
| declare class Box extends Group implements IBox { | ||
| declare class Box<TInputData = IBoxInputData> extends Group<TInputData> implements IBox { | ||
| get __tag(): string; | ||
@@ -299,3 +297,3 @@ get isBranchLeaf(): boolean; | ||
| hasScroller?: boolean; | ||
| constructor(data?: IBoxInputData); | ||
| constructor(data?: TInputData); | ||
| __updateStrokeSpread(): number; | ||
@@ -318,3 +316,3 @@ __updateRectRenderSpread(): number; | ||
| declare class Frame extends Box implements IFrame { | ||
| declare class Frame<TInputData = IFrameInputData> extends Box<TInputData> implements IFrame { | ||
| get __tag(): string; | ||
@@ -325,12 +323,10 @@ get isFrame(): boolean; | ||
| overflow?: IOverflow; | ||
| constructor(data?: IFrameInputData); | ||
| } | ||
| declare class Rect extends UI implements IRect { | ||
| declare class Rect<TInputData = IRectInputData> extends UI<TInputData> implements IRect { | ||
| get __tag(): string; | ||
| __: IRectData; | ||
| constructor(data?: IRectInputData); | ||
| } | ||
| declare class Ellipse extends UI implements IEllipse { | ||
| declare class Ellipse<TInputData = IEllipseInputData> extends UI<TInputData> implements IEllipse { | ||
| get __tag(): string; | ||
@@ -341,7 +337,6 @@ __: IEllipseData; | ||
| endAngle?: INumber; | ||
| constructor(data?: IEllipseInputData); | ||
| __updatePath(): void; | ||
| } | ||
| declare class Polygon extends UI implements IPolygon { | ||
| declare class Polygon<TInputData = IPolygonInputData> extends UI<TInputData> implements IPolygon { | ||
| get __tag(): string; | ||
@@ -352,3 +347,2 @@ __: IPolygonData; | ||
| curve?: boolean | number; | ||
| constructor(data?: IPolygonInputData); | ||
| __updatePath(): void; | ||
@@ -359,3 +353,3 @@ __updateRenderPath(): void; | ||
| declare class Star extends UI implements IStar { | ||
| declare class Star<TInputData = IStarInputData> extends UI<TInputData> implements IStar { | ||
| get __tag(): string; | ||
@@ -365,7 +359,6 @@ __: IStarData; | ||
| innerRadius?: INumber; | ||
| constructor(data?: IStarInputData); | ||
| __updatePath(): void; | ||
| } | ||
| declare class Line extends UI implements ILine { | ||
| declare class Line<TInputData = ILineInputData> extends UI<TInputData> implements ILine { | ||
| get __tag(): string; | ||
@@ -380,9 +373,6 @@ __: ILineData; | ||
| set toPoint(value: IPointData); | ||
| constructor(data?: ILineInputData); | ||
| __updatePath(): void; | ||
| __updateRenderPath(): void; | ||
| __updateBoxBounds(): void; | ||
| } | ||
| declare class Image extends Rect implements IImage { | ||
| declare class Image<TInputData = IImageInputData> extends Rect<TInputData> implements IImage { | ||
| get __tag(): string; | ||
@@ -393,7 +383,6 @@ __: IImageData; | ||
| get image(): ILeaferImage; | ||
| constructor(data?: IImageInputData); | ||
| } | ||
| declare const MyImage: typeof Image; | ||
| declare class Canvas extends Rect implements ICanvas { | ||
| declare class Canvas<TInputData = ICanvasInputData> extends Rect<TInputData> implements ICanvas { | ||
| get __tag(): string; | ||
@@ -411,3 +400,3 @@ __: ICanvasData; | ||
| url?: string; | ||
| constructor(data?: ICanvasInputData); | ||
| constructor(data?: TInputData); | ||
| drawImage(url: string): void; | ||
@@ -421,3 +410,3 @@ draw(ui: IUI, offset?: IPointData, scale?: number | IPointData, rotation?: number): void; | ||
| declare class Text extends UI implements IText { | ||
| declare class Text<TConstructorData = ITextInputData> extends UI<TConstructorData> implements IText { | ||
| get __tag(): string; | ||
@@ -453,3 +442,2 @@ __: ITextData; | ||
| get textDrawData(): ITextDrawData; | ||
| constructor(data?: ITextInputData); | ||
| __updateTextDrawData(): void; | ||
@@ -466,10 +454,9 @@ __updateBoxBounds(): void; | ||
| declare class Path extends UI implements IPath { | ||
| declare class Path<TInputData = IPathInputData> extends UI<TInputData> implements IPath { | ||
| get __tag(): string; | ||
| __: IPathData; | ||
| strokeAlign?: IStrokeAlign; | ||
| constructor(data?: IPathInputData); | ||
| } | ||
| declare class Pen extends Group implements IPen { | ||
| declare class Pen<TInputData = IPenInputData> extends Group<TInputData> implements IPen { | ||
| get __tag(): string; | ||
@@ -481,3 +468,2 @@ __: IPenData; | ||
| __path: IPathCommandData$1; | ||
| constructor(data?: IPenInputData); | ||
| setStyle(data: IPathInputData): Pen; | ||
@@ -484,0 +470,0 @@ beginPath(): Pen; |
83123
-0.96%1840
-3.46%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated