@leafer-ui/interface 1.0.0-rc.7 → 1.0.0-rc.8
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 +2 -2
- package/src/IUI.ts +2 -1
- package/src/app/ILeafer.ts +2 -2
- package/src/editor/IEditor.ts +2 -2
- package/src/index.ts +2 -2
- package/src/type/IComputedType.ts +1 -0
- package/src/type/IType.ts +3 -0
- package/types/index.d.ts +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
4
|
"description": "@leafer-ui/interface",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/interface": "1.0.0-rc.
|
|
25
|
+
"@leafer/interface": "1.0.0-rc.8"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/IUI.ts
CHANGED
|
@@ -127,6 +127,7 @@ export interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIDat
|
|
|
127
127
|
__baseLine?: number
|
|
128
128
|
__lineHeight?: number
|
|
129
129
|
__letterSpacing?: number
|
|
130
|
+
__padding?: number[]
|
|
130
131
|
__clipText?: boolean
|
|
131
132
|
__textBoxBounds?: IBoundsData
|
|
132
133
|
}
|
|
@@ -274,7 +275,7 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
|
|
|
274
275
|
parent?: IGroup
|
|
275
276
|
isFrame?: boolean
|
|
276
277
|
|
|
277
|
-
proxyData
|
|
278
|
+
proxyData: IUIInputData
|
|
278
279
|
__proxyData?: IUIInputData
|
|
279
280
|
|
|
280
281
|
children?: IUI[]
|
package/src/app/ILeafer.ts
CHANGED
|
@@ -7,8 +7,8 @@ export interface ILeafer extends IGroup, ILeaferAttrData, IControl {
|
|
|
7
7
|
readonly isApp: boolean
|
|
8
8
|
readonly app: ILeafer
|
|
9
9
|
parent?: IApp
|
|
10
|
-
zoomLayer
|
|
11
|
-
editor
|
|
10
|
+
zoomLayer: IGroup
|
|
11
|
+
editor: IEditorBase
|
|
12
12
|
|
|
13
13
|
ground?: ILeafer
|
|
14
14
|
tree?: ILeafer
|
package/src/editor/IEditor.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IGroup, IUI, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill,
|
|
1
|
+
import { IGroup, IUI, IRectInputData, ISelectorProxy, IEditSize, ICursorType, IAround, IDragEvent, IRotateEvent, IStroke, IFill, ILeaf, IObject, IBoxInputData } from '@leafer-ui/interface'
|
|
2
2
|
|
|
3
3
|
export interface IEditorBase extends IGroup, ISelectorProxy {
|
|
4
4
|
config: IEditorConfig
|
|
5
5
|
|
|
6
6
|
hoverTarget: IUI
|
|
7
|
-
target: IUI | IUI[]
|
|
7
|
+
target: IUI | IUI[]
|
|
8
8
|
|
|
9
9
|
readonly list: IUI[]
|
|
10
10
|
|
package/src/index.ts
CHANGED
|
@@ -23,8 +23,8 @@ export {
|
|
|
23
23
|
IUITag, IUIInputData
|
|
24
24
|
} from './IUI'
|
|
25
25
|
|
|
26
|
-
export { IUnitData, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IFill, IStroke, IStrokeAlign, IStrokeJoin, IStrokeCap, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow, ITextWrap } from './type/IType'
|
|
27
|
-
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString
|
|
26
|
+
export { IUnitData, IVectorPath, IShadowEffect, IBlurEffect, IGrayscaleEffect, IFill, IStroke, IStrokeAlign, IStrokeJoin, IStrokeCap, IRGB, IRGBA, IColor, IColorStop, IPaint, IGradientPaint, IImagePaint, IImagePaintMode, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, IOverflow, ITextWrap, IRepeat } from './type/IType'
|
|
27
|
+
export { ICornerRadiusString, IStrokeWidthString, IPaintString, IShadowString, IPercent, IDashPatternString, IColorString } from './type/IStringType'
|
|
28
28
|
export { ILeafFill, ILeafPaint, ILeafPaintPatternData, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEffect } from './type/IComputedType'
|
|
29
29
|
|
|
30
30
|
export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
|
package/src/type/IType.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface IImagePaint extends IPaintBase {
|
|
|
72
72
|
offset?: IPointData
|
|
73
73
|
scale?: number | IPointData
|
|
74
74
|
rotation?: number
|
|
75
|
+
|
|
76
|
+
repeat?: IRepeat
|
|
75
77
|
}
|
|
76
78
|
export interface IImageFilters {
|
|
77
79
|
exposure?: number // 曝光
|
|
@@ -83,6 +85,7 @@ export interface IImageFilters {
|
|
|
83
85
|
shadows?: number // 阴影
|
|
84
86
|
}
|
|
85
87
|
export type IImagePaintMode = 'cover' | 'fit' | 'strench' | 'clip' | 'repeat'
|
|
88
|
+
export type IRepeat = boolean | 'x' | 'y'
|
|
86
89
|
|
|
87
90
|
// 描边
|
|
88
91
|
export type IStrokeAlign = 'inside' | 'outside' | 'center'
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPointData, IExportFileType, 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';
|
|
2
2
|
export * from '@leafer/interface';
|
|
3
|
-
import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1,
|
|
3
|
+
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';
|
|
4
4
|
|
|
5
5
|
type IPercent = string;
|
|
6
6
|
type IColorString = string;
|
|
@@ -62,6 +62,7 @@ interface IImagePaint extends IPaintBase {
|
|
|
62
62
|
offset?: IPointData;
|
|
63
63
|
scale?: number | IPointData;
|
|
64
64
|
rotation?: number;
|
|
65
|
+
repeat?: IRepeat;
|
|
65
66
|
}
|
|
66
67
|
interface IImageFilters {
|
|
67
68
|
exposure?: number;
|
|
@@ -73,6 +74,7 @@ interface IImageFilters {
|
|
|
73
74
|
shadows?: number;
|
|
74
75
|
}
|
|
75
76
|
type IImagePaintMode = 'cover' | 'fit' | 'strench' | 'clip' | 'repeat';
|
|
77
|
+
type IRepeat = boolean | 'x' | 'y';
|
|
76
78
|
type IStrokeAlign = 'inside' | 'outside' | 'center';
|
|
77
79
|
type IStrokeCap = 'none' | 'round' | 'square' | 'arrow-lines' | 'arrow-equilateral';
|
|
78
80
|
type IStrokeJoin = 'bevel' | 'round' | 'miter';
|
|
@@ -129,6 +131,7 @@ interface ILeafPaintPatternData {
|
|
|
129
131
|
opacity?: number;
|
|
130
132
|
transform?: IMatrixData;
|
|
131
133
|
mode?: IImagePaintMode;
|
|
134
|
+
repeat?: 'repeat' | 'repeat-x' | 'repeat-y';
|
|
132
135
|
}
|
|
133
136
|
type ILeafFill = ILeafPaint;
|
|
134
137
|
interface ILeafStrokePaint extends ILeafPaint {
|
|
@@ -391,6 +394,7 @@ interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
|
|
|
391
394
|
__baseLine?: number;
|
|
392
395
|
__lineHeight?: number;
|
|
393
396
|
__letterSpacing?: number;
|
|
397
|
+
__padding?: number[];
|
|
394
398
|
__clipText?: boolean;
|
|
395
399
|
__textBoxBounds?: IBoundsData;
|
|
396
400
|
}
|
|
@@ -513,7 +517,7 @@ interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEf
|
|
|
513
517
|
leafer?: ILeafer;
|
|
514
518
|
parent?: IGroup;
|
|
515
519
|
isFrame?: boolean;
|
|
516
|
-
proxyData
|
|
520
|
+
proxyData: IUIInputData;
|
|
517
521
|
__proxyData?: IUIInputData;
|
|
518
522
|
children?: IUI[];
|
|
519
523
|
reset(data?: IUIInputData): void;
|
|
@@ -575,7 +579,7 @@ interface IUIInputData extends IRectInputData, IEllipseInputData, IPolygonInputD
|
|
|
575
579
|
interface IEditorBase extends IGroup$1, ISelectorProxy {
|
|
576
580
|
config: IEditorConfig;
|
|
577
581
|
hoverTarget: IUI$1;
|
|
578
|
-
target: IUI$1 | IUI$1[]
|
|
582
|
+
target: IUI$1 | IUI$1[];
|
|
579
583
|
readonly list: IUI$1[];
|
|
580
584
|
readonly hasTarget: boolean;
|
|
581
585
|
readonly multiple: boolean;
|
|
@@ -638,8 +642,8 @@ interface ILeafer extends IGroup, ILeaferAttrData, IControl {
|
|
|
638
642
|
readonly isApp: boolean;
|
|
639
643
|
readonly app: ILeafer;
|
|
640
644
|
parent?: IApp;
|
|
641
|
-
zoomLayer
|
|
642
|
-
editor
|
|
645
|
+
zoomLayer: IGroup;
|
|
646
|
+
editor: IEditorBase;
|
|
643
647
|
ground?: ILeafer;
|
|
644
648
|
tree?: ILeafer;
|
|
645
649
|
sky?: ILeafer;
|
|
@@ -719,4 +723,4 @@ interface IEffectModule {
|
|
|
719
723
|
backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
|
|
720
724
|
}
|
|
721
725
|
|
|
722
|
-
export type { IApp, IAppConfig, IAppData, IAppInputData, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, 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, IShadowEffect, IShadowString, IStar, IStarData, IStarInputData,
|
|
726
|
+
export type { IApp, IAppConfig, IAppData, IAppInputData, 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 };
|