@leafer-ui/display 1.3.2 → 1.3.3
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/Leafer.ts +1 -1
- package/src/Text.ts +1 -1
- package/src/UI.ts +9 -7
- package/types/index.d.ts +8 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
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.3.
|
|
26
|
-
"@leafer-ui/data": "1.3.
|
|
27
|
-
"@leafer-ui/display-module": "1.3.
|
|
28
|
-
"@leafer-ui/decorator": "1.3.
|
|
29
|
-
"@leafer-ui/external": "1.3.
|
|
25
|
+
"@leafer/core": "1.3.3",
|
|
26
|
+
"@leafer-ui/data": "1.3.3",
|
|
27
|
+
"@leafer-ui/display-module": "1.3.3",
|
|
28
|
+
"@leafer-ui/decorator": "1.3.3",
|
|
29
|
+
"@leafer-ui/external": "1.3.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.3.
|
|
33
|
-
"@leafer-ui/interface": "1.3.
|
|
32
|
+
"@leafer/interface": "1.3.3",
|
|
33
|
+
"@leafer-ui/interface": "1.3.3"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Box.ts
CHANGED
package/src/Leafer.ts
CHANGED
|
@@ -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
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'
|
|
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, ITransition, IAnimateType, IEffect } from '@leafer-ui/interface'
|
|
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, ITransition, 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
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';
|
|
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, ITransition, IStates, IStateName, 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';
|
|
3
|
+
import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IEffect, IAnimation, ITransition, 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);
|