@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,353 @@
|
|
1
|
+
import type {
|
2
|
+
PathProps,
|
3
|
+
SkDOM,
|
4
|
+
GroupProps,
|
5
|
+
ImageProps,
|
6
|
+
BlurImageFilterProps,
|
7
|
+
MatrixColorFilterProps,
|
8
|
+
CircleProps,
|
9
|
+
BlurMaskFilterProps,
|
10
|
+
LinearGradientProps,
|
11
|
+
PaintProps,
|
12
|
+
ShaderProps,
|
13
|
+
ImageShaderProps,
|
14
|
+
CustomDrawingNodeProps,
|
15
|
+
LineProps,
|
16
|
+
OvalProps,
|
17
|
+
PatchProps,
|
18
|
+
PointsProps,
|
19
|
+
RectProps,
|
20
|
+
RoundedRectProps,
|
21
|
+
VerticesProps,
|
22
|
+
TextProps,
|
23
|
+
DiffRectProps,
|
24
|
+
OffsetImageFilterProps,
|
25
|
+
BlendColorFilterProps,
|
26
|
+
TextPathProps,
|
27
|
+
TextBlobProps,
|
28
|
+
GlyphsProps,
|
29
|
+
TwoPointConicalGradientProps,
|
30
|
+
TurbulenceProps,
|
31
|
+
SweepGradientProps,
|
32
|
+
RadialGradientProps,
|
33
|
+
FractalNoiseProps,
|
34
|
+
ColorProps,
|
35
|
+
PictureProps,
|
36
|
+
ImageSVGProps,
|
37
|
+
LerpColorFilterProps,
|
38
|
+
DrawingNodeProps,
|
39
|
+
BoxProps,
|
40
|
+
BoxShadowProps,
|
41
|
+
ChildrenProps,
|
42
|
+
} from "../types";
|
43
|
+
import type {
|
44
|
+
BlendImageFilterProps,
|
45
|
+
BlendProps,
|
46
|
+
DisplacementMapImageFilterProps,
|
47
|
+
DropShadowImageFilterProps,
|
48
|
+
MorphologyImageFilterProps,
|
49
|
+
RuntimeShaderImageFilterProps,
|
50
|
+
} from "../types/ImageFilters";
|
51
|
+
import type {
|
52
|
+
CornerPathEffectProps,
|
53
|
+
DashPathEffectProps,
|
54
|
+
DiscretePathEffectProps,
|
55
|
+
Line2DPathEffectProps,
|
56
|
+
Path1DPathEffectProps,
|
57
|
+
Path2DPathEffectProps,
|
58
|
+
} from "../types/PathEffects";
|
59
|
+
|
60
|
+
import {
|
61
|
+
FillNode,
|
62
|
+
ImageNode,
|
63
|
+
CircleNode,
|
64
|
+
PathNode,
|
65
|
+
LineNode,
|
66
|
+
PatchNode,
|
67
|
+
PointsNode,
|
68
|
+
RectNode,
|
69
|
+
RRectNode,
|
70
|
+
VerticesNode,
|
71
|
+
TextNode,
|
72
|
+
OvalNode,
|
73
|
+
CustomDrawingNode,
|
74
|
+
TextPathNode,
|
75
|
+
TextBlobNode,
|
76
|
+
GlyphsNode,
|
77
|
+
DiffRectNode,
|
78
|
+
PictureNode,
|
79
|
+
ImageSVGNode,
|
80
|
+
BackdropFilterNode,
|
81
|
+
BoxNode,
|
82
|
+
BoxShadowNode,
|
83
|
+
} from "./drawings";
|
84
|
+
import {
|
85
|
+
BlendImageFilterNode,
|
86
|
+
BlurImageFilterNode,
|
87
|
+
BlurMaskFilterNode,
|
88
|
+
DisplacementMapImageFilterNode,
|
89
|
+
DropShadowImageFilterNode,
|
90
|
+
OffsetImageFilterNode,
|
91
|
+
RuntimeShaderImageFilterNode,
|
92
|
+
CornerPathEffectNode,
|
93
|
+
DiscretePathEffectNode,
|
94
|
+
DashPathEffectNode,
|
95
|
+
Path1DPathEffectNode,
|
96
|
+
Path2DPathEffectNode,
|
97
|
+
SumPathEffectNode,
|
98
|
+
Line2DPathEffectNode,
|
99
|
+
BlendNode,
|
100
|
+
} from "./paint";
|
101
|
+
import {
|
102
|
+
MatrixColorFilterNode,
|
103
|
+
LumaColorFilterNode,
|
104
|
+
LinearToSRGBGammaColorFilterNode,
|
105
|
+
SRGBToLinearGammaColorFilterNode,
|
106
|
+
BlendColorFilterNode,
|
107
|
+
LerpColorFilterNode,
|
108
|
+
} from "./paint/ColorFilters";
|
109
|
+
import {
|
110
|
+
LinearGradientNode,
|
111
|
+
ShaderNode,
|
112
|
+
ImageShaderNode,
|
113
|
+
TwoPointConicalGradientNode,
|
114
|
+
TurbulenceNode,
|
115
|
+
SweepGradientNode,
|
116
|
+
RadialGradientNode,
|
117
|
+
FractalNoiseNode,
|
118
|
+
ColorNode,
|
119
|
+
} from "./paint/Shaders";
|
120
|
+
import { MorphologyImageFilterNode } from "./paint/ImageFilters";
|
121
|
+
import { GroupNode } from "./GroupNode";
|
122
|
+
import { PaintNode } from "./PaintNode";
|
123
|
+
import type { NodeContext } from "./Node";
|
124
|
+
|
125
|
+
export class JsiSkDOM implements SkDOM {
|
126
|
+
constructor(private ctx: NodeContext) {}
|
127
|
+
|
128
|
+
Group(props?: GroupProps) {
|
129
|
+
return new GroupNode(this.ctx, props ?? {});
|
130
|
+
}
|
131
|
+
|
132
|
+
Paint(props: PaintProps) {
|
133
|
+
return new PaintNode(this.ctx, props);
|
134
|
+
}
|
135
|
+
|
136
|
+
// Drawings
|
137
|
+
Fill(props?: DrawingNodeProps) {
|
138
|
+
return new FillNode(this.ctx, props);
|
139
|
+
}
|
140
|
+
|
141
|
+
Image(props: ImageProps) {
|
142
|
+
return new ImageNode(this.ctx, props);
|
143
|
+
}
|
144
|
+
|
145
|
+
Circle(props: CircleProps) {
|
146
|
+
return new CircleNode(this.ctx, props);
|
147
|
+
}
|
148
|
+
|
149
|
+
Path(props: PathProps) {
|
150
|
+
return new PathNode(this.ctx, props);
|
151
|
+
}
|
152
|
+
|
153
|
+
CustomDrawing(props: CustomDrawingNodeProps) {
|
154
|
+
return new CustomDrawingNode(this.ctx, props);
|
155
|
+
}
|
156
|
+
|
157
|
+
Line(props: LineProps) {
|
158
|
+
return new LineNode(this.ctx, props);
|
159
|
+
}
|
160
|
+
|
161
|
+
Oval(props: OvalProps) {
|
162
|
+
return new OvalNode(this.ctx, props);
|
163
|
+
}
|
164
|
+
|
165
|
+
Patch(props: PatchProps) {
|
166
|
+
return new PatchNode(this.ctx, props);
|
167
|
+
}
|
168
|
+
|
169
|
+
Points(props: PointsProps) {
|
170
|
+
return new PointsNode(this.ctx, props);
|
171
|
+
}
|
172
|
+
|
173
|
+
Rect(props: RectProps) {
|
174
|
+
return new RectNode(this.ctx, props);
|
175
|
+
}
|
176
|
+
|
177
|
+
RRect(props: RoundedRectProps) {
|
178
|
+
return new RRectNode(this.ctx, props);
|
179
|
+
}
|
180
|
+
|
181
|
+
Vertices(props: VerticesProps) {
|
182
|
+
return new VerticesNode(this.ctx, props);
|
183
|
+
}
|
184
|
+
|
185
|
+
Text(props: TextProps) {
|
186
|
+
return new TextNode(this.ctx, props);
|
187
|
+
}
|
188
|
+
|
189
|
+
TextPath(props: TextPathProps) {
|
190
|
+
return new TextPathNode(this.ctx, props);
|
191
|
+
}
|
192
|
+
|
193
|
+
TextBlob(props: TextBlobProps) {
|
194
|
+
return new TextBlobNode(this.ctx, props);
|
195
|
+
}
|
196
|
+
|
197
|
+
Glyphs(props: GlyphsProps) {
|
198
|
+
return new GlyphsNode(this.ctx, props);
|
199
|
+
}
|
200
|
+
|
201
|
+
DiffRect(props: DiffRectProps) {
|
202
|
+
return new DiffRectNode(this.ctx, props);
|
203
|
+
}
|
204
|
+
|
205
|
+
Picture(props: PictureProps) {
|
206
|
+
return new PictureNode(this.ctx, props);
|
207
|
+
}
|
208
|
+
|
209
|
+
ImageSVG(props: ImageSVGProps) {
|
210
|
+
return new ImageSVGNode(this.ctx, props);
|
211
|
+
}
|
212
|
+
|
213
|
+
// BlurMaskFilters
|
214
|
+
BlurMaskFilter(props: BlurMaskFilterProps) {
|
215
|
+
return new BlurMaskFilterNode(this.ctx, props);
|
216
|
+
}
|
217
|
+
|
218
|
+
// ImageFilters
|
219
|
+
BlendImageFilter(props: BlendImageFilterProps) {
|
220
|
+
return new BlendImageFilterNode(this.ctx, props);
|
221
|
+
}
|
222
|
+
|
223
|
+
DropShadowImageFilter(props: DropShadowImageFilterProps) {
|
224
|
+
return new DropShadowImageFilterNode(this.ctx, props);
|
225
|
+
}
|
226
|
+
|
227
|
+
DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {
|
228
|
+
return new DisplacementMapImageFilterNode(this.ctx, props);
|
229
|
+
}
|
230
|
+
|
231
|
+
BlurImageFilter(props: BlurImageFilterProps) {
|
232
|
+
return new BlurImageFilterNode(this.ctx, props);
|
233
|
+
}
|
234
|
+
|
235
|
+
OffsetImageFilter(props: OffsetImageFilterProps) {
|
236
|
+
return new OffsetImageFilterNode(this.ctx, props);
|
237
|
+
}
|
238
|
+
|
239
|
+
MorphologyImageFilter(props: MorphologyImageFilterProps) {
|
240
|
+
return new MorphologyImageFilterNode(this.ctx, props);
|
241
|
+
}
|
242
|
+
|
243
|
+
RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {
|
244
|
+
return new RuntimeShaderImageFilterNode(this.ctx, props);
|
245
|
+
}
|
246
|
+
|
247
|
+
// Color Filters
|
248
|
+
MatrixColorFilter(props: MatrixColorFilterProps) {
|
249
|
+
return new MatrixColorFilterNode(this.ctx, props);
|
250
|
+
}
|
251
|
+
|
252
|
+
BlendColorFilter(props: BlendColorFilterProps) {
|
253
|
+
return new BlendColorFilterNode(this.ctx, props);
|
254
|
+
}
|
255
|
+
|
256
|
+
LumaColorFilter() {
|
257
|
+
return new LumaColorFilterNode(this.ctx);
|
258
|
+
}
|
259
|
+
|
260
|
+
LinearToSRGBGammaColorFilter() {
|
261
|
+
return new LinearToSRGBGammaColorFilterNode(this.ctx);
|
262
|
+
}
|
263
|
+
|
264
|
+
SRGBToLinearGammaColorFilter() {
|
265
|
+
return new SRGBToLinearGammaColorFilterNode(this.ctx);
|
266
|
+
}
|
267
|
+
|
268
|
+
LerpColorFilter(props: LerpColorFilterProps) {
|
269
|
+
return new LerpColorFilterNode(this.ctx, props);
|
270
|
+
}
|
271
|
+
|
272
|
+
// Shaders
|
273
|
+
Shader(props: ShaderProps) {
|
274
|
+
return new ShaderNode(this.ctx, props);
|
275
|
+
}
|
276
|
+
|
277
|
+
ImageShader(props: ImageShaderProps) {
|
278
|
+
return new ImageShaderNode(this.ctx, props);
|
279
|
+
}
|
280
|
+
|
281
|
+
ColorShader(props: ColorProps) {
|
282
|
+
return new ColorNode(this.ctx, props);
|
283
|
+
}
|
284
|
+
|
285
|
+
SweepGradient(props: SweepGradientProps) {
|
286
|
+
return new SweepGradientNode(this.ctx, props);
|
287
|
+
}
|
288
|
+
|
289
|
+
Turbulence(props: TurbulenceProps) {
|
290
|
+
return new TurbulenceNode(this.ctx, props);
|
291
|
+
}
|
292
|
+
|
293
|
+
FractalNoise(props: FractalNoiseProps) {
|
294
|
+
return new FractalNoiseNode(this.ctx, props);
|
295
|
+
}
|
296
|
+
|
297
|
+
LinearGradient(props: LinearGradientProps) {
|
298
|
+
return new LinearGradientNode(this.ctx, props);
|
299
|
+
}
|
300
|
+
|
301
|
+
RadialGradient(props: RadialGradientProps) {
|
302
|
+
return new RadialGradientNode(this.ctx, props);
|
303
|
+
}
|
304
|
+
|
305
|
+
TwoPointConicalGradient(props: TwoPointConicalGradientProps) {
|
306
|
+
return new TwoPointConicalGradientNode(this.ctx, props);
|
307
|
+
}
|
308
|
+
|
309
|
+
// Path Effects
|
310
|
+
CornerPathEffect(props: CornerPathEffectProps) {
|
311
|
+
return new CornerPathEffectNode(this.ctx, props);
|
312
|
+
}
|
313
|
+
|
314
|
+
DiscretePathEffect(props: DiscretePathEffectProps) {
|
315
|
+
return new DiscretePathEffectNode(this.ctx, props);
|
316
|
+
}
|
317
|
+
|
318
|
+
DashPathEffect(props: DashPathEffectProps) {
|
319
|
+
return new DashPathEffectNode(this.ctx, props);
|
320
|
+
}
|
321
|
+
|
322
|
+
Path1DPathEffect(props: Path1DPathEffectProps) {
|
323
|
+
return new Path1DPathEffectNode(this.ctx, props);
|
324
|
+
}
|
325
|
+
|
326
|
+
Path2DPathEffect(props: Path2DPathEffectProps) {
|
327
|
+
return new Path2DPathEffectNode(this.ctx, props);
|
328
|
+
}
|
329
|
+
|
330
|
+
SumPathEffect() {
|
331
|
+
return new SumPathEffectNode(this.ctx);
|
332
|
+
}
|
333
|
+
|
334
|
+
Line2DPathEffect(props: Line2DPathEffectProps) {
|
335
|
+
return new Line2DPathEffectNode(this.ctx, props);
|
336
|
+
}
|
337
|
+
|
338
|
+
Blend(props: BlendProps) {
|
339
|
+
return new BlendNode(this.ctx, props);
|
340
|
+
}
|
341
|
+
|
342
|
+
BackdropFilter(props: ChildrenProps) {
|
343
|
+
return new BackdropFilterNode(this.ctx, props);
|
344
|
+
}
|
345
|
+
|
346
|
+
Box(props: BoxProps) {
|
347
|
+
return new BoxNode(this.ctx, props);
|
348
|
+
}
|
349
|
+
|
350
|
+
BoxShadow(props: BoxShadowProps) {
|
351
|
+
return new BoxShadowNode(this.ctx, props);
|
352
|
+
}
|
353
|
+
}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
import type {
|
2
|
+
SkColorFilter,
|
3
|
+
Skia,
|
4
|
+
SkImageFilter,
|
5
|
+
SkMaskFilter,
|
6
|
+
SkShader,
|
7
|
+
SkPathEffect,
|
8
|
+
SkPaint,
|
9
|
+
} from "../../skia/types";
|
10
|
+
import type { Node, DeclarationNode, NodeType } from "../types";
|
11
|
+
import { DeclarationType } from "../types";
|
12
|
+
import type { DependencyManager } from "../../renderer/DependencyManager";
|
13
|
+
|
14
|
+
export interface NodeContext {
|
15
|
+
Skia: Skia;
|
16
|
+
depMgr: DependencyManager;
|
17
|
+
}
|
18
|
+
|
19
|
+
export abstract class JsiNode<P> implements Node<P> {
|
20
|
+
protected _children: JsiNode<unknown>[] = [];
|
21
|
+
protected Skia: Skia;
|
22
|
+
protected depMgr: DependencyManager;
|
23
|
+
|
24
|
+
constructor(ctx: NodeContext, public type: NodeType, protected props: P) {
|
25
|
+
this.Skia = ctx.Skia;
|
26
|
+
this.depMgr = ctx.depMgr;
|
27
|
+
}
|
28
|
+
|
29
|
+
setProps(props: P) {
|
30
|
+
this.props = props;
|
31
|
+
}
|
32
|
+
|
33
|
+
setProp<K extends keyof P>(name: K, v: P[K]) {
|
34
|
+
const hasChanged = this.props[name] !== v;
|
35
|
+
this.props[name] = v;
|
36
|
+
return hasChanged;
|
37
|
+
}
|
38
|
+
|
39
|
+
getProps() {
|
40
|
+
return this.props;
|
41
|
+
}
|
42
|
+
|
43
|
+
children() {
|
44
|
+
return this._children;
|
45
|
+
}
|
46
|
+
|
47
|
+
addChild(child: Node<unknown>) {
|
48
|
+
this._children.push(child as JsiNode<unknown>);
|
49
|
+
}
|
50
|
+
|
51
|
+
dispose() {
|
52
|
+
this.depMgr.unsubscribeNode(this);
|
53
|
+
this._children.forEach((child) => child.dispose());
|
54
|
+
}
|
55
|
+
|
56
|
+
removeChild(child: Node<unknown>) {
|
57
|
+
const index = this._children.indexOf(child as JsiNode<unknown>);
|
58
|
+
if (index !== -1) {
|
59
|
+
const [node] = this._children.splice(index, 1);
|
60
|
+
node.dispose();
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
insertChildBefore(child: Node<unknown>, before: Node<unknown>) {
|
65
|
+
const index = this._children.indexOf(child as JsiNode<unknown>);
|
66
|
+
if (index !== -1) {
|
67
|
+
this._children.splice(index, 1);
|
68
|
+
}
|
69
|
+
const beforeIndex = this._children.indexOf(before as JsiNode<unknown>);
|
70
|
+
this._children.splice(beforeIndex, 0, child as JsiNode<unknown>);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
export type Invalidate = () => void;
|
75
|
+
|
76
|
+
export abstract class JsiDeclarationNode<
|
77
|
+
P,
|
78
|
+
T,
|
79
|
+
Nullable extends null | never = never
|
80
|
+
>
|
81
|
+
extends JsiNode<P>
|
82
|
+
implements DeclarationNode<P, T, Nullable>
|
83
|
+
{
|
84
|
+
private invalidate: Invalidate = () => {};
|
85
|
+
|
86
|
+
constructor(
|
87
|
+
ctx: NodeContext,
|
88
|
+
public declarationType: DeclarationType,
|
89
|
+
type: NodeType,
|
90
|
+
props: P
|
91
|
+
) {
|
92
|
+
super(ctx, type, props);
|
93
|
+
}
|
94
|
+
|
95
|
+
abstract materialize(): T | Nullable;
|
96
|
+
|
97
|
+
addChild(child: Node<unknown>): void {
|
98
|
+
if (!(child instanceof JsiDeclarationNode)) {
|
99
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
100
|
+
}
|
101
|
+
super.addChild(child);
|
102
|
+
this.invalidate();
|
103
|
+
}
|
104
|
+
|
105
|
+
insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {
|
106
|
+
if (!(child instanceof JsiDeclarationNode)) {
|
107
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
108
|
+
}
|
109
|
+
super.insertChildBefore(child, before);
|
110
|
+
this.invalidate();
|
111
|
+
}
|
112
|
+
|
113
|
+
dispose() {
|
114
|
+
this.invalidate();
|
115
|
+
super.dispose();
|
116
|
+
}
|
117
|
+
|
118
|
+
setInvalidate(invalidate: Invalidate) {
|
119
|
+
this.invalidate = invalidate;
|
120
|
+
}
|
121
|
+
|
122
|
+
setProps(props: P) {
|
123
|
+
super.setProps(props);
|
124
|
+
this.invalidate();
|
125
|
+
}
|
126
|
+
|
127
|
+
setProp<K extends keyof P>(name: K, v: P[K]) {
|
128
|
+
const hasChanged = super.setProp(name, v);
|
129
|
+
if (hasChanged) {
|
130
|
+
this.invalidate();
|
131
|
+
}
|
132
|
+
return hasChanged;
|
133
|
+
}
|
134
|
+
|
135
|
+
isPaint(): this is DeclarationNode<unknown, SkPaint> {
|
136
|
+
return this.declarationType === DeclarationType.Paint;
|
137
|
+
}
|
138
|
+
|
139
|
+
isImageFilter(): this is DeclarationNode<unknown, SkImageFilter> {
|
140
|
+
return this.declarationType === DeclarationType.ImageFilter;
|
141
|
+
}
|
142
|
+
|
143
|
+
isColorFilter(): this is DeclarationNode<unknown, SkColorFilter> {
|
144
|
+
return this.declarationType === DeclarationType.ColorFilter;
|
145
|
+
}
|
146
|
+
|
147
|
+
isShader(): this is DeclarationNode<unknown, SkShader> {
|
148
|
+
return this.declarationType === DeclarationType.Shader;
|
149
|
+
}
|
150
|
+
|
151
|
+
isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter> {
|
152
|
+
return this.declarationType === DeclarationType.MaskFilter;
|
153
|
+
}
|
154
|
+
|
155
|
+
isPathEffect(): this is DeclarationNode<unknown, SkPathEffect> {
|
156
|
+
return this.declarationType === DeclarationType.PathEffect;
|
157
|
+
}
|
158
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import type {
|
2
|
+
BlendMode,
|
3
|
+
PaintStyle,
|
4
|
+
SkColorFilter,
|
5
|
+
SkImageFilter,
|
6
|
+
SkMaskFilter,
|
7
|
+
SkPathEffect,
|
8
|
+
SkShader,
|
9
|
+
StrokeCap,
|
10
|
+
StrokeJoin,
|
11
|
+
} from "../../skia/types";
|
12
|
+
import type { SkColor } from "../../skia/types/Color";
|
13
|
+
|
14
|
+
export interface PaintContext {
|
15
|
+
color?: SkColor;
|
16
|
+
strokeWidth?: number;
|
17
|
+
blendMode?: BlendMode;
|
18
|
+
style?: PaintStyle;
|
19
|
+
strokeJoin?: StrokeJoin;
|
20
|
+
strokeCap?: StrokeCap;
|
21
|
+
strokeMiter?: number;
|
22
|
+
opacity?: number;
|
23
|
+
antiAlias?: boolean;
|
24
|
+
|
25
|
+
shader?: SkShader;
|
26
|
+
colorFilter?: SkColorFilter;
|
27
|
+
imageFilter?: SkImageFilter;
|
28
|
+
maskFilter?: SkMaskFilter;
|
29
|
+
pathEffect?: SkPathEffect;
|
30
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import type { SkPaint } from "../../skia/types";
|
2
|
+
import { StrokeCap, StrokeJoin, PaintStyle, BlendMode } from "../../skia/types";
|
3
|
+
import type { DeclarationNode, PaintProps } from "../types";
|
4
|
+
import { DeclarationType, NodeType } from "../types";
|
5
|
+
|
6
|
+
import { enumKey } from "./datatypes";
|
7
|
+
import type { NodeContext } from "./Node";
|
8
|
+
import { JsiDeclarationNode } from "./Node";
|
9
|
+
|
10
|
+
export class PaintNode
|
11
|
+
extends JsiDeclarationNode<PaintProps, SkPaint>
|
12
|
+
implements DeclarationNode<PaintProps, SkPaint>
|
13
|
+
{
|
14
|
+
constructor(ctx: NodeContext, props: PaintProps = {}) {
|
15
|
+
super(ctx, DeclarationType.Paint, NodeType.Paint, props);
|
16
|
+
}
|
17
|
+
|
18
|
+
materialize() {
|
19
|
+
const {
|
20
|
+
color,
|
21
|
+
strokeWidth,
|
22
|
+
blendMode,
|
23
|
+
style,
|
24
|
+
strokeJoin,
|
25
|
+
strokeCap,
|
26
|
+
strokeMiter,
|
27
|
+
opacity,
|
28
|
+
antiAlias,
|
29
|
+
} = this.props;
|
30
|
+
const paint = this.Skia.Paint();
|
31
|
+
if (color !== undefined) {
|
32
|
+
paint.setColor(this.Skia.Color(color));
|
33
|
+
}
|
34
|
+
if (strokeWidth !== undefined) {
|
35
|
+
paint.setStrokeWidth(strokeWidth);
|
36
|
+
}
|
37
|
+
if (blendMode !== undefined) {
|
38
|
+
paint.setBlendMode(BlendMode[enumKey(blendMode)]);
|
39
|
+
}
|
40
|
+
if (style !== undefined) {
|
41
|
+
paint.setStyle(PaintStyle[enumKey(style)]);
|
42
|
+
}
|
43
|
+
if (strokeJoin !== undefined) {
|
44
|
+
paint.setStrokeJoin(StrokeJoin[enumKey(strokeJoin)]);
|
45
|
+
}
|
46
|
+
if (strokeCap !== undefined) {
|
47
|
+
paint.setStrokeCap(StrokeCap[enumKey(strokeCap)]);
|
48
|
+
}
|
49
|
+
if (strokeMiter !== undefined) {
|
50
|
+
paint.setStrokeMiter(strokeMiter);
|
51
|
+
}
|
52
|
+
if (opacity !== undefined) {
|
53
|
+
paint.setAlphaf(opacity);
|
54
|
+
}
|
55
|
+
if (antiAlias !== undefined) {
|
56
|
+
paint.setAntiAlias(antiAlias);
|
57
|
+
}
|
58
|
+
this._children.forEach((child) => {
|
59
|
+
if (child instanceof JsiDeclarationNode) {
|
60
|
+
if (child.isShader()) {
|
61
|
+
paint.setShader(child.materialize());
|
62
|
+
} else if (child.isColorFilter()) {
|
63
|
+
paint.setColorFilter(child.materialize());
|
64
|
+
} else if (child.isImageFilter()) {
|
65
|
+
paint.setImageFilter(child.materialize());
|
66
|
+
} else if (child.isMaskFilter()) {
|
67
|
+
paint.setMaskFilter(child.materialize());
|
68
|
+
} else if (child.isPathEffect()) {
|
69
|
+
paint.setPathEffect(child.materialize());
|
70
|
+
} else {
|
71
|
+
throw new Error(`Unknown paint child ${child.type}`);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
});
|
75
|
+
return paint;
|
76
|
+
}
|
77
|
+
}
|