@shopify/react-native-skia 0.1.172 → 0.1.173
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +1 -0
- package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +5 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +106 -5
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +3 -1
- package/cpp/api/JsiSkSurface.h +7 -1
- package/cpp/api/JsiSkSurfaceFactory.h +15 -2
- package/cpp/rnskia/RNSkDomView.cpp +2 -4
- package/cpp/rnskia/RNSkJsView.cpp +3 -0
- package/cpp/rnskia/RNSkPictureView.h +3 -0
- package/cpp/rnskia/RNSkPlatformContext.h +9 -0
- package/cpp/rnskia/dom/JsiDomApi.h +1 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.cpp +117 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.h +49 -0
- package/cpp/rnskia/dom/base/Declaration.h +88 -0
- package/cpp/rnskia/dom/base/DeclarationContext.h +79 -0
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +25 -9
- package/cpp/rnskia/dom/base/DrawingContext.cpp +32 -186
- package/cpp/rnskia/dom/base/DrawingContext.h +45 -64
- package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +35 -106
- package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +28 -9
- package/cpp/rnskia/dom/base/JsiDomNode.h +46 -17
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +81 -67
- package/cpp/rnskia/dom/base/NodeProp.h +12 -2
- package/cpp/rnskia/dom/base/NodePropsContainer.h +15 -16
- package/cpp/rnskia/dom/nodes/JsiBackdropFilterNode.h +22 -11
- package/cpp/rnskia/dom/nodes/JsiBlendNode.h +43 -59
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +16 -17
- package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +6 -5
- package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +45 -69
- package/cpp/rnskia/dom/nodes/JsiGroupNode.h +1 -1
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +121 -161
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +1 -0
- package/cpp/rnskia/dom/nodes/JsiLayerNode.h +28 -18
- package/cpp/rnskia/dom/nodes/JsiPaintNode.h +82 -45
- package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +68 -101
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +3 -2
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +150 -207
- package/cpp/rnskia/dom/props/BezierProps.h +4 -2
- package/cpp/rnskia/dom/props/BlendModeProp.h +4 -2
- package/cpp/rnskia/dom/props/BoxShadowProps.h +8 -10
- package/cpp/rnskia/dom/props/CircleProp.h +6 -5
- package/cpp/rnskia/dom/props/ClipProp.h +6 -4
- package/cpp/rnskia/dom/props/ColorProp.h +8 -4
- package/cpp/rnskia/dom/props/DrawingProp.h +5 -3
- package/cpp/rnskia/dom/props/FontProp.h +4 -2
- package/cpp/rnskia/dom/props/GlyphsProp.h +4 -2
- package/cpp/rnskia/dom/props/ImageProps.h +9 -6
- package/cpp/rnskia/dom/props/LayerProp.h +6 -4
- package/cpp/rnskia/dom/props/MatrixProp.h +4 -2
- package/cpp/rnskia/dom/props/NumbersProp.h +8 -4
- package/cpp/rnskia/dom/props/PaintProps.h +55 -92
- package/cpp/rnskia/dom/props/PathProp.h +4 -2
- package/cpp/rnskia/dom/props/PictureProp.h +4 -2
- package/cpp/rnskia/dom/props/PointProp.h +4 -2
- package/cpp/rnskia/dom/props/PointsProp.h +8 -4
- package/cpp/rnskia/dom/props/RRectProp.h +23 -16
- package/cpp/rnskia/dom/props/RadiusProp.h +4 -2
- package/cpp/rnskia/dom/props/RectProp.h +18 -12
- package/cpp/rnskia/dom/props/StrokeProps.h +8 -4
- package/cpp/rnskia/dom/props/SvgProp.h +4 -2
- package/cpp/rnskia/dom/props/TextBlobProp.h +10 -8
- package/cpp/rnskia/dom/props/TileModeProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformsProps.h +5 -7
- package/cpp/rnskia/dom/props/UniformsProp.h +4 -2
- package/cpp/rnskia/dom/props/VertexModeProp.h +4 -2
- package/cpp/rnskia/dom/props/VerticesProps.h +7 -11
- package/ios/RNSkia-iOS/DisplayLink.mm +22 -24
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +53 -50
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +2 -0
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +38 -25
- package/ios/RNSkia-iOS/SkiaDomViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaManager.mm +12 -10
- package/ios/RNSkia-iOS/SkiaMetalRenderer.h +5 -0
- package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +53 -0
- package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaUIView.mm +63 -53
- package/ios/RNSkiaModule.mm +5 -7
- package/lib/commonjs/dom/nodes/DrawingNode.js +5 -1
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +33 -34
- package/lib/commonjs/dom/nodes/LayerNode.js +13 -6
- package/lib/commonjs/dom/nodes/LayerNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.d.ts +6 -11
- package/lib/commonjs/dom/nodes/Node.js +8 -26
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintNode.d.ts +3 -3
- package/lib/commonjs/dom/nodes/PaintNode.js +32 -15
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.d.ts +2 -3
- package/lib/commonjs/dom/nodes/RenderNode.js +19 -187
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.d.ts +1 -1
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js +25 -7
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.d.ts +3 -1
- package/lib/commonjs/dom/nodes/drawings/Box.js +3 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/BlendNode.d.ts +3 -7
- package/lib/commonjs/dom/nodes/paint/BlendNode.js +16 -47
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.d.ts +10 -11
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.d.ts +11 -11
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +45 -42
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/MaskFilters.d.ts +3 -3
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/PathEffects.d.ts +15 -18
- package/lib/commonjs/dom/nodes/paint/PathEffects.js +30 -72
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.d.ts +11 -12
- package/lib/commonjs/dom/nodes/paint/Shaders.js +28 -18
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/commonjs/dom/types/DeclarationContext.js +118 -0
- package/lib/commonjs/dom/types/DeclarationContext.js.map +1 -0
- package/lib/commonjs/dom/types/DrawingContext.d.ts +18 -1
- package/lib/commonjs/dom/types/DrawingContext.js +330 -0
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Node.d.ts +4 -10
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.d.ts +22 -23
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.d.ts +1 -0
- package/lib/commonjs/dom/types/index.js +13 -0
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/index.d.ts +1 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +3 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DrawingContext.d.ts +4 -3
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +35 -35
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +1 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -0
- package/lib/commonjs/renderer/Offscreen.js +31 -0
- package/lib/commonjs/renderer/Offscreen.js.map +1 -0
- package/lib/commonjs/renderer/Reconciler.js +0 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/Surface.d.ts +4 -0
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.d.ts +6 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +4 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.d.ts +2 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +6 -4
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.web.js +3 -14
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.web.js +0 -7
- package/lib/commonjs/views/SkiaPictureView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +0 -7
- package/lib/commonjs/views/SkiaView.web.js.map +1 -1
- package/lib/module/dom/nodes/DrawingNode.js +5 -1
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +33 -34
- package/lib/module/dom/nodes/LayerNode.js +13 -7
- package/lib/module/dom/nodes/LayerNode.js.map +1 -1
- package/lib/module/dom/nodes/Node.d.ts +6 -11
- package/lib/module/dom/nodes/Node.js +8 -25
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/PaintContext.js.map +1 -1
- package/lib/module/dom/nodes/PaintNode.d.ts +3 -3
- package/lib/module/dom/nodes/PaintNode.js +32 -15
- package/lib/module/dom/nodes/PaintNode.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.d.ts +2 -3
- package/lib/module/dom/nodes/RenderNode.js +20 -187
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.d.ts +1 -1
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js +23 -4
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.d.ts +3 -1
- package/lib/module/dom/nodes/drawings/Box.js +3 -0
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/paint/BlendNode.d.ts +3 -7
- package/lib/module/dom/nodes/paint/BlendNode.js +15 -46
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.d.ts +10 -11
- package/lib/module/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.d.ts +11 -11
- package/lib/module/dom/nodes/paint/ImageFilters.js +48 -41
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/MaskFilters.d.ts +3 -3
- package/lib/module/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/PathEffects.d.ts +15 -18
- package/lib/module/dom/nodes/paint/PathEffects.js +29 -72
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.d.ts +11 -12
- package/lib/module/dom/nodes/paint/Shaders.js +28 -18
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/module/dom/types/DeclarationContext.js +107 -0
- package/lib/module/dom/types/DeclarationContext.js.map +1 -0
- package/lib/module/dom/types/DrawingContext.d.ts +18 -1
- package/lib/module/dom/types/DrawingContext.js +322 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Node.d.ts +4 -10
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/dom/types/SkDOM.d.ts +22 -23
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.d.ts +1 -0
- package/lib/module/dom/types/index.js +1 -0
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/index.d.ts +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +3 -3
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DrawingContext.d.ts +4 -3
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +35 -35
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +1 -0
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -0
- package/lib/module/renderer/Offscreen.js +19 -0
- package/lib/module/renderer/Offscreen.js.map +1 -0
- package/lib/module/renderer/Reconciler.js +0 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/skia/types/Surface/Surface.d.ts +4 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -1
- package/lib/module/skia/types/Surface/SurfaceFactory.d.ts +6 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/module/skia/web/JsiSkSurface.js +4 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.d.ts +2 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +6 -4
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.web.js +2 -11
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/SkiaPictureView.web.js +0 -5
- package/lib/module/views/SkiaPictureView.web.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +0 -5
- package/lib/module/views/SkiaView.web.js.map +1 -1
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +33 -34
- package/lib/typescript/src/dom/nodes/Node.d.ts +6 -11
- package/lib/typescript/src/dom/nodes/PaintNode.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/RenderNode.d.ts +2 -3
- package/lib/typescript/src/dom/nodes/drawings/BackdropFilterNode.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +3 -1
- package/lib/typescript/src/dom/nodes/paint/BlendNode.d.ts +3 -7
- package/lib/typescript/src/dom/nodes/paint/ColorFilters.d.ts +10 -11
- package/lib/typescript/src/dom/nodes/paint/ImageFilters.d.ts +11 -11
- package/lib/typescript/src/dom/nodes/paint/MaskFilters.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/paint/PathEffects.d.ts +15 -18
- package/lib/typescript/src/dom/nodes/paint/Shaders.d.ts +11 -12
- package/lib/typescript/src/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/typescript/src/dom/types/DrawingContext.d.ts +18 -1
- package/lib/typescript/src/dom/types/Node.d.ts +4 -10
- package/lib/typescript/src/dom/types/SkDOM.d.ts +22 -23
- package/lib/typescript/src/dom/types/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +4 -3
- package/lib/typescript/src/renderer/HostComponents.d.ts +35 -35
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -0
- package/lib/typescript/src/skia/types/Surface/Surface.d.ts +4 -0
- package/lib/typescript/src/skia/types/Surface/SurfaceFactory.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +2 -1
- package/package.json +1 -1
- package/src/dom/nodes/DrawingNode.ts +5 -1
- package/src/dom/nodes/LayerNode.ts +13 -11
- package/src/dom/nodes/Node.ts +18 -41
- package/src/dom/nodes/PaintContext.ts +1 -0
- package/src/dom/nodes/PaintNode.ts +28 -18
- package/src/dom/nodes/RenderNode.ts +25 -183
- package/src/dom/nodes/drawings/BackdropFilterNode.ts +18 -11
- package/src/dom/nodes/drawings/Box.ts +6 -4
- package/src/dom/nodes/paint/BlendNode.ts +16 -63
- package/src/dom/nodes/paint/ColorFilters.ts +32 -55
- package/src/dom/nodes/paint/ImageFilters.ts +58 -53
- package/src/dom/nodes/paint/MaskFilters.ts +5 -7
- package/src/dom/nodes/paint/PathEffects.ts +37 -90
- package/src/dom/nodes/paint/Shaders.ts +31 -29
- package/src/dom/types/DeclarationContext.ts +105 -0
- package/src/dom/types/DrawingContext.ts +304 -1
- package/src/dom/types/Node.ts +4 -20
- package/src/dom/types/SkDOM.ts +22 -43
- package/src/dom/types/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/renderer/Canvas.tsx +3 -3
- package/src/renderer/DrawingContext.ts +4 -5
- package/src/renderer/HostComponents.ts +34 -53
- package/src/renderer/HostConfig.ts +1 -0
- package/src/renderer/Offscreen.tsx +24 -0
- package/src/renderer/Reconciler.tsx +0 -1
- package/src/skia/types/Surface/Surface.ts +5 -0
- package/src/skia/types/Surface/SurfaceFactory.ts +7 -0
- package/src/skia/web/JsiSkSurface.ts +4 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +21 -2
- package/src/views/SkiaBaseWebView.tsx +6 -2
- package/src/views/SkiaDomView.web.tsx +2 -13
- package/src/views/SkiaPictureView.web.tsx +0 -7
- package/src/views/SkiaView.web.tsx +0 -7
@@ -3,4 +3,334 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
exports.JsiDrawingContext = void 0;
|
7
|
+
|
8
|
+
var _types = require("../../skia/types");
|
9
|
+
|
10
|
+
var _Enum = require("../nodes/datatypes/Enum");
|
11
|
+
|
12
|
+
var _Node = require("../nodes/Node");
|
13
|
+
|
14
|
+
var _DeclarationContext = require("./DeclarationContext");
|
15
|
+
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17
|
+
|
18
|
+
class JsiDrawingContext {
|
19
|
+
constructor(Skia, canvas) {
|
20
|
+
this.Skia = Skia;
|
21
|
+
this.canvas = canvas;
|
22
|
+
|
23
|
+
_defineProperty(this, "paints", void 0);
|
24
|
+
|
25
|
+
_defineProperty(this, "declarationCtx", void 0);
|
26
|
+
|
27
|
+
const paint = this.Skia.Paint();
|
28
|
+
this.paints = [paint];
|
29
|
+
this.declarationCtx = new _DeclarationContext.DeclarationContext(Skia);
|
30
|
+
}
|
31
|
+
|
32
|
+
get paint() {
|
33
|
+
return this.paints[this.paints.length - 1];
|
34
|
+
}
|
35
|
+
|
36
|
+
save() {
|
37
|
+
const childPaint = this.paint.copy();
|
38
|
+
this.paints.push(childPaint);
|
39
|
+
}
|
40
|
+
|
41
|
+
restore() {
|
42
|
+
this.paints.pop();
|
43
|
+
}
|
44
|
+
|
45
|
+
saveAndConcat(node, cache) {
|
46
|
+
if (cache) {
|
47
|
+
this.paints.push(cache);
|
48
|
+
return true;
|
49
|
+
}
|
50
|
+
|
51
|
+
const paint = new ConcatablePaint(this.Skia, this.declarationCtx, node);
|
52
|
+
|
53
|
+
if (!paint.isPristine()) {
|
54
|
+
this.save();
|
55
|
+
paint.concatTo(this.paint);
|
56
|
+
return true;
|
57
|
+
}
|
58
|
+
|
59
|
+
return false;
|
60
|
+
}
|
61
|
+
|
62
|
+
}
|
63
|
+
|
64
|
+
exports.JsiDrawingContext = JsiDrawingContext;
|
65
|
+
|
66
|
+
class ConcatablePaint {
|
67
|
+
constructor(Skia, declCtx, node) {
|
68
|
+
_defineProperty(this, "pristine", true);
|
69
|
+
|
70
|
+
_defineProperty(this, "_color", void 0);
|
71
|
+
|
72
|
+
_defineProperty(this, "_strokeWidth", void 0);
|
73
|
+
|
74
|
+
_defineProperty(this, "_blendMode", void 0);
|
75
|
+
|
76
|
+
_defineProperty(this, "_style", void 0);
|
77
|
+
|
78
|
+
_defineProperty(this, "_strokeJoin", void 0);
|
79
|
+
|
80
|
+
_defineProperty(this, "_strokeCap", void 0);
|
81
|
+
|
82
|
+
_defineProperty(this, "_strokeMiter", void 0);
|
83
|
+
|
84
|
+
_defineProperty(this, "_opacity", 1);
|
85
|
+
|
86
|
+
_defineProperty(this, "_antiAlias", void 0);
|
87
|
+
|
88
|
+
_defineProperty(this, "_imageFilter", void 0);
|
89
|
+
|
90
|
+
_defineProperty(this, "_shader", void 0);
|
91
|
+
|
92
|
+
_defineProperty(this, "_pathEffect", void 0);
|
93
|
+
|
94
|
+
_defineProperty(this, "_colorFilter", void 0);
|
95
|
+
|
96
|
+
_defineProperty(this, "_maskFilter", void 0);
|
97
|
+
|
98
|
+
const props = node.getProps();
|
99
|
+
const children = node.children();
|
100
|
+
this.setColor(props.color !== undefined ? Skia.Color(props.color) : props.color);
|
101
|
+
this.setStrokeWidth(props.strokeWidth);
|
102
|
+
this.setBlendMode(props.blendMode);
|
103
|
+
this.setStyle(props.style);
|
104
|
+
this.setStrokeJoin(props.strokeJoin);
|
105
|
+
this.setStrokeCap(props.strokeCap);
|
106
|
+
this.setStrokeMiter(props.strokeMiter);
|
107
|
+
this.setOpacity(props.opacity);
|
108
|
+
this.setAntiAlias(props.antiAlias);
|
109
|
+
declCtx.save();
|
110
|
+
children.forEach(child => {
|
111
|
+
if (child instanceof _Node.JsiDeclarationNode) {
|
112
|
+
child.decorate(declCtx);
|
113
|
+
}
|
114
|
+
});
|
115
|
+
const colorFilter = declCtx.colorFilters.popAllAsOne();
|
116
|
+
const imageFilter = declCtx.imageFilters.popAllAsOne();
|
117
|
+
const shader = declCtx.shaders.pop();
|
118
|
+
const maskFilter = declCtx.maskFilters.pop();
|
119
|
+
const pathEffect = declCtx.pathEffects.popAllAsOne();
|
120
|
+
declCtx.restore();
|
121
|
+
|
122
|
+
if (imageFilter) {
|
123
|
+
this.setImageFilter(imageFilter);
|
124
|
+
}
|
125
|
+
|
126
|
+
if (shader) {
|
127
|
+
this.setShader(shader);
|
128
|
+
}
|
129
|
+
|
130
|
+
if (pathEffect) {
|
131
|
+
this.setPathEffect(pathEffect);
|
132
|
+
}
|
133
|
+
|
134
|
+
if (colorFilter) {
|
135
|
+
this.setColorFilter(colorFilter);
|
136
|
+
}
|
137
|
+
|
138
|
+
if (maskFilter) {
|
139
|
+
this.setMaskFilter(maskFilter);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
enum(value, key) {
|
144
|
+
if (key !== undefined) {
|
145
|
+
return value[(0, _Enum.enumKey)(key)];
|
146
|
+
}
|
147
|
+
|
148
|
+
return undefined;
|
149
|
+
}
|
150
|
+
|
151
|
+
setValue(key, value) {
|
152
|
+
if (value !== undefined) {
|
153
|
+
this[key] = value;
|
154
|
+
this.pristine = false;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
setColor(color) {
|
159
|
+
this.setValue("_color", color);
|
160
|
+
}
|
161
|
+
|
162
|
+
getColor() {
|
163
|
+
return this._color;
|
164
|
+
}
|
165
|
+
|
166
|
+
setStrokeWidth(strokeWidth) {
|
167
|
+
this.setValue("_strokeWidth", strokeWidth);
|
168
|
+
}
|
169
|
+
|
170
|
+
getStrokeWidth() {
|
171
|
+
return this._strokeWidth;
|
172
|
+
}
|
173
|
+
|
174
|
+
setBlendMode(blendMode) {
|
175
|
+
this.setValue("_blendMode", this.enum(_types.BlendMode, blendMode));
|
176
|
+
}
|
177
|
+
|
178
|
+
getBlendMode() {
|
179
|
+
return this._blendMode;
|
180
|
+
}
|
181
|
+
|
182
|
+
setStyle(style) {
|
183
|
+
this.setValue("_style", this.enum(_types.PaintStyle, style));
|
184
|
+
}
|
185
|
+
|
186
|
+
getStyle() {
|
187
|
+
return this._style;
|
188
|
+
}
|
189
|
+
|
190
|
+
setStrokeJoin(strokeJoin) {
|
191
|
+
this.setValue("_strokeJoin", this.enum(_types.StrokeJoin, strokeJoin));
|
192
|
+
}
|
193
|
+
|
194
|
+
getStrokeJoin() {
|
195
|
+
return this._strokeJoin;
|
196
|
+
}
|
197
|
+
|
198
|
+
setStrokeCap(strokeCap) {
|
199
|
+
this.setValue("_strokeCap", this.enum(_types.StrokeCap, strokeCap));
|
200
|
+
}
|
201
|
+
|
202
|
+
getStrokeCap() {
|
203
|
+
return this._strokeCap;
|
204
|
+
}
|
205
|
+
|
206
|
+
setStrokeMiter(strokeMiter) {
|
207
|
+
this.setValue("_strokeMiter", strokeMiter);
|
208
|
+
}
|
209
|
+
|
210
|
+
getStrokeMiter() {
|
211
|
+
return this._strokeMiter;
|
212
|
+
}
|
213
|
+
|
214
|
+
setOpacity(opacity) {
|
215
|
+
this.setValue("_opacity", opacity);
|
216
|
+
}
|
217
|
+
|
218
|
+
getOpacity() {
|
219
|
+
return this._opacity;
|
220
|
+
}
|
221
|
+
|
222
|
+
setAntiAlias(antiAlias) {
|
223
|
+
this.setValue("_antiAlias", antiAlias);
|
224
|
+
}
|
225
|
+
|
226
|
+
getAntiAlias() {
|
227
|
+
return this._antiAlias;
|
228
|
+
}
|
229
|
+
|
230
|
+
setImageFilter(imageFilter) {
|
231
|
+
this.setValue("_imageFilter", imageFilter);
|
232
|
+
}
|
233
|
+
|
234
|
+
getImageFilter() {
|
235
|
+
return this._imageFilter;
|
236
|
+
}
|
237
|
+
|
238
|
+
setShader(shader) {
|
239
|
+
this.setValue("_shader", shader);
|
240
|
+
}
|
241
|
+
|
242
|
+
getShader() {
|
243
|
+
return this._shader;
|
244
|
+
}
|
245
|
+
|
246
|
+
setPathEffect(pathEffect) {
|
247
|
+
this.setValue("_pathEffect", pathEffect);
|
248
|
+
}
|
249
|
+
|
250
|
+
getPathEffect() {
|
251
|
+
return this._pathEffect;
|
252
|
+
}
|
253
|
+
|
254
|
+
setColorFilter(colorFilter) {
|
255
|
+
this.setValue("_colorFilter", colorFilter);
|
256
|
+
}
|
257
|
+
|
258
|
+
getColorFilter() {
|
259
|
+
return this._colorFilter;
|
260
|
+
}
|
261
|
+
|
262
|
+
setMaskFilter(maskFilter) {
|
263
|
+
this.setValue("_maskFilter", maskFilter);
|
264
|
+
}
|
265
|
+
|
266
|
+
getMaskFilter() {
|
267
|
+
return this._maskFilter;
|
268
|
+
}
|
269
|
+
|
270
|
+
isPristine() {
|
271
|
+
return this.pristine;
|
272
|
+
}
|
273
|
+
|
274
|
+
concatTo(paint) {
|
275
|
+
if (this._opacity !== undefined) {
|
276
|
+
paint.setAlphaf(paint.getAlphaf() * this._opacity);
|
277
|
+
}
|
278
|
+
|
279
|
+
if (this._color !== undefined) {
|
280
|
+
const currentOpacity = paint.getAlphaf();
|
281
|
+
paint.setShader(null);
|
282
|
+
paint.setColor(this._color);
|
283
|
+
paint.setAlphaf(currentOpacity * paint.getAlphaf());
|
284
|
+
}
|
285
|
+
|
286
|
+
if (this._strokeWidth !== undefined) {
|
287
|
+
paint.setStrokeWidth(this._strokeWidth);
|
288
|
+
}
|
289
|
+
|
290
|
+
if (this._blendMode !== undefined) {
|
291
|
+
paint.setBlendMode(this._blendMode);
|
292
|
+
}
|
293
|
+
|
294
|
+
if (this._style !== undefined) {
|
295
|
+
paint.setStyle(this._style);
|
296
|
+
}
|
297
|
+
|
298
|
+
if (this._strokeJoin !== undefined) {
|
299
|
+
paint.setStrokeJoin(this._strokeJoin);
|
300
|
+
}
|
301
|
+
|
302
|
+
if (this._strokeCap !== undefined) {
|
303
|
+
paint.setStrokeCap(this._strokeCap);
|
304
|
+
}
|
305
|
+
|
306
|
+
if (this._strokeMiter !== undefined) {
|
307
|
+
paint.setStrokeMiter(this._strokeMiter);
|
308
|
+
}
|
309
|
+
|
310
|
+
if (this._antiAlias !== undefined) {
|
311
|
+
paint.setAntiAlias(this._antiAlias);
|
312
|
+
}
|
313
|
+
|
314
|
+
if (this._imageFilter !== undefined) {
|
315
|
+
paint.setImageFilter(this._imageFilter);
|
316
|
+
}
|
317
|
+
|
318
|
+
if (this._shader !== undefined) {
|
319
|
+
paint.setShader(this._shader);
|
320
|
+
}
|
321
|
+
|
322
|
+
if (this._pathEffect !== undefined) {
|
323
|
+
paint.setPathEffect(this._pathEffect);
|
324
|
+
}
|
325
|
+
|
326
|
+
if (this._colorFilter !== undefined) {
|
327
|
+
paint.setColorFilter(this._colorFilter);
|
328
|
+
}
|
329
|
+
|
330
|
+
if (this._maskFilter !== undefined) {
|
331
|
+
paint.setMaskFilter(this._maskFilter);
|
332
|
+
}
|
333
|
+
}
|
334
|
+
|
335
|
+
}
|
6
336
|
//# sourceMappingURL=DrawingContext.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["DrawingContext.ts"],"sourcesContent":["import type { SkCanvas, SkPaint } from \"../../skia/types\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n}\n"],"mappings":""}
|
1
|
+
{"version":3,"names":["JsiDrawingContext","constructor","Skia","canvas","paint","Paint","paints","declarationCtx","DeclarationContext","length","save","childPaint","copy","push","restore","pop","saveAndConcat","node","cache","ConcatablePaint","isPristine","concatTo","declCtx","props","getProps","children","setColor","color","undefined","Color","setStrokeWidth","strokeWidth","setBlendMode","blendMode","setStyle","style","setStrokeJoin","strokeJoin","setStrokeCap","strokeCap","setStrokeMiter","strokeMiter","setOpacity","opacity","setAntiAlias","antiAlias","forEach","child","JsiDeclarationNode","decorate","colorFilter","colorFilters","popAllAsOne","imageFilter","imageFilters","shader","shaders","maskFilter","maskFilters","pathEffect","pathEffects","setImageFilter","setShader","setPathEffect","setColorFilter","setMaskFilter","enum","value","key","enumKey","setValue","pristine","getColor","_color","getStrokeWidth","_strokeWidth","BlendMode","getBlendMode","_blendMode","PaintStyle","getStyle","_style","StrokeJoin","getStrokeJoin","_strokeJoin","StrokeCap","getStrokeCap","_strokeCap","getStrokeMiter","_strokeMiter","getOpacity","_opacity","getAntiAlias","_antiAlias","getImageFilter","_imageFilter","getShader","_shader","getPathEffect","_pathEffect","getColorFilter","_colorFilter","getMaskFilter","_maskFilter","setAlphaf","getAlphaf","currentOpacity"],"sources":["DrawingContext.ts"],"sourcesContent":["import type {\n SkCanvas,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkMaskFilter,\n SkPaint,\n SkPathEffect,\n SkShader,\n Skia,\n} from \"../../skia/types\";\nimport { BlendMode, PaintStyle, StrokeCap, StrokeJoin } from \"../../skia/types\";\nimport { enumKey } from \"../nodes/datatypes/Enum\";\nimport { JsiDeclarationNode } from \"../nodes/Node\";\n\nimport type { PaintProps, SkEnum } from \"./Common\";\nimport { DeclarationContext } from \"./DeclarationContext\";\nimport type { Node } from \"./Node\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n saveAndConcat(node: Node<PaintProps>, cache?: SkPaint): boolean;\n restore(): void;\n declarationCtx: DeclarationContext;\n}\n\nexport class JsiDrawingContext implements DrawingContext {\n paints: SkPaint[];\n\n declarationCtx: DeclarationContext;\n\n constructor(private readonly Skia: Skia, public readonly canvas: SkCanvas) {\n const paint = this.Skia.Paint();\n this.paints = [paint];\n this.declarationCtx = new DeclarationContext(Skia);\n }\n\n get paint() {\n return this.paints[this.paints.length - 1];\n }\n\n private save() {\n const childPaint = this.paint.copy();\n this.paints.push(childPaint);\n }\n\n restore(): void {\n this.paints.pop();\n }\n\n saveAndConcat(node: Node<PaintProps>, cache?: SkPaint) {\n if (cache) {\n this.paints.push(cache);\n return true;\n }\n const paint = new ConcatablePaint(this.Skia, this.declarationCtx, node);\n if (!paint.isPristine()) {\n this.save();\n paint.concatTo(this.paint);\n return true;\n }\n return false;\n }\n}\n\nclass ConcatablePaint {\n private pristine = true;\n\n _color?: SkColor;\n _strokeWidth?: number;\n _blendMode?: BlendMode;\n _style?: PaintStyle;\n _strokeJoin?: StrokeJoin;\n _strokeCap?: StrokeCap;\n _strokeMiter?: number;\n _opacity = 1;\n _antiAlias?: boolean;\n\n _imageFilter?: SkImageFilter;\n _shader?: SkShader;\n _pathEffect?: SkPathEffect;\n _colorFilter?: SkColorFilter;\n _maskFilter?: SkMaskFilter;\n\n constructor(Skia: Skia, declCtx: DeclarationContext, node: Node<PaintProps>) {\n const props = node.getProps();\n const children = node.children();\n this.setColor(\n props.color !== undefined ? Skia.Color(props.color) : props.color\n );\n this.setStrokeWidth(props.strokeWidth);\n this.setBlendMode(props.blendMode);\n this.setStyle(props.style);\n this.setStrokeJoin(props.strokeJoin);\n this.setStrokeCap(props.strokeCap);\n this.setStrokeMiter(props.strokeMiter);\n this.setOpacity(props.opacity);\n this.setAntiAlias(props.antiAlias);\n declCtx.save();\n children.forEach((child) => {\n if (child instanceof JsiDeclarationNode) {\n child.decorate(declCtx);\n }\n });\n const colorFilter = declCtx.colorFilters.popAllAsOne();\n const imageFilter = declCtx.imageFilters.popAllAsOne();\n const shader = declCtx.shaders.pop();\n const maskFilter = declCtx.maskFilters.pop();\n const pathEffect = declCtx.pathEffects.popAllAsOne();\n declCtx.restore();\n if (imageFilter) {\n this.setImageFilter(imageFilter);\n }\n if (shader) {\n this.setShader(shader);\n }\n if (pathEffect) {\n this.setPathEffect(pathEffect);\n }\n if (colorFilter) {\n this.setColorFilter(colorFilter);\n }\n if (maskFilter) {\n this.setMaskFilter(maskFilter);\n }\n }\n\n private enum<T>(value: T, key?: Uncapitalize<string>) {\n if (key !== undefined) {\n return value[enumKey(key) as keyof T];\n }\n return undefined;\n }\n\n private setValue<T extends keyof typeof this>(\n key: T,\n value?: typeof this[T]\n ) {\n if (value !== undefined) {\n this[key] = value;\n this.pristine = false;\n }\n }\n\n setColor(color?: SkColor) {\n this.setValue(\"_color\", color);\n }\n\n getColor() {\n return this._color;\n }\n\n setStrokeWidth(strokeWidth?: number) {\n this.setValue(\"_strokeWidth\", strokeWidth);\n }\n\n getStrokeWidth() {\n return this._strokeWidth;\n }\n\n setBlendMode(blendMode?: SkEnum<typeof BlendMode>) {\n this.setValue(\"_blendMode\", this.enum(BlendMode, blendMode));\n }\n\n getBlendMode() {\n return this._blendMode;\n }\n\n setStyle(style?: SkEnum<typeof PaintStyle>) {\n this.setValue(\"_style\", this.enum(PaintStyle, style));\n }\n\n getStyle() {\n return this._style;\n }\n\n setStrokeJoin(strokeJoin?: SkEnum<typeof StrokeJoin>) {\n this.setValue(\"_strokeJoin\", this.enum(StrokeJoin, strokeJoin));\n }\n\n getStrokeJoin() {\n return this._strokeJoin;\n }\n\n setStrokeCap(strokeCap?: SkEnum<typeof StrokeCap>) {\n this.setValue(\"_strokeCap\", this.enum(StrokeCap, strokeCap));\n }\n\n getStrokeCap() {\n return this._strokeCap;\n }\n\n setStrokeMiter(strokeMiter?: number) {\n this.setValue(\"_strokeMiter\", strokeMiter);\n }\n\n getStrokeMiter() {\n return this._strokeMiter;\n }\n\n setOpacity(opacity?: number) {\n this.setValue(\"_opacity\", opacity);\n }\n\n getOpacity() {\n return this._opacity;\n }\n\n setAntiAlias(antiAlias?: boolean) {\n this.setValue(\"_antiAlias\", antiAlias);\n }\n\n getAntiAlias() {\n return this._antiAlias;\n }\n\n setImageFilter(imageFilter?: SkImageFilter) {\n this.setValue(\"_imageFilter\", imageFilter);\n }\n\n getImageFilter() {\n return this._imageFilter;\n }\n\n setShader(shader?: SkShader) {\n this.setValue(\"_shader\", shader);\n }\n\n getShader() {\n return this._shader;\n }\n\n setPathEffect(pathEffect?: SkPathEffect) {\n this.setValue(\"_pathEffect\", pathEffect);\n }\n\n getPathEffect() {\n return this._pathEffect;\n }\n\n setColorFilter(colorFilter?: SkColorFilter) {\n this.setValue(\"_colorFilter\", colorFilter);\n }\n\n getColorFilter() {\n return this._colorFilter;\n }\n\n setMaskFilter(maskFilter?: SkMaskFilter) {\n this.setValue(\"_maskFilter\", maskFilter);\n }\n\n getMaskFilter() {\n return this._maskFilter;\n }\n\n isPristine() {\n return this.pristine;\n }\n\n concatTo(paint: SkPaint) {\n if (this._opacity !== undefined) {\n paint.setAlphaf(paint.getAlphaf() * this._opacity);\n }\n if (this._color !== undefined) {\n const currentOpacity = paint.getAlphaf();\n paint.setShader(null);\n paint.setColor(this._color);\n paint.setAlphaf(currentOpacity * paint.getAlphaf());\n }\n if (this._strokeWidth !== undefined) {\n paint.setStrokeWidth(this._strokeWidth);\n }\n if (this._blendMode !== undefined) {\n paint.setBlendMode(this._blendMode);\n }\n if (this._style !== undefined) {\n paint.setStyle(this._style);\n }\n if (this._strokeJoin !== undefined) {\n paint.setStrokeJoin(this._strokeJoin);\n }\n if (this._strokeCap !== undefined) {\n paint.setStrokeCap(this._strokeCap);\n }\n if (this._strokeMiter !== undefined) {\n paint.setStrokeMiter(this._strokeMiter);\n }\n if (this._antiAlias !== undefined) {\n paint.setAntiAlias(this._antiAlias);\n }\n if (this._imageFilter !== undefined) {\n paint.setImageFilter(this._imageFilter);\n }\n if (this._shader !== undefined) {\n paint.setShader(this._shader);\n }\n if (this._pathEffect !== undefined) {\n paint.setPathEffect(this._pathEffect);\n }\n if (this._colorFilter !== undefined) {\n paint.setColorFilter(this._colorFilter);\n }\n if (this._maskFilter !== undefined) {\n paint.setMaskFilter(this._maskFilter);\n }\n }\n}\n"],"mappings":";;;;;;;AAWA;;AACA;;AACA;;AAGA;;;;AAWO,MAAMA,iBAAN,CAAkD;EAKvDC,WAAW,CAAkBC,IAAlB,EAA8CC,MAA9C,EAAgE;IAAA,KAA9CD,IAA8C,GAA9CA,IAA8C;IAAA,KAAlBC,MAAkB,GAAlBA,MAAkB;;IAAA;;IAAA;;IACzE,MAAMC,KAAK,GAAG,KAAKF,IAAL,CAAUG,KAAV,EAAd;IACA,KAAKC,MAAL,GAAc,CAACF,KAAD,CAAd;IACA,KAAKG,cAAL,GAAsB,IAAIC,sCAAJ,CAAuBN,IAAvB,CAAtB;EACD;;EAEQ,IAALE,KAAK,GAAG;IACV,OAAO,KAAKE,MAAL,CAAY,KAAKA,MAAL,CAAYG,MAAZ,GAAqB,CAAjC,CAAP;EACD;;EAEOC,IAAI,GAAG;IACb,MAAMC,UAAU,GAAG,KAAKP,KAAL,CAAWQ,IAAX,EAAnB;IACA,KAAKN,MAAL,CAAYO,IAAZ,CAAiBF,UAAjB;EACD;;EAEDG,OAAO,GAAS;IACd,KAAKR,MAAL,CAAYS,GAAZ;EACD;;EAEDC,aAAa,CAACC,IAAD,EAAyBC,KAAzB,EAA0C;IACrD,IAAIA,KAAJ,EAAW;MACT,KAAKZ,MAAL,CAAYO,IAAZ,CAAiBK,KAAjB;MACA,OAAO,IAAP;IACD;;IACD,MAAMd,KAAK,GAAG,IAAIe,eAAJ,C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,KAAK,CAAC6D,aAAN,CAAoB,KAAKsC,WAAzB;IACD;EACF;;AAjPmB"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { SkColorFilter, SkImageFilter, SkMaskFilter, SkPaint, SkPathEffect, SkShader } from "../../skia/types";
|
2
1
|
import type { GroupProps } from "./Common";
|
3
|
-
import type { DrawingContext } from "./DrawingContext";
|
4
2
|
import type { DeclarationType, NodeType } from "./NodeType";
|
3
|
+
import type { DeclarationContext } from "./DeclarationContext";
|
4
|
+
import type { DrawingContext } from "./DrawingContext";
|
5
5
|
export interface Node<P> {
|
6
6
|
type: NodeType;
|
7
7
|
setProps(props: P): void;
|
@@ -13,16 +13,10 @@ export interface Node<P> {
|
|
13
13
|
insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;
|
14
14
|
}
|
15
15
|
export declare type Invalidate = () => void;
|
16
|
-
export interface DeclarationNode<P
|
16
|
+
export interface DeclarationNode<P> extends Node<P> {
|
17
17
|
declarationType: DeclarationType;
|
18
|
-
|
18
|
+
decorate(ctx: DeclarationContext): void;
|
19
19
|
setInvalidate(invalidate: Invalidate): void;
|
20
|
-
isPaint(): this is DeclarationNode<unknown, SkPaint>;
|
21
|
-
isImageFilter(): this is DeclarationNode<unknown, SkImageFilter>;
|
22
|
-
isColorFilter(): this is DeclarationNode<unknown, SkColorFilter>;
|
23
|
-
isShader(): this is DeclarationNode<unknown, SkShader>;
|
24
|
-
isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter>;
|
25
|
-
isPathEffect(): this is DeclarationNode<unknown, SkPathEffect>;
|
26
20
|
}
|
27
21
|
export interface RenderNode<P extends GroupProps> extends Node<P> {
|
28
22
|
render(ctx: DrawingContext): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type { GroupProps } from \"./Common\";\nimport type { DeclarationType, NodeType } from \"./NodeType\";\nimport type { DeclarationContext } from \"./DeclarationContext\";\nimport type { DrawingContext } from \"./DrawingContext\";\n\nexport interface Node<P> {\n type: NodeType;\n\n setProps(props: P): void;\n setProp<K extends keyof P>(name: K, v: P[K]): boolean;\n getProps(): P;\n\n children(): Node<unknown>[];\n addChild(child: Node<unknown>): void;\n removeChild(child: Node<unknown>): void;\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;\n}\n\nexport type Invalidate = () => void;\n\nexport interface DeclarationNode<P> extends Node<P> {\n declarationType: DeclarationType;\n decorate(ctx: DeclarationContext): void;\n\n setInvalidate(invalidate: Invalidate): void;\n}\n\nexport interface RenderNode<P extends GroupProps> extends Node<P> {\n render(ctx: DrawingContext): void;\n}\n"],"mappings":""}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { SkImageFilter, SkMaskFilter, SkShader, SkColorFilter, SkPathEffect, SkPaint } from "../../skia/types";
|
2
1
|
import type { ChildrenProps, GroupProps, PaintProps } from "./Common";
|
3
2
|
import type { BlendImageFilterProps, BlurImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, DisplacementMapImageFilterProps, MorphologyImageFilterProps, BlendProps } from "./ImageFilters";
|
4
3
|
import type { DeclarationNode, RenderNode } from "./Node";
|
@@ -7,14 +6,14 @@ import type { ImageProps, CircleProps, PathProps, CustomDrawingNodeProps, LinePr
|
|
7
6
|
import type { BlurMaskFilterProps } from "./MaskFilters";
|
8
7
|
import type { FractalNoiseProps, SweepGradientProps, ImageShaderProps, LinearGradientProps, ShaderProps, TurbulenceProps, TwoPointConicalGradientProps, RadialGradientProps, ColorProps } from "./Shaders";
|
9
8
|
import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "./PathEffects";
|
10
|
-
declare type ImageFilterNode<P> = DeclarationNode<P
|
11
|
-
declare type PathEffectNode<P> = DeclarationNode<P
|
12
|
-
declare type NullablePathEffectNode<P> = DeclarationNode<P
|
9
|
+
declare type ImageFilterNode<P> = DeclarationNode<P>;
|
10
|
+
declare type PathEffectNode<P> = DeclarationNode<P>;
|
11
|
+
declare type NullablePathEffectNode<P> = DeclarationNode<P>;
|
13
12
|
declare type DrawingNode<P extends GroupProps> = RenderNode<P>;
|
14
13
|
export interface SkDOM {
|
15
14
|
Layer(props?: ChildrenProps): RenderNode<ChildrenProps>;
|
16
15
|
Group(props?: GroupProps): RenderNode<GroupProps>;
|
17
|
-
Paint(props: PaintProps): DeclarationNode<PaintProps
|
16
|
+
Paint(props: PaintProps): DeclarationNode<PaintProps>;
|
18
17
|
Fill(props?: DrawingNodeProps): DrawingNode<DrawingNodeProps>;
|
19
18
|
Image(props: ImageProps): DrawingNode<ImageProps>;
|
20
19
|
Circle(props: CircleProps): DrawingNode<CircleProps>;
|
@@ -34,7 +33,7 @@ export interface SkDOM {
|
|
34
33
|
DiffRect(props: DiffRectProps): DrawingNode<DiffRectProps>;
|
35
34
|
Picture(props: PictureProps): DrawingNode<PictureProps>;
|
36
35
|
ImageSVG(props: ImageSVGProps): DrawingNode<ImageSVGProps>;
|
37
|
-
BlurMaskFilter(props: BlurMaskFilterProps): DeclarationNode<BlurMaskFilterProps
|
36
|
+
BlurMaskFilter(props: BlurMaskFilterProps): DeclarationNode<BlurMaskFilterProps>;
|
38
37
|
BlendImageFilter(props: BlendImageFilterProps): ImageFilterNode<BlendImageFilterProps>;
|
39
38
|
BlurImageFilter(props: BlurImageFilterProps): ImageFilterNode<BlurImageFilterProps>;
|
40
39
|
OffsetImageFilter(props: OffsetImageFilterProps): ImageFilterNode<OffsetImageFilterProps>;
|
@@ -42,21 +41,21 @@ export interface SkDOM {
|
|
42
41
|
MorphologyImageFilter(props: MorphologyImageFilterProps): ImageFilterNode<MorphologyImageFilterProps>;
|
43
42
|
DisplacementMapImageFilter(props: DisplacementMapImageFilterProps): ImageFilterNode<DisplacementMapImageFilterProps>;
|
44
43
|
RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps): ImageFilterNode<RuntimeShaderImageFilterProps>;
|
45
|
-
MatrixColorFilter(props: MatrixColorFilterProps): DeclarationNode<MatrixColorFilterProps
|
46
|
-
BlendColorFilter(props: BlendColorFilterProps): DeclarationNode<BlendColorFilterProps
|
47
|
-
LumaColorFilter(): DeclarationNode<null
|
48
|
-
LinearToSRGBGammaColorFilter(): DeclarationNode<null
|
49
|
-
SRGBToLinearGammaColorFilter(): DeclarationNode<null
|
50
|
-
LerpColorFilter(props: LerpColorFilterProps): DeclarationNode<LerpColorFilterProps
|
51
|
-
Shader(props: ShaderProps): DeclarationNode<ShaderProps
|
52
|
-
ImageShader(props: ImageShaderProps): DeclarationNode<ImageShaderProps
|
53
|
-
ColorShader(props: ColorProps): DeclarationNode<ColorProps
|
54
|
-
Turbulence(props: TurbulenceProps): DeclarationNode<TurbulenceProps
|
55
|
-
FractalNoise(props: FractalNoiseProps): DeclarationNode<FractalNoiseProps
|
56
|
-
LinearGradient(props: LinearGradientProps): DeclarationNode<LinearGradientProps
|
57
|
-
RadialGradient(props: RadialGradientProps): DeclarationNode<RadialGradientProps
|
58
|
-
SweepGradient(props: SweepGradientProps): DeclarationNode<SweepGradientProps
|
59
|
-
TwoPointConicalGradient(props: TwoPointConicalGradientProps): DeclarationNode<TwoPointConicalGradientProps
|
44
|
+
MatrixColorFilter(props: MatrixColorFilterProps): DeclarationNode<MatrixColorFilterProps>;
|
45
|
+
BlendColorFilter(props: BlendColorFilterProps): DeclarationNode<BlendColorFilterProps>;
|
46
|
+
LumaColorFilter(): DeclarationNode<null>;
|
47
|
+
LinearToSRGBGammaColorFilter(): DeclarationNode<null>;
|
48
|
+
SRGBToLinearGammaColorFilter(): DeclarationNode<null>;
|
49
|
+
LerpColorFilter(props: LerpColorFilterProps): DeclarationNode<LerpColorFilterProps>;
|
50
|
+
Shader(props: ShaderProps): DeclarationNode<ShaderProps>;
|
51
|
+
ImageShader(props: ImageShaderProps): DeclarationNode<ImageShaderProps>;
|
52
|
+
ColorShader(props: ColorProps): DeclarationNode<ColorProps>;
|
53
|
+
Turbulence(props: TurbulenceProps): DeclarationNode<TurbulenceProps>;
|
54
|
+
FractalNoise(props: FractalNoiseProps): DeclarationNode<FractalNoiseProps>;
|
55
|
+
LinearGradient(props: LinearGradientProps): DeclarationNode<LinearGradientProps>;
|
56
|
+
RadialGradient(props: RadialGradientProps): DeclarationNode<RadialGradientProps>;
|
57
|
+
SweepGradient(props: SweepGradientProps): DeclarationNode<SweepGradientProps>;
|
58
|
+
TwoPointConicalGradient(props: TwoPointConicalGradientProps): DeclarationNode<TwoPointConicalGradientProps>;
|
60
59
|
CornerPathEffect(props: CornerPathEffectProps): NullablePathEffectNode<CornerPathEffectProps>;
|
61
60
|
DiscretePathEffect(props: DiscretePathEffectProps): PathEffectNode<DiscretePathEffectProps>;
|
62
61
|
DashPathEffect(props: DashPathEffectProps): PathEffectNode<DashPathEffectProps>;
|
@@ -64,9 +63,9 @@ export interface SkDOM {
|
|
64
63
|
Path2DPathEffect(props: Path2DPathEffectProps): NullablePathEffectNode<Path2DPathEffectProps>;
|
65
64
|
SumPathEffect(): NullablePathEffectNode<null>;
|
66
65
|
Line2DPathEffect(props: Line2DPathEffectProps): NullablePathEffectNode<Line2DPathEffectProps>;
|
67
|
-
Blend(props: BlendProps): DeclarationNode<BlendProps
|
66
|
+
Blend(props: BlendProps): DeclarationNode<BlendProps>;
|
68
67
|
BackdropFilter(props: ChildrenProps): RenderNode<ChildrenProps>;
|
69
68
|
Box(props: BoxProps): RenderNode<BoxProps>;
|
70
|
-
BoxShadow(props: BoxShadowProps): DeclarationNode<BoxShadowProps
|
69
|
+
BoxShadow(props: BoxShadowProps): DeclarationNode<BoxShadowProps>;
|
71
70
|
}
|
72
71
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["SkDOM.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"names":[],"sources":["SkDOM.ts"],"sourcesContent":["import type { ChildrenProps, GroupProps, PaintProps } from \"./Common\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n DisplacementMapImageFilterProps,\n MorphologyImageFilterProps,\n BlendProps,\n} from \"./ImageFilters\";\nimport type { DeclarationNode, RenderNode } from \"./Node\";\nimport type {\n BlendColorFilterProps,\n MatrixColorFilterProps,\n LerpColorFilterProps,\n} from \"./ColorFilters\";\nimport type {\n ImageProps,\n CircleProps,\n PathProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n PictureProps,\n ImageSVGProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n} from \"./Drawings\";\nimport type { BlurMaskFilterProps } from \"./MaskFilters\";\nimport type {\n FractalNoiseProps,\n SweepGradientProps,\n ImageShaderProps,\n LinearGradientProps,\n ShaderProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n RadialGradientProps,\n ColorProps,\n} from \"./Shaders\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"./PathEffects\";\n\ntype ImageFilterNode<P> = DeclarationNode<P>;\n\ntype PathEffectNode<P> = DeclarationNode<P>;\ntype NullablePathEffectNode<P> = DeclarationNode<P>;\n\ntype DrawingNode<P extends GroupProps> = RenderNode<P>;\n\nexport interface SkDOM {\n Layer(props?: ChildrenProps): RenderNode<ChildrenProps>;\n Group(props?: GroupProps): RenderNode<GroupProps>;\n Paint(props: PaintProps): DeclarationNode<PaintProps>;\n\n // Drawings\n Fill(props?: DrawingNodeProps): DrawingNode<DrawingNodeProps>;\n Image(props: ImageProps): DrawingNode<ImageProps>;\n Circle(props: CircleProps): DrawingNode<CircleProps>;\n Path(props: PathProps): DrawingNode<PathProps>;\n CustomDrawing(\n props: CustomDrawingNodeProps\n ): DrawingNode<CustomDrawingNodeProps>;\n Line(props: LineProps): DrawingNode<LineProps>;\n Oval(props: OvalProps): DrawingNode<OvalProps>;\n Patch(props: PatchProps): DrawingNode<PatchProps>;\n Points(props: PointsProps): DrawingNode<PointsProps>;\n Rect(props: RectProps): DrawingNode<RectProps>;\n RRect(props: RoundedRectProps): DrawingNode<RoundedRectProps>;\n Vertices(props: VerticesProps): DrawingNode<VerticesProps>;\n Text(props: TextProps): DrawingNode<TextProps>;\n TextPath(props: TextPathProps): DrawingNode<TextPathProps>;\n TextBlob(props: TextBlobProps): DrawingNode<TextBlobProps>;\n Glyphs(props: GlyphsProps): DrawingNode<GlyphsProps>;\n DiffRect(props: DiffRectProps): DrawingNode<DiffRectProps>;\n Picture(props: PictureProps): DrawingNode<PictureProps>;\n ImageSVG(props: ImageSVGProps): DrawingNode<ImageSVGProps>;\n\n // BlurMaskFilters\n BlurMaskFilter(\n props: BlurMaskFilterProps\n ): DeclarationNode<BlurMaskFilterProps>;\n\n // ImageFilters\n BlendImageFilter(\n props: BlendImageFilterProps\n ): ImageFilterNode<BlendImageFilterProps>;\n BlurImageFilter(\n props: BlurImageFilterProps\n ): ImageFilterNode<BlurImageFilterProps>;\n OffsetImageFilter(\n props: OffsetImageFilterProps\n ): ImageFilterNode<OffsetImageFilterProps>;\n DropShadowImageFilter(\n props: DropShadowImageFilterProps\n ): ImageFilterNode<DropShadowImageFilterProps>;\n MorphologyImageFilter(\n props: MorphologyImageFilterProps\n ): ImageFilterNode<MorphologyImageFilterProps>;\n DisplacementMapImageFilter(\n props: DisplacementMapImageFilterProps\n ): ImageFilterNode<DisplacementMapImageFilterProps>;\n RuntimeShaderImageFilter(\n props: RuntimeShaderImageFilterProps\n ): ImageFilterNode<RuntimeShaderImageFilterProps>;\n\n // ColorFilters\n MatrixColorFilter(\n props: MatrixColorFilterProps\n ): DeclarationNode<MatrixColorFilterProps>;\n BlendColorFilter(\n props: BlendColorFilterProps\n ): DeclarationNode<BlendColorFilterProps>;\n LumaColorFilter(): DeclarationNode<null>;\n LinearToSRGBGammaColorFilter(): DeclarationNode<null>;\n SRGBToLinearGammaColorFilter(): DeclarationNode<null>;\n LerpColorFilter(\n props: LerpColorFilterProps\n ): DeclarationNode<LerpColorFilterProps>;\n\n // Shaders\n Shader(props: ShaderProps): DeclarationNode<ShaderProps>;\n ImageShader(props: ImageShaderProps): DeclarationNode<ImageShaderProps>;\n ColorShader(props: ColorProps): DeclarationNode<ColorProps>;\n Turbulence(props: TurbulenceProps): DeclarationNode<TurbulenceProps>;\n FractalNoise(props: FractalNoiseProps): DeclarationNode<FractalNoiseProps>;\n LinearGradient(\n props: LinearGradientProps\n ): DeclarationNode<LinearGradientProps>;\n RadialGradient(\n props: RadialGradientProps\n ): DeclarationNode<RadialGradientProps>;\n SweepGradient(props: SweepGradientProps): DeclarationNode<SweepGradientProps>;\n TwoPointConicalGradient(\n props: TwoPointConicalGradientProps\n ): DeclarationNode<TwoPointConicalGradientProps>;\n\n // Path Effects\n CornerPathEffect(\n props: CornerPathEffectProps\n ): NullablePathEffectNode<CornerPathEffectProps>;\n DiscretePathEffect(\n props: DiscretePathEffectProps\n ): PathEffectNode<DiscretePathEffectProps>;\n DashPathEffect(\n props: DashPathEffectProps\n ): PathEffectNode<DashPathEffectProps>;\n Path1DPathEffect(\n props: Path1DPathEffectProps\n ): NullablePathEffectNode<Path1DPathEffectProps>;\n Path2DPathEffect(\n props: Path2DPathEffectProps\n ): NullablePathEffectNode<Path2DPathEffectProps>;\n SumPathEffect(): NullablePathEffectNode<null>;\n Line2DPathEffect(\n props: Line2DPathEffectProps\n ): NullablePathEffectNode<Line2DPathEffectProps>;\n\n // Mixed\n Blend(props: BlendProps): DeclarationNode<BlendProps>;\n BackdropFilter(props: ChildrenProps): RenderNode<ChildrenProps>;\n Box(props: BoxProps): RenderNode<BoxProps>;\n BoxShadow(props: BoxShadowProps): DeclarationNode<BoxShadowProps>;\n}\n"],"mappings":""}
|
@@ -17,6 +17,19 @@ Object.keys(_DrawingContext).forEach(function (key) {
|
|
17
17
|
});
|
18
18
|
});
|
19
19
|
|
20
|
+
var _DeclarationContext = require("./DeclarationContext");
|
21
|
+
|
22
|
+
Object.keys(_DeclarationContext).forEach(function (key) {
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
24
|
+
if (key in exports && exports[key] === _DeclarationContext[key]) return;
|
25
|
+
Object.defineProperty(exports, key, {
|
26
|
+
enumerable: true,
|
27
|
+
get: function () {
|
28
|
+
return _DeclarationContext[key];
|
29
|
+
}
|
30
|
+
});
|
31
|
+
});
|
32
|
+
|
20
33
|
var _Node = require("./Node");
|
21
34
|
|
22
35
|
Object.keys(_Node).forEach(function (key) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./DrawingContext\";\nexport * from \"./Node\";\nexport * from \"./NodeType\";\nexport * from \"./SkDOM\";\nexport * from \"./Common\";\nexport * from \"./Drawings\";\nexport * from \"./ImageFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./MaskFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./Shaders\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./DrawingContext\";\nexport * from \"./DeclarationContext\";\nexport * from \"./Node\";\nexport * from \"./NodeType\";\nexport * from \"./SkDOM\";\nexport * from \"./Common\";\nexport * from \"./Drawings\";\nexport * from \"./ImageFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./MaskFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./Shaders\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/lib/commonjs/index.d.ts
CHANGED
package/lib/commonjs/index.js
CHANGED
@@ -32,6 +32,19 @@ Object.keys(_Canvas).forEach(function (key) {
|
|
32
32
|
});
|
33
33
|
});
|
34
34
|
|
35
|
+
var _Offscreen = require("./renderer/Offscreen");
|
36
|
+
|
37
|
+
Object.keys(_Offscreen).forEach(function (key) {
|
38
|
+
if (key === "default" || key === "__esModule") return;
|
39
|
+
if (key in exports && exports[key] === _Offscreen[key]) return;
|
40
|
+
Object.defineProperty(exports, key, {
|
41
|
+
enumerable: true,
|
42
|
+
get: function () {
|
43
|
+
return _Offscreen[key];
|
44
|
+
}
|
45
|
+
});
|
46
|
+
});
|
47
|
+
|
35
48
|
var _views = require("./views");
|
36
49
|
|
37
50
|
Object.keys(_views).forEach(function (key) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":";;;;;;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":";;;;;;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -40,11 +40,11 @@ const Canvas = /*#__PURE__*/(0, _react.forwardRef)((_ref, forwardedRef) => {
|
|
40
40
|
(_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.redraw();
|
41
41
|
}, [innerRef]);
|
42
42
|
const registerValues = (0, _react.useCallback)(values => {
|
43
|
-
if (ref.current
|
44
|
-
|
43
|
+
if (ref.current !== null) {
|
44
|
+
return ref.current.registerValues(values);
|
45
45
|
}
|
46
46
|
|
47
|
-
return
|
47
|
+
return () => {};
|
48
48
|
}, [ref]);
|
49
49
|
const root = (0, _react.useMemo)(() => new _Reconciler.SkiaRoot(_Skia.Skia, registerValues, redraw), [redraw, registerValues]); // Render effect
|
50
50
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useCanvasRef","useRef","Canvas","forwardRef","forwardedRef","children","style","debug","mode","onTouch","onSize","props","innerRef","ref","useCombinedRefs","redraw","useCallback","current","registerValues","values","
|
1
|
+
{"version":3,"names":["useCanvasRef","useRef","Canvas","forwardRef","forwardedRef","children","style","debug","mode","onTouch","onSize","props","innerRef","ref","useCombinedRefs","redraw","useCallback","current","registerValues","values","root","useMemo","SkiaRoot","Skia","useEffect","render","unmount","dom","refs","targetRef","React","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n MutableRefObject,\n ForwardedRef,\n} from \"react\";\n\nimport { SkiaDomView } from \"../views\";\nimport { Skia } from \"../skia/Skia\";\nimport type { TouchHandler, SkiaBaseViewProps } from \"../views\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { SkiaRoot } from \"./Reconciler\";\n\nexport const useCanvasRef = () => useRef<SkiaDomView>(null);\n\nexport interface CanvasProps extends SkiaBaseViewProps {\n ref?: RefObject<SkiaDomView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nexport const Canvas = forwardRef<SkiaDomView, CanvasProps>(\n (\n { children, style, debug, mode, onTouch, onSize, ...props },\n forwardedRef\n ) => {\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const redraw = useCallback(() => {\n innerRef.current?.redraw();\n }, [innerRef]);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current !== null) {\n return ref.current.registerValues(values);\n }\n return () => {};\n },\n [ref]\n );\n const root = useMemo(\n () => new SkiaRoot(Skia, registerValues, redraw),\n [redraw, registerValues]\n );\n\n // Render effect\n useEffect(() => {\n root.render(children);\n }, [children, root, redraw]);\n\n useEffect(() => {\n return () => {\n root.unmount();\n };\n }, [root]);\n\n return (\n <SkiaDomView\n ref={ref}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onSize={onSize}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n }\n) as React.FC<CanvasProps & React.RefAttributes<SkiaDomView>>;\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"],"mappings":";;;;;;;AAAA;;AAcA;;AACA;;AAIA;;;;;;;;AAEO,MAAMA,YAAY,GAAG,MAAM,IAAAC,aAAA,EAAoB,IAApB,CAA3B;;;AAQA,MAAMC,MAAM,gBAAG,IAAAC,iBAAA,EACpB,OAEEC,YAFF,KAGK;EAAA,IAFH;IAAEC,QAAF;IAAYC,KAAZ;IAAmBC,KAAnB;IAA0BC,IAA1B;IAAgCC,OAAhC;IAAyCC,MAAzC;IAAiD,GAAG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