@leafer/worker 1.0.0-beta.18 → 1.0.0-rc.10

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/worker",
3
- "version": "1.0.0-beta.18",
3
+ "version": "1.0.0-rc.10",
4
4
  "description": "@leafer/worker",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,12 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0-beta.18",
26
- "@leafer/partner": "1.0.0-beta.18",
27
- "@leafer/canvas-worker": "1.0.0-beta.18",
28
- "@leafer/image-worker": "1.0.0-beta.18"
25
+ "@leafer/core": "1.0.0-rc.10",
26
+ "@leafer/canvas-worker": "1.0.0-rc.10",
27
+ "@leafer/image-worker": "1.0.0-rc.10"
29
28
  },
30
29
  "devDependencies": {
31
- "@leafer/interface": "1.0.0-beta.18"
30
+ "@leafer/interface": "1.0.0-rc.10"
32
31
  }
33
32
  }
package/src/index.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export * from '@leafer/core'
2
- export * from '@leafer/partner'
3
2
 
4
3
  export * from '@leafer/canvas-worker'
5
4
  export * from '@leafer/image-worker'
6
5
 
7
6
  import { ICreator, IFunction, IExportImageType, IExportFileType, IObject, ICanvasType } from '@leafer/interface'
8
- import { Platform, Creator, FileHelper, InteractionBase } from '@leafer/core'
7
+ import { Platform, Creator, FileHelper } from '@leafer/core'
9
8
 
10
9
  import { LeaferCanvas } from '@leafer/canvas-worker'
11
10
  import { LeaferImage } from '@leafer/image-worker'
@@ -15,10 +14,7 @@ const { mineType } = FileHelper
15
14
 
16
15
  Object.assign(Creator, {
17
16
  canvas: (options?, manager?) => new LeaferCanvas(options, manager),
18
- image: (options) => new LeaferImage(options),
19
- hitCanvas: (options?, manager?) => new LeaferCanvas(options, manager),
20
-
21
- interaction: (target, canvas, selector, options?) => new InteractionBase(target, canvas, selector, options),
17
+ image: (options) => new LeaferImage(options)
22
18
  } as ICreator)
23
19
 
24
20
 
@@ -41,7 +37,7 @@ export function useCanvas(_canvasType: ICanvasType, _power?: IObject): void {
41
37
  canvasSaveAs: (_canvas: OffscreenCanvas, _filename: string, _quality?: any) => new Promise((resolve) => resolve()),
42
38
  loadImage(src: any): Promise<ImageBitmap> {
43
39
  return new Promise((resolve, reject) => {
44
- if (!src.startsWith('data:') && Platform.imageSuffix) src += (src.includes("?") ? "&" : "?") + Platform.imageSuffix
40
+ if (!src.startsWith('data:') && Platform.image.suffix) src += (src.includes("?") ? "&" : "?") + Platform.image.suffix
45
41
  let req = new XMLHttpRequest()
46
42
  req.open('GET', src, true)
47
43
  req.responseType = "blob"
@@ -66,7 +62,6 @@ Platform.name = 'web'
66
62
  Platform.isWorker = true
67
63
  Platform.requestRender = function (render: IFunction): void { requestAnimationFrame(render) }
68
64
  Platform.devicePixelRatio = 1
69
- Platform.realtimeLayout = true
70
65
 
71
66
 
72
67
  // same as web
package/types/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from '@leafer/core';
2
- export * from '@leafer/partner';
3
2
  export * from '@leafer/canvas-worker';
4
3
  export * from '@leafer/image-worker';
5
4
  import { ICanvasType, IObject } from '@leafer/interface';