@leafer-ui/interface 1.0.0-rc.23 → 1.0.0-rc.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.0.0-rc.23",
3
+ "version": "1.0.0-rc.24",
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.23"
25
+ "@leafer/interface": "1.0.0-rc.24"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -312,6 +312,8 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
312
312
 
313
313
  children?: IUI[]
314
314
 
315
+ readonly pen: IPathCreator
316
+
315
317
  reset(data?: IUIInputData): void
316
318
 
317
319
  set(data: IUIInputData): void
@@ -328,6 +330,8 @@ export interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrDa
328
330
  getPath(curve?: boolean, pathForRender?: boolean): IPathCommandData
329
331
  getPathString(curve?: boolean, pathForRender?: boolean): IPathString
330
332
 
333
+ load(): void
334
+
331
335
  __drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void
332
336
  __drawPathByBox(drawer: IPathDrawer): void
333
337
  __drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void
@@ -369,11 +373,6 @@ export interface IUIData extends IUIComputedData, ILeafData {
369
373
  __isOverflow?: boolean
370
374
  __blendLayer?: boolean
371
375
 
372
- readonly __autoWidth: boolean
373
- readonly __autoHeight: boolean
374
- readonly __autoSide: boolean
375
- readonly __autoSize: boolean
376
-
377
376
  __boxStroke?: boolean
378
377
 
379
378
  // text
package/src/type/IType.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber, IAlign } from '@leafer/interface'
1
+ import { IPointData, IPathCommandData, IWindingRule, IBlendMode, IExportFileType, ISizeData, IFourNumber, IAlign, IUnitPointData } from '@leafer/interface'
2
2
  import { IColorString, IPaintString } from './IStringType'
3
3
 
4
4
  export type IPaint = ISolidPaint | IGradientPaint | IImagePaint
@@ -47,10 +47,10 @@ export interface IRGBA extends IRGB {
47
47
  // ---
48
48
  export interface IGradientPaint extends IPaintBase {
49
49
  type: IGradientType
50
- from?: IPointData
51
- to?: IPointData
50
+ from?: IAlign | IUnitPointData
51
+ to?: IAlign | IUnitPointData
52
52
  stretch?: number
53
- stops: IColorStop[]
53
+ stops: IColorStop[] | IColorString[]
54
54
  }
55
55
  export interface IColorStop {
56
56
  offset: number
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { IPointData, IExportFileType, IFourNumber, IAlign, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, INumber, IBoolean, IString, IUnitData, IPathCreator, IBoundsData as IBoundsData$1, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IValue, IFindCondition, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap, IAround } from '@leafer/interface';
1
+ import { IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, ISizeData, IPathCommandData, IWindingRule, IBlendMode, IMatrixData, ILeaferImage, ITaskItem, INumber, IBoolean, IString, IUnitData, IPathCreator, IBoundsData as IBoundsData$1, ILeaferImageConfig, ICanvasContext2DSettings, ILeaferCanvas, IRenderOptions, IPickOptions, IPickResult, ILeaf as ILeaf$1, IValue, IFindCondition, IPathString, IPathDrawer, IExportOptions, IExportResult, IAnswer, ILeafData, ILeafComputedData, ILeafInputData, IObject as IObject$1, ILeaferAttrData, IControl, ILeaferConfig, ILeaferType, ILeafRender, ILeafBounds, ILeafHit, IStateStyleType, ICachedLeaf, IBooleanMap, IAround } from '@leafer/interface';
2
2
  export * from '@leafer/interface';
3
- import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IObject, ILeaf, 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, IAlign as IAlign$1, IUnitPointData, IUIInputData as IUIInputData$1, IBox as IBox$1, IRect as IRect$1, IBoundsData, IKeyEvent } from '@leafer-ui/interface';
3
+ import { IGroup as IGroup$1, ISelectorProxy, IUI as IUI$1, ILeafList, IObject, ILeaf, 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, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IBox as IBox$1, IRect as IRect$1, IBoundsData, IKeyEvent } from '@leafer-ui/interface';
4
4
 
5
5
  type IPercent = string;
6
6
  type IColorString = string;
@@ -41,10 +41,10 @@ interface IRGBA extends IRGB {
41
41
  }
42
42
  interface IGradientPaint extends IPaintBase {
43
43
  type: IGradientType;
44
- from?: IPointData;
45
- to?: IPointData;
44
+ from?: IAlign | IUnitPointData;
45
+ to?: IAlign | IUnitPointData;
46
46
  stretch?: number;
47
- stops: IColorStop[];
47
+ stops: IColorStop[] | IColorString[];
48
48
  }
49
49
  interface IColorStop {
50
50
  offset: number;
@@ -368,7 +368,7 @@ interface IEditorConfig {
368
368
  resizeCursor?: IImageCursor;
369
369
  rotateCursor?: IImageCursor;
370
370
  skewCursor?: IImageCursor;
371
- around?: IAlign$1 | IUnitPointData;
371
+ around?: IAlign$1 | IUnitPointData$1;
372
372
  lockRatio?: boolean | 'corner';
373
373
  rotateGap?: number;
374
374
  selector?: boolean;
@@ -669,6 +669,7 @@ interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEf
669
669
  editOuter: string;
670
670
  editInner: string;
671
671
  children?: IUI[];
672
+ readonly pen: IPathCreator;
672
673
  reset(data?: IUIInputData): void;
673
674
  set(data: IUIInputData): void;
674
675
  toJSON(): IUIInputData;
@@ -680,6 +681,7 @@ interface IUI extends IFillAttrData, IStrokeAttrData, ICornerRadiusAttrData, IEf
680
681
  findId(id: number | string): IUI;
681
682
  getPath(curve?: boolean, pathForRender?: boolean): IPathCommandData;
682
683
  getPathString(curve?: boolean, pathForRender?: boolean): IPathString;
684
+ load(): void;
683
685
  __drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void;
684
686
  __drawPathByBox(drawer: IPathDrawer): void;
685
687
  __drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
@@ -708,10 +710,6 @@ interface IUIData extends IUIComputedData, ILeafData {
708
710
  __drawAfterFill?: boolean;
709
711
  __isOverflow?: boolean;
710
712
  __blendLayer?: boolean;
711
- readonly __autoWidth: boolean;
712
- readonly __autoHeight: boolean;
713
- readonly __autoSide: boolean;
714
- readonly __autoSize: boolean;
715
713
  __boxStroke?: boolean;
716
714
  __font?: string;
717
715
  __textDrawData?: ITextDrawData;