@leafer-ui/effect 1.0.0-beta.9 → 1.0.0-rc.3

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,12 +1,15 @@
1
1
  {
2
2
  "name": "@leafer-ui/effect",
3
- "version": "1.0.0-beta.9",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "@leafer-ui/effect",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
7
7
  "main": "src/index.ts",
8
+ "types": "types/index.d.ts",
8
9
  "files": [
9
- "src"
10
+ "src",
11
+ "types",
12
+ "dist"
10
13
  ],
11
14
  "repository": {
12
15
  "type": "git",
@@ -17,5 +20,12 @@
17
20
  "keywords": [
18
21
  "leafer-ui",
19
22
  "leaferjs"
20
- ]
23
+ ],
24
+ "dependencies": {
25
+ "@leafer/core": "1.0.0-rc.3"
26
+ },
27
+ "devDependencies": {
28
+ "@leafer/interface": "1.0.0-rc.3",
29
+ "@leafer-ui/interface": "1.0.0-rc.3"
30
+ }
21
31
  }
@@ -45,7 +45,11 @@ export function innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape
45
45
 
46
46
  other.fillWorld(copyBounds, item.color, 'source-in')
47
47
 
48
- current.copyWorldToInner(other, copyBounds as IMatrixWithBoundsData, __layout.renderBounds, item.blendMode)
48
+ if (ui.__hasMirror) {
49
+ current.copyWorldByReset(other, copyBounds, __world, item.blendMode)
50
+ } else {
51
+ current.copyWorldToInner(other, copyBounds as IMatrixWithBoundsData, __layout.renderBounds, item.blendMode)
52
+ }
49
53
 
50
54
  if (end && index < end) other.clear()
51
55
 
package/src/Shadow.ts CHANGED
@@ -44,7 +44,11 @@ export function shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, _op
44
44
  worldCanvas ? other.copyWorld(worldCanvas, __world, __world, 'destination-out') : other.copyWorld(shape.canvas, shapeBounds, bounds, 'destination-out')
45
45
  }
46
46
 
47
- current.copyWorldToInner(other, copyBounds as IMatrixWithBoundsData, __layout.renderBounds, item.blendMode)
47
+ if (ui.__hasMirror) {
48
+ current.copyWorldByReset(other, copyBounds, __world, item.blendMode)
49
+ } else {
50
+ current.copyWorldToInner(other, copyBounds as IMatrixWithBoundsData, __layout.renderBounds, item.blendMode)
51
+ }
48
52
 
49
53
  if (end && index < end) other.clear()
50
54
  })
@@ -0,0 +1,10 @@
1
+ import { ILeaferCanvas, IRenderOptions } from '@leafer/interface';
2
+ import { IUI, ICachedShape } from '@leafer-ui/interface';
3
+
4
+ declare function shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, _options: IRenderOptions): void;
5
+
6
+ declare function innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape, _options: IRenderOptions): void;
7
+
8
+ declare function blur(ui: IUI, current: ILeaferCanvas, origin: ILeaferCanvas): void;
9
+
10
+ export { blur, innerShadow, shadow };