@leafer-ui/display 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/src/Box.ts +2 -0
- package/src/Group.ts +2 -2
- package/src/Leafer.ts +3 -3
- package/src/Text.ts +1 -1
- package/src/UI.ts +10 -8
- package/types/index.d.ts +9 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "@leafer-ui/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.
|
|
26
|
-
"@leafer-ui/data": "1.
|
|
27
|
-
"@leafer-ui/display-module": "1.
|
|
28
|
-
"@leafer-ui/decorator": "1.
|
|
29
|
-
"@leafer-ui/external": "1.
|
|
25
|
+
"@leafer/core": "1.4.0",
|
|
26
|
+
"@leafer-ui/data": "1.4.0",
|
|
27
|
+
"@leafer-ui/display-module": "1.4.0",
|
|
28
|
+
"@leafer-ui/decorator": "1.4.0",
|
|
29
|
+
"@leafer-ui/external": "1.4.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.
|
|
33
|
-
"@leafer-ui/interface": "1.
|
|
32
|
+
"@leafer/interface": "1.4.0",
|
|
33
|
+
"@leafer-ui/interface": "1.4.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Box.ts
CHANGED
package/src/Group.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IJSONOptions, IPickOptions, IPickResult, IPointData } from '@leafer/interface'
|
|
1
|
+
import { IJSONOptions, IPickOptions, IPickResult, IPointData, ITransition } from '@leafer/interface'
|
|
2
2
|
import { Branch, useModule, dataProcessor, registerUI } from '@leafer/core'
|
|
3
3
|
|
|
4
|
-
import { IGroup, IGroupData, IGroupInputData, IUI, IUIInputData, IUIJSONData,
|
|
4
|
+
import { IGroup, IGroupData, IGroupInputData, IUI, IUIInputData, IUIJSONData, IFindCondition, IFindUIMethod } from '@leafer-ui/interface'
|
|
5
5
|
import { GroupData } from '@leafer-ui/data'
|
|
6
6
|
|
|
7
7
|
import { UI } from './UI'
|
package/src/Leafer.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IFourNumber, IBounds, IClientPointData } from '@leafer/interface'
|
|
1
|
+
import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IFourNumber, IBounds, IClientPointData, ITransition } from '@leafer/interface'
|
|
2
2
|
import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, WaitHelper, WatchEvent, Bounds, LeafList, Plugin } from '@leafer/core'
|
|
3
3
|
|
|
4
|
-
import { ILeaferInputData, ILeaferData, IFunction, IUIInputData,
|
|
4
|
+
import { ILeaferInputData, ILeaferData, IFunction, IUIInputData, ILeafer, IApp, IEditorBase } from '@leafer-ui/interface'
|
|
5
5
|
import { LeaferData } from '@leafer-ui/data'
|
|
6
6
|
|
|
7
7
|
import { Group } from './Group'
|
|
@@ -256,7 +256,7 @@ export class Leafer extends Group implements ILeafer {
|
|
|
256
256
|
override __setAttr(attrName: string, newValue: IValue): boolean {
|
|
257
257
|
if (this.canvas) {
|
|
258
258
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
259
|
-
if (!newValue) debug.warn(attrName + ' is 0')
|
|
259
|
+
// if (!newValue) debug.warn(attrName + ' is 0')
|
|
260
260
|
this.__changeCanvasSize(attrName, newValue as number)
|
|
261
261
|
} else if (attrName === 'fill') {
|
|
262
262
|
this.__changeFill(newValue as string)
|
package/src/Text.ts
CHANGED
package/src/UI.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
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 } from '@leafer/interface'
|
|
1
|
+
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 } from '@leafer/interface'
|
|
2
2
|
import { Leaf, PathDrawer, surfaceType, dataType, positionType, 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 } from '@leafer/core'
|
|
3
3
|
|
|
4
|
-
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,
|
|
4
|
+
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, IEffect, IStateStyle } from '@leafer-ui/interface'
|
|
5
5
|
import { effectType, zoomLayerType } from '@leafer-ui/decorator'
|
|
6
6
|
|
|
7
7
|
import { UIData } from '@leafer-ui/data'
|
|
@@ -326,17 +326,19 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
|
|
|
326
326
|
public disabled?: IBoolean
|
|
327
327
|
|
|
328
328
|
|
|
329
|
-
public normalStyle?:
|
|
329
|
+
public normalStyle?: IStateStyle
|
|
330
330
|
|
|
331
|
-
public hoverStyle?:
|
|
331
|
+
public hoverStyle?: IStateStyle
|
|
332
332
|
|
|
333
|
-
public pressStyle?:
|
|
333
|
+
public pressStyle?: IStateStyle
|
|
334
334
|
|
|
335
|
-
public focusStyle?:
|
|
335
|
+
public focusStyle?: IStateStyle
|
|
336
336
|
|
|
337
|
-
public selectedStyle?:
|
|
337
|
+
public selectedStyle?: IStateStyle
|
|
338
338
|
|
|
339
|
-
public disabledStyle?:
|
|
339
|
+
public disabledStyle?: IStateStyle
|
|
340
|
+
|
|
341
|
+
public placeholderStyle?: IStateStyle
|
|
340
342
|
|
|
341
343
|
|
|
342
344
|
public button?: IBoolean
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
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, IHitType, ICursorType, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
|
|
1
|
+
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, IHitType, ICursorType, ITransition, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
|
|
2
2
|
import { Leaf, LeafList } from '@leafer/core';
|
|
3
|
-
import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IEffect, IAnimation,
|
|
3
|
+
import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IEffect, IAnimation, IStates, IStateName, IStateStyle, IAnimate, IEditorConfig, IFindUIMethod, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, IUIJSONData, IFindCondition as IFindCondition$1, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, 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, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, IWritingMode, ITextAlign, IVerticalAlign, ITextWrap, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData } from '@leafer-ui/interface';
|
|
4
4
|
|
|
5
5
|
declare class UI extends Leaf implements IUI {
|
|
6
6
|
__: IUIData;
|
|
@@ -98,12 +98,13 @@ declare class UI extends Leaf implements IUI {
|
|
|
98
98
|
state?: IStateName;
|
|
99
99
|
selected?: IBoolean;
|
|
100
100
|
disabled?: IBoolean;
|
|
101
|
-
normalStyle?:
|
|
102
|
-
hoverStyle?:
|
|
103
|
-
pressStyle?:
|
|
104
|
-
focusStyle?:
|
|
105
|
-
selectedStyle?:
|
|
106
|
-
disabledStyle?:
|
|
101
|
+
normalStyle?: IStateStyle;
|
|
102
|
+
hoverStyle?: IStateStyle;
|
|
103
|
+
pressStyle?: IStateStyle;
|
|
104
|
+
focusStyle?: IStateStyle;
|
|
105
|
+
selectedStyle?: IStateStyle;
|
|
106
|
+
disabledStyle?: IStateStyle;
|
|
107
|
+
placeholderStyle?: IStateStyle;
|
|
107
108
|
button?: IBoolean;
|
|
108
109
|
data: IObject;
|
|
109
110
|
set scale(value: INumber | IPointData);
|