@leafer-ui/web 1.0.0-rc.2 → 1.0.0-rc.20
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 +10 -6
- package/src/index.ts +23 -2
- package/types/index.d.ts +5 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/web",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.20",
|
|
4
4
|
"description": "@leafer-ui/web",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,10 +22,14 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/
|
|
26
|
-
"@leafer/
|
|
27
|
-
"@leafer
|
|
28
|
-
"@leafer
|
|
29
|
-
"@leafer-ui/
|
|
25
|
+
"@leafer/core": "1.0.0-rc.20",
|
|
26
|
+
"@leafer/web": "1.0.0-rc.20",
|
|
27
|
+
"@leafer/partner": "1.0.0-rc.20",
|
|
28
|
+
"@leafer/interface": "1.0.0-rc.20",
|
|
29
|
+
"@leafer-ui/draw": "1.0.0-rc.20",
|
|
30
|
+
"@leafer-ui/core": "1.0.0-rc.20",
|
|
31
|
+
"@leafer-ui/interaction-web": "1.0.0-rc.20",
|
|
32
|
+
"@leafer-ui/partner": "1.0.0-rc.20",
|
|
33
|
+
"@leafer-ui/interface": "1.0.0-rc.20"
|
|
30
34
|
}
|
|
31
35
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
export * from '@leafer/web'
|
|
2
|
+
export * from '@leafer/partner'
|
|
3
|
+
|
|
2
4
|
export * from '@leafer-ui/core'
|
|
5
|
+
export * from '@leafer-ui/interaction-web'
|
|
3
6
|
export * from '@leafer-ui/partner'
|
|
4
7
|
|
|
5
|
-
import {
|
|
8
|
+
import { ICreator } from '@leafer/interface'
|
|
9
|
+
import { useCanvas, Creator, LeaferCanvas, ImageManager } from '@leafer/web'
|
|
10
|
+
import { HitCanvasManager, Leafer } from '@leafer-ui/core'
|
|
11
|
+
import { Interaction } from '@leafer-ui/interaction-web'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Object.assign(Creator, {
|
|
15
|
+
interaction: (target, canvas, selector, options?) => new Interaction(target, canvas, selector, options),
|
|
16
|
+
hitCanvas: (options?, manager?) => new LeaferCanvas(options, manager),
|
|
17
|
+
hitCanvasManager: () => new HitCanvasManager()
|
|
18
|
+
} as ICreator)
|
|
19
|
+
|
|
20
|
+
useCanvas('canvas')
|
|
6
21
|
|
|
7
|
-
|
|
22
|
+
// chrome 刷新页面时不会销毁实例,需要主动销毁
|
|
23
|
+
window.addEventListener('unload', () => {
|
|
24
|
+
const { list } = Leafer
|
|
25
|
+
list.forEach(leafer => (leafer as Leafer).destroy(true))
|
|
26
|
+
list.destroy()
|
|
27
|
+
ImageManager.destroy()
|
|
28
|
+
})
|
package/types/index.d.ts
CHANGED
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
export * from '@leafer/web'
|
|
2
|
-
export * from '@leafer
|
|
3
|
-
export * from '@leafer-ui/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export * from '@leafer-ui/app'
|
|
7
|
-
|
|
8
|
-
export * from '@leafer-ui/display'
|
|
9
|
-
export * from '@leafer-ui/display-module'
|
|
10
|
-
export * from '@leafer-ui/decorator'
|
|
11
|
-
|
|
12
|
-
export * from '@leafer-ui/external'
|
|
13
|
-
export * from '@leafer-ui/type'
|
|
14
|
-
|
|
15
|
-
// leafer/core
|
|
16
|
-
export * from '@leafer/canvas'
|
|
17
|
-
export * from '@leafer/image'
|
|
18
|
-
export * from '@leafer/interaction'
|
|
19
|
-
|
|
20
|
-
export * from '@leafer/data'
|
|
21
|
-
export * from '@leafer/debug'
|
|
22
|
-
export * from '@leafer/decorator'
|
|
23
|
-
export * from '@leafer/display'
|
|
24
|
-
export * from '@leafer/display-module'
|
|
25
|
-
|
|
26
|
-
export * from '@leafer/event'
|
|
27
|
-
export * from '@leafer/event-ui'
|
|
28
|
-
|
|
29
|
-
export * from '@leafer/file'
|
|
30
|
-
export * from '@leafer/helper'
|
|
31
|
-
export * from '@leafer/layout'
|
|
32
|
-
export * from '@leafer/list'
|
|
33
|
-
export * from '@leafer/math'
|
|
34
|
-
|
|
35
|
-
export * from '@leafer/path'
|
|
36
|
-
export * from '@leafer/platform'
|
|
37
|
-
export * from '@leafer/plugin'
|
|
38
|
-
|
|
39
|
-
export * from '@leafer/task'
|
|
1
|
+
export * from '@leafer/web';
|
|
2
|
+
export * from '@leafer/partner';
|
|
3
|
+
export * from '@leafer-ui/core';
|
|
4
|
+
export * from '@leafer-ui/interaction-web';
|
|
5
|
+
export * from '@leafer-ui/partner';
|