@leafer-ui/interface 1.0.0-rc.2 → 1.0.0-rc.4

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.2",
3
+ "version": "1.0.0-rc.4",
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.2"
25
+ "@leafer/interface": "1.0.0-rc.4"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -138,6 +138,9 @@ export interface ITextRowData {
138
138
  data?: ITextCharData[]
139
139
  words?: ITextWordData[]
140
140
 
141
+ startCharSize?: number
142
+ endCharSize?: number
143
+
141
144
  paraStart?: boolean // paragraph start
142
145
  paraEnd?: boolean // paragraph end
143
146
  isOverflow?: boolean
@@ -5,8 +5,8 @@ import { ICachedShape } from '../ICachedShape'
5
5
 
6
6
 
7
7
  export interface IEffectModule {
8
- shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void
9
- innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void
10
- blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, options: IRenderOptions): void
11
- backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void
8
+ shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
9
+ innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
10
+ blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, renderOptions: IRenderOptions): void
11
+ backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void
12
12
  }
@@ -5,22 +5,22 @@ import { IUI, IUIData } from '../IUI'
5
5
  import { ICachedShape } from '../ICachedShape'
6
6
 
7
7
  export interface IPaintModule {
8
- compute?(ui: IUI, attrName: 'fill' | 'stroke'): void
8
+ compute?(attrName: 'fill' | 'stroke', ui: IUI): void
9
9
 
10
- fill?(ui: IUI, canvas: ILeaferCanvas, fill: string): void
11
- fills?(ui: IUI, canvas: ILeaferCanvas, fills: ILeafPaint[]): void
10
+ fill?(fill: string, ui: IUI, canvas: ILeaferCanvas,): void
11
+ fills?(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
12
12
 
13
13
  fillText?(ui: IUI, canvas: ILeaferCanvas): void
14
14
 
15
- stroke?(ui: IUI, canvas: ILeaferCanvas, stroke: string): void
16
- strokes?(ui: IUI, canvas: ILeaferCanvas, strokes: ILeafPaint[]): void
15
+ stroke?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
16
+ strokes?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
17
17
 
18
- strokeText?(ui: IUI, canvas: ILeaferCanvas, stroke: string): void
19
- strokesText?(ui: IUI, canvas: ILeaferCanvas, strokes: ILeafPaint[]): void
18
+ strokeText?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
19
+ strokesText?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
20
20
 
21
21
  drawTextStroke?(ui: IUI, canvas: ILeaferCanvas): void
22
22
 
23
- shape?(ui: IUI, current: ILeaferCanvas, options: IRenderOptions): ICachedShape
23
+ shape?(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape
24
24
 
25
- recycleImage?(data: IUIData, attrName: string): IBooleanMap
25
+ recycleImage?(attrName: 'fill' | 'stroke', data: IUIData): IBooleanMap
26
26
  }
package/types/index.d.ts CHANGED
@@ -391,6 +391,8 @@ interface ITextRowData {
391
391
  text?: string;
392
392
  data?: ITextCharData[];
393
393
  words?: ITextWordData[];
394
+ startCharSize?: number;
395
+ endCharSize?: number;
394
396
  paraStart?: boolean;
395
397
  paraEnd?: boolean;
396
398
  isOverflow?: boolean;
@@ -572,24 +574,24 @@ interface ICachedShape extends ICachedLeaf {
572
574
  }
573
575
 
574
576
  interface IPaintModule {
575
- compute?(ui: IUI, attrName: 'fill' | 'stroke'): void;
576
- fill?(ui: IUI, canvas: ILeaferCanvas, fill: string): void;
577
- fills?(ui: IUI, canvas: ILeaferCanvas, fills: ILeafPaint[]): void;
577
+ compute?(attrName: 'fill' | 'stroke', ui: IUI): void;
578
+ fill?(fill: string, ui: IUI, canvas: ILeaferCanvas): void;
579
+ fills?(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
578
580
  fillText?(ui: IUI, canvas: ILeaferCanvas): void;
579
- stroke?(ui: IUI, canvas: ILeaferCanvas, stroke: string): void;
580
- strokes?(ui: IUI, canvas: ILeaferCanvas, strokes: ILeafPaint[]): void;
581
- strokeText?(ui: IUI, canvas: ILeaferCanvas, stroke: string): void;
582
- strokesText?(ui: IUI, canvas: ILeaferCanvas, strokes: ILeafPaint[]): void;
581
+ stroke?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
582
+ strokes?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
583
+ strokeText?(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
584
+ strokesText?(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
583
585
  drawTextStroke?(ui: IUI, canvas: ILeaferCanvas): void;
584
- shape?(ui: IUI, current: ILeaferCanvas, options: IRenderOptions): ICachedShape;
585
- recycleImage?(data: IUIData, attrName: string): IBooleanMap;
586
+ shape?(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
587
+ recycleImage?(attrName: 'fill' | 'stroke', data: IUIData): IBooleanMap;
586
588
  }
587
589
 
588
590
  interface IEffectModule {
589
- shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void;
590
- innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void;
591
- blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, options: IRenderOptions): void;
592
- backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, options: IRenderOptions): void;
591
+ shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
592
+ innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
593
+ blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas, renderOptions: IRenderOptions): void;
594
+ backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, renderOptions: IRenderOptions): void;
593
595
  }
594
596
 
595
597
  export type { IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, ICornerRadiusString, IDashPatternString, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IExportOptions, IExportResult, IExportResultFunction, IFontWeight, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGradientPaint, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, 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, IColorString as IStringColor, IStrokeAlign, IStrokeCap, IStrokeJoin, IStrokeWidthString, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDrawData, ITextInputData, ITextRenderModule, ITextRowData, ITextWordData, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIRenderModule, IUITag, IUnitData, IVectorPath, IVerticalAlign };