@leafer-ui/interface 1.0.0-beta.6 → 1.0.0-beta.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "@leafer-ui/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,6 +19,6 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/interface": "1.0.0-beta.6"
22
+ "@leafer/interface": "1.0.0-beta.8"
23
23
  }
24
24
  }
package/src/IUI.ts CHANGED
@@ -247,10 +247,11 @@ export interface IGroup extends IUI {
247
247
  children: IUI[]
248
248
  mask?: IUI
249
249
  add(child: IUI, index?: number): void
250
- remove(child?: IUI): void
251
250
  addAt(child: IUI, index: number): void
252
251
  addAfter(child: IUI, after: IUI): void
253
252
  addBefore(child: IUI, before: IUI): void
253
+ remove(child?: IUI): void
254
+ removeAll(): void
254
255
  }
255
256
  export interface IGroupData extends IUIData { }
256
257
  export interface IGroupInputData extends IUIInputData { }
package/src/index.ts CHANGED
@@ -25,7 +25,7 @@ export { ILeafFill, ILeafPaint, ILeafPaintColor, ILeafStrokePaint, ILeafShadowEf
25
25
  export { IUIRenderModule, IRectRenderModule, IImageRenderModule, ITextRenderModule, IGroupRenderModule, IFrameRenderModule } from './module/IUIRender'
26
26
  export { IUIBoundsModule } from './module/IUIBounds'
27
27
  export { IUIHitModule } from './module/IUIHit'
28
- export { IExportModule, IExportOptions, IExportResult } from './module/IExport'
28
+ export { IExportModule, IExportOptions, IExportResult, IExportResultFunction } from './module/IExport'
29
29
 
30
30
  export { IPaintModule } from './module/IPaint'
31
31
  export { IEffectModule } from './module/IEffect'
@@ -1,12 +1,12 @@
1
- import { ILeaferCanvas } from '@leafer/interface'
1
+ import { ILeaferCanvas, IRenderOptions } from '@leafer/interface'
2
2
 
3
3
  import { IUI } from '../IUI'
4
4
  import { ICachedShape } from '../ICachedShape'
5
5
 
6
6
 
7
7
  export interface IEffectModule {
8
- shadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
9
- innerShadow?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
10
- blur?(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void
11
- backgroundBlur?(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): void
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
12
12
  }
@@ -9,6 +9,11 @@ export interface IExportResult {
9
9
  data: IBlob | string | boolean
10
10
  }
11
11
 
12
+ export interface IExportResultFunction {
13
+ (data: IExportResult): void
14
+ }
15
+
16
+
12
17
  export interface IExportModule {
13
18
  export(leaf: ILeaf, filename: IExportFileType | string, options?: IExportOptions | number | boolean): Promise<IExportResult>
14
19
  }