@shopify/react-native-skia 0.1.115 → 0.1.119
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +39 -2
- package/cpp/api/JsiSkApi.h +13 -9
- package/cpp/api/JsiSkCanvas.h +9 -1
- package/cpp/api/JsiSkPicture.h +71 -0
- package/cpp/api/JsiSkPictureFactory.h +50 -0
- package/cpp/api/JsiSkPictureRecorder.h +53 -0
- package/lib/commonjs/renderer/Canvas.js +22 -36
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +3 -25
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/{Defs.js → Drawing.js} +13 -12
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/components/Group.js +31 -20
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +1 -21
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js +35 -0
- package/lib/commonjs/renderer/components/Picture.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +5 -34
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/{DropShadow.js → Shadow.js} +19 -8
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js +4 -17
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/index.js +17 -4
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js +126 -0
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js +9 -5
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/index.js +13 -0
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
- package/lib/commonjs/renderer/index.js +13 -0
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.js +12 -1
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Drawing.js +9 -24
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Node.js +9 -16
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paint.js +24 -26
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Math.js +19 -1
- package/lib/commonjs/renderer/processors/math/Math.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Matrix3.js +11 -5
- package/lib/commonjs/renderer/processors/math/Matrix3.js.map +1 -1
- package/lib/commonjs/renderer/typeddash.js +26 -2
- package/lib/commonjs/renderer/typeddash.js.map +1 -1
- package/lib/commonjs/renderer/useContextBridge.js +35 -0
- package/lib/commonjs/renderer/useContextBridge.js.map +1 -0
- package/lib/commonjs/skia/Canvas.js.map +1 -1
- package/lib/commonjs/skia/Picture/Picture.js +6 -0
- package/lib/commonjs/skia/Picture/Picture.js.map +1 -0
- package/lib/commonjs/skia/Picture/PictureFactory.js +6 -0
- package/lib/commonjs/skia/Picture/PictureFactory.js.map +1 -0
- package/lib/commonjs/skia/Picture/PictureRecorder.js +6 -0
- package/lib/commonjs/skia/Picture/PictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/Picture/index.js +58 -0
- package/lib/commonjs/skia/Picture/index.js.map +1 -0
- package/lib/commonjs/skia/Picture/usePicture.js +30 -0
- package/lib/commonjs/skia/Picture/usePicture.js.map +1 -0
- package/lib/commonjs/skia/Skia.js +2 -0
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/index.js +28 -0
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/values/hooks/useDerivedValue.js +2 -2
- package/lib/commonjs/values/hooks/useDerivedValue.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js +6 -44
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/renderer/Canvas.js +20 -32
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +2 -24
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Drawing.js +17 -0
- package/lib/module/renderer/components/Drawing.js.map +1 -0
- package/lib/module/renderer/components/Group.js +32 -22
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +2 -22
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js +21 -0
- package/lib/module/renderer/components/Picture.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +4 -26
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/{DropShadow.js → Shadow.js} +16 -6
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/index.js +1 -2
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/module/renderer/components/index.js +2 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js +102 -0
- package/lib/module/renderer/components/shapes/Box.js.map +1 -0
- package/lib/module/renderer/components/shapes/FitBox.js +5 -4
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/index.js +1 -0
- package/lib/module/renderer/components/shapes/index.js.map +1 -1
- package/lib/module/renderer/index.js +1 -0
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.js +4 -0
- package/lib/module/renderer/nodes/Declaration.js.map +1 -1
- package/lib/module/renderer/nodes/Drawing.js +8 -21
- package/lib/module/renderer/nodes/Drawing.js.map +1 -1
- package/lib/module/renderer/nodes/Node.js +9 -15
- package/lib/module/renderer/nodes/Node.js.map +1 -1
- package/lib/module/renderer/processors/Paint.js +22 -21
- package/lib/module/renderer/processors/Paint.js.map +1 -1
- package/lib/module/renderer/processors/math/Math.js +15 -0
- package/lib/module/renderer/processors/math/Math.js.map +1 -1
- package/lib/module/renderer/processors/math/Matrix3.js +6 -2
- package/lib/module/renderer/processors/math/Matrix3.js.map +1 -1
- package/lib/module/renderer/typeddash.js +21 -0
- package/lib/module/renderer/typeddash.js.map +1 -1
- package/lib/module/renderer/useContextBridge.js +21 -0
- package/lib/module/renderer/useContextBridge.js.map +1 -0
- package/lib/module/skia/Canvas.js.map +1 -1
- package/lib/module/skia/Picture/Picture.js +2 -0
- package/lib/module/skia/Picture/Picture.js.map +1 -0
- package/lib/module/skia/Picture/PictureFactory.js +2 -0
- package/lib/module/skia/Picture/PictureFactory.js.map +1 -0
- package/lib/module/skia/Picture/PictureRecorder.js +2 -0
- package/lib/module/skia/Picture/PictureRecorder.js.map +1 -0
- package/lib/module/skia/Picture/index.js +5 -0
- package/lib/module/skia/Picture/index.js.map +1 -0
- package/lib/module/skia/Picture/usePicture.js +19 -0
- package/lib/module/skia/Picture/usePicture.js.map +1 -0
- package/lib/module/skia/Skia.js +2 -0
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/index.js +2 -0
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/values/hooks/useDerivedValue.js +1 -1
- package/lib/module/values/hooks/useDerivedValue.js.map +1 -1
- package/lib/module/views/SkiaView.js +6 -44
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +5 -10
- package/lib/typescript/src/renderer/components/Drawing.d.ts +7 -0
- package/lib/typescript/src/renderer/components/Picture.d.ts +6 -0
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +3 -12
- package/lib/typescript/src/renderer/components/imageFilters/{DropShadow.d.ts → Shadow.d.ts} +3 -2
- package/lib/typescript/src/renderer/components/imageFilters/index.d.ts +1 -2
- package/lib/typescript/src/renderer/components/index.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +23 -0
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/index.d.ts +1 -0
- package/lib/typescript/src/renderer/index.d.ts +1 -0
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +3 -0
- package/lib/typescript/src/renderer/nodes/Drawing.d.ts +2 -2
- package/lib/typescript/src/renderer/nodes/Node.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Paint.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/math/Math.d.ts +14 -0
- package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +1 -0
- package/lib/typescript/src/renderer/typeddash.d.ts +1 -0
- package/lib/typescript/src/renderer/useContextBridge.d.ts +5 -0
- package/lib/typescript/src/skia/Canvas.d.ts +6 -0
- package/lib/typescript/src/skia/Picture/Picture.d.ts +26 -0
- package/lib/typescript/src/skia/Picture/PictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/Picture/PictureRecorder.d.ts +15 -0
- package/lib/typescript/src/skia/Picture/index.d.ts +4 -0
- package/lib/typescript/src/skia/Picture/usePicture.d.ts +11 -0
- package/lib/typescript/src/skia/Skia.d.ts +5 -0
- package/lib/typescript/src/skia/index.d.ts +2 -0
- package/lib/typescript/src/views/SkiaView.d.ts +28 -13
- package/lib/typescript/src/views/types.d.ts +0 -23
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +7 -7
- package/src/renderer/Canvas.tsx +14 -30
- package/src/renderer/HostConfig.ts +2 -20
- package/src/renderer/components/Drawing.tsx +16 -0
- package/src/renderer/components/Group.tsx +44 -27
- package/src/renderer/components/Paint.tsx +5 -35
- package/src/renderer/components/Picture.tsx +17 -0
- package/src/renderer/components/imageFilters/InnerShadow.tsx +33 -47
- package/src/renderer/components/imageFilters/Shadow.tsx +39 -0
- package/src/renderer/components/imageFilters/index.ts +1 -2
- package/src/renderer/components/index.ts +2 -1
- package/src/renderer/components/maskFilters/Blur.tsx +1 -1
- package/src/renderer/components/shapes/Box.tsx +98 -0
- package/src/renderer/components/shapes/FitBox.tsx +6 -4
- package/src/renderer/components/shapes/index.ts +1 -0
- package/src/renderer/index.ts +1 -0
- package/src/renderer/nodes/Declaration.tsx +14 -0
- package/src/renderer/nodes/Drawing.tsx +16 -26
- package/src/renderer/nodes/Node.ts +9 -12
- package/src/renderer/processors/Paint.ts +34 -31
- package/src/renderer/processors/math/Math.ts +16 -0
- package/src/renderer/processors/math/Matrix3.ts +35 -31
- package/src/renderer/typeddash.ts +18 -0
- package/src/renderer/useContextBridge.tsx +21 -0
- package/src/skia/Canvas.ts +7 -0
- package/src/skia/Picture/Picture.ts +34 -0
- package/src/skia/Picture/PictureFactory.ts +9 -0
- package/src/skia/Picture/PictureRecorder.ts +18 -0
- package/src/skia/Picture/index.ts +4 -0
- package/src/skia/Picture/usePicture.ts +28 -0
- package/src/skia/Skia.ts +5 -0
- package/src/skia/index.ts +2 -0
- package/src/values/hooks/useDerivedValue.ts +1 -1
- package/src/views/SkiaView.tsx +31 -41
- package/src/views/types.ts +0 -24
- package/lib/commonjs/renderer/components/Defs.js.map +0 -1
- package/lib/commonjs/renderer/components/imageFilters/DropShadow.js.map +0 -1
- package/lib/module/renderer/components/Defs.js +0 -16
- package/lib/module/renderer/components/Defs.js.map +0 -1
- package/lib/module/renderer/components/imageFilters/DropShadow.js.map +0 -1
- package/lib/typescript/src/renderer/components/Defs.d.ts +0 -5
- package/src/renderer/components/Defs.tsx +0 -19
- package/src/renderer/components/imageFilters/DropShadow.tsx +0 -31
@@ -3,28 +3,29 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.Drawing = void 0;
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _Drawing = require("../nodes/Drawing");
|
11
11
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
13
|
|
14
14
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
15
15
|
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
const onDraw = (0, _Drawing.createDrawing)((ctx, _ref) => {
|
17
|
+
let {
|
18
|
+
drawing
|
19
|
+
} = _ref;
|
20
|
+
drawing(ctx);
|
21
21
|
});
|
22
22
|
|
23
|
-
const
|
24
|
-
return /*#__PURE__*/_react.default.createElement("
|
25
|
-
|
23
|
+
const Drawing = props => {
|
24
|
+
return /*#__PURE__*/_react.default.createElement("skDrawing", _extends({
|
25
|
+
onDraw: onDraw,
|
26
|
+
skipProcessing: true
|
26
27
|
}, props));
|
27
28
|
};
|
28
29
|
|
29
|
-
exports.
|
30
|
-
//# sourceMappingURL=
|
30
|
+
exports.Drawing = Drawing;
|
31
|
+
//# sourceMappingURL=Drawing.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Drawing.tsx"],"names":["onDraw","ctx","drawing","Drawing","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AAMA,MAAMA,MAAM,GAAG,4BAA4B,CAACC,GAAD,WAAsB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AAC/DA,EAAAA,OAAO,CAACD,GAAD,CAAP;AACD,CAFc,CAAf;;AAIO,MAAME,OAAO,GAAIC,KAAD,IAAyB;AAC9C,sBAAO;AAAW,IAAA,MAAM,EAAEJ,MAAnB;AAA2B,IAAA,cAAc;AAAzC,KAA8CI,KAA9C,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { DrawingContext } from \"../DrawingContext\";\nimport { createDrawing } from \"../nodes/Drawing\";\n\ninterface DrawingProps {\n drawing: (ctx: DrawingContext) => void;\n}\n\nconst onDraw = createDrawing<DrawingProps>((ctx, { drawing }) => {\n drawing(ctx);\n});\n\nexport const Drawing = (props: DrawingProps) => {\n return <skDrawing onDraw={onDraw} skipProcessing {...props} />;\n};\n"]}
|
@@ -13,6 +13,8 @@ var _processors = require("../processors");
|
|
13
13
|
|
14
14
|
var _nodes = require("../nodes");
|
15
15
|
|
16
|
+
var _Declaration = require("../nodes/Declaration");
|
17
|
+
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
19
|
|
18
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -30,35 +32,44 @@ const onDraw = (0, _nodes.createDrawing)((ctx, _ref, node) => {
|
|
30
32
|
canvas,
|
31
33
|
opacity
|
32
34
|
} = ctx;
|
33
|
-
const
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
const declarations = node.children.filter(_Declaration.isDeclarationNode).map(child => child.draw(ctx));
|
36
|
+
const drawings = node.children.filter(child => child instanceof _nodes.DrawingNode);
|
37
|
+
const paint = (0, _processors.processPaint)(ctx.paint.copy(), opacity, groupProps, declarations);
|
38
|
+
const hasTransform = !!groupProps.transform || !!groupProps.matrix;
|
39
|
+
const hasClip = !!clip;
|
40
|
+
const shouldSave = hasTransform || hasClip || !!layer;
|
41
|
+
|
42
|
+
if (shouldSave) {
|
43
|
+
if (layer) {
|
44
|
+
if (typeof layer === "boolean") {
|
45
|
+
canvas.saveLayer();
|
46
|
+
} else if (isSkPaint(layer)) {
|
47
|
+
canvas.saveLayer(layer);
|
48
|
+
} else {
|
49
|
+
var _layer$current;
|
50
|
+
|
51
|
+
canvas.saveLayer((_layer$current = layer.current) !== null && _layer$current !== void 0 ? _layer$current : undefined);
|
52
|
+
}
|
41
53
|
} else {
|
42
|
-
|
43
|
-
|
44
|
-
canvas.saveLayer((_layer$current = layer.current) !== null && _layer$current !== void 0 ? _layer$current : undefined);
|
54
|
+
canvas.save();
|
45
55
|
}
|
46
|
-
} else {
|
47
|
-
canvas.save();
|
48
|
-
}
|
49
56
|
|
50
|
-
|
57
|
+
(0, _processors.processTransform)(ctx, groupProps);
|
51
58
|
|
52
|
-
|
53
|
-
|
54
|
-
|
59
|
+
if (clip) {
|
60
|
+
const op = invertClip ? _skia.ClipOp.Difference : _skia.ClipOp.Intersect;
|
61
|
+
(0, _processors.processClip)(canvas, clip, op);
|
62
|
+
}
|
55
63
|
}
|
56
64
|
|
57
65
|
node.visit({ ...ctx,
|
58
66
|
paint,
|
59
67
|
opacity: groupProps.opacity ? groupProps.opacity * opacity : opacity
|
60
|
-
});
|
61
|
-
|
68
|
+
}, drawings);
|
69
|
+
|
70
|
+
if (shouldSave) {
|
71
|
+
canvas.restore();
|
72
|
+
}
|
62
73
|
});
|
63
74
|
|
64
75
|
const Group = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Group.tsx"],"names":["isSkPaint","obj","__typename__","onDraw","ctx","node","layer","clip","invertClip","groupProps","canvas","opacity","paint","saveLayer","current","undefined","save","op","ClipOp","Difference","Intersect","visit","restore","Group","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;
|
1
|
+
{"version":3,"sources":["Group.tsx"],"names":["isSkPaint","obj","__typename__","onDraw","ctx","node","layer","clip","invertClip","groupProps","canvas","opacity","declarations","children","filter","isDeclarationNode","map","child","draw","drawings","DrawingNode","paint","copy","hasTransform","transform","matrix","hasClip","shouldSave","saveLayer","current","undefined","save","op","ClipOp","Difference","Intersect","visit","restore","Group","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAOA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAIC,GAAD,IAChB,kBAAkBA,GAAlB,IAAyBA,GAAG,CAACC,YAAJ,KAAqB,OADhD;;AASA,MAAMC,MAAM,GAAG,0BACb,CAACC,GAAD,QAAkDC,IAAlD,KAA2D;AAAA,MAArD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA,UAAf;AAA2B,OAAGC;AAA9B,GAAqD;AACzD,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAsBP,GAA5B;AACA,QAAMQ,YAAY,GAAGP,IAAI,CAACQ,QAAL,CAClBC,MADkB,CACXC,8BADW,EAElBC,GAFkB,CAEbC,KAAD,IAAWA,KAAK,CAACC,IAAN,CAAWd,GAAX,CAFG,CAArB;AAIA,QAAMe,QAAQ,GAAGd,IAAI,CAACQ,QAAL,CAAcC,MAAd,CACdG,KAAD,IAAWA,KAAK,YAAYG,kBADb,CAAjB;AAGA,QAAMC,KAAK,GAAG,8BACZjB,GAAG,CAACiB,KAAJ,CAAUC,IAAV,EADY,EAEZX,OAFY,EAGZF,UAHY,EAIZG,YAJY,CAAd;AAMA,QAAMW,YAAY,GAAG,CAAC,CAACd,UAAU,CAACe,SAAb,IAA0B,CAAC,CAACf,UAAU,CAACgB,MAA5D;AACA,QAAMC,OAAO,GAAG,CAAC,CAACnB,IAAlB;AACA,QAAMoB,UAAU,GAAGJ,YAAY,IAAIG,OAAhB,IAA2B,CAAC,CAACpB,KAAhD;;AACA,MAAIqB,UAAJ,EAAgB;AACd,QAAIrB,KAAJ,EAAW;AACT,UAAI,OAAOA,KAAP,KAAiB,SAArB,EAAgC;AAC9BI,QAAAA,MAAM,CAACkB,SAAP;AACD,OAFD,MAEO,IAAI5B,SAAS,CAACM,KAAD,CAAb,EAAsB;AAC3BI,QAAAA,MAAM,CAACkB,SAAP,CAAiBtB,KAAjB;AACD,OAFM,MAEA;AAAA;;AACLI,QAAAA,MAAM,CAACkB,SAAP,mBAAiBtB,KAAK,CAACuB,OAAvB,2DAAkCC,SAAlC;AACD;AACF,KARD,MAQO;AACLpB,MAAAA,MAAM,CAACqB,IAAP;AACD;;AACD,sCAAiB3B,GAAjB,EAAsBK,UAAtB;;AACA,QAAIF,IAAJ,EAAU;AACR,YAAMyB,EAAE,GAAGxB,UAAU,GAAGyB,aAAOC,UAAV,GAAuBD,aAAOE,SAAnD;AACA,mCAAYzB,MAAZ,EAAoBH,IAApB,EAA0ByB,EAA1B;AACD;AACF;;AACD3B,EAAAA,IAAI,CAAC+B,KAAL,CACE,EACE,GAAGhC,GADL;AAEEiB,IAAAA,KAFF;AAGEV,IAAAA,OAAO,EAAEF,UAAU,CAACE,OAAX,GAAqBF,UAAU,CAACE,OAAX,GAAqBA,OAA1C,GAAoDA;AAH/D,GADF,EAMEQ,QANF;;AAQA,MAAIQ,UAAJ,EAAgB;AACdjB,IAAAA,MAAM,CAAC2B,OAAP;AACD;AACF,CAhDY,CAAf;;AAmDO,MAAMC,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAEpC;AAAnB,KAA+BoC,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { RefObject } from \"react\";\n\nimport type { SkPaint } from \"../../skia\";\nimport { ClipOp } from \"../../skia\";\nimport { processTransform, processPaint, processClip } from \"../processors\";\nimport type {\n CustomPaintProps,\n TransformProps,\n AnimatedProps,\n ClipDef,\n} from \"../processors\";\nimport { createDrawing, DrawingNode } from \"../nodes\";\nimport { isDeclarationNode } from \"../nodes/Declaration\";\n\nconst isSkPaint = (obj: RefObject<SkPaint> | SkPaint): obj is SkPaint =>\n \"__typename__\" in obj && obj.__typename__ === \"Paint\";\n\nexport interface GroupProps extends CustomPaintProps, TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: RefObject<SkPaint> | SkPaint | boolean;\n}\n\nconst onDraw = createDrawing<GroupProps>(\n (ctx, { layer, clip, invertClip, ...groupProps }, node) => {\n const { canvas, opacity } = ctx;\n const declarations = node.children\n .filter(isDeclarationNode)\n .map((child) => child.draw(ctx));\n\n const drawings = node.children.filter(\n (child) => child instanceof DrawingNode\n );\n const paint = processPaint(\n ctx.paint.copy(),\n opacity,\n groupProps,\n declarations\n );\n const hasTransform = !!groupProps.transform || !!groupProps.matrix;\n const hasClip = !!clip;\n const shouldSave = hasTransform || hasClip || !!layer;\n if (shouldSave) {\n if (layer) {\n if (typeof layer === \"boolean\") {\n canvas.saveLayer();\n } else if (isSkPaint(layer)) {\n canvas.saveLayer(layer);\n } else {\n canvas.saveLayer(layer.current ?? undefined);\n }\n } else {\n canvas.save();\n }\n processTransform(ctx, groupProps);\n if (clip) {\n const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;\n processClip(canvas, clip, op);\n }\n }\n node.visit(\n {\n ...ctx,\n paint,\n opacity: groupProps.opacity ? groupProps.opacity * opacity : opacity,\n },\n drawings\n );\n if (shouldSave) {\n canvas.restore();\n }\n }\n);\n\nexport const Group = (props: AnimatedProps<GroupProps>) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
|
@@ -25,27 +25,7 @@ exports.usePaintRef = usePaintRef;
|
|
25
25
|
const Paint = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
26
26
|
const paint = (0, _react.useMemo)(() => _skia.Skia.Paint(), []);
|
27
27
|
(0, _react.useImperativeHandle)(ref, () => paint, [paint]);
|
28
|
-
const onDeclare = (0, _react.useMemo)(() => (0, _nodes.createDeclaration)((paintProps, children, ctx) =>
|
29
|
-
(0, _processors.processPaint)(paint, ctx.opacity, paintProps);
|
30
|
-
children.forEach(child => {
|
31
|
-
if ((0, _skia.isShader)(child)) {
|
32
|
-
paint.setShader(child);
|
33
|
-
} else if ((0, _skia.isMaskFilter)(child)) {
|
34
|
-
paint.setMaskFilter(child);
|
35
|
-
} else if ((0, _skia.isColorFilter)(child)) {
|
36
|
-
paint.setColorFilter(child);
|
37
|
-
} else if ((0, _skia.isPathEffect)(child)) {
|
38
|
-
paint.setPathEffect(child);
|
39
|
-
}
|
40
|
-
});
|
41
|
-
const filters = children.filter(_skia.isImageFilter);
|
42
|
-
|
43
|
-
if (filters.length > 0) {
|
44
|
-
paint.setImageFilter(filters.reverse().reduce(_skia.Skia.ImageFilter.MakeCompose, null));
|
45
|
-
}
|
46
|
-
|
47
|
-
return paint;
|
48
|
-
}), [paint]);
|
28
|
+
const onDeclare = (0, _react.useMemo)(() => (0, _nodes.createDeclaration)((paintProps, children, ctx) => (0, _processors.processPaint)(paint, ctx.opacity, paintProps, children)), [paint]);
|
49
29
|
return /*#__PURE__*/_react.default.createElement("skDeclaration", _extends({
|
50
30
|
onDeclare: onDeclare
|
51
31
|
}, props));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Paint.tsx"],"names":["usePaintRef","Paint","props","ref","paint","Skia","onDeclare","paintProps","children","ctx","opacity"
|
1
|
+
{"version":3,"sources":["Paint.tsx"],"names":["usePaintRef","Paint","props","ref","paint","Skia","onDeclare","paintProps","children","ctx","opacity"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;AACA;;;;;;;;AAEO,MAAMA,WAAW,GAAG,MAAM,mBAAgB,IAAhB,CAA1B;;;AAMA,MAAMC,KAAK,gBAAG,uBACnB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACd,QAAMC,KAAK,GAAG,oBAAQ,MAAMC,WAAKJ,KAAL,EAAd,EAA4B,EAA5B,CAAd;AACA,kCAAoBE,GAApB,EAAyB,MAAMC,KAA/B,EAAsC,CAACA,KAAD,CAAtC;AACA,QAAME,SAAS,GAAG,oBAChB,MACE,8BAA8B,CAACC,UAAD,EAAaC,QAAb,EAAuBC,GAAvB,KAC5B,8BAAaL,KAAb,EAAoBK,GAAG,CAACC,OAAxB,EAAiCH,UAAjC,EAA6CC,QAA7C,CADF,CAFc,EAKhB,CAACJ,KAAD,CALgB,CAAlB;AAOA,sBAAO;AAAe,IAAA,SAAS,EAAEE;AAA1B,KAAyCJ,KAAzC,EAAP;AACD,CAZkB,CAAd","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useRef, useMemo, forwardRef, useImperativeHandle } from \"react\";\n\nimport type { SkPaint } from \"../../skia\";\nimport { Skia } from \"../../skia\";\nimport type { CustomPaintProps, AnimatedProps } from \"../processors\";\nimport { processPaint } from \"../processors\";\nimport { createDeclaration } from \"../nodes\";\n\nexport const usePaintRef = () => useRef<SkPaint>(null);\n\nexport interface PaintProps extends Omit<CustomPaintProps, \"paint\"> {\n children?: ReactNode | ReactNode[];\n}\n\nexport const Paint = forwardRef<SkPaint, AnimatedProps<PaintProps>>(\n (props, ref) => {\n const paint = useMemo(() => Skia.Paint(), []);\n useImperativeHandle(ref, () => paint, [paint]);\n const onDeclare = useMemo(\n () =>\n createDeclaration<PaintProps>((paintProps, children, ctx) =>\n processPaint(paint, ctx.opacity, paintProps, children)\n ),\n [paint]\n );\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n }\n);\n"]}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Picture = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _Drawing = require("../nodes/Drawing");
|
11
|
+
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
+
|
14
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
15
|
+
|
16
|
+
const onDraw = (0, _Drawing.createDrawing)((ctx, _ref) => {
|
17
|
+
let {
|
18
|
+
picture
|
19
|
+
} = _ref;
|
20
|
+
const {
|
21
|
+
canvas
|
22
|
+
} = ctx;
|
23
|
+
canvas.drawPicture(picture);
|
24
|
+
});
|
25
|
+
|
26
|
+
const Picture = props => {
|
27
|
+
return /*#__PURE__*/_react.default.createElement("skDrawing", _extends({
|
28
|
+
onDraw: onDraw
|
29
|
+
}, props, {
|
30
|
+
skipProcessing: true
|
31
|
+
}));
|
32
|
+
};
|
33
|
+
|
34
|
+
exports.Picture = Picture;
|
35
|
+
//# sourceMappingURL=Picture.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Picture.tsx"],"names":["onDraw","ctx","picture","canvas","drawPicture","Picture","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AAMA,MAAMA,MAAM,GAAG,4BAA4B,CAACC,GAAD,WAAsB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAaF,GAAnB;AACAE,EAAAA,MAAM,CAACC,WAAP,CAAmBF,OAAnB;AACD,CAHc,CAAf;;AAKO,MAAMG,OAAO,GAAIC,KAAD,IAAyB;AAC9C,sBAAO;AAAW,IAAA,MAAM,EAAEN;AAAnB,KAA+BM,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { SkPicture } from \"../../skia\";\nimport { createDrawing } from \"../nodes/Drawing\";\n\nexport interface PictureProps {\n picture: SkPicture;\n}\n\nconst onDraw = createDrawing<PictureProps>((ctx, { picture }) => {\n const { canvas } = ctx;\n canvas.drawPicture(picture);\n});\n\nexport const Picture = (props: PictureProps) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
|
@@ -3,43 +3,20 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
6
|
+
exports.MakeInnerShadow = void 0;
|
9
7
|
|
10
8
|
var _skia = require("../../../skia");
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
var _getInput = require("./getInput");
|
15
|
-
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
-
|
18
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
|
-
|
20
|
-
const onDeclare = (0, _Declaration.createDeclaration)((_ref, children, _ref2) => {
|
21
|
-
let {
|
22
|
-
dx,
|
23
|
-
dy,
|
24
|
-
blur,
|
25
|
-
color,
|
26
|
-
shadowOnly
|
27
|
-
} = _ref;
|
28
|
-
let {
|
29
|
-
opacity
|
30
|
-
} = _ref2;
|
31
|
-
const input = (0, _getInput.getInput)(children);
|
32
|
-
const cl = (0, _skia.processColor)(color, opacity);
|
33
|
-
|
10
|
+
const MakeInnerShadow = (shadowOnly, dx, dy, sigmaX, sigmaY, color, input) => {
|
34
11
|
const sourceGraphic = _skia.Skia.ImageFilter.MakeColorFilter(_skia.Skia.ColorFilter.MakeBlend(0xff000000, _skia.BlendMode.Dst), null);
|
35
12
|
|
36
13
|
const sourceAlpha = _skia.Skia.ImageFilter.MakeColorFilter(_skia.Skia.ColorFilter.MakeBlend(0xff000000, _skia.BlendMode.SrcIn), null);
|
37
14
|
|
38
|
-
const f1 = _skia.Skia.ImageFilter.MakeColorFilter(_skia.Skia.ColorFilter.MakeBlend(
|
15
|
+
const f1 = _skia.Skia.ImageFilter.MakeColorFilter(_skia.Skia.ColorFilter.MakeBlend(color, _skia.BlendMode.SrcOut), null);
|
39
16
|
|
40
17
|
const f2 = _skia.Skia.ImageFilter.MakeOffset(dx, dy, f1);
|
41
18
|
|
42
|
-
const f3 = _skia.Skia.ImageFilter.MakeBlur(
|
19
|
+
const f3 = _skia.Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, _skia.TileMode.Decal, f2);
|
43
20
|
|
44
21
|
const f4 = _skia.Skia.ImageFilter.MakeBlend(_skia.BlendMode.SrcIn, sourceAlpha, f3);
|
45
22
|
|
@@ -48,13 +25,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children, _ref2) =>
|
|
48
25
|
}
|
49
26
|
|
50
27
|
return _skia.Skia.ImageFilter.MakeCompose(input, _skia.Skia.ImageFilter.MakeBlend(_skia.BlendMode.SrcOver, sourceGraphic, f4));
|
51
|
-
});
|
52
|
-
|
53
|
-
const InnerShadow = props => {
|
54
|
-
return /*#__PURE__*/_react.default.createElement("skDeclaration", _extends({
|
55
|
-
onDeclare: onDeclare
|
56
|
-
}, props));
|
57
28
|
};
|
58
29
|
|
59
|
-
exports.
|
30
|
+
exports.MakeInnerShadow = MakeInnerShadow;
|
60
31
|
//# sourceMappingURL=InnerShadow.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["InnerShadow.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["InnerShadow.tsx"],"names":["MakeInnerShadow","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","Skia","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver"],"mappings":";;;;;;;AACA;;AAGO,MAAMA,eAAe,GAAG,CAC7BC,UAD6B,EAE7BC,EAF6B,EAG7BC,EAH6B,EAI7BC,MAJ6B,EAK7BC,MAL6B,EAM7BC,KAN6B,EAO7BC,KAP6B,KAQ1B;AACH,QAAMC,aAAa,GAAGC,WAAKC,WAAL,CAAiBC,eAAjB,CACpBF,WAAKG,WAAL,CAAiBC,SAAjB,CAA2B,UAA3B,EAAuCC,gBAAUC,GAAjD,CADoB,EAEpB,IAFoB,CAAtB;;AAIA,QAAMC,WAAW,GAAGP,WAAKC,WAAL,CAAiBC,eAAjB,CAClBF,WAAKG,WAAL,CAAiBC,SAAjB,CAA2B,UAA3B,EAAuCC,gBAAUG,KAAjD,CADkB,EAElB,IAFkB,CAApB;;AAIA,QAAMC,EAAE,GAAGT,WAAKC,WAAL,CAAiBC,eAAjB,CACTF,WAAKG,WAAL,CAAiBC,SAAjB,CAA2BP,KAA3B,EAAkCQ,gBAAUK,MAA5C,CADS,EAET,IAFS,CAAX;;AAIA,QAAMC,EAAE,GAAGX,WAAKC,WAAL,CAAiBW,UAAjB,CAA4BnB,EAA5B,EAAgCC,EAAhC,EAAoCe,EAApC,CAAX;;AACA,QAAMI,EAAE,GAAGb,WAAKC,WAAL,CAAiBa,QAAjB,CAA0BnB,MAA1B,EAAkCC,MAAlC,EAA0CmB,eAASC,KAAnD,EAA0DL,EAA1D,CAAX;;AACA,QAAMM,EAAE,GAAGjB,WAAKC,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUG,KAArC,EAA4CD,WAA5C,EAAyDM,EAAzD,CAAX;;AACA,MAAIrB,UAAJ,EAAgB;AACd,WAAOyB,EAAP;AACD;;AACD,SAAOjB,WAAKC,WAAL,CAAiBiB,WAAjB,CACLpB,KADK,EAELE,WAAKC,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUc,OAArC,EAA8CpB,aAA9C,EAA6DkB,EAA7D,CAFK,CAAP;AAID,CA/BM","sourcesContent":["import type { SkColor } from \"../../../skia\";\nimport { BlendMode, Skia, TileMode } from \"../../../skia\";\nimport type { SkImageFilter } from \"../../../skia/ImageFilter/ImageFilter\";\n\nexport const MakeInnerShadow = (\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(0xff000000, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(0xff000000, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n"]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.Shadow = void 0;
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
@@ -15,6 +15,8 @@ var _Color = require("../../../skia/Color");
|
|
15
15
|
|
16
16
|
var _getInput = require("./getInput");
|
17
17
|
|
18
|
+
var _InnerShadow = require("./InnerShadow");
|
19
|
+
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
21
|
|
20
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -24,22 +26,31 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children, _ref2) =>
|
|
24
26
|
dx,
|
25
27
|
dy,
|
26
28
|
blur,
|
27
|
-
color,
|
28
|
-
shadowOnly
|
29
|
+
color: cl,
|
30
|
+
shadowOnly,
|
31
|
+
inner
|
29
32
|
} = _ref;
|
30
33
|
let {
|
31
34
|
opacity
|
32
35
|
} = _ref2;
|
33
36
|
const input = (0, _getInput.getInput)(children);
|
34
|
-
const
|
35
|
-
|
37
|
+
const color = (0, _Color.processColor)(cl, opacity);
|
38
|
+
let factory;
|
39
|
+
|
40
|
+
if (inner) {
|
41
|
+
factory = _InnerShadow.MakeInnerShadow.bind(null, shadowOnly);
|
42
|
+
} else {
|
43
|
+
factory = shadowOnly ? _skia.Skia.ImageFilter.MakeDropShadowOnly : _skia.Skia.ImageFilter.MakeDropShadow;
|
44
|
+
}
|
45
|
+
|
46
|
+
return factory(dx, dy, blur, blur, color, input);
|
36
47
|
});
|
37
48
|
|
38
|
-
const
|
49
|
+
const Shadow = props => {
|
39
50
|
return /*#__PURE__*/_react.default.createElement("skDeclaration", _extends({
|
40
51
|
onDeclare: onDeclare
|
41
52
|
}, props));
|
42
53
|
};
|
43
54
|
|
44
|
-
exports.
|
45
|
-
//# sourceMappingURL=
|
55
|
+
exports.Shadow = Shadow;
|
56
|
+
//# sourceMappingURL=Shadow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Shadow.tsx"],"names":["onDeclare","children","dx","dy","blur","color","cl","shadowOnly","inner","opacity","input","factory","MakeInnerShadow","bind","Skia","ImageFilter","MakeDropShadowOnly","MakeDropShadow","Shadow","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAGA;;AAEA;;AACA;;;;;;AAWA,MAAMA,SAAS,GAAG,oCAChB,OAAiDC,QAAjD,YAA2E;AAAA,MAA1E;AAAEC,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUC,IAAAA,IAAV;AAAgBC,IAAAA,KAAK,EAAEC,EAAvB;AAA2BC,IAAAA,UAA3B;AAAuCC,IAAAA;AAAvC,GAA0E;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AACzE,QAAMC,KAAK,GAAG,wBAAST,QAAT,CAAd;AACA,QAAMI,KAAK,GAAG,yBAAaC,EAAb,EAAiBG,OAAjB,CAAd;AACA,MAAIE,OAAJ;;AACA,MAAIH,KAAJ,EAAW;AACTG,IAAAA,OAAO,GAAGC,6BAAgBC,IAAhB,CAAqB,IAArB,EAA2BN,UAA3B,CAAV;AACD,GAFD,MAEO;AACLI,IAAAA,OAAO,GAAGJ,UAAU,GAChBO,WAAKC,WAAL,CAAiBC,kBADD,GAEhBF,WAAKC,WAAL,CAAiBE,cAFrB;AAGD;;AACD,SAAON,OAAO,CAACT,EAAD,EAAKC,EAAL,EAASC,IAAT,EAAeA,IAAf,EAAqBC,KAArB,EAA4BK,KAA5B,CAAd;AACD,CAbe,CAAlB;;AAgBO,MAAMQ,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAe,IAAA,SAAS,EAAEnB;AAA1B,KAAyCmB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { Color } from \"../../../skia/Color\";\nimport { processColor } from \"../../../skia/Color\";\n\nimport { getInput } from \"./getInput\";\nimport { MakeInnerShadow } from \"./InnerShadow\";\n\nexport interface ShadowProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nconst onDeclare = createDeclaration<ShadowProps>(\n ({ dx, dy, blur, color: cl, shadowOnly, inner }, children, { opacity }) => {\n const input = getInput(children);\n const color = processColor(cl, opacity);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, shadowOnly);\n } else {\n factory = shadowOnly\n ? Skia.ImageFilter.MakeDropShadowOnly\n : Skia.ImageFilter.MakeDropShadow;\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n);\n\nexport const Shadow = (props: AnimatedProps<ShadowProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|
@@ -43,28 +43,15 @@ Object.keys(_DisplacementMap).forEach(function (key) {
|
|
43
43
|
});
|
44
44
|
});
|
45
45
|
|
46
|
-
var
|
46
|
+
var _Shadow = require("./Shadow");
|
47
47
|
|
48
|
-
Object.keys(
|
48
|
+
Object.keys(_Shadow).forEach(function (key) {
|
49
49
|
if (key === "default" || key === "__esModule") return;
|
50
|
-
if (key in exports && exports[key] ===
|
50
|
+
if (key in exports && exports[key] === _Shadow[key]) return;
|
51
51
|
Object.defineProperty(exports, key, {
|
52
52
|
enumerable: true,
|
53
53
|
get: function () {
|
54
|
-
return
|
55
|
-
}
|
56
|
-
});
|
57
|
-
});
|
58
|
-
|
59
|
-
var _InnerShadow = require("./InnerShadow");
|
60
|
-
|
61
|
-
Object.keys(_InnerShadow).forEach(function (key) {
|
62
|
-
if (key === "default" || key === "__esModule") return;
|
63
|
-
if (key in exports && exports[key] === _InnerShadow[key]) return;
|
64
|
-
Object.defineProperty(exports, key, {
|
65
|
-
enumerable: true,
|
66
|
-
get: function () {
|
67
|
-
return _InnerShadow[key];
|
54
|
+
return _Shadow[key];
|
68
55
|
}
|
69
56
|
});
|
70
57
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Blur\";\nexport * from \"./Offset\";\nexport * from \"./DisplacementMap\";\nexport * from \"./Shadow\";\nexport * from \"./Morphology\";\n"]}
|
@@ -134,6 +134,19 @@ Object.keys(_processors).forEach(function (key) {
|
|
134
134
|
});
|
135
135
|
});
|
136
136
|
|
137
|
+
var _Picture = require("./Picture");
|
138
|
+
|
139
|
+
Object.keys(_Picture).forEach(function (key) {
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
141
|
+
if (key in exports && exports[key] === _Picture[key]) return;
|
142
|
+
Object.defineProperty(exports, key, {
|
143
|
+
enumerable: true,
|
144
|
+
get: function () {
|
145
|
+
return _Picture[key];
|
146
|
+
}
|
147
|
+
});
|
148
|
+
});
|
149
|
+
|
137
150
|
var _Group = require("./Group");
|
138
151
|
|
139
152
|
Object.keys(_Group).forEach(function (key) {
|
@@ -199,15 +212,15 @@ Object.keys(_Blend).forEach(function (key) {
|
|
199
212
|
});
|
200
213
|
});
|
201
214
|
|
202
|
-
var
|
215
|
+
var _Drawing = require("./Drawing");
|
203
216
|
|
204
|
-
Object.keys(
|
217
|
+
Object.keys(_Drawing).forEach(function (key) {
|
205
218
|
if (key === "default" || key === "__esModule") return;
|
206
|
-
if (key in exports && exports[key] ===
|
219
|
+
if (key in exports && exports[key] === _Drawing[key]) return;
|
207
220
|
Object.defineProperty(exports, key, {
|
208
221
|
enumerable: true,
|
209
222
|
get: function () {
|
210
|
-
return
|
223
|
+
return _Drawing[key];
|
211
224
|
}
|
212
225
|
});
|
213
226
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Compose\";\nexport * from \"./Blend\";\nexport * from \"./
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Compose\";\nexport * from \"./Blend\";\nexport * from \"./Drawing\";\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Blur.tsx"],"names":["onDeclare","style","blur","respectCTM","Skia","MaskFilter","MakeBlur","BlurStyle","BlurMask","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,QAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAAgC;AAC/B,SAAOC,WAAKC,UAAL,CAAgBC,QAAhB,CACLC,sBAAU,yBAAQN,KAAR,CAAV,CADK,EAELC,IAFK,EAGLC,UAHK,CAAP;AAKD,CAPe,CAAlB;;AAUO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBT,EAAAA,KAAK,EAAE,QADe;AAEtBE,EAAAA,UAAU,EAAE;AAFU,CAAxB","sourcesContent":["import React from \"react\";\n\nimport { BlurStyle } from \"../../../skia/MaskFilter\";\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { SkEnum } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface BlurMaskProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n\nconst onDeclare = createDeclaration<BlurMaskProps>(\n ({ style, blur, respectCTM }) => {\n return Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n);\n\nexport const BlurMask = (props: AnimatedProps<BlurMaskProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nBlurMask.defaultProps = {\n style: \"normal\",\n respectCTM:
|
1
|
+
{"version":3,"sources":["Blur.tsx"],"names":["onDeclare","style","blur","respectCTM","Skia","MaskFilter","MakeBlur","BlurStyle","BlurMask","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,QAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAAgC;AAC/B,SAAOC,WAAKC,UAAL,CAAgBC,QAAhB,CACLC,sBAAU,yBAAQN,KAAR,CAAV,CADK,EAELC,IAFK,EAGLC,UAHK,CAAP;AAKD,CAPe,CAAlB;;AAUO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBT,EAAAA,KAAK,EAAE,QADe;AAEtBE,EAAAA,UAAU,EAAE;AAFU,CAAxB","sourcesContent":["import React from \"react\";\n\nimport { BlurStyle } from \"../../../skia/MaskFilter\";\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { SkEnum } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface BlurMaskProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n\nconst onDeclare = createDeclaration<BlurMaskProps>(\n ({ style, blur, respectCTM }) => {\n return Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n);\n\nexport const BlurMask = (props: AnimatedProps<BlurMaskProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nBlurMask.defaultProps = {\n style: \"normal\",\n respectCTM: true,\n};\n"]}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.BoxShadow = exports.Box = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _skia = require("../../../skia");
|
11
|
+
|
12
|
+
var _nodes = require("../../nodes");
|
13
|
+
|
14
|
+
var _processors = require("../../processors");
|
15
|
+
|
16
|
+
var _Rects = require("../../processors/Rects");
|
17
|
+
|
18
|
+
var _Declaration = require("../../nodes/Declaration");
|
19
|
+
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
|
+
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
23
|
+
|
24
|
+
const inflate = function (box, dx, dy) {
|
25
|
+
let tx = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
26
|
+
let ty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
27
|
+
return (0, _processors.rrect)((0, _Rects.rect)(box.rect.x - dx + tx, box.rect.y - dy + ty, box.rect.width + 2 * dx, box.rect.height + 2 * dy), box.rx + dx, box.ry + dy);
|
28
|
+
};
|
29
|
+
|
30
|
+
const deflate = function (box, dx, dy) {
|
31
|
+
let tx = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
32
|
+
let ty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
33
|
+
return inflate(box, -dx, -dy, tx, ty);
|
34
|
+
};
|
35
|
+
|
36
|
+
const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
37
|
+
let {
|
38
|
+
dx,
|
39
|
+
dy,
|
40
|
+
spread,
|
41
|
+
blur,
|
42
|
+
color,
|
43
|
+
inner
|
44
|
+
} = _ref;
|
45
|
+
return {
|
46
|
+
dx,
|
47
|
+
dy,
|
48
|
+
spread,
|
49
|
+
blur,
|
50
|
+
color,
|
51
|
+
inner,
|
52
|
+
__typename__: "BoxShadow"
|
53
|
+
};
|
54
|
+
});
|
55
|
+
|
56
|
+
const BoxShadow = props => {
|
57
|
+
return /*#__PURE__*/_react.default.createElement("skDeclaration", _extends({
|
58
|
+
onDeclare: onDeclare
|
59
|
+
}, props));
|
60
|
+
};
|
61
|
+
|
62
|
+
exports.BoxShadow = BoxShadow;
|
63
|
+
|
64
|
+
const isBoxShadow = s => s.__typename__ === "BoxShadow";
|
65
|
+
|
66
|
+
const onDraw = (0, _nodes.createDrawing)((ctx, _ref2, node) => {
|
67
|
+
let {
|
68
|
+
box: defaultBox
|
69
|
+
} = _ref2;
|
70
|
+
const box = (0, _Rects.isRRect)(defaultBox) ? defaultBox : (0, _processors.rrect)(defaultBox, 0, 0);
|
71
|
+
const {
|
72
|
+
canvas,
|
73
|
+
paint,
|
74
|
+
opacity
|
75
|
+
} = ctx;
|
76
|
+
const shadows = node.visit(ctx).filter(isBoxShadow);
|
77
|
+
shadows.filter(shadow => !shadow.inner).map(shadow => {
|
78
|
+
const {
|
79
|
+
color = "black",
|
80
|
+
blur,
|
81
|
+
spread = 0,
|
82
|
+
dx = 0,
|
83
|
+
dy = 0
|
84
|
+
} = shadow;
|
85
|
+
|
86
|
+
const lPaint = _skia.Skia.Paint();
|
87
|
+
|
88
|
+
lPaint.setColor((0, _skia.processColor)(color, opacity));
|
89
|
+
lPaint.setMaskFilter(_skia.Skia.MaskFilter.MakeBlur(_skia.BlurStyle.Normal, blur, true));
|
90
|
+
canvas.drawRRect(inflate(box, spread, spread, dx, dy), lPaint);
|
91
|
+
});
|
92
|
+
canvas.drawRRect(box, paint);
|
93
|
+
shadows.filter(shadow => shadow.inner).map(shadow => {
|
94
|
+
const {
|
95
|
+
color = "black",
|
96
|
+
blur,
|
97
|
+
spread = 0,
|
98
|
+
dx = 0,
|
99
|
+
dy = 0
|
100
|
+
} = shadow;
|
101
|
+
const delta = (0, _processors.add)((0, _processors.vec)(10, 10), (0, _processors.vec)(Math.abs(dx), Math.abs(dy)));
|
102
|
+
canvas.save();
|
103
|
+
canvas.clipRRect(box, _skia.ClipOp.Intersect, false);
|
104
|
+
|
105
|
+
const lPaint = _skia.Skia.Paint();
|
106
|
+
|
107
|
+
lPaint.setColor((0, _skia.processColor)(color, opacity));
|
108
|
+
lPaint.setMaskFilter(_skia.Skia.MaskFilter.MakeBlur(_skia.BlurStyle.Normal, blur, true));
|
109
|
+
const inner = deflate(box, spread, spread, dx, dy);
|
110
|
+
const outer = inflate(box, delta.x, delta.y);
|
111
|
+
canvas.drawDRRect(outer, inner, lPaint);
|
112
|
+
canvas.restore();
|
113
|
+
});
|
114
|
+
});
|
115
|
+
|
116
|
+
const Box = props => {
|
117
|
+
return /*#__PURE__*/_react.default.createElement("skDrawing", _extends({
|
118
|
+
onDraw: onDraw
|
119
|
+
}, props));
|
120
|
+
};
|
121
|
+
|
122
|
+
exports.Box = Box;
|
123
|
+
Box.defaultProps = {
|
124
|
+
shadows: []
|
125
|
+
};
|
126
|
+
//# sourceMappingURL=Box.js.map
|