@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,21 @@
|
|
1
|
+
import type { CustomDrawingNodeProps, DrawingContext } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
4
|
+
import type { NodeContext } from "../Node";
|
5
|
+
|
6
|
+
export class CustomDrawingNode extends JsiDrawingNode<
|
7
|
+
CustomDrawingNodeProps,
|
8
|
+
null
|
9
|
+
> {
|
10
|
+
constructor(ctx: NodeContext, props: CustomDrawingNodeProps) {
|
11
|
+
super(ctx, NodeType.Drawing, props);
|
12
|
+
}
|
13
|
+
|
14
|
+
deriveProps() {
|
15
|
+
return null;
|
16
|
+
}
|
17
|
+
|
18
|
+
draw(ctx: DrawingContext) {
|
19
|
+
this.props.drawing(ctx);
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { DiffRectProps, DrawingContext } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
4
|
+
import type { NodeContext } from "../Node";
|
5
|
+
|
6
|
+
export class DiffRectNode extends JsiDrawingNode<DiffRectProps, null> {
|
7
|
+
constructor(ctx: NodeContext, props: DiffRectProps) {
|
8
|
+
super(ctx, NodeType.DiffRect, props);
|
9
|
+
}
|
10
|
+
|
11
|
+
deriveProps() {
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
|
15
|
+
draw({ canvas, paint }: DrawingContext) {
|
16
|
+
const { outer, inner } = this.props;
|
17
|
+
canvas.drawDRRect(outer, inner, paint);
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { DrawingContext, DrawingNodeProps } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
4
|
+
import type { NodeContext } from "../Node";
|
5
|
+
|
6
|
+
export class FillNode extends JsiDrawingNode<DrawingNodeProps, null> {
|
7
|
+
constructor(ctx: NodeContext, props: DrawingNodeProps = {}) {
|
8
|
+
super(ctx, NodeType.Fill, props);
|
9
|
+
}
|
10
|
+
|
11
|
+
deriveProps() {
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
|
15
|
+
draw({ canvas, paint }: DrawingContext) {
|
16
|
+
canvas.drawPaint(paint);
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import type { SkRect } from "../../../skia/types";
|
2
|
+
import type { DrawingContext, ImageProps } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { fitRects, processRect } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class ImageNode extends JsiDrawingNode<
|
9
|
+
ImageProps,
|
10
|
+
{ src: SkRect; dst: SkRect }
|
11
|
+
> {
|
12
|
+
constructor(ctx: NodeContext, props: ImageProps) {
|
13
|
+
super(ctx, NodeType.Image, props);
|
14
|
+
}
|
15
|
+
|
16
|
+
deriveProps() {
|
17
|
+
const { image, fit } = this.props;
|
18
|
+
const rect = processRect(this.Skia, this.props);
|
19
|
+
const { src, dst } = fitRects(
|
20
|
+
fit,
|
21
|
+
{
|
22
|
+
x: 0,
|
23
|
+
y: 0,
|
24
|
+
width: image.width(),
|
25
|
+
height: image.height(),
|
26
|
+
},
|
27
|
+
rect
|
28
|
+
);
|
29
|
+
return { src, dst };
|
30
|
+
}
|
31
|
+
|
32
|
+
draw({ canvas, paint }: DrawingContext) {
|
33
|
+
const { image } = this.props;
|
34
|
+
if (!this.derived) {
|
35
|
+
throw new Error("ImageNode: src and dst are undefined");
|
36
|
+
}
|
37
|
+
const { src, dst } = this.derived;
|
38
|
+
canvas.drawImageRect(image, src, dst, paint);
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { DrawingContext, ImageSVGProps } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { processRect } from "../datatypes";
|
4
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
5
|
+
import type { NodeContext } from "../Node";
|
6
|
+
|
7
|
+
export class ImageSVGNode extends JsiDrawingNode<ImageSVGProps, null> {
|
8
|
+
constructor(ctx: NodeContext, props: ImageSVGProps) {
|
9
|
+
super(ctx, NodeType.ImageSVG, props);
|
10
|
+
}
|
11
|
+
|
12
|
+
deriveProps() {
|
13
|
+
return null;
|
14
|
+
}
|
15
|
+
|
16
|
+
draw({ canvas }: DrawingContext) {
|
17
|
+
const { svg } = this.props;
|
18
|
+
const { x, y, width, height } = processRect(this.Skia, this.props);
|
19
|
+
canvas.save();
|
20
|
+
canvas.translate(x, y);
|
21
|
+
canvas.drawSvg(svg, width, height);
|
22
|
+
canvas.restore();
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { DrawingContext, LineProps } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
4
|
+
import type { NodeContext } from "../Node";
|
5
|
+
|
6
|
+
export class LineNode extends JsiDrawingNode<LineProps, null> {
|
7
|
+
constructor(ctx: NodeContext, props: LineProps) {
|
8
|
+
super(ctx, NodeType.Line, props);
|
9
|
+
}
|
10
|
+
|
11
|
+
deriveProps() {
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
|
15
|
+
draw({ canvas, paint }: DrawingContext) {
|
16
|
+
const { p1, p2 } = this.props;
|
17
|
+
canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { SkRect } from "../../../skia/types";
|
2
|
+
import type { DrawingContext, OvalProps } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { processRect } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class OvalNode extends JsiDrawingNode<OvalProps, SkRect> {
|
9
|
+
constructor(ctx: NodeContext, props: OvalProps) {
|
10
|
+
super(ctx, NodeType.Oval, props);
|
11
|
+
}
|
12
|
+
|
13
|
+
deriveProps() {
|
14
|
+
return processRect(this.Skia, this.props);
|
15
|
+
}
|
16
|
+
|
17
|
+
draw({ canvas, paint }: DrawingContext) {
|
18
|
+
if (this.derived === undefined) {
|
19
|
+
throw new Error("OvalNode: rect is undefined");
|
20
|
+
}
|
21
|
+
canvas.drawOval(this.derived, paint);
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import type { SkColor, SkPoint } from "../../../skia/types";
|
2
|
+
import { BlendMode } from "../../../skia/types";
|
3
|
+
import type { DrawingContext, PatchProps } from "../../types";
|
4
|
+
import { NodeType } from "../../types";
|
5
|
+
import { ALPHA, enumKey, processColor } from "../datatypes";
|
6
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
7
|
+
import type { NodeContext } from "../Node";
|
8
|
+
|
9
|
+
export class PatchNode extends JsiDrawingNode<
|
10
|
+
PatchProps,
|
11
|
+
{ points: SkPoint[]; colors: SkColor[] | undefined; mode: BlendMode }
|
12
|
+
> {
|
13
|
+
constructor(ctx: NodeContext, props: PatchProps) {
|
14
|
+
super(ctx, NodeType.Patch, props);
|
15
|
+
}
|
16
|
+
|
17
|
+
deriveProps() {
|
18
|
+
const { colors, blendMode, patch } = this.props;
|
19
|
+
const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;
|
20
|
+
const mode = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;
|
21
|
+
// Patch requires a path with the following constraints:
|
22
|
+
// M tl
|
23
|
+
// C c1 c2 br
|
24
|
+
// C c1 c2 bl
|
25
|
+
// C c1 c2 tl (the redundant point in the last command is removed)
|
26
|
+
return {
|
27
|
+
mode,
|
28
|
+
points: [
|
29
|
+
patch[0].pos,
|
30
|
+
patch[0].c2,
|
31
|
+
patch[1].c1,
|
32
|
+
patch[1].pos,
|
33
|
+
patch[1].c2,
|
34
|
+
patch[2].c1,
|
35
|
+
patch[2].pos,
|
36
|
+
patch[2].c2,
|
37
|
+
patch[3].c1,
|
38
|
+
patch[3].pos,
|
39
|
+
patch[3].c2,
|
40
|
+
patch[0].c1,
|
41
|
+
],
|
42
|
+
colors: colors
|
43
|
+
? colors.map((c) => processColor(this.Skia, c, 1))
|
44
|
+
: undefined,
|
45
|
+
};
|
46
|
+
}
|
47
|
+
|
48
|
+
draw({ canvas, paint, opacity }: DrawingContext) {
|
49
|
+
if (!this.derived) {
|
50
|
+
throw new Error("PatchNode: derived props not set");
|
51
|
+
}
|
52
|
+
const { texture } = this.props;
|
53
|
+
const { colors, points, mode } = this.derived;
|
54
|
+
canvas.drawPatch(
|
55
|
+
points,
|
56
|
+
opacity === 1
|
57
|
+
? colors
|
58
|
+
: colors &&
|
59
|
+
colors.map((c) => {
|
60
|
+
c[ALPHA] = c[ALPHA] * opacity;
|
61
|
+
return c;
|
62
|
+
}),
|
63
|
+
texture,
|
64
|
+
mode,
|
65
|
+
paint
|
66
|
+
);
|
67
|
+
}
|
68
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { FillType } from "../../../skia/types";
|
2
|
+
import type { SkPath } from "../../../skia/types";
|
3
|
+
import type { DrawingContext, PathProps } from "../../types";
|
4
|
+
import { NodeType } from "../../types";
|
5
|
+
import { enumKey, processPath } from "../datatypes";
|
6
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
7
|
+
import type { NodeContext } from "../Node";
|
8
|
+
|
9
|
+
export class PathNode extends JsiDrawingNode<PathProps, SkPath> {
|
10
|
+
constructor(ctx: NodeContext, props: PathProps) {
|
11
|
+
super(ctx, NodeType.Path, props);
|
12
|
+
}
|
13
|
+
|
14
|
+
protected deriveProps() {
|
15
|
+
const { start, end, fillType, stroke, ...pathProps } = this.props;
|
16
|
+
const hasStartOffset = start !== 0;
|
17
|
+
const hasEndOffset = end !== 1;
|
18
|
+
const hasStrokeOptions = stroke !== undefined;
|
19
|
+
const hasFillType = !!fillType;
|
20
|
+
const willMutatePath =
|
21
|
+
hasStartOffset || hasEndOffset || hasStrokeOptions || hasFillType;
|
22
|
+
const pristinePath = processPath(this.Skia, pathProps.path);
|
23
|
+
const path = willMutatePath ? pristinePath.copy() : pristinePath;
|
24
|
+
if (hasFillType) {
|
25
|
+
path.setFillType(FillType[enumKey(fillType)]);
|
26
|
+
}
|
27
|
+
if (hasStrokeOptions) {
|
28
|
+
path.stroke(stroke);
|
29
|
+
}
|
30
|
+
if (hasStartOffset || hasEndOffset) {
|
31
|
+
path.trim(start, end, false);
|
32
|
+
}
|
33
|
+
return path;
|
34
|
+
}
|
35
|
+
|
36
|
+
draw({ canvas, paint }: DrawingContext) {
|
37
|
+
if (!this.derived) {
|
38
|
+
throw new Error("Path not initialized");
|
39
|
+
}
|
40
|
+
canvas.drawPath(this.derived, paint);
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { DrawingContext, PictureProps } from "../../types";
|
2
|
+
import { NodeType } from "../../types";
|
3
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
4
|
+
import type { NodeContext } from "../Node";
|
5
|
+
|
6
|
+
export class PictureNode extends JsiDrawingNode<PictureProps, null> {
|
7
|
+
constructor(ctx: NodeContext, props: PictureProps) {
|
8
|
+
super(ctx, NodeType.Picture, props);
|
9
|
+
}
|
10
|
+
|
11
|
+
deriveProps() {
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
|
15
|
+
draw({ canvas }: DrawingContext) {
|
16
|
+
const { picture } = this.props;
|
17
|
+
canvas.drawPicture(picture);
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { PointMode } from "../../../skia/types";
|
2
|
+
import type { DrawingContext, PointsProps } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { enumKey } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class PointsNode extends JsiDrawingNode<PointsProps, null> {
|
9
|
+
constructor(ctx: NodeContext, props: PointsProps) {
|
10
|
+
super(ctx, NodeType.Points, props);
|
11
|
+
}
|
12
|
+
|
13
|
+
deriveProps() {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
|
17
|
+
draw({ canvas, paint }: DrawingContext) {
|
18
|
+
const { points, mode } = this.props;
|
19
|
+
canvas.drawPoints(PointMode[enumKey(mode)], points, paint);
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { SkRRect } from "../../../skia/types";
|
2
|
+
import type { DrawingContext, RoundedRectProps } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { processRRect } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class RRectNode extends JsiDrawingNode<RoundedRectProps, SkRRect> {
|
9
|
+
rect?: SkRRect;
|
10
|
+
|
11
|
+
constructor(ctx: NodeContext, props: RoundedRectProps) {
|
12
|
+
super(ctx, NodeType.RRect, props);
|
13
|
+
}
|
14
|
+
|
15
|
+
protected deriveProps() {
|
16
|
+
return processRRect(this.Skia, this.props);
|
17
|
+
}
|
18
|
+
|
19
|
+
draw({ canvas, paint }: DrawingContext) {
|
20
|
+
if (this.derived === undefined) {
|
21
|
+
throw new Error("RRectNode: rect is undefined");
|
22
|
+
}
|
23
|
+
canvas.drawRRect(this.derived, paint);
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { SkRect } from "../../../skia/types/Rect";
|
2
|
+
import type { DrawingContext, RectProps } from "../../types";
|
3
|
+
import { NodeType } from "../../types";
|
4
|
+
import { processRect } from "../datatypes";
|
5
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
6
|
+
import type { NodeContext } from "../Node";
|
7
|
+
|
8
|
+
export class RectNode extends JsiDrawingNode<RectProps, SkRect> {
|
9
|
+
constructor(ctx: NodeContext, props: RectProps) {
|
10
|
+
super(ctx, NodeType.Rect, props);
|
11
|
+
}
|
12
|
+
|
13
|
+
deriveProps() {
|
14
|
+
return processRect(this.Skia, this.props);
|
15
|
+
}
|
16
|
+
|
17
|
+
draw({ canvas, paint }: DrawingContext) {
|
18
|
+
if (this.derived === undefined) {
|
19
|
+
throw new Error("RectNode: rect is undefined");
|
20
|
+
}
|
21
|
+
canvas.drawRect(this.derived, paint);
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import type { SkRSXform, SkTextBlob, SkPoint } from "../../../skia/types";
|
2
|
+
import type {
|
3
|
+
DrawingContext,
|
4
|
+
TextBlobProps,
|
5
|
+
TextPathProps,
|
6
|
+
TextProps,
|
7
|
+
} from "../../types";
|
8
|
+
import { NodeType } from "../../types";
|
9
|
+
import { processPath } from "../datatypes";
|
10
|
+
import type { GlyphsProps } from "../../types/Drawings";
|
11
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
12
|
+
import type { NodeContext } from "../Node";
|
13
|
+
|
14
|
+
export class TextNode extends JsiDrawingNode<TextProps, null> {
|
15
|
+
constructor(ctx: NodeContext, props: TextProps) {
|
16
|
+
super(ctx, NodeType.Text, props);
|
17
|
+
}
|
18
|
+
|
19
|
+
protected deriveProps() {
|
20
|
+
return null;
|
21
|
+
}
|
22
|
+
|
23
|
+
draw({ canvas, paint }: DrawingContext) {
|
24
|
+
const { text, x, y, font } = this.props;
|
25
|
+
canvas.drawText(text, x, y, paint, font);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
export class TextPathNode extends JsiDrawingNode<TextPathProps, SkTextBlob> {
|
30
|
+
constructor(ctx: NodeContext, props: TextPathProps) {
|
31
|
+
super(ctx, NodeType.TextPath, props);
|
32
|
+
}
|
33
|
+
|
34
|
+
deriveProps() {
|
35
|
+
const path = processPath(this.Skia, this.props.path);
|
36
|
+
const { font, initialOffset } = this.props;
|
37
|
+
let { text } = this.props;
|
38
|
+
const ids = font.getGlyphIDs(text);
|
39
|
+
const widths = font.getGlyphWidths(ids);
|
40
|
+
const rsx: SkRSXform[] = [];
|
41
|
+
const meas = this.Skia.ContourMeasureIter(path, false, 1);
|
42
|
+
let cont = meas.next();
|
43
|
+
let dist = initialOffset;
|
44
|
+
for (let i = 0; i < text.length && cont; i++) {
|
45
|
+
const width = widths[i];
|
46
|
+
dist += width / 2;
|
47
|
+
if (dist > cont.length()) {
|
48
|
+
// jump to next contour
|
49
|
+
cont = meas.next();
|
50
|
+
if (!cont) {
|
51
|
+
// We have come to the end of the path - terminate the string
|
52
|
+
// right here.
|
53
|
+
text = text.substring(0, i);
|
54
|
+
break;
|
55
|
+
}
|
56
|
+
dist = width / 2;
|
57
|
+
}
|
58
|
+
// Gives us the (x, y) coordinates as well as the cos/sin of the tangent
|
59
|
+
// line at that position.
|
60
|
+
const { px, py, tx, ty } = cont.getPosTan(dist);
|
61
|
+
const adjustedX = px - (width / 2) * tx;
|
62
|
+
const adjustedY = py - (width / 2) * ty;
|
63
|
+
rsx.push(this.Skia.RSXform(tx, ty, adjustedX, adjustedY));
|
64
|
+
dist += width / 2;
|
65
|
+
}
|
66
|
+
return this.Skia.TextBlob.MakeFromRSXform(text, rsx, font);
|
67
|
+
}
|
68
|
+
|
69
|
+
draw({ canvas, paint }: DrawingContext) {
|
70
|
+
if (!this.derived) {
|
71
|
+
throw new Error("TextPathNode: blob is null");
|
72
|
+
}
|
73
|
+
canvas.drawTextBlob(this.derived, 0, 0, paint);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
export class TextBlobNode extends JsiDrawingNode<TextBlobProps, null> {
|
78
|
+
constructor(ctx: NodeContext, props: TextBlobProps) {
|
79
|
+
super(ctx, NodeType.TextBlob, props);
|
80
|
+
}
|
81
|
+
|
82
|
+
protected deriveProps() {
|
83
|
+
return null;
|
84
|
+
}
|
85
|
+
|
86
|
+
draw({ canvas, paint }: DrawingContext) {
|
87
|
+
const { blob, x, y } = this.props;
|
88
|
+
canvas.drawTextBlob(blob, x, y, paint);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
interface ProcessedGlyphs {
|
93
|
+
glyphs: number[];
|
94
|
+
positions: SkPoint[];
|
95
|
+
}
|
96
|
+
|
97
|
+
export class GlyphsNode extends JsiDrawingNode<GlyphsProps, ProcessedGlyphs> {
|
98
|
+
constructor(ctx: NodeContext, props: GlyphsProps) {
|
99
|
+
super(ctx, NodeType.Glyphs, props);
|
100
|
+
}
|
101
|
+
|
102
|
+
deriveProps() {
|
103
|
+
return this.props.glyphs.reduce<ProcessedGlyphs>(
|
104
|
+
(acc, glyph) => {
|
105
|
+
const { id, pos } = glyph;
|
106
|
+
acc.glyphs.push(id);
|
107
|
+
acc.positions.push(pos);
|
108
|
+
return acc;
|
109
|
+
},
|
110
|
+
{ glyphs: [], positions: [] }
|
111
|
+
);
|
112
|
+
}
|
113
|
+
|
114
|
+
draw({ canvas, paint }: DrawingContext) {
|
115
|
+
if (!this.derived) {
|
116
|
+
throw new Error("GlyphsNode: processedGlyphs is null");
|
117
|
+
}
|
118
|
+
const { glyphs, positions } = this.derived;
|
119
|
+
const { x, y, font } = this.props;
|
120
|
+
canvas.drawGlyphs(glyphs, positions, x, y, font, paint);
|
121
|
+
}
|
122
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import type { SkVertices } from "../../../skia/types";
|
2
|
+
import { VertexMode, BlendMode } from "../../../skia/types";
|
3
|
+
import type { DrawingContext, VerticesProps } from "../../types";
|
4
|
+
import { NodeType } from "../../types";
|
5
|
+
import { enumKey, processColor } from "../datatypes";
|
6
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
7
|
+
import type { NodeContext } from "../Node";
|
8
|
+
|
9
|
+
export class VerticesNode extends JsiDrawingNode<VerticesProps, SkVertices> {
|
10
|
+
constructor(ctx: NodeContext, props: VerticesProps) {
|
11
|
+
super(ctx, NodeType.Vertices, props);
|
12
|
+
}
|
13
|
+
|
14
|
+
protected deriveProps() {
|
15
|
+
const { mode, vertices, textures, colors, indices } = this.props;
|
16
|
+
const vertexMode = mode ? VertexMode[enumKey(mode)] : VertexMode.Triangles;
|
17
|
+
return this.Skia.MakeVertices(
|
18
|
+
vertexMode,
|
19
|
+
vertices,
|
20
|
+
textures,
|
21
|
+
colors ? colors.map((c) => processColor(this.Skia, c, 1)) : undefined,
|
22
|
+
indices
|
23
|
+
);
|
24
|
+
}
|
25
|
+
|
26
|
+
draw({ canvas, paint }: DrawingContext) {
|
27
|
+
const { colors, blendMode } = this.props;
|
28
|
+
const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;
|
29
|
+
const blend = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;
|
30
|
+
if (this.derived === undefined) {
|
31
|
+
throw new Error("VerticesNode: vertices is undefined");
|
32
|
+
}
|
33
|
+
canvas.drawVertices(this.derived, blend, paint);
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export * from "./CircleNode";
|
2
|
+
export * from "./FillNode";
|
3
|
+
export * from "./ImageNode";
|
4
|
+
export * from "./PointsNode";
|
5
|
+
export * from "./PathNode";
|
6
|
+
export * from "./RectNode";
|
7
|
+
export * from "./RRectNode";
|
8
|
+
export * from "./OvalNode";
|
9
|
+
export * from "./LineNode";
|
10
|
+
export * from "./PatchNode";
|
11
|
+
export * from "./VerticesNode";
|
12
|
+
export * from "./CustomDrawingNode";
|
13
|
+
export * from "./Text";
|
14
|
+
export * from "./PictureNode";
|
15
|
+
export * from "./DiffRectNode";
|
16
|
+
export * from "./ImageSVG";
|
17
|
+
export * from "./BackdropFilterNode";
|
18
|
+
export * from "./Box";
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import type { BlendProps } from "../../types/ImageFilters";
|
2
|
+
import type { SkShader, SkImageFilter } from "../../../skia/types";
|
3
|
+
import { BlendMode } from "../../../skia/types";
|
4
|
+
import { DeclarationType, NodeType } from "../../types/NodeType";
|
5
|
+
import type { NodeContext } from "../Node";
|
6
|
+
import { JsiDeclarationNode } from "../Node";
|
7
|
+
import type { Node } from "../../types";
|
8
|
+
import { enumKey } from "../datatypes";
|
9
|
+
|
10
|
+
import { ImageFilterDeclaration } from "./ImageFilters";
|
11
|
+
import { ShaderDeclaration } from "./Shaders";
|
12
|
+
|
13
|
+
export class BlendNode extends JsiDeclarationNode<
|
14
|
+
BlendProps,
|
15
|
+
SkShader | SkImageFilter
|
16
|
+
> {
|
17
|
+
constructor(ctx: NodeContext, props: BlendProps) {
|
18
|
+
super(ctx, DeclarationType.ImageFilter, NodeType.Blend, props);
|
19
|
+
}
|
20
|
+
|
21
|
+
private checkChild(
|
22
|
+
child: ImageFilterDeclaration<unknown> | ShaderDeclaration<unknown>
|
23
|
+
) {
|
24
|
+
if (this._children.length > 0) {
|
25
|
+
if (child.declarationType === DeclarationType.ImageFilter) {
|
26
|
+
this.declarationType = DeclarationType.ImageFilter;
|
27
|
+
} else {
|
28
|
+
this.declarationType = DeclarationType.Shader;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
addChild(child: Node<unknown>) {
|
34
|
+
if (
|
35
|
+
!(child instanceof JsiDeclarationNode) ||
|
36
|
+
(child.declarationType !== DeclarationType.Shader &&
|
37
|
+
child.declarationType !== DeclarationType.ImageFilter)
|
38
|
+
) {
|
39
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
40
|
+
}
|
41
|
+
this.checkChild(child);
|
42
|
+
super.addChild(child);
|
43
|
+
}
|
44
|
+
|
45
|
+
insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {
|
46
|
+
if (
|
47
|
+
!(child instanceof ImageFilterDeclaration) ||
|
48
|
+
!(child instanceof ShaderDeclaration)
|
49
|
+
) {
|
50
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
51
|
+
}
|
52
|
+
this.checkChild(child);
|
53
|
+
super.insertChildBefore(child, before);
|
54
|
+
}
|
55
|
+
|
56
|
+
materialize() {
|
57
|
+
const { Skia } = this;
|
58
|
+
const blend = BlendMode[enumKey(this.props.mode)];
|
59
|
+
if (this.declarationType === DeclarationType.ImageFilter) {
|
60
|
+
return (this._children as ImageFilterDeclaration<unknown>[])
|
61
|
+
.reverse()
|
62
|
+
.reduce<SkImageFilter | null>((inner, outer) => {
|
63
|
+
if (inner === null) {
|
64
|
+
return outer.materialize();
|
65
|
+
}
|
66
|
+
return Skia.ImageFilter.MakeBlend(blend, outer.materialize(), inner);
|
67
|
+
}, null) as SkImageFilter;
|
68
|
+
} else {
|
69
|
+
return (this._children as ShaderDeclaration<unknown>[])
|
70
|
+
.reverse()
|
71
|
+
.reduce<SkShader | null>((inner, outer) => {
|
72
|
+
if (inner === null) {
|
73
|
+
return outer.materialize();
|
74
|
+
}
|
75
|
+
return Skia.Shader.MakeBlend(blend, outer.materialize(), inner);
|
76
|
+
}, null) as SkShader;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|