@shopify/react-native-skia 0.1.146 → 0.1.148
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkMatrix.h +9 -0
- package/cpp/api/JsiSkPath.h +2 -2
- package/lib/commonjs/dom/nodes/DrawingNode.js +84 -0
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/GroupNode.js +28 -0
- package/lib/commonjs/dom/nodes/GroupNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +256 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -0
- package/lib/commonjs/dom/nodes/Node.js +158 -0
- package/lib/commonjs/dom/nodes/Node.js.map +1 -0
- package/lib/commonjs/dom/nodes/PaintContext.js +6 -0
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -0
- package/lib/commonjs/dom/nodes/PaintNode.js +96 -0
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/RenderNode.js +346 -0
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -0
- package/lib/commonjs/{renderer/processors/Circles.js → dom/nodes/datatypes/Circle.js} +4 -2
- package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -0
- package/lib/commonjs/{renderer/processors → dom/nodes/datatypes}/Color.js +0 -0
- package/lib/commonjs/{renderer/processors → dom/nodes/datatypes}/Color.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Enum.js +11 -0
- package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -0
- package/lib/commonjs/{renderer/components/image/BoxFit.js → dom/nodes/datatypes/Fitting.js} +2 -2
- package/lib/commonjs/{renderer/components/image/BoxFit.js.map → dom/nodes/datatypes/Fitting.js.map} +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js +65 -0
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -0
- package/lib/commonjs/{renderer/processors/Paths.js → dom/nodes/datatypes/Path.js} +2 -2
- package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -0
- package/lib/commonjs/{renderer/processors → dom/nodes/datatypes}/Radius.js +0 -0
- package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -0
- package/lib/commonjs/{renderer/processors/Rects.js → dom/nodes/datatypes/Rect.js} +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -0
- package/lib/commonjs/dom/nodes/datatypes/Transform.js +42 -0
- package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -0
- package/lib/commonjs/dom/nodes/datatypes/index.js +123 -0
- package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js +38 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js +105 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js +43 -0
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +28 -0
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js +36 -0
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/FillNode.js +33 -0
- package/lib/commonjs/dom/nodes/drawings/FillNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js +63 -0
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.js +45 -0
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/LineNode.js +36 -0
- package/lib/commonjs/dom/nodes/drawings/LineNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/OvalNode.js +39 -0
- package/lib/commonjs/dom/nodes/drawings/OvalNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js +69 -0
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/PathNode.js +68 -0
- package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/PictureNode.js +34 -0
- package/lib/commonjs/dom/nodes/drawings/PictureNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/PointsNode.js +40 -0
- package/lib/commonjs/dom/nodes/drawings/PointsNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/RRectNode.js +43 -0
- package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/RectNode.js +39 -0
- package/lib/commonjs/dom/nodes/drawings/RectNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/Text.js +185 -0
- package/lib/commonjs/dom/nodes/drawings/Text.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js +55 -0
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/index.js +240 -0
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -0
- package/lib/commonjs/dom/nodes/index.js +45 -0
- package/lib/commonjs/dom/nodes/index.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.js +82 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js +152 -0
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +225 -0
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js +33 -0
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/PathEffects.js +223 -0
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/Shaders.js +242 -0
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -0
- package/lib/commonjs/dom/nodes/paint/index.js +84 -0
- package/lib/commonjs/dom/nodes/paint/index.js.map +1 -0
- package/lib/commonjs/dom/types/ColorFilters.js +6 -0
- package/lib/commonjs/dom/types/ColorFilters.js.map +1 -0
- package/lib/commonjs/dom/types/Common.js +6 -0
- package/lib/commonjs/dom/types/Common.js.map +1 -0
- package/lib/commonjs/dom/types/DrawingContext.js +6 -0
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -0
- package/lib/commonjs/dom/types/Drawings.js +6 -0
- package/lib/commonjs/dom/types/Drawings.js.map +1 -0
- package/lib/commonjs/dom/types/ImageFilters.js +6 -0
- package/lib/commonjs/dom/types/ImageFilters.js.map +1 -0
- package/lib/commonjs/dom/types/MaskFilters.js +6 -0
- package/lib/commonjs/dom/types/MaskFilters.js.map +1 -0
- package/lib/commonjs/dom/types/Node.js +6 -0
- package/lib/commonjs/dom/types/Node.js.map +1 -0
- package/lib/commonjs/dom/types/NodeType.js +80 -0
- package/lib/commonjs/dom/types/NodeType.js.map +1 -0
- package/lib/commonjs/dom/types/PathEffects.js +6 -0
- package/lib/commonjs/dom/types/PathEffects.js.map +1 -0
- package/lib/commonjs/dom/types/Shaders.js +6 -0
- package/lib/commonjs/dom/types/Shaders.js.map +1 -0
- package/lib/commonjs/dom/types/SkDOM.js +6 -0
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -0
- package/lib/commonjs/dom/types/index.js +149 -0
- package/lib/commonjs/dom/types/index.js.map +1 -0
- package/lib/commonjs/index.js +26 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +7 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.js +39 -0
- package/lib/commonjs/renderer/Container.js.map +1 -0
- package/lib/commonjs/renderer/DependencyManager.js +17 -5
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.js +196 -0
- package/lib/commonjs/renderer/HostComponents.js.map +1 -0
- package/lib/commonjs/renderer/HostConfig.js +47 -125
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +1 -46
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Drawing.js +1 -15
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js +1 -69
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +2 -14
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js +1 -19
- package/lib/commonjs/renderer/components/Picture.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +2 -32
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +1 -25
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +1 -23
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +1 -17
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +1 -17
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +1 -20
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +1 -17
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js +1 -35
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js +1 -30
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js +1 -61
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/image/index.js +0 -13
- package/lib/commonjs/renderer/components/image/index.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +1 -27
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +1 -38
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +1 -25
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +1 -20
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +1 -28
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +1 -39
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/index.js +0 -13
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -23
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +1 -30
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +1 -27
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +1 -28
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +1 -31
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +1 -37
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +1 -33
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +1 -17
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js +1 -19
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +1 -22
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +1 -28
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +1 -28
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js +1 -23
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +1 -29
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +1 -22
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +1 -30
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js +2 -102
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js +1 -22
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js +1 -19
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Fill.js +1 -15
- package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js +3 -3
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Line.js +1 -19
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js +1 -19
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +1 -37
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js +1 -47
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js +1 -26
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js +1 -19
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +1 -19
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js +1 -36
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js +1 -39
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js +1 -24
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js +1 -20
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js +1 -71
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/index.js +0 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/index.js +0 -117
- package/lib/commonjs/renderer/processors/index.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js +4 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/web/WithSkiaWeb.js +3 -1
- package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
- package/lib/module/dom/nodes/DrawingNode.js +72 -0
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -0
- package/lib/module/dom/nodes/GroupNode.js +17 -0
- package/lib/module/dom/nodes/GroupNode.js.map +1 -0
- package/lib/module/dom/nodes/JsiSkDOM.js +240 -0
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -0
- package/lib/module/dom/nodes/Node.js +145 -0
- package/lib/module/dom/nodes/Node.js.map +1 -0
- package/lib/module/dom/nodes/PaintContext.js +2 -0
- package/lib/module/dom/nodes/PaintContext.js.map +1 -0
- package/lib/module/dom/nodes/PaintNode.js +83 -0
- package/lib/module/dom/nodes/PaintNode.js.map +1 -0
- package/lib/module/dom/nodes/RenderNode.js +329 -0
- package/lib/module/dom/nodes/RenderNode.js.map +1 -0
- package/lib/module/{renderer/processors/Circles.js → dom/nodes/datatypes/Circle.js} +2 -3
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -0
- package/lib/module/{renderer/processors → dom/nodes/datatypes}/Color.js +0 -0
- package/lib/module/{renderer/processors → dom/nodes/datatypes}/Color.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Enum.js +2 -0
- package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -0
- package/lib/module/{renderer/components/image/BoxFit.js → dom/nodes/datatypes/Fitting.js} +2 -2
- package/lib/module/{renderer/components/image/BoxFit.js.map → dom/nodes/datatypes/Fitting.js.map} +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +47 -0
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -0
- package/lib/module/{renderer/processors/Paths.js → dom/nodes/datatypes/Path.js} +2 -2
- package/lib/module/dom/nodes/datatypes/Path.js.map +1 -0
- package/lib/module/{renderer/processors → dom/nodes/datatypes}/Radius.js +0 -0
- package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -0
- package/lib/module/{renderer/processors/Rects.js → dom/nodes/datatypes/Rect.js} +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -0
- package/lib/module/dom/nodes/datatypes/Transform.js +32 -0
- package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -0
- package/lib/module/dom/nodes/datatypes/index.js +10 -0
- package/lib/module/dom/nodes/datatypes/index.js.map +1 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js +25 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/Box.js +89 -0
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -0
- package/lib/module/dom/nodes/drawings/CircleNode.js +31 -0
- package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +17 -0
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/DiffRectNode.js +25 -0
- package/lib/module/dom/nodes/drawings/DiffRectNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/FillNode.js +22 -0
- package/lib/module/dom/nodes/drawings/FillNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/ImageNode.js +51 -0
- package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/ImageSVG.js +33 -0
- package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -0
- package/lib/module/dom/nodes/drawings/LineNode.js +25 -0
- package/lib/module/dom/nodes/drawings/LineNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/OvalNode.js +27 -0
- package/lib/module/dom/nodes/drawings/OvalNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/PatchNode.js +56 -0
- package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/PathNode.js +55 -0
- package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/PictureNode.js +23 -0
- package/lib/module/dom/nodes/drawings/PictureNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/PointsNode.js +27 -0
- package/lib/module/dom/nodes/drawings/PointsNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/RRectNode.js +31 -0
- package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/RectNode.js +27 -0
- package/lib/module/dom/nodes/drawings/RectNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/Text.js +164 -0
- package/lib/module/dom/nodes/drawings/Text.js.map +1 -0
- package/lib/module/dom/nodes/drawings/VerticesNode.js +42 -0
- package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/index.js +19 -0
- package/lib/module/dom/nodes/drawings/index.js.map +1 -0
- package/lib/module/dom/nodes/index.js +4 -0
- package/lib/module/dom/nodes/index.js.map +1 -0
- package/lib/module/dom/nodes/paint/BlendNode.js +66 -0
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -0
- package/lib/module/dom/nodes/paint/ColorFilters.js +120 -0
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -0
- package/lib/module/dom/nodes/paint/ImageFilters.js +191 -0
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -0
- package/lib/module/dom/nodes/paint/MaskFilters.js +20 -0
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -0
- package/lib/module/dom/nodes/paint/PathEffects.js +192 -0
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -0
- package/lib/module/dom/nodes/paint/Shaders.js +201 -0
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -0
- package/lib/module/dom/nodes/paint/index.js +7 -0
- package/lib/module/dom/nodes/paint/index.js.map +1 -0
- package/lib/module/dom/types/ColorFilters.js +2 -0
- package/lib/module/dom/types/ColorFilters.js.map +1 -0
- package/lib/module/dom/types/Common.js +2 -0
- package/lib/module/dom/types/Common.js.map +1 -0
- package/lib/module/dom/types/DrawingContext.js +2 -0
- package/lib/module/dom/types/DrawingContext.js.map +1 -0
- package/lib/module/dom/types/Drawings.js +2 -0
- package/lib/module/dom/types/Drawings.js.map +1 -0
- package/lib/module/dom/types/ImageFilters.js +2 -0
- package/lib/module/dom/types/ImageFilters.js.map +1 -0
- package/lib/module/dom/types/MaskFilters.js +2 -0
- package/lib/module/dom/types/MaskFilters.js.map +1 -0
- package/lib/module/dom/types/Node.js +2 -0
- package/lib/module/dom/types/Node.js.map +1 -0
- package/lib/module/dom/types/NodeType.js +72 -0
- package/lib/module/dom/types/NodeType.js.map +1 -0
- package/lib/module/dom/types/PathEffects.js +2 -0
- package/lib/module/dom/types/PathEffects.js.map +1 -0
- package/lib/module/dom/types/Shaders.js +2 -0
- package/lib/module/dom/types/Shaders.js.map +1 -0
- package/lib/module/dom/types/SkDOM.js +2 -0
- package/lib/module/dom/types/SkDOM.js.map +1 -0
- package/lib/module/dom/types/index.js +12 -0
- package/lib/module/dom/types/index.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +7 -3
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.js +29 -0
- package/lib/module/renderer/Container.js.map +1 -0
- package/lib/module/renderer/DependencyManager.js +17 -5
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/HostComponents.js +185 -0
- package/lib/module/renderer/HostComponents.js.map +1 -0
- package/lib/module/renderer/HostConfig.js +47 -126
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +1 -42
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Drawing.js +1 -13
- package/lib/module/renderer/components/Drawing.js.map +1 -1
- package/lib/module/renderer/components/Group.js +1 -65
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +3 -12
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js +1 -17
- package/lib/module/renderer/components/Picture.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +2 -30
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js +1 -20
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +1 -19
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +1 -15
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +1 -15
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js +1 -17
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +1 -15
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js +1 -31
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js +1 -27
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js +1 -57
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/image/index.js +0 -1
- package/lib/module/renderer/components/image/index.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js +1 -21
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +1 -30
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js +1 -21
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js +1 -17
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +1 -24
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +1 -34
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/index.js +0 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +1 -19
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +1 -27
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +1 -24
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +1 -25
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +1 -28
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +1 -32
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +1 -29
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +1 -14
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js +1 -16
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js +1 -20
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js +1 -25
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js +1 -25
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js +1 -19
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js +1 -26
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js +1 -20
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +1 -27
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js +2 -97
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js +1 -19
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js +1 -17
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Fill.js +1 -13
- package/lib/module/renderer/components/shapes/Fill.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Line.js +1 -17
- package/lib/module/renderer/components/shapes/Line.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js +1 -16
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +1 -32
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js +1 -43
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js +1 -20
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js +1 -16
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js +1 -16
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js +1 -31
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js +1 -37
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js +1 -22
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js +1 -18
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js +1 -69
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/index.js +0 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/index.js +0 -9
- package/lib/module/renderer/processors/index.js.map +1 -1
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js +4 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.js +3 -1
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/typescript/src/dom/nodes/DrawingNode.d.ts +14 -0
- package/lib/typescript/src/dom/nodes/GroupNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +70 -0
- package/lib/typescript/src/dom/nodes/Node.d.ts +43 -0
- package/lib/typescript/src/dom/nodes/PaintContext.d.ts +18 -0
- package/lib/typescript/src/dom/nodes/PaintNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/RenderNode.d.ts +29 -0
- package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +4 -0
- package/lib/typescript/src/{renderer/processors → dom/nodes/datatypes}/Color.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/datatypes/Enum.d.ts +1 -0
- package/lib/typescript/src/{renderer/components/image/BoxFit.d.ts → dom/nodes/datatypes/Fitting.d.ts} +1 -1
- package/lib/typescript/src/{renderer/processors/Transform.d.ts → dom/nodes/datatypes/Gradient.d.ts} +11 -9
- package/lib/typescript/src/dom/nodes/datatypes/Path.d.ts +4 -0
- package/lib/typescript/src/dom/nodes/datatypes/Radius.d.ts +3 -0
- package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +5 -0
- package/lib/typescript/src/dom/nodes/datatypes/Transform.d.ts +3 -0
- package/lib/typescript/src/dom/nodes/datatypes/index.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/BackdropFilterNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +13 -0
- package/lib/typescript/src/dom/nodes/drawings/CircleNode.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/DiffRectNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/FillNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/ImageNode.d.ts +25 -0
- package/lib/typescript/src/dom/nodes/drawings/ImageSVG.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/LineNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/OvalNode.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/PatchNode.d.ts +18 -0
- package/lib/typescript/src/dom/nodes/drawings/PathNode.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/PictureNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/PointsNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/RRectNode.d.ts +10 -0
- package/lib/typescript/src/dom/nodes/drawings/RectNode.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/Text.d.ts +30 -0
- package/lib/typescript/src/dom/nodes/drawings/VerticesNode.d.ts +9 -0
- package/lib/typescript/src/dom/nodes/drawings/index.d.ts +18 -0
- package/lib/typescript/src/dom/nodes/index.d.ts +3 -0
- package/lib/typescript/src/dom/nodes/paint/BlendNode.d.ts +12 -0
- package/lib/typescript/src/dom/nodes/paint/ColorFilters.d.ts +36 -0
- package/lib/typescript/src/dom/nodes/paint/ImageFilters.d.ts +42 -0
- package/lib/typescript/src/dom/nodes/paint/MaskFilters.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/paint/PathEffects.d.ts +42 -0
- package/lib/typescript/src/dom/nodes/paint/Shaders.d.ts +44 -0
- package/lib/typescript/src/dom/nodes/paint/index.d.ts +6 -0
- package/lib/typescript/src/dom/types/ColorFilters.d.ts +12 -0
- package/lib/typescript/src/dom/types/Common.d.ts +57 -0
- package/lib/typescript/src/dom/types/DrawingContext.d.ts +6 -0
- package/lib/typescript/src/dom/types/Drawings.d.ts +106 -0
- package/lib/typescript/src/dom/types/ImageFilters.d.ts +37 -0
- package/lib/typescript/src/dom/types/MaskFilters.d.ts +7 -0
- package/lib/typescript/src/dom/types/Node.d.ts +29 -0
- package/lib/typescript/src/dom/types/NodeType.d.ts +66 -0
- package/lib/typescript/src/dom/types/PathEffects.d.ts +28 -0
- package/lib/typescript/src/dom/types/Shaders.d.ts +59 -0
- package/lib/typescript/src/dom/types/SkDOM.d.ts +71 -0
- package/lib/typescript/src/dom/types/index.d.ts +11 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +3 -3
- package/lib/typescript/src/renderer/Container.d.ts +12 -0
- package/lib/typescript/src/renderer/DependencyManager.d.ts +5 -4
- package/lib/typescript/src/renderer/HostComponents.d.ts +72 -0
- package/lib/typescript/src/renderer/HostConfig.d.ts +5 -13
- package/lib/typescript/src/renderer/components/Blend.d.ts +4 -9
- package/lib/typescript/src/renderer/components/Drawing.d.ts +2 -6
- package/lib/typescript/src/renderer/components/Group.d.ts +4 -9
- package/lib/typescript/src/renderer/components/Paint.d.ts +4 -8
- package/lib/typescript/src/renderer/components/Picture.d.ts +3 -5
- package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +2 -1
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +3 -3
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +4 -10
- package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +4 -7
- package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +3 -4
- package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +3 -4
- package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +4 -8
- package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +3 -4
- package/lib/typescript/src/renderer/components/image/Image.d.ts +3 -11
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +2 -5
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +3 -15
- package/lib/typescript/src/renderer/components/image/index.d.ts +0 -1
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +4 -10
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +4 -10
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +4 -8
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +4 -8
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +3 -7
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +3 -11
- package/lib/typescript/src/renderer/components/index.d.ts +0 -1
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +3 -9
- package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +4 -7
- package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +4 -8
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +4 -9
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +4 -9
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +4 -13
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +4 -10
- package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +3 -6
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +3 -6
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +3 -10
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +3 -8
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +3 -8
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +4 -9
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +3 -9
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +3 -10
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +3 -10
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +4 -21
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +3 -8
- package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +3 -4
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +3 -7
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -20
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +3 -16
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +3 -9
- package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +3 -12
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +3 -13
- package/lib/typescript/src/renderer/components/text/Text.d.ts +3 -8
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +3 -8
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +3 -9
- package/lib/typescript/src/renderer/index.d.ts +0 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/index.d.ts +0 -9
- package/lib/typescript/src/skia/types/Matrix.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +1 -0
- package/package.json +1 -1
- package/src/dom/nodes/DrawingNode.ts +72 -0
- package/src/dom/nodes/GroupNode.ts +23 -0
- package/src/dom/nodes/JsiSkDOM.ts +353 -0
- package/src/dom/nodes/Node.ts +158 -0
- package/src/dom/nodes/PaintContext.ts +30 -0
- package/src/dom/nodes/PaintNode.ts +77 -0
- package/src/dom/nodes/RenderNode.ts +349 -0
- package/src/{renderer/processors/Circles.ts → dom/nodes/datatypes/Circle.ts} +3 -15
- package/src/{renderer/processors → dom/nodes/datatypes}/Color.ts +1 -1
- package/src/dom/nodes/datatypes/Enum.ts +2 -0
- package/src/{renderer/components/image/BoxFit.ts → dom/nodes/datatypes/Fitting.ts} +2 -11
- package/src/dom/nodes/datatypes/Gradient.ts +48 -0
- package/src/{renderer/processors/Paths.ts → dom/nodes/datatypes/Path.ts} +3 -4
- package/src/{renderer/processors → dom/nodes/datatypes}/Radius.ts +2 -3
- package/src/{renderer/processors/Rects.ts → dom/nodes/datatypes/Rect.ts} +2 -16
- package/src/dom/nodes/datatypes/Transform.ts +26 -0
- package/src/dom/nodes/datatypes/index.ts +9 -0
- package/src/dom/nodes/drawings/BackdropFilterNode.ts +30 -0
- package/src/dom/nodes/drawings/Box.ts +105 -0
- package/src/dom/nodes/drawings/CircleNode.ts +24 -0
- package/src/dom/nodes/drawings/CustomDrawingNode.ts +21 -0
- package/src/dom/nodes/drawings/DiffRectNode.ts +19 -0
- package/src/dom/nodes/drawings/FillNode.ts +18 -0
- package/src/dom/nodes/drawings/ImageNode.ts +40 -0
- package/src/dom/nodes/drawings/ImageSVG.ts +24 -0
- package/src/dom/nodes/drawings/LineNode.ts +19 -0
- package/src/dom/nodes/drawings/OvalNode.ts +23 -0
- package/src/dom/nodes/drawings/PatchNode.ts +68 -0
- package/src/dom/nodes/drawings/PathNode.ts +42 -0
- package/src/dom/nodes/drawings/PictureNode.ts +19 -0
- package/src/dom/nodes/drawings/PointsNode.ts +21 -0
- package/src/dom/nodes/drawings/RRectNode.ts +25 -0
- package/src/dom/nodes/drawings/RectNode.ts +23 -0
- package/src/dom/nodes/drawings/Text.ts +122 -0
- package/src/dom/nodes/drawings/VerticesNode.ts +35 -0
- package/src/dom/nodes/drawings/index.ts +18 -0
- package/src/dom/nodes/index.ts +3 -0
- package/src/dom/nodes/paint/BlendNode.ts +79 -0
- package/src/dom/nodes/paint/ColorFilters.ts +130 -0
- package/src/dom/nodes/paint/ImageFilters.ts +210 -0
- package/src/dom/nodes/paint/MaskFilters.ts +25 -0
- package/src/dom/nodes/paint/PathEffects.ts +192 -0
- package/src/dom/nodes/paint/Shaders.ts +228 -0
- package/src/dom/nodes/paint/index.ts +6 -0
- package/src/dom/types/ColorFilters.ts +16 -0
- package/src/dom/types/Common.ts +90 -0
- package/src/dom/types/DrawingContext.ts +7 -0
- package/src/dom/types/Drawings.ts +157 -0
- package/src/dom/types/ImageFilters.ts +53 -0
- package/src/dom/types/MaskFilters.ts +9 -0
- package/src/dom/types/Node.ts +46 -0
- package/src/dom/types/NodeType.ts +80 -0
- package/src/dom/types/PathEffects.ts +35 -0
- package/src/dom/types/Shaders.ts +86 -0
- package/src/dom/types/SkDOM.ts +202 -0
- package/src/dom/types/index.ts +11 -0
- package/src/index.ts +2 -0
- package/src/renderer/Canvas.tsx +7 -6
- package/src/renderer/Container.tsx +31 -0
- package/src/renderer/DependencyManager.tsx +23 -15
- package/src/renderer/HostComponents.ts +269 -0
- package/src/renderer/HostConfig.ts +60 -123
- package/src/renderer/components/Blend.tsx +4 -45
- package/src/renderer/components/Drawing.tsx +3 -12
- package/src/renderer/components/Group.tsx +4 -79
- package/src/renderer/components/Paint.tsx +7 -24
- package/src/renderer/components/Picture.tsx +4 -13
- package/src/renderer/components/backdrop/BackdropBlur.tsx +2 -1
- package/src/renderer/components/backdrop/BackdropFilter.tsx +5 -29
- package/src/renderer/components/colorFilters/BlendColor.tsx +4 -26
- package/src/renderer/components/colorFilters/Lerp.tsx +4 -23
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +4 -16
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +4 -14
- package/src/renderer/components/colorFilters/Matrix.tsx +4 -19
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +4 -16
- package/src/renderer/components/image/Image.tsx +4 -40
- package/src/renderer/components/image/ImageSVG.tsx +3 -19
- package/src/renderer/components/image/ImageShader.tsx +4 -69
- package/src/renderer/components/image/index.ts +0 -1
- package/src/renderer/components/imageFilters/Blur.tsx +4 -29
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +6 -30
- package/src/renderer/components/imageFilters/Morphology.tsx +4 -25
- package/src/renderer/components/imageFilters/Offset.tsx +4 -19
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +6 -27
- package/src/renderer/components/imageFilters/Shadow.tsx +4 -38
- package/src/renderer/components/index.ts +0 -1
- package/src/renderer/components/maskFilters/Blur.tsx +4 -23
- package/src/renderer/components/pathEffects/Corner.tsx +4 -27
- package/src/renderer/components/pathEffects/Dash.tsx +4 -23
- package/src/renderer/components/pathEffects/Discrete.tsx +4 -24
- package/src/renderer/components/pathEffects/Line2D.tsx +4 -29
- package/src/renderer/components/pathEffects/Path1D.tsx +4 -39
- package/src/renderer/components/pathEffects/Path2D.tsx +4 -31
- package/src/renderer/components/pathEffects/Sum.tsx +3 -17
- package/src/renderer/components/shaders/Color.tsx +4 -16
- package/src/renderer/components/shaders/FractalNoise.tsx +4 -26
- package/src/renderer/components/shaders/LinearGradient.tsx +4 -29
- package/src/renderer/components/shaders/RadialGradient.tsx +4 -29
- package/src/renderer/components/shaders/Shader.tsx +4 -24
- package/src/renderer/components/shaders/SweepGradient.tsx +4 -32
- package/src/renderer/components/shaders/Turbulence.tsx +4 -26
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -33
- package/src/renderer/components/shapes/Box.tsx +6 -109
- package/src/renderer/components/shapes/Circle.tsx +4 -16
- package/src/renderer/components/shapes/DiffRect.tsx +4 -17
- package/src/renderer/components/shapes/Fill.tsx +4 -11
- package/src/renderer/components/shapes/FitBox.tsx +2 -2
- package/src/renderer/components/shapes/Line.tsx +4 -13
- package/src/renderer/components/shapes/Oval.tsx +4 -18
- package/src/renderer/components/shapes/Patch.tsx +4 -59
- package/src/renderer/components/shapes/Path.tsx +4 -48
- package/src/renderer/components/shapes/Points.tsx +4 -20
- package/src/renderer/components/shapes/Rect.tsx +4 -18
- package/src/renderer/components/shapes/RoundedRect.tsx +4 -17
- package/src/renderer/components/shapes/Vertices.tsx +4 -37
- package/src/renderer/components/text/Glyphs.tsx +4 -39
- package/src/renderer/components/text/Text.tsx +4 -22
- package/src/renderer/components/text/TextBlob.tsx +4 -17
- package/src/renderer/components/text/TextPath.tsx +4 -59
- package/src/renderer/index.ts +0 -1
- package/src/renderer/processors/Animations/Animations.ts +5 -0
- package/src/renderer/processors/index.ts +0 -9
- package/src/skia/types/Matrix.ts +1 -0
- package/src/skia/web/JsiSkMatrix.ts +4 -0
- package/src/web/WithSkiaWeb.tsx +3 -1
- package/lib/commonjs/renderer/components/Compose.js +0 -40
- package/lib/commonjs/renderer/components/Compose.js.map +0 -1
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +0 -24
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +0 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +0 -28
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +0 -1
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +0 -33
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +0 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js +0 -32
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +0 -1
- package/lib/commonjs/renderer/nodes/Container.js +0 -28
- package/lib/commonjs/renderer/nodes/Container.js.map +0 -1
- package/lib/commonjs/renderer/nodes/Declaration.js +0 -57
- package/lib/commonjs/renderer/nodes/Declaration.js.map +0 -1
- package/lib/commonjs/renderer/nodes/Drawing.js +0 -56
- package/lib/commonjs/renderer/nodes/Drawing.js.map +0 -1
- package/lib/commonjs/renderer/nodes/Node.js +0 -73
- package/lib/commonjs/renderer/nodes/Node.js.map +0 -1
- package/lib/commonjs/renderer/nodes/index.js +0 -58
- package/lib/commonjs/renderer/nodes/index.js.map +0 -1
- package/lib/commonjs/renderer/processors/Circles.js.map +0 -1
- package/lib/commonjs/renderer/processors/Clips.js +0 -24
- package/lib/commonjs/renderer/processors/Clips.js.map +0 -1
- package/lib/commonjs/renderer/processors/Font.js +0 -13
- package/lib/commonjs/renderer/processors/Font.js.map +0 -1
- package/lib/commonjs/renderer/processors/Paint.js +0 -98
- package/lib/commonjs/renderer/processors/Paint.js.map +0 -1
- package/lib/commonjs/renderer/processors/Paths.js.map +0 -1
- package/lib/commonjs/renderer/processors/Radius.js.map +0 -1
- package/lib/commonjs/renderer/processors/Rects.js.map +0 -1
- package/lib/commonjs/renderer/processors/Transform.js +0 -58
- package/lib/commonjs/renderer/processors/Transform.js.map +0 -1
- package/lib/module/renderer/components/Compose.js +0 -25
- package/lib/module/renderer/components/Compose.js.map +0 -1
- package/lib/module/renderer/components/colorFilters/Compose.js +0 -14
- package/lib/module/renderer/components/colorFilters/Compose.js.map +0 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +0 -17
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +0 -1
- package/lib/module/renderer/components/imageFilters/getInput.js +0 -23
- package/lib/module/renderer/components/imageFilters/getInput.js.map +0 -1
- package/lib/module/renderer/components/shaders/Gradient.js +0 -20
- package/lib/module/renderer/components/shaders/Gradient.js.map +0 -1
- package/lib/module/renderer/nodes/Container.js +0 -18
- package/lib/module/renderer/nodes/Container.js.map +0 -1
- package/lib/module/renderer/nodes/Declaration.js +0 -36
- package/lib/module/renderer/nodes/Declaration.js.map +0 -1
- package/lib/module/renderer/nodes/Drawing.js +0 -37
- package/lib/module/renderer/nodes/Drawing.js.map +0 -1
- package/lib/module/renderer/nodes/Node.js +0 -63
- package/lib/module/renderer/nodes/Node.js.map +0 -1
- package/lib/module/renderer/nodes/index.js +0 -5
- package/lib/module/renderer/nodes/index.js.map +0 -1
- package/lib/module/renderer/processors/Circles.js.map +0 -1
- package/lib/module/renderer/processors/Clips.js +0 -13
- package/lib/module/renderer/processors/Clips.js.map +0 -1
- package/lib/module/renderer/processors/Font.js +0 -4
- package/lib/module/renderer/processors/Font.js.map +0 -1
- package/lib/module/renderer/processors/Paint.js +0 -84
- package/lib/module/renderer/processors/Paint.js.map +0 -1
- package/lib/module/renderer/processors/Paths.js.map +0 -1
- package/lib/module/renderer/processors/Radius.js.map +0 -1
- package/lib/module/renderer/processors/Rects.js.map +0 -1
- package/lib/module/renderer/processors/Transform.js +0 -42
- package/lib/module/renderer/processors/Transform.js.map +0 -1
- package/lib/typescript/src/renderer/components/Compose.d.ts +0 -6
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +0 -3
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +0 -2
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +0 -3
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +0 -17
- package/lib/typescript/src/renderer/nodes/Container.d.ts +0 -8
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +0 -22
- package/lib/typescript/src/renderer/nodes/Drawing.d.ts +0 -21
- package/lib/typescript/src/renderer/nodes/Node.d.ts +0 -24
- package/lib/typescript/src/renderer/nodes/index.d.ts +0 -4
- package/lib/typescript/src/renderer/processors/Circles.d.ts +0 -13
- package/lib/typescript/src/renderer/processors/Clips.d.ts +0 -4
- package/lib/typescript/src/renderer/processors/Font.d.ts +0 -7
- package/lib/typescript/src/renderer/processors/Paint.d.ts +0 -22
- package/lib/typescript/src/renderer/processors/Paths.d.ts +0 -4
- package/lib/typescript/src/renderer/processors/Radius.d.ts +0 -3
- package/lib/typescript/src/renderer/processors/Rects.d.ts +0 -20
- package/src/renderer/components/Compose.tsx +0 -26
- package/src/renderer/components/colorFilters/Compose.ts +0 -18
- package/src/renderer/components/imageFilters/InnerShadow.tsx +0 -38
- package/src/renderer/components/imageFilters/getInput.ts +0 -20
- package/src/renderer/components/shaders/Gradient.ts +0 -24
- package/src/renderer/nodes/Container.tsx +0 -17
- package/src/renderer/nodes/Declaration.tsx +0 -65
- package/src/renderer/nodes/Drawing.tsx +0 -65
- package/src/renderer/nodes/Node.ts +0 -59
- package/src/renderer/nodes/index.ts +0 -4
- package/src/renderer/processors/Clips.ts +0 -23
- package/src/renderer/processors/Font.ts +0 -8
- package/src/renderer/processors/Paint.ts +0 -118
- package/src/renderer/processors/Transform.ts +0 -50
@@ -0,0 +1,349 @@
|
|
1
|
+
import type { RefObject } from "react";
|
2
|
+
|
3
|
+
import type {
|
4
|
+
SkMatrix,
|
5
|
+
SkRect,
|
6
|
+
SkRRect,
|
7
|
+
SkPath,
|
8
|
+
SkPaint,
|
9
|
+
} from "../../skia/types";
|
10
|
+
import {
|
11
|
+
StrokeCap,
|
12
|
+
StrokeJoin,
|
13
|
+
PaintStyle,
|
14
|
+
BlendMode,
|
15
|
+
ClipOp,
|
16
|
+
isRRect,
|
17
|
+
} from "../../skia/types";
|
18
|
+
import type {
|
19
|
+
RenderNode,
|
20
|
+
GroupProps,
|
21
|
+
DrawingContext,
|
22
|
+
NodeType,
|
23
|
+
Node,
|
24
|
+
DeclarationNode,
|
25
|
+
} from "../types";
|
26
|
+
|
27
|
+
import { isPathDef, processPath, processTransformProps } from "./datatypes";
|
28
|
+
import type { NodeContext } from "./Node";
|
29
|
+
import { JsiNode, JsiDeclarationNode } from "./Node";
|
30
|
+
import type { PaintContext } from "./PaintContext";
|
31
|
+
import { enumKey } from "./datatypes/Enum";
|
32
|
+
|
33
|
+
const paintProps = [
|
34
|
+
"color",
|
35
|
+
"strokeWidth",
|
36
|
+
"blendMode",
|
37
|
+
"strokeCap",
|
38
|
+
"strokeJoin",
|
39
|
+
"strokeMiter",
|
40
|
+
"style",
|
41
|
+
"antiAlias",
|
42
|
+
"opacity",
|
43
|
+
];
|
44
|
+
|
45
|
+
interface PaintCache {
|
46
|
+
parent: SkPaint;
|
47
|
+
child: SkPaint;
|
48
|
+
}
|
49
|
+
|
50
|
+
export abstract class JsiRenderNode<P extends GroupProps>
|
51
|
+
extends JsiNode<P>
|
52
|
+
implements RenderNode<P>
|
53
|
+
{
|
54
|
+
paintCache: PaintCache | null = null;
|
55
|
+
matrix: SkMatrix;
|
56
|
+
clipRect?: SkRect;
|
57
|
+
clipRRect?: SkRRect;
|
58
|
+
clipPath?: SkPath;
|
59
|
+
|
60
|
+
constructor(ctx: NodeContext, type: NodeType, props: P) {
|
61
|
+
super(ctx, type, props);
|
62
|
+
this.matrix = this.Skia.Matrix();
|
63
|
+
this.onPropChange();
|
64
|
+
}
|
65
|
+
|
66
|
+
setProps(props: P) {
|
67
|
+
super.setProps(props);
|
68
|
+
this.onPropChange();
|
69
|
+
this.paintCache = null;
|
70
|
+
}
|
71
|
+
|
72
|
+
setProp<K extends keyof P>(key: K, value: P[K]) {
|
73
|
+
const hasChanged = super.setProp(key, value);
|
74
|
+
if (hasChanged) {
|
75
|
+
this.onPropChange();
|
76
|
+
if (paintProps.includes(key as string)) {
|
77
|
+
this.paintCache = null;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
return hasChanged;
|
81
|
+
}
|
82
|
+
|
83
|
+
protected onPropChange() {
|
84
|
+
this.matrix.identity();
|
85
|
+
this.clipPath = undefined;
|
86
|
+
this.clipRect = undefined;
|
87
|
+
this.clipRRect = undefined;
|
88
|
+
this.computeMatrix();
|
89
|
+
this.computeClip();
|
90
|
+
}
|
91
|
+
|
92
|
+
addChild(child: Node<unknown>) {
|
93
|
+
if (child instanceof JsiDeclarationNode) {
|
94
|
+
child.setInvalidate(() => (this.paintCache = null));
|
95
|
+
}
|
96
|
+
super.addChild(child);
|
97
|
+
}
|
98
|
+
|
99
|
+
insertChildBefore(child: Node<unknown>, before: Node<unknown>) {
|
100
|
+
if (child instanceof JsiDeclarationNode) {
|
101
|
+
child.setInvalidate(() => (this.paintCache = null));
|
102
|
+
}
|
103
|
+
super.insertChildBefore(child, before);
|
104
|
+
}
|
105
|
+
|
106
|
+
private computeClip() {
|
107
|
+
const { clip } = this.props;
|
108
|
+
if (clip) {
|
109
|
+
if (isPathDef(clip)) {
|
110
|
+
this.clipPath = processPath(this.Skia, clip);
|
111
|
+
} else if (isRRect(clip)) {
|
112
|
+
this.clipRRect = clip;
|
113
|
+
} else {
|
114
|
+
this.clipRect = clip;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
private computeMatrix() {
|
120
|
+
processTransformProps(this.matrix, this.props);
|
121
|
+
}
|
122
|
+
|
123
|
+
private getPaintCtx() {
|
124
|
+
let ctx: PaintContext | undefined;
|
125
|
+
const {
|
126
|
+
color,
|
127
|
+
strokeWidth,
|
128
|
+
blendMode,
|
129
|
+
style,
|
130
|
+
strokeJoin,
|
131
|
+
strokeCap,
|
132
|
+
strokeMiter,
|
133
|
+
opacity,
|
134
|
+
antiAlias,
|
135
|
+
} = this.props;
|
136
|
+
if (
|
137
|
+
color !== undefined ||
|
138
|
+
strokeWidth !== undefined ||
|
139
|
+
blendMode !== undefined ||
|
140
|
+
style !== undefined ||
|
141
|
+
strokeJoin !== undefined ||
|
142
|
+
strokeCap !== undefined ||
|
143
|
+
strokeMiter !== undefined ||
|
144
|
+
opacity !== undefined ||
|
145
|
+
antiAlias !== undefined
|
146
|
+
) {
|
147
|
+
ctx = {};
|
148
|
+
if (color !== undefined) {
|
149
|
+
ctx.color = this.Skia.Color(color);
|
150
|
+
}
|
151
|
+
if (strokeWidth !== undefined) {
|
152
|
+
ctx.strokeWidth = strokeWidth;
|
153
|
+
}
|
154
|
+
if (blendMode !== undefined) {
|
155
|
+
ctx.blendMode = BlendMode[enumKey(blendMode)];
|
156
|
+
}
|
157
|
+
if (style !== undefined) {
|
158
|
+
ctx.style = PaintStyle[enumKey(style)];
|
159
|
+
}
|
160
|
+
if (strokeJoin !== undefined) {
|
161
|
+
ctx.strokeJoin = StrokeJoin[enumKey(strokeJoin)];
|
162
|
+
}
|
163
|
+
if (strokeCap !== undefined) {
|
164
|
+
ctx.strokeCap = StrokeCap[enumKey(strokeCap)];
|
165
|
+
}
|
166
|
+
if (strokeMiter !== undefined) {
|
167
|
+
ctx.strokeMiter = strokeMiter;
|
168
|
+
}
|
169
|
+
if (opacity !== undefined) {
|
170
|
+
ctx.opacity = opacity;
|
171
|
+
}
|
172
|
+
if (antiAlias !== undefined) {
|
173
|
+
ctx.antiAlias = antiAlias;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
this._children.forEach((child) => {
|
177
|
+
if (child instanceof JsiDeclarationNode) {
|
178
|
+
if (child.isColorFilter()) {
|
179
|
+
ctx = ctx || {};
|
180
|
+
const cf = child.materialize();
|
181
|
+
ctx.colorFilter = ctx.colorFilter
|
182
|
+
? this.Skia.ColorFilter.MakeCompose(cf, ctx.colorFilter)
|
183
|
+
: cf;
|
184
|
+
} else if (child.isShader()) {
|
185
|
+
ctx = ctx || {};
|
186
|
+
const shader = child.materialize();
|
187
|
+
ctx.shader = shader;
|
188
|
+
} else if (child.isPathEffect()) {
|
189
|
+
ctx = ctx || {};
|
190
|
+
const pe = child.materialize();
|
191
|
+
ctx.pathEffect = ctx.pathEffect
|
192
|
+
? this.Skia.PathEffect.MakeCompose(pe, ctx.pathEffect)
|
193
|
+
: pe;
|
194
|
+
} else if (child.isImageFilter()) {
|
195
|
+
ctx = ctx || {};
|
196
|
+
const filter = child.materialize();
|
197
|
+
ctx.imageFilter = ctx.imageFilter
|
198
|
+
? this.Skia.ImageFilter.MakeCompose(filter, ctx.imageFilter)
|
199
|
+
: filter;
|
200
|
+
} else if (child.isMaskFilter()) {
|
201
|
+
ctx = ctx || {};
|
202
|
+
const filter = child.materialize();
|
203
|
+
ctx.maskFilter = filter;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
});
|
207
|
+
return ctx;
|
208
|
+
}
|
209
|
+
|
210
|
+
render(parentCtx: DrawingContext) {
|
211
|
+
const { invertClip, layer, matrix, transform } = this.props;
|
212
|
+
const { canvas } = parentCtx;
|
213
|
+
|
214
|
+
const opacity = this.props.opacity
|
215
|
+
? parentCtx.opacity * this.props.opacity
|
216
|
+
: parentCtx.opacity;
|
217
|
+
|
218
|
+
if (
|
219
|
+
this.paintCache === null ||
|
220
|
+
this.paintCache.parent !== parentCtx.paint
|
221
|
+
) {
|
222
|
+
const paintCtx = this.getPaintCtx();
|
223
|
+
const child = paintCtx
|
224
|
+
? concatPaint(parentCtx.paint, paintCtx, parentCtx.opacity)
|
225
|
+
: parentCtx.paint;
|
226
|
+
this.paintCache = { parent: parentCtx.paint, child };
|
227
|
+
}
|
228
|
+
const paint = this.paintCache.child;
|
229
|
+
// TODO: can we only recreate a new context here if needed?
|
230
|
+
const ctx = { ...parentCtx, opacity, paint };
|
231
|
+
const hasTransform = matrix !== undefined || transform !== undefined;
|
232
|
+
const hasClip = this.clipRect !== undefined;
|
233
|
+
const shouldSave = hasTransform || hasClip || !!layer;
|
234
|
+
const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;
|
235
|
+
|
236
|
+
if (shouldSave) {
|
237
|
+
if (layer) {
|
238
|
+
if (typeof layer === "boolean") {
|
239
|
+
canvas.saveLayer();
|
240
|
+
} else if (isSkPaint(layer)) {
|
241
|
+
canvas.saveLayer(layer);
|
242
|
+
} else {
|
243
|
+
canvas.saveLayer(
|
244
|
+
layer.current ? layer.current.materialize() : undefined
|
245
|
+
);
|
246
|
+
}
|
247
|
+
} else {
|
248
|
+
canvas.save();
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
if (this.matrix) {
|
253
|
+
canvas.concat(this.matrix);
|
254
|
+
}
|
255
|
+
if (this.clipRect) {
|
256
|
+
canvas.clipRect(this.clipRect, op, true);
|
257
|
+
}
|
258
|
+
if (this.clipRRect) {
|
259
|
+
canvas.clipRRect(this.clipRRect, op, true);
|
260
|
+
}
|
261
|
+
if (this.clipPath) {
|
262
|
+
canvas.clipPath(this.clipPath, op, true);
|
263
|
+
}
|
264
|
+
|
265
|
+
this.renderNode(ctx);
|
266
|
+
|
267
|
+
if (shouldSave) {
|
268
|
+
canvas.restore();
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
abstract renderNode(ctx: DrawingContext): void;
|
273
|
+
}
|
274
|
+
|
275
|
+
export const isSkPaint = (
|
276
|
+
obj: RefObject<DeclarationNode<unknown, SkPaint>> | SkPaint
|
277
|
+
): obj is SkPaint => "__typename__" in obj && obj.__typename__ === "Paint";
|
278
|
+
|
279
|
+
const concatPaint = (
|
280
|
+
parent: SkPaint,
|
281
|
+
{
|
282
|
+
color,
|
283
|
+
strokeWidth,
|
284
|
+
shader,
|
285
|
+
antiAlias,
|
286
|
+
blendMode,
|
287
|
+
colorFilter,
|
288
|
+
imageFilter,
|
289
|
+
maskFilter,
|
290
|
+
pathEffect,
|
291
|
+
opacity: alpha,
|
292
|
+
strokeCap,
|
293
|
+
strokeJoin,
|
294
|
+
strokeMiter,
|
295
|
+
style,
|
296
|
+
}: PaintContext,
|
297
|
+
opacity: number
|
298
|
+
) => {
|
299
|
+
const paint = parent.copy();
|
300
|
+
if (color !== undefined) {
|
301
|
+
paint.setShader(null);
|
302
|
+
color[3] *= opacity;
|
303
|
+
paint.setColor(color);
|
304
|
+
} else {
|
305
|
+
const cl = paint.getColor();
|
306
|
+
cl[3] *= opacity;
|
307
|
+
paint.setColor(cl);
|
308
|
+
}
|
309
|
+
if (strokeWidth !== undefined) {
|
310
|
+
paint.setStrokeWidth(strokeWidth);
|
311
|
+
}
|
312
|
+
if (shader !== undefined) {
|
313
|
+
paint.setShader(shader);
|
314
|
+
}
|
315
|
+
if (antiAlias !== undefined) {
|
316
|
+
paint.setAntiAlias(antiAlias);
|
317
|
+
}
|
318
|
+
if (blendMode !== undefined) {
|
319
|
+
paint.setBlendMode(blendMode);
|
320
|
+
}
|
321
|
+
if (colorFilter !== undefined) {
|
322
|
+
paint.setColorFilter(colorFilter);
|
323
|
+
}
|
324
|
+
if (imageFilter !== undefined) {
|
325
|
+
paint.setImageFilter(imageFilter);
|
326
|
+
}
|
327
|
+
if (maskFilter !== undefined) {
|
328
|
+
paint.setMaskFilter(maskFilter);
|
329
|
+
}
|
330
|
+
if (pathEffect !== undefined) {
|
331
|
+
paint.setPathEffect(pathEffect);
|
332
|
+
}
|
333
|
+
if (alpha !== undefined) {
|
334
|
+
paint.setAlphaf(alpha * opacity);
|
335
|
+
}
|
336
|
+
if (strokeCap !== undefined) {
|
337
|
+
paint.setStrokeCap(strokeCap);
|
338
|
+
}
|
339
|
+
if (strokeJoin !== undefined) {
|
340
|
+
paint.setStrokeJoin(strokeJoin);
|
341
|
+
}
|
342
|
+
if (strokeMiter !== undefined) {
|
343
|
+
paint.setStrokeMiter(strokeMiter);
|
344
|
+
}
|
345
|
+
if (style !== undefined) {
|
346
|
+
paint.setStyle(style);
|
347
|
+
}
|
348
|
+
return paint;
|
349
|
+
};
|
@@ -1,19 +1,7 @@
|
|
1
|
-
import type { Skia
|
1
|
+
import type { Skia } from "../../../skia/types";
|
2
|
+
import type { CircleDef, ScalarCircleDef } from "../../types";
|
2
3
|
|
3
|
-
|
4
|
-
c: Vector;
|
5
|
-
r: number;
|
6
|
-
}
|
7
|
-
|
8
|
-
interface ScalarCircleDef {
|
9
|
-
cx: number;
|
10
|
-
cy: number;
|
11
|
-
r: number;
|
12
|
-
}
|
13
|
-
|
14
|
-
export type CircleDef = PointCircleDef | ScalarCircleDef;
|
15
|
-
|
16
|
-
const isCircleScalarDef = (def: CircleDef): def is ScalarCircleDef =>
|
4
|
+
export const isCircleScalarDef = (def: CircleDef): def is ScalarCircleDef =>
|
17
5
|
// We have an issue to check property existence on JSI backed instances
|
18
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
19
7
|
(def as any).cx !== undefined;
|
@@ -1,15 +1,6 @@
|
|
1
|
-
import { exhaustiveCheck } from "
|
1
|
+
import { exhaustiveCheck } from "../../../renderer/typeddash";
|
2
2
|
import type { SkRect } from "../../../skia/types";
|
3
|
-
|
4
|
-
// https://api.flutter.dev/flutter/painting/BoxFit-class.html
|
5
|
-
export type Fit =
|
6
|
-
| "cover"
|
7
|
-
| "contain"
|
8
|
-
| "fill"
|
9
|
-
| "fitHeight"
|
10
|
-
| "fitWidth"
|
11
|
-
| "none"
|
12
|
-
| "scaleDown";
|
3
|
+
import type { Fit } from "../../types";
|
13
4
|
|
14
5
|
export interface Size {
|
15
6
|
width: number;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import type { Skia, SkRect, Transforms2d, Vector } from "../../../skia/types";
|
2
|
+
import { TileMode } from "../../../skia/types";
|
3
|
+
import type { GradientProps, ImageShaderProps } from "../../types";
|
4
|
+
|
5
|
+
import { enumKey } from "./Enum";
|
6
|
+
import { processTransformProps } from "./Transform";
|
7
|
+
|
8
|
+
export const transformOrigin = (origin: Vector, transform: Transforms2d) => [
|
9
|
+
{ translateX: origin.x },
|
10
|
+
{ translateY: origin.y },
|
11
|
+
...transform,
|
12
|
+
{ translateX: -origin.x },
|
13
|
+
{ translateY: -origin.y },
|
14
|
+
];
|
15
|
+
|
16
|
+
export const processGradientProps = (
|
17
|
+
Skia: Skia,
|
18
|
+
{ colors, positions, mode, flags, ...transform }: GradientProps
|
19
|
+
) => {
|
20
|
+
const localMatrix = Skia.Matrix();
|
21
|
+
processTransformProps(localMatrix, transform);
|
22
|
+
return {
|
23
|
+
colors: colors.map((color) => Skia.Color(color)),
|
24
|
+
positions: positions ?? null,
|
25
|
+
mode: TileMode[enumKey(mode ?? "clamp")],
|
26
|
+
flags,
|
27
|
+
localMatrix,
|
28
|
+
};
|
29
|
+
};
|
30
|
+
|
31
|
+
export const getRect = (
|
32
|
+
Skia: Skia,
|
33
|
+
props: Omit<ImageShaderProps, "tx" | "ty" | "fm" | "mm" | "fit" | "image">
|
34
|
+
): SkRect | undefined => {
|
35
|
+
const { x, y, width, height } = props;
|
36
|
+
if (props.rect) {
|
37
|
+
return props.rect;
|
38
|
+
} else if (
|
39
|
+
x !== undefined &&
|
40
|
+
y !== undefined &&
|
41
|
+
width !== undefined &&
|
42
|
+
height !== undefined
|
43
|
+
) {
|
44
|
+
return Skia.XYWHRect(x, y, width, height);
|
45
|
+
} else {
|
46
|
+
return undefined;
|
47
|
+
}
|
48
|
+
};
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import type {
|
2
|
-
import { isPath } from "
|
3
|
-
|
4
|
-
export type PathDef = string | SkPath;
|
1
|
+
import type { Skia } from "../../../skia/types";
|
2
|
+
import { isPath } from "../../../skia/types";
|
3
|
+
import type { PathDef } from "../../types";
|
5
4
|
|
6
5
|
export const processPath = (Skia: Skia, rawPath: PathDef) => {
|
7
6
|
const path =
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import type { Skia, Vector } from "
|
2
|
-
|
3
|
-
export type Radius = number | Vector;
|
1
|
+
import type { Skia, Vector } from "../../../skia/types";
|
2
|
+
import type { Radius } from "../../types";
|
4
3
|
|
5
4
|
export const processRadius = (Skia: Skia, radius: Radius): Vector => {
|
6
5
|
if (typeof radius === "number") {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
|
-
import type { Skia, SkRect,
|
2
|
+
import type { Skia, SkRect, Vector } from "../../../skia/types";
|
3
|
+
import type { RectCtor, RectDef, RRectCtor, RRectDef } from "../../types";
|
3
4
|
|
4
|
-
import type { Radius } from "./Radius";
|
5
5
|
import { processRadius } from "./Radius";
|
6
6
|
|
7
7
|
export const isEdge = (pos: Vector, b: SkRect) =>
|
@@ -14,20 +14,6 @@ const isRRectCtor = (def: RRectDef): def is RRectCtor =>
|
|
14
14
|
const isRectCtor = (def: RectDef): def is RectCtor =>
|
15
15
|
(def as any).rect === undefined;
|
16
16
|
|
17
|
-
export interface RectCtor {
|
18
|
-
x: number;
|
19
|
-
y: number;
|
20
|
-
width: number;
|
21
|
-
height: number;
|
22
|
-
}
|
23
|
-
|
24
|
-
export interface RRectCtor extends RectCtor {
|
25
|
-
r: Radius;
|
26
|
-
}
|
27
|
-
|
28
|
-
export type RectDef = RectCtor | { rect: SkRect };
|
29
|
-
export type RRectDef = RRectCtor | { rect: SkRRect };
|
30
|
-
|
31
17
|
export const processRect = (Skia: Skia, def: RectDef) => {
|
32
18
|
if (isRectCtor(def)) {
|
33
19
|
return Skia.XYWHRect(def.x, def.y, def.width, def.height);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { TransformProps } from "../../types";
|
2
|
+
import type { SkMatrix } from "../../../skia/types";
|
3
|
+
import { processTransform } from "../../../skia/types";
|
4
|
+
|
5
|
+
export const processTransformProps = (m3: SkMatrix, props: TransformProps) => {
|
6
|
+
const { transform, origin, matrix } = props;
|
7
|
+
if (matrix) {
|
8
|
+
if (origin) {
|
9
|
+
m3.translate(origin.x, origin.y);
|
10
|
+
m3.concat(matrix);
|
11
|
+
m3.translate(-origin.x, -origin.y);
|
12
|
+
} else {
|
13
|
+
m3.identity();
|
14
|
+
m3.concat(matrix);
|
15
|
+
}
|
16
|
+
} else if (transform) {
|
17
|
+
m3.identity();
|
18
|
+
if (origin) {
|
19
|
+
m3.translate(origin.x, origin.y);
|
20
|
+
}
|
21
|
+
processTransform(m3, transform);
|
22
|
+
if (origin) {
|
23
|
+
m3.translate(-origin.x, -origin.y);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { isColorFilter } from "../../../skia/types";
|
2
|
+
import type { ChildrenProps, DrawingContext } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
5
|
+
import type { NodeContext } from "../Node";
|
6
|
+
import { JsiDeclarationNode } from "../Node";
|
7
|
+
|
8
|
+
export class BackdropFilterNode extends JsiDrawingNode<ChildrenProps, null> {
|
9
|
+
constructor(ctx: NodeContext, props: ChildrenProps) {
|
10
|
+
super(ctx, NodeType.BackdropFilter, props);
|
11
|
+
}
|
12
|
+
|
13
|
+
protected deriveProps() {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
|
17
|
+
draw({ canvas }: DrawingContext) {
|
18
|
+
const child = this._children[0];
|
19
|
+
const filter =
|
20
|
+
child instanceof JsiDeclarationNode ? child.materialize() : null;
|
21
|
+
canvas.saveLayer(
|
22
|
+
undefined,
|
23
|
+
null,
|
24
|
+
isColorFilter(filter)
|
25
|
+
? this.Skia.ImageFilter.MakeColorFilter(filter, null)
|
26
|
+
: filter
|
27
|
+
);
|
28
|
+
canvas.restore();
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import type { SkRRect, Skia } from "../../../skia/types";
|
2
|
+
import { BlurStyle, ClipOp, isRRect } from "../../../skia/types";
|
3
|
+
import type { DrawingContext } from "../../types";
|
4
|
+
import { DeclarationType, NodeType } from "../../types";
|
5
|
+
import type { BoxShadowProps, BoxProps } from "../../types/Drawings";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
import { JsiDeclarationNode } from "../Node";
|
8
|
+
import { processColor } from "../datatypes";
|
9
|
+
import { JsiRenderNode } from "../RenderNode";
|
10
|
+
|
11
|
+
const inflate = (
|
12
|
+
Skia: Skia,
|
13
|
+
box: SkRRect,
|
14
|
+
dx: number,
|
15
|
+
dy: number,
|
16
|
+
tx = 0,
|
17
|
+
ty = 0
|
18
|
+
) =>
|
19
|
+
Skia.RRectXY(
|
20
|
+
Skia.XYWHRect(
|
21
|
+
box.rect.x - dx + tx,
|
22
|
+
box.rect.y - dy + ty,
|
23
|
+
box.rect.width + 2 * dx,
|
24
|
+
box.rect.height + 2 * dy
|
25
|
+
),
|
26
|
+
box.rx + dx,
|
27
|
+
box.ry + dy
|
28
|
+
);
|
29
|
+
|
30
|
+
const deflate = (
|
31
|
+
Skia: Skia,
|
32
|
+
box: SkRRect,
|
33
|
+
dx: number,
|
34
|
+
dy: number,
|
35
|
+
tx = 0,
|
36
|
+
ty = 0
|
37
|
+
) => inflate(Skia, box, -dx, -dy, tx, ty);
|
38
|
+
|
39
|
+
export class BoxShadowNode extends JsiDeclarationNode<
|
40
|
+
BoxShadowProps,
|
41
|
+
BoxShadowProps
|
42
|
+
> {
|
43
|
+
constructor(ctx: NodeContext, props: BoxShadowProps) {
|
44
|
+
super(ctx, DeclarationType.Unknown, NodeType.Box, props);
|
45
|
+
}
|
46
|
+
|
47
|
+
materialize() {
|
48
|
+
return this.props;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
export class BoxNode extends JsiRenderNode<BoxProps> {
|
53
|
+
constructor(ctx: NodeContext, props: BoxProps) {
|
54
|
+
super(ctx, NodeType.Box, props);
|
55
|
+
}
|
56
|
+
|
57
|
+
renderNode({ canvas, paint, opacity }: DrawingContext) {
|
58
|
+
const { box: defaultBox } = this.props;
|
59
|
+
const box = isRRect(defaultBox)
|
60
|
+
? defaultBox
|
61
|
+
: this.Skia.RRectXY(defaultBox, 0, 0);
|
62
|
+
const shadows = this._children
|
63
|
+
.map((node) => {
|
64
|
+
if (node instanceof BoxShadowNode) {
|
65
|
+
return node.materialize();
|
66
|
+
}
|
67
|
+
return null;
|
68
|
+
})
|
69
|
+
.filter((n): n is BoxShadowProps => n !== null);
|
70
|
+
shadows
|
71
|
+
.filter((shadow) => !shadow.inner)
|
72
|
+
.map((shadow) => {
|
73
|
+
const { color = "black", blur, spread = 0, dx = 0, dy = 0 } = shadow;
|
74
|
+
const lPaint = this.Skia.Paint();
|
75
|
+
lPaint.setColor(processColor(this.Skia, color, opacity));
|
76
|
+
lPaint.setMaskFilter(
|
77
|
+
this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)
|
78
|
+
);
|
79
|
+
canvas.drawRRect(
|
80
|
+
inflate(this.Skia, box, spread, spread, dx, dy),
|
81
|
+
lPaint
|
82
|
+
);
|
83
|
+
});
|
84
|
+
|
85
|
+
canvas.drawRRect(box, paint);
|
86
|
+
|
87
|
+
shadows
|
88
|
+
.filter((shadow) => shadow.inner)
|
89
|
+
.map((shadow) => {
|
90
|
+
const { color = "black", blur, spread = 0, dx = 0, dy = 0 } = shadow;
|
91
|
+
const delta = this.Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));
|
92
|
+
canvas.save();
|
93
|
+
canvas.clipRRect(box, ClipOp.Intersect, false);
|
94
|
+
const lPaint = this.Skia.Paint();
|
95
|
+
lPaint.setColor(processColor(this.Skia, color, opacity));
|
96
|
+
lPaint.setMaskFilter(
|
97
|
+
this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)
|
98
|
+
);
|
99
|
+
const inner = deflate(this.Skia, box, spread, spread, dx, dy);
|
100
|
+
const outer = inflate(this.Skia, box, delta.x, delta.y);
|
101
|
+
canvas.drawDRRect(outer, inner, lPaint);
|
102
|
+
canvas.restore();
|
103
|
+
});
|
104
|
+
}
|
105
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { SkPoint } from "../../../skia/types";
|
2
|
+
import type { CircleProps, DrawingContext } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { processCircle } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class CircleNode extends JsiDrawingNode<CircleProps, SkPoint> {
|
9
|
+
constructor(ctx: NodeContext, props: CircleProps) {
|
10
|
+
super(ctx, NodeType.Circle, props);
|
11
|
+
}
|
12
|
+
|
13
|
+
protected deriveProps() {
|
14
|
+
return processCircle(this.Skia, this.props).c;
|
15
|
+
}
|
16
|
+
|
17
|
+
draw({ canvas, paint }: DrawingContext) {
|
18
|
+
if (!this.derived) {
|
19
|
+
throw new Error("CircleNode: c is undefined");
|
20
|
+
}
|
21
|
+
const { x, y } = this.derived;
|
22
|
+
canvas.drawCircle(x, y, this.props.r, paint);
|
23
|
+
}
|
24
|
+
}
|