@leafer/interface 1.0.0-beta.2 → 1.0.0-beta.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/interface",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "@leafer/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -12,4 +12,16 @@ export interface IPlatform {
12
12
  conicGradientRotate90?: boolean // fixfox need rotate
13
13
  fullImageShadow?: boolean // safari need
14
14
  layout(target: ILeaf): void
15
+ origin?: {
16
+ createCanvas: ICreateCanvasFunction,
17
+ loadImage: ILoadImageFunction
18
+ }
19
+ }
20
+
21
+ interface ICreateCanvasFunction {
22
+ (width: number, height: number, format?: 'svg' | 'pdf'): any
23
+ }
24
+
25
+ interface ILoadImageFunction {
26
+ (url: string): Promise<any>
15
27
  }