@shopify/react-native-skia 0.1.147 → 0.1.148
Sign up to get free protection for your applications and to get access to all the features.
- 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/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/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/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/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,269 @@
|
|
1
|
+
import type { ForwardedRef } from "react";
|
2
|
+
|
3
|
+
import { NodeType } from "../dom/types";
|
4
|
+
import type {
|
5
|
+
CircleProps,
|
6
|
+
DrawingNodeProps,
|
7
|
+
ImageProps,
|
8
|
+
PaintProps,
|
9
|
+
PathProps,
|
10
|
+
CustomDrawingNodeProps,
|
11
|
+
LineProps,
|
12
|
+
OvalProps,
|
13
|
+
DiffRectProps,
|
14
|
+
PointsProps,
|
15
|
+
RectProps,
|
16
|
+
RoundedRectProps,
|
17
|
+
TextProps,
|
18
|
+
VerticesProps,
|
19
|
+
BlurMaskFilterProps,
|
20
|
+
BlendImageFilterProps,
|
21
|
+
BlurImageFilterProps,
|
22
|
+
DisplacementMapImageFilterProps,
|
23
|
+
DropShadowImageFilterProps,
|
24
|
+
OffsetImageFilterProps,
|
25
|
+
RuntimeShaderImageFilterProps,
|
26
|
+
MatrixColorFilterProps,
|
27
|
+
ShaderProps,
|
28
|
+
ImageShaderProps,
|
29
|
+
LinearGradientProps,
|
30
|
+
GroupProps,
|
31
|
+
PatchProps,
|
32
|
+
BlendColorFilterProps,
|
33
|
+
DashPathEffectProps,
|
34
|
+
DiscretePathEffectProps,
|
35
|
+
CornerPathEffectProps,
|
36
|
+
Line2DPathEffectProps,
|
37
|
+
Path1DPathEffectProps,
|
38
|
+
Path2DPathEffectProps,
|
39
|
+
TextPathProps,
|
40
|
+
TextBlobProps,
|
41
|
+
GlyphsProps,
|
42
|
+
TwoPointConicalGradientProps,
|
43
|
+
TurbulenceProps,
|
44
|
+
SweepGradientProps,
|
45
|
+
RadialGradientProps,
|
46
|
+
ColorProps,
|
47
|
+
PictureProps,
|
48
|
+
ImageSVGProps,
|
49
|
+
LerpColorFilterProps,
|
50
|
+
BoxProps,
|
51
|
+
BoxShadowProps,
|
52
|
+
} from "../dom/types";
|
53
|
+
import type { ChildrenProps } from "../dom/types/Common";
|
54
|
+
import type {
|
55
|
+
BlendProps,
|
56
|
+
MorphologyImageFilterProps,
|
57
|
+
} from "../dom/types/ImageFilters";
|
58
|
+
import type { PaintNode } from "../dom/nodes/PaintNode";
|
59
|
+
|
60
|
+
import type { Container } from "./Container";
|
61
|
+
import { exhaustiveCheck } from "./typeddash";
|
62
|
+
import type { SkiaProps } from "./processors";
|
63
|
+
|
64
|
+
declare global {
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
66
|
+
namespace JSX {
|
67
|
+
interface IntrinsicElements {
|
68
|
+
skGroup: SkiaProps<GroupProps>;
|
69
|
+
skPaint: SkiaProps<PaintProps> & { ref: ForwardedRef<PaintNode> };
|
70
|
+
|
71
|
+
// Drawings
|
72
|
+
skFill: SkiaProps<DrawingNodeProps>;
|
73
|
+
skImage: SkiaProps<ImageProps>;
|
74
|
+
skCircle: SkiaProps<CircleProps>;
|
75
|
+
skPath: SkiaProps<PathProps>;
|
76
|
+
skDrawing: SkiaProps<CustomDrawingNodeProps>;
|
77
|
+
skLine: SkiaProps<LineProps>;
|
78
|
+
skOval: SkiaProps<OvalProps>;
|
79
|
+
skPatch: SkiaProps<PatchProps>;
|
80
|
+
skPoints: SkiaProps<PointsProps>;
|
81
|
+
skRect: SkiaProps<RectProps>;
|
82
|
+
skRRect: SkiaProps<RoundedRectProps>;
|
83
|
+
skVertices: SkiaProps<VerticesProps>;
|
84
|
+
skText: SkiaProps<TextProps>;
|
85
|
+
skTextPath: SkiaProps<TextPathProps>;
|
86
|
+
skTextBlob: SkiaProps<TextBlobProps>;
|
87
|
+
skGlyphs: SkiaProps<GlyphsProps>;
|
88
|
+
skDiffRect: SkiaProps<DiffRectProps>;
|
89
|
+
skPicture: SkiaProps<PictureProps>;
|
90
|
+
skImageSVG: SkiaProps<ImageSVGProps>;
|
91
|
+
|
92
|
+
// BlurMaskFilters
|
93
|
+
skBlurMaskFilter: SkiaProps<BlurMaskFilterProps>;
|
94
|
+
|
95
|
+
// ImageFilters
|
96
|
+
skBlendImageFilter: SkiaProps<BlendImageFilterProps>;
|
97
|
+
skBlurImageFilter: SkiaProps<BlurImageFilterProps>;
|
98
|
+
skOffsetImageFilter: SkiaProps<OffsetImageFilterProps>;
|
99
|
+
skDropShadowImageFilter: SkiaProps<DropShadowImageFilterProps>;
|
100
|
+
skDisplacementMapImageFilter: SkiaProps<DisplacementMapImageFilterProps>;
|
101
|
+
skRuntimeShaderImageFilter: SkiaProps<RuntimeShaderImageFilterProps>;
|
102
|
+
skMorphologyImageFilter: SkiaProps<MorphologyImageFilterProps>;
|
103
|
+
|
104
|
+
// ColorFilters
|
105
|
+
skMatrixColorFilter: SkiaProps<MatrixColorFilterProps>;
|
106
|
+
skBlendColorFilter: SkiaProps<BlendColorFilterProps>;
|
107
|
+
skLinearToSRGBGammaColorFilter: SkiaProps<ChildrenProps>;
|
108
|
+
skSRGBToLinearGammaColorFilter: SkiaProps<ChildrenProps>;
|
109
|
+
skLumaColorFilter: SkiaProps<ChildrenProps>;
|
110
|
+
skLerpColorFilter: SkiaProps<LerpColorFilterProps>;
|
111
|
+
|
112
|
+
// Shaders
|
113
|
+
skShader: SkiaProps<ShaderProps>;
|
114
|
+
skImageShader: SkiaProps<ImageShaderProps>;
|
115
|
+
skColorShader: SkiaProps<ColorProps>;
|
116
|
+
skTurbulence: SkiaProps<TurbulenceProps>;
|
117
|
+
skFractalNoise: SkiaProps<TurbulenceProps>;
|
118
|
+
skLinearGradient: SkiaProps<LinearGradientProps>;
|
119
|
+
skRadialGradient: SkiaProps<RadialGradientProps>;
|
120
|
+
skSweepGradient: SkiaProps<SweepGradientProps>;
|
121
|
+
skTwoPointConicalGradient: SkiaProps<TwoPointConicalGradientProps>;
|
122
|
+
|
123
|
+
// Path Effects
|
124
|
+
skDiscretePathEffect: SkiaProps<DiscretePathEffectProps>;
|
125
|
+
skDashPathEffect: SkiaProps<DashPathEffectProps>;
|
126
|
+
skPath1DPathEffect: SkiaProps<Path1DPathEffectProps>;
|
127
|
+
skPath2DPathEffect: SkiaProps<Path2DPathEffectProps>;
|
128
|
+
skCornerPathEffect: SkiaProps<CornerPathEffectProps>;
|
129
|
+
skSumPathEffect: ChildrenProps;
|
130
|
+
skLine2DPathEffect: SkiaProps<Line2DPathEffectProps>;
|
131
|
+
|
132
|
+
// Mixed declarations/drawings
|
133
|
+
skBlend: SkiaProps<BlendProps>;
|
134
|
+
skBackdropFilter: SkiaProps<ChildrenProps>;
|
135
|
+
skBox: SkiaProps<BoxProps>;
|
136
|
+
skBoxShadow: SkiaProps<BoxShadowProps>;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
export const createNode = (
|
142
|
+
container: Container,
|
143
|
+
type: NodeType,
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
145
|
+
props: any
|
146
|
+
) => {
|
147
|
+
const { Sk } = container;
|
148
|
+
switch (type) {
|
149
|
+
case NodeType.Group:
|
150
|
+
return Sk.Group(props);
|
151
|
+
case NodeType.Paint:
|
152
|
+
return Sk.Paint(props);
|
153
|
+
// Drawings
|
154
|
+
case NodeType.Fill:
|
155
|
+
return Sk.Fill(props);
|
156
|
+
case NodeType.Image:
|
157
|
+
return Sk.Image(props);
|
158
|
+
case NodeType.Circle:
|
159
|
+
return Sk.Circle(props);
|
160
|
+
case NodeType.Path:
|
161
|
+
return Sk.Path(props);
|
162
|
+
case NodeType.Drawing:
|
163
|
+
return Sk.CustomDrawing(props);
|
164
|
+
case NodeType.Line:
|
165
|
+
return Sk.Line(props);
|
166
|
+
case NodeType.Oval:
|
167
|
+
return Sk.Oval(props);
|
168
|
+
case NodeType.Patch:
|
169
|
+
return Sk.Patch(props);
|
170
|
+
case NodeType.Points:
|
171
|
+
return Sk.Points(props);
|
172
|
+
case NodeType.Rect:
|
173
|
+
return Sk.Rect(props);
|
174
|
+
case NodeType.RRect:
|
175
|
+
return Sk.RRect(props);
|
176
|
+
case NodeType.Vertices:
|
177
|
+
return Sk.Vertices(props);
|
178
|
+
case NodeType.Text:
|
179
|
+
return Sk.Text(props);
|
180
|
+
case NodeType.TextPath:
|
181
|
+
return Sk.TextPath(props);
|
182
|
+
case NodeType.TextBlob:
|
183
|
+
return Sk.TextBlob(props);
|
184
|
+
case NodeType.Glyphs:
|
185
|
+
return Sk.Glyphs(props);
|
186
|
+
case NodeType.DiffRect:
|
187
|
+
return Sk.DiffRect(props);
|
188
|
+
case NodeType.Picture:
|
189
|
+
return Sk.Picture(props);
|
190
|
+
case NodeType.ImageSVG:
|
191
|
+
return Sk.ImageSVG(props);
|
192
|
+
// Mask Filter
|
193
|
+
case NodeType.BlurMaskFilter:
|
194
|
+
return Sk.BlurMaskFilter(props);
|
195
|
+
// Image Filter
|
196
|
+
case NodeType.BlendImageFilter:
|
197
|
+
return Sk.BlendImageFilter(props);
|
198
|
+
case NodeType.BlurImageFilter:
|
199
|
+
return Sk.BlurImageFilter(props);
|
200
|
+
case NodeType.OffsetImageFilter:
|
201
|
+
return Sk.OffsetImageFilter(props);
|
202
|
+
case NodeType.DropShadowImageFilter:
|
203
|
+
return Sk.DropShadowImageFilter(props);
|
204
|
+
case NodeType.DisplacementMapImageFilter:
|
205
|
+
return Sk.DisplacementMapImageFilter(props);
|
206
|
+
case NodeType.MorphologyImageFilter:
|
207
|
+
return Sk.MorphologyImageFilter(props);
|
208
|
+
case NodeType.RuntimeShaderImageFilter:
|
209
|
+
return Sk.RuntimeShaderImageFilter(props);
|
210
|
+
// Color Filter
|
211
|
+
case NodeType.MatrixColorFilter:
|
212
|
+
return Sk.MatrixColorFilter(props);
|
213
|
+
case NodeType.BlendColorFilter:
|
214
|
+
return Sk.BlendColorFilter(props);
|
215
|
+
case NodeType.LerpColorFilter:
|
216
|
+
return Sk.LerpColorFilter(props);
|
217
|
+
case NodeType.LumaColorFilter:
|
218
|
+
return Sk.LumaColorFilter();
|
219
|
+
case NodeType.LinearToSRGBGammaColorFilter:
|
220
|
+
return Sk.LinearToSRGBGammaColorFilter();
|
221
|
+
case NodeType.SRGBToLinearGammaColorFilter:
|
222
|
+
return Sk.SRGBToLinearGammaColorFilter();
|
223
|
+
// Shader
|
224
|
+
case NodeType.Shader:
|
225
|
+
return Sk.Shader(props);
|
226
|
+
case NodeType.ImageShader:
|
227
|
+
return Sk.ImageShader(props);
|
228
|
+
case NodeType.ColorShader:
|
229
|
+
return Sk.ColorShader(props);
|
230
|
+
case NodeType.Turbulence:
|
231
|
+
return Sk.Turbulence(props);
|
232
|
+
case NodeType.FractalNoise:
|
233
|
+
return Sk.FractalNoise(props);
|
234
|
+
case NodeType.LinearGradient:
|
235
|
+
return Sk.LinearGradient(props);
|
236
|
+
case NodeType.RadialGradient:
|
237
|
+
return Sk.RadialGradient(props);
|
238
|
+
case NodeType.SweepGradient:
|
239
|
+
return Sk.SweepGradient(props);
|
240
|
+
case NodeType.TwoPointConicalGradient:
|
241
|
+
return Sk.TwoPointConicalGradient(props);
|
242
|
+
// Path Effect
|
243
|
+
case NodeType.CornerPathEffect:
|
244
|
+
return Sk.CornerPathEffect(props);
|
245
|
+
case NodeType.DiscretePathEffect:
|
246
|
+
return Sk.DiscretePathEffect(props);
|
247
|
+
case NodeType.DashPathEffect:
|
248
|
+
return Sk.DashPathEffect(props);
|
249
|
+
case NodeType.Path1DPathEffect:
|
250
|
+
return Sk.Path1DPathEffect(props);
|
251
|
+
case NodeType.Path2DPathEffect:
|
252
|
+
return Sk.Path2DPathEffect(props);
|
253
|
+
case NodeType.SumPathEffect:
|
254
|
+
return Sk.SumPathEffect();
|
255
|
+
case NodeType.Line2DPathEffect:
|
256
|
+
return Sk.Line2DPathEffect(props);
|
257
|
+
// Mixed
|
258
|
+
case NodeType.Blend:
|
259
|
+
return Sk.Blend(props);
|
260
|
+
case NodeType.BackdropFilter:
|
261
|
+
return Sk.BackdropFilter(props);
|
262
|
+
case NodeType.Box:
|
263
|
+
return Sk.Box(props);
|
264
|
+
case NodeType.BoxShadow:
|
265
|
+
return Sk.BoxShadow(props);
|
266
|
+
default:
|
267
|
+
return exhaustiveCheck(type);
|
268
|
+
}
|
269
|
+
};
|
@@ -1,9 +1,15 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
1
2
|
/*global NodeJS*/
|
2
3
|
import type { HostConfig } from "react-reconciler";
|
3
4
|
|
4
|
-
import type {
|
5
|
-
import {
|
6
|
-
|
5
|
+
import type { NodeType, Node } from "../dom/types";
|
6
|
+
import type { SkiaValue } from "../values";
|
7
|
+
|
8
|
+
import type { Container } from "./Container";
|
9
|
+
import { createNode } from "./HostComponents";
|
10
|
+
import type { AnimatedProps } from "./processors";
|
11
|
+
import { isSelector, isValue } from "./processors";
|
12
|
+
import { mapKeys, shallowEq } from "./typeddash";
|
7
13
|
|
8
14
|
const DEBUG = false;
|
9
15
|
export const debug = (...args: Parameters<typeof console.log>) => {
|
@@ -12,27 +18,15 @@ export const debug = (...args: Parameters<typeof console.log>) => {
|
|
12
18
|
}
|
13
19
|
};
|
14
20
|
|
15
|
-
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
17
|
-
namespace JSX {
|
18
|
-
interface IntrinsicElements {
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
20
|
-
skDeclaration: DeclarationProps<any>;
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
22
|
-
skDrawing: DrawingProps<any>;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
21
|
+
type Instance = Node<unknown>;
|
26
22
|
|
27
|
-
type Instance = Node;
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
29
23
|
type Props = any;
|
30
|
-
type TextInstance = Node
|
24
|
+
type TextInstance = Node<unknown>;
|
31
25
|
type SuspenseInstance = Instance;
|
32
26
|
type HydratableInstance = Instance;
|
33
27
|
type PublicInstance = Instance;
|
34
28
|
type HostContext = null;
|
35
|
-
type UpdatePayload =
|
29
|
+
type UpdatePayload = Container;
|
36
30
|
type ChildSet = unknown;
|
37
31
|
type TimeoutHandle = NodeJS.Timeout;
|
38
32
|
type NoTimeout = -1;
|
@@ -53,84 +47,20 @@ type SkiaHostConfig = HostConfig<
|
|
53
47
|
NoTimeout
|
54
48
|
>;
|
55
49
|
|
56
|
-
const
|
57
|
-
|
58
|
-
return false;
|
59
|
-
}
|
60
|
-
for (const child of node.children) {
|
61
|
-
if (!child.memoized) {
|
62
|
-
return false;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
return true;
|
66
|
-
};
|
67
|
-
|
68
|
-
const bustBranchMemoization = (parent: Node) => {
|
69
|
-
if (parent.memoizable) {
|
70
|
-
let ancestor: Node | undefined = parent;
|
71
|
-
while (ancestor) {
|
72
|
-
ancestor.memoized = null;
|
73
|
-
ancestor = ancestor.parent;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
};
|
77
|
-
|
78
|
-
const bustBranchMemoizable = (parent: Node) => {
|
79
|
-
if (parent.memoizable) {
|
80
|
-
let ancestor: Node | undefined = parent;
|
81
|
-
while (ancestor) {
|
82
|
-
ancestor.memoizable = false;
|
83
|
-
ancestor = ancestor.parent;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
};
|
87
|
-
|
88
|
-
const appendNode = (parent: Node, child: Node) => {
|
89
|
-
child.parent = parent;
|
90
|
-
bustBranchMemoization(parent);
|
91
|
-
if (!child.memoizable) {
|
92
|
-
bustBranchMemoizable(parent);
|
93
|
-
}
|
94
|
-
if (!parent.memoizable) {
|
95
|
-
child.memoizable = false;
|
96
|
-
}
|
97
|
-
parent.children.push(child);
|
98
|
-
};
|
99
|
-
|
100
|
-
const removeNode = (parent: Node, child: Node) => {
|
101
|
-
bustBranchMemoization(parent);
|
102
|
-
const index = parent.children.indexOf(child);
|
103
|
-
parent.children.splice(index, 1);
|
104
|
-
child.depMgr.unsubscribeNode(child);
|
105
|
-
// unsubscribe to all children as well
|
106
|
-
for (const c of child.children) {
|
107
|
-
removeNode(child, c);
|
108
|
-
}
|
50
|
+
const appendNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
51
|
+
parent.addChild(child);
|
109
52
|
};
|
110
53
|
|
111
|
-
const
|
112
|
-
|
113
|
-
const index = parent.children.indexOf(child);
|
114
|
-
if (index !== -1) {
|
115
|
-
parent.children.splice(index, 1);
|
116
|
-
}
|
117
|
-
const beforeIndex = parent.children.indexOf(before);
|
118
|
-
parent.children.splice(beforeIndex, 0, child);
|
54
|
+
const removeNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
55
|
+
return parent.removeChild(child);
|
119
56
|
};
|
120
57
|
|
121
|
-
const
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
const { onDeclare, ...p2 } = props;
|
128
|
-
return new DeclarationNode(container.depMgr, onDeclare, p2);
|
129
|
-
default:
|
130
|
-
// TODO: here we need to throw a nice error message
|
131
|
-
// This is the error that will show up when the user uses nodes not supported by Skia (View, Audio, etc)
|
132
|
-
return exhaustiveCheck(type);
|
133
|
-
}
|
58
|
+
const insertBefore = (
|
59
|
+
parent: Node<unknown>,
|
60
|
+
child: Node<unknown>,
|
61
|
+
before: Node<unknown>
|
62
|
+
) => {
|
63
|
+
parent.insertChildBefore(child, before);
|
134
64
|
};
|
135
65
|
|
136
66
|
export const skHostConfig: SkiaHostConfig = {
|
@@ -151,7 +81,7 @@ export const skHostConfig: SkiaHostConfig = {
|
|
151
81
|
|
152
82
|
appendChildToContainer(container, child) {
|
153
83
|
debug("appendChildToContainer", container, child);
|
154
|
-
appendNode(container, child);
|
84
|
+
appendNode(container.root, child);
|
155
85
|
},
|
156
86
|
|
157
87
|
appendChild(parent, child) {
|
@@ -159,7 +89,7 @@ export const skHostConfig: SkiaHostConfig = {
|
|
159
89
|
appendNode(parent, child);
|
160
90
|
},
|
161
91
|
|
162
|
-
getRootHostContext: (_rootContainerInstance:
|
92
|
+
getRootHostContext: (_rootContainerInstance: Container) => {
|
163
93
|
debug("getRootHostContext");
|
164
94
|
return null;
|
165
95
|
},
|
@@ -186,13 +116,16 @@ export const skHostConfig: SkiaHostConfig = {
|
|
186
116
|
|
187
117
|
createInstance(
|
188
118
|
type,
|
189
|
-
|
119
|
+
pristineProps,
|
190
120
|
container,
|
191
121
|
_hostContext,
|
192
122
|
_internalInstanceHandle
|
193
123
|
) {
|
194
124
|
debug("createInstance", type);
|
195
|
-
|
125
|
+
const props = { ...pristineProps };
|
126
|
+
const node = createNode(container, type, materialize(props));
|
127
|
+
container.depMgr.subscribeNode(node, props);
|
128
|
+
return node;
|
196
129
|
},
|
197
130
|
|
198
131
|
appendInitialChild(parentInstance, child) {
|
@@ -221,10 +154,6 @@ export const skHostConfig: SkiaHostConfig = {
|
|
221
154
|
return null;
|
222
155
|
},
|
223
156
|
|
224
|
-
finalizeContainerChildren: () => {
|
225
|
-
debug("finalizeContainerChildren");
|
226
|
-
},
|
227
|
-
|
228
157
|
resetAfterCommit(container) {
|
229
158
|
debug("resetAfterCommit");
|
230
159
|
container.redraw();
|
@@ -236,46 +165,38 @@ export const skHostConfig: SkiaHostConfig = {
|
|
236
165
|
},
|
237
166
|
|
238
167
|
prepareUpdate: (
|
239
|
-
|
168
|
+
_instance,
|
240
169
|
type,
|
241
170
|
oldProps,
|
242
171
|
newProps,
|
243
|
-
|
172
|
+
rootContainerInstance,
|
244
173
|
_hostContext
|
245
174
|
) => {
|
246
175
|
debug("prepareUpdate");
|
247
176
|
const propsAreEqual = shallowEq(oldProps, newProps);
|
248
|
-
if (propsAreEqual
|
177
|
+
if (propsAreEqual) {
|
249
178
|
return null;
|
250
179
|
}
|
251
180
|
debug("update ", type);
|
252
|
-
return
|
181
|
+
return rootContainerInstance;
|
253
182
|
},
|
254
183
|
|
255
184
|
commitUpdate(
|
256
185
|
instance,
|
257
|
-
|
186
|
+
updatePayload,
|
258
187
|
type,
|
259
188
|
prevProps,
|
260
189
|
nextProps,
|
261
190
|
_internalHandle
|
262
191
|
) {
|
263
192
|
debug("commitUpdate: ", type);
|
264
|
-
if (shallowEq(prevProps, nextProps)
|
193
|
+
if (shallowEq(prevProps, nextProps)) {
|
265
194
|
return;
|
266
195
|
}
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
} else if (instance instanceof DeclarationNode) {
|
272
|
-
const { onDeclare, ...props } = nextProps;
|
273
|
-
instance.props = props;
|
274
|
-
} else {
|
275
|
-
throw new Error(
|
276
|
-
"Unsupported instance commitUpdate " + instance.constructor.name
|
277
|
-
);
|
278
|
-
}
|
196
|
+
const props = { ...nextProps };
|
197
|
+
updatePayload.depMgr.unsubscribeNode(instance);
|
198
|
+
instance.setProps(materialize(props));
|
199
|
+
updatePayload.depMgr.subscribeNode(instance, props);
|
279
200
|
},
|
280
201
|
|
281
202
|
commitTextUpdate: (
|
@@ -288,7 +209,9 @@ export const skHostConfig: SkiaHostConfig = {
|
|
288
209
|
|
289
210
|
clearContainer: (container) => {
|
290
211
|
debug("clearContainer");
|
291
|
-
container.children.
|
212
|
+
container.root.children().forEach((child) => {
|
213
|
+
container.root.removeChild(child);
|
214
|
+
});
|
292
215
|
},
|
293
216
|
|
294
217
|
preparePortalMount: () => {
|
@@ -299,15 +222,29 @@ export const skHostConfig: SkiaHostConfig = {
|
|
299
222
|
removeNode(parent, child);
|
300
223
|
},
|
301
224
|
|
302
|
-
removeChildFromContainer: (
|
303
|
-
removeNode(
|
225
|
+
removeChildFromContainer: (container, child) => {
|
226
|
+
removeNode(container.root, child);
|
304
227
|
},
|
305
228
|
|
306
|
-
insertInContainerBefore: (
|
307
|
-
insertBefore(
|
229
|
+
insertInContainerBefore: (container, child, before) => {
|
230
|
+
insertBefore(container.root, child, before);
|
308
231
|
},
|
309
232
|
|
310
233
|
insertBefore: (parent, child, before) => {
|
311
234
|
insertBefore(parent, child, before);
|
312
235
|
},
|
313
236
|
};
|
237
|
+
|
238
|
+
const materialize = <P>(props: AnimatedProps<P>) => {
|
239
|
+
const result = { ...props };
|
240
|
+
mapKeys(props).forEach((key) => {
|
241
|
+
const prop = props[key];
|
242
|
+
if (isValue(prop)) {
|
243
|
+
result[key] = (prop as SkiaValue<P[typeof key]>).current;
|
244
|
+
} else if (isSelector(prop)) {
|
245
|
+
result[key] = prop.selector(prop.value.current) as P[typeof key];
|
246
|
+
}
|
247
|
+
});
|
248
|
+
|
249
|
+
return result as any;
|
250
|
+
};
|
@@ -1,49 +1,8 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
2
1
|
import React from "react";
|
3
2
|
|
4
|
-
import type {
|
5
|
-
import {
|
6
|
-
import { createDeclaration } from "../nodes";
|
7
|
-
import type { AnimatedProps, SkEnum } from "../processors";
|
8
|
-
import { enumKey } from "../processors/Paint";
|
9
|
-
import type { DeclarationResult } from "../nodes/Declaration";
|
3
|
+
import type { BlendProps } from "../../dom/types";
|
4
|
+
import type { SkiaProps } from "../processors";
|
10
5
|
|
11
|
-
const
|
12
|
-
|
13
|
-
): children is SkImageFilter[] =>
|
14
|
-
children.every((child) => isImageFilter(child));
|
15
|
-
|
16
|
-
const childrenAreShaders = (
|
17
|
-
children: DeclarationResult[]
|
18
|
-
): children is SkShader[] => children.every((child) => isShader(child));
|
19
|
-
|
20
|
-
interface BlendProps {
|
21
|
-
mode: SkEnum<typeof BlendMode>;
|
22
|
-
children?: ReactNode | ReactNode[];
|
23
|
-
}
|
24
|
-
|
25
|
-
const onDeclare = createDeclaration<BlendProps>(
|
26
|
-
({ mode }, children, { Skia }) => {
|
27
|
-
const blend = BlendMode[enumKey(mode)];
|
28
|
-
if (childrenAreImageFilters(children)) {
|
29
|
-
return children.reverse().reduce<SkImageFilter | null>((inner, outer) => {
|
30
|
-
if (inner === null) {
|
31
|
-
return outer;
|
32
|
-
}
|
33
|
-
return Skia.ImageFilter.MakeBlend(blend, outer, inner);
|
34
|
-
}, null);
|
35
|
-
} else if (childrenAreShaders(children)) {
|
36
|
-
return children.reverse().reduce<SkShader | null>((inner, outer) => {
|
37
|
-
if (inner === null) {
|
38
|
-
return outer;
|
39
|
-
}
|
40
|
-
return Skia.Shader.MakeBlend(blend, outer, inner);
|
41
|
-
}, null);
|
42
|
-
}
|
43
|
-
throw new Error("<Blend /> can only blend Shaders or ImageFilters");
|
44
|
-
}
|
45
|
-
);
|
46
|
-
|
47
|
-
export const Blend = (props: AnimatedProps<BlendProps>) => {
|
48
|
-
return <skDeclaration onDeclare={onDeclare} {...props} />;
|
6
|
+
export const Blend = (props: SkiaProps<BlendProps>) => {
|
7
|
+
return <skBlend {...props} />;
|
49
8
|
};
|
@@ -1,16 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
|
3
|
-
import type {
|
4
|
-
import { createDrawing } from "../nodes/Drawing";
|
3
|
+
import type { CustomDrawingNodeProps } from "../../dom/types";
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
const onDraw = createDrawing<DrawingProps>((ctx, { drawing }) => {
|
11
|
-
drawing(ctx);
|
12
|
-
});
|
13
|
-
|
14
|
-
export const Drawing = (props: DrawingProps) => {
|
15
|
-
return <skDrawing onDraw={onDraw} skipProcessing {...props} />;
|
5
|
+
export const Drawing = (props: CustomDrawingNodeProps) => {
|
6
|
+
return <skDrawing {...props} />;
|
16
7
|
};
|