@shopify/react-native-skia 0.1.147 → 0.1.149
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkFont.h +4 -4
- package/cpp/rnskia/RNSkJsiViewApi.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/core/Data.js +10 -1
- package/lib/commonjs/skia/core/Data.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/core/Data.js +11 -2
- package/lib/module/skia/core/Data.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/skia/core/Data.ts +11 -2
- 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
package/cpp/api/JsiSkFont.h
CHANGED
@@ -71,7 +71,7 @@ namespace RNSkia
|
|
71
71
|
|
72
72
|
JSI_HOST_FUNCTION(getTextWidth) {
|
73
73
|
auto str = arguments[0].asString(runtime).utf8(runtime);
|
74
|
-
auto numGlyphIDs = str.length();
|
74
|
+
auto numGlyphIDs = getObject()->countText(str.c_str(), str.length(), SkTextEncoding::kUTF8);
|
75
75
|
std::vector<SkGlyphID> glyphs;
|
76
76
|
glyphs.resize(numGlyphIDs);
|
77
77
|
int glyphsSize = static_cast<int>(numGlyphIDs);
|
@@ -111,9 +111,9 @@ namespace RNSkia
|
|
111
111
|
JSI_HOST_FUNCTION(getGlyphIDs)
|
112
112
|
{
|
113
113
|
auto str = arguments[0].asString(runtime).utf8(runtime);
|
114
|
-
|
115
|
-
? arguments[1].asNumber()
|
116
|
-
: str.length();
|
114
|
+
int numGlyphIDs = count > 1 && !arguments[1].isNull() && !arguments[1].isUndefined()
|
115
|
+
? static_cast<int>(arguments[1].asNumber())
|
116
|
+
: getObject()->countText(str.c_str(), str.length(), SkTextEncoding::kUTF8);
|
117
117
|
std::vector<SkGlyphID> glyphIDs;
|
118
118
|
glyphIDs.resize(numGlyphIDs);
|
119
119
|
getObject()->textToGlyphs(str.c_str(), str.length(), SkTextEncoding::kUTF8,
|
@@ -114,9 +114,9 @@ public:
|
|
114
114
|
}
|
115
115
|
|
116
116
|
JSI_HOST_FUNCTION(requestRedraw) {
|
117
|
-
if (count
|
117
|
+
if (count != 1) {
|
118
118
|
_platformContext->raiseError(
|
119
|
-
std::string("requestRedraw: Expected
|
119
|
+
std::string("requestRedraw: Expected 1 arguments, got " + std::to_string(count) + "."));
|
120
120
|
|
121
121
|
return jsi::Value::undefined();
|
122
122
|
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.JsiDrawingNode = void 0;
|
7
|
+
|
8
|
+
var _Node = require("./Node");
|
9
|
+
|
10
|
+
var _PaintNode = require("./PaintNode");
|
11
|
+
|
12
|
+
var _RenderNode = require("./RenderNode");
|
13
|
+
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15
|
+
|
16
|
+
class JsiDrawingNode extends _RenderNode.JsiRenderNode {
|
17
|
+
constructor(ctx, type, props) {
|
18
|
+
super(ctx, type, props);
|
19
|
+
|
20
|
+
_defineProperty(this, "derived", void 0);
|
21
|
+
|
22
|
+
this.derived = this.deriveProps();
|
23
|
+
}
|
24
|
+
|
25
|
+
setProps(props) {
|
26
|
+
super.setProps(props);
|
27
|
+
this.derived = this.deriveProps();
|
28
|
+
}
|
29
|
+
|
30
|
+
setProp(name, value) {
|
31
|
+
const hasChanged = super.setProp(name, value);
|
32
|
+
|
33
|
+
if (hasChanged) {
|
34
|
+
this.derived = this.deriveProps();
|
35
|
+
}
|
36
|
+
|
37
|
+
return hasChanged;
|
38
|
+
}
|
39
|
+
|
40
|
+
addChild(child) {
|
41
|
+
if (!(child instanceof _Node.JsiDeclarationNode)) {
|
42
|
+
throw new Error(`Cannot add ${child.type} to ${this.type}`);
|
43
|
+
}
|
44
|
+
|
45
|
+
super.addChild(child);
|
46
|
+
this.derived = this.deriveProps();
|
47
|
+
}
|
48
|
+
|
49
|
+
insertChildBefore(child, before) {
|
50
|
+
if (!(child instanceof _Node.JsiDeclarationNode)) {
|
51
|
+
throw new Error(`Cannot add ${child.type} to ${this.type}`);
|
52
|
+
}
|
53
|
+
|
54
|
+
super.insertChildBefore(child, before);
|
55
|
+
this.derived = this.deriveProps();
|
56
|
+
}
|
57
|
+
|
58
|
+
renderNode(ctx) {
|
59
|
+
if (this.props.paint && (0, _RenderNode.isSkPaint)(this.props.paint)) {
|
60
|
+
this.draw({ ...ctx,
|
61
|
+
paint: this.props.paint
|
62
|
+
});
|
63
|
+
} else if (this.props.paint && this.props.paint.current != null) {
|
64
|
+
this.draw({ ...ctx,
|
65
|
+
paint: this.props.paint.current.materialize()
|
66
|
+
});
|
67
|
+
} else {
|
68
|
+
this.draw(ctx);
|
69
|
+
}
|
70
|
+
|
71
|
+
this.children().map(child => {
|
72
|
+
if (child instanceof _PaintNode.PaintNode) {
|
73
|
+
const paint = child.materialize();
|
74
|
+
this.draw({ ...ctx,
|
75
|
+
paint
|
76
|
+
});
|
77
|
+
}
|
78
|
+
});
|
79
|
+
}
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
exports.JsiDrawingNode = JsiDrawingNode;
|
84
|
+
//# sourceMappingURL=DrawingNode.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["DrawingNode.ts"],"names":["JsiDrawingNode","JsiRenderNode","constructor","ctx","type","props","derived","deriveProps","setProps","setProp","name","value","hasChanged","addChild","child","JsiDeclarationNode","Error","insertChildBefore","before","renderNode","paint","draw","current","materialize","children","map","PaintNode"],"mappings":";;;;;;;AASA;;AACA;;AACA;;;;AAEO,MAAeA,cAAf,SACGC,yBADH,CAGP;AAGEC,EAAAA,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;AACtD,UAAMF,GAAN,EAAWC,IAAX,EAAiBC,KAAjB;;AADsD;;AAEtD,SAAKC,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MAEO,IAAI,KAAKf,KAAL,CAAWe,KAAX,IAAoB,KAAKf,KAAL,CAAWe,KAAX,CAAiBE,OAAjB,IAA4B,IAApD,EAA0D;AAC/D,WAAKD,IAAL,CAAU,EAAE,GAAGlB,GAAL;AAAUiB,QAAAA,KAAK,EAAE,KAAKf,KAAL,CAAWe,KAAX,CAAiBE,OAAjB,CAAyBC,WAAzB;AAAjB,OAAV;AACD,KAFM,MAEA;AACL,WAAKF,IAAL,CAAUlB,GAAV;AACD;;AACD,SAAKqB,QAAL,GAAgBC,GAAhB,CAAqBX,KAAD,IAAW;AAC7B,UAAIA,KAAK,YAAYY,oBAArB,EAAgC;AAC9B,cAAMN,KAAK,GAAGN,KAAK,CAACS,WAAN,EAAd;AACA,aAAKF,IAAL,CAAU,EAAE,GAAGlB,GAAL;AAAUiB,UAAAA;AAAV,SAAV;AACD;AACF,KALD;AAMD;;AAnDH","sourcesContent":["import type {\n DrawingContext,\n DrawingNodeProps,\n Node,\n NodeType,\n RenderNode,\n} from \"../types\";\n\nimport type { NodeContext } from \"./Node\";\nimport { JsiDeclarationNode } from \"./Node\";\nimport { PaintNode } from \"./PaintNode\";\nimport { isSkPaint, JsiRenderNode } from \"./RenderNode\";\n\nexport abstract class JsiDrawingNode<P extends DrawingNodeProps, C>\n extends JsiRenderNode<P>\n implements RenderNode<P>\n{\n protected derived?: C;\n\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, type, props);\n this.derived = this.deriveProps();\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.derived = this.deriveProps();\n }\n\n setProp<K extends keyof P>(name: K, value: P[K]) {\n const hasChanged = super.setProp(name, value);\n if (hasChanged) {\n this.derived = this.deriveProps();\n }\n return hasChanged;\n }\n\n addChild(child: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n this.derived = this.deriveProps();\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n this.derived = this.deriveProps();\n }\n\n renderNode(ctx: DrawingContext): void {\n if (this.props.paint && isSkPaint(this.props.paint)) {\n this.draw({ ...ctx, paint: this.props.paint });\n } else if (this.props.paint && this.props.paint.current != null) {\n this.draw({ ...ctx, paint: this.props.paint.current.materialize() });\n } else {\n this.draw(ctx);\n }\n this.children().map((child) => {\n if (child instanceof PaintNode) {\n const paint = child.materialize();\n this.draw({ ...ctx, paint });\n }\n });\n }\n\n protected abstract draw(ctx: DrawingContext): void;\n protected abstract deriveProps(): C;\n}\n"]}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.GroupNode = void 0;
|
7
|
+
|
8
|
+
var _types = require("../types");
|
9
|
+
|
10
|
+
var _RenderNode = require("./RenderNode");
|
11
|
+
|
12
|
+
class GroupNode extends _RenderNode.JsiRenderNode {
|
13
|
+
constructor(ctx, props) {
|
14
|
+
super(ctx, _types.NodeType.Group, props);
|
15
|
+
}
|
16
|
+
|
17
|
+
renderNode(ctx) {
|
18
|
+
this.children().map(child => {
|
19
|
+
if (child instanceof _RenderNode.JsiRenderNode) {
|
20
|
+
child.render(ctx);
|
21
|
+
}
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
exports.GroupNode = GroupNode;
|
28
|
+
//# sourceMappingURL=GroupNode.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["GroupNode.ts"],"names":["GroupNode","JsiRenderNode","constructor","ctx","props","NodeType","Group","renderNode","children","map","child","render"],"mappings":";;;;;;;AACA;;AAGA;;AAGO,MAAMA,SAAN,SACGC,yBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;AAC/C,UAAMD,GAAN,EAAWE,gBAASC,KAApB,EAA2BF,KAA3B;AACD;;AAEDG,EAAAA,UAAU,CAACJ,GAAD,EAA4B;AACpC,SAAKK,QAAL,GAAgBC,GAAhB,CAAqBC,KAAD,IAAW;AAC7B,UAAIA,KAAK,YAAYT,yBAArB,EAAoC;AAClCS,QAAAA,KAAK,CAACC,MAAN,CAAaR,GAAb;AACD;AACF,KAJD;AAKD;;AAXH","sourcesContent":["import type { DrawingContext, GroupProps } from \"../types\";\nimport { NodeType } from \"../types\";\nimport type { RenderNode } from \"../types/Node\";\n\nimport { JsiRenderNode } from \"./RenderNode\";\nimport type { NodeContext } from \"./Node\";\n\nexport class GroupNode\n extends JsiRenderNode<GroupProps>\n implements RenderNode<GroupProps>\n{\n constructor(ctx: NodeContext, props: GroupProps) {\n super(ctx, NodeType.Group, props);\n }\n\n renderNode(ctx: DrawingContext): void {\n this.children().map((child) => {\n if (child instanceof JsiRenderNode) {\n child.render(ctx);\n }\n });\n }\n}\n"]}
|
@@ -0,0 +1,256 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.JsiSkDOM = void 0;
|
7
|
+
|
8
|
+
var _drawings = require("./drawings");
|
9
|
+
|
10
|
+
var _paint = require("./paint");
|
11
|
+
|
12
|
+
var _ColorFilters = require("./paint/ColorFilters");
|
13
|
+
|
14
|
+
var _Shaders = require("./paint/Shaders");
|
15
|
+
|
16
|
+
var _ImageFilters = require("./paint/ImageFilters");
|
17
|
+
|
18
|
+
var _GroupNode = require("./GroupNode");
|
19
|
+
|
20
|
+
var _PaintNode = require("./PaintNode");
|
21
|
+
|
22
|
+
class JsiSkDOM {
|
23
|
+
constructor(ctx) {
|
24
|
+
this.ctx = ctx;
|
25
|
+
}
|
26
|
+
|
27
|
+
Group(props) {
|
28
|
+
return new _GroupNode.GroupNode(this.ctx, props !== null && props !== void 0 ? props : {});
|
29
|
+
}
|
30
|
+
|
31
|
+
Paint(props) {
|
32
|
+
return new _PaintNode.PaintNode(this.ctx, props);
|
33
|
+
} // Drawings
|
34
|
+
|
35
|
+
|
36
|
+
Fill(props) {
|
37
|
+
return new _drawings.FillNode(this.ctx, props);
|
38
|
+
}
|
39
|
+
|
40
|
+
Image(props) {
|
41
|
+
return new _drawings.ImageNode(this.ctx, props);
|
42
|
+
}
|
43
|
+
|
44
|
+
Circle(props) {
|
45
|
+
return new _drawings.CircleNode(this.ctx, props);
|
46
|
+
}
|
47
|
+
|
48
|
+
Path(props) {
|
49
|
+
return new _drawings.PathNode(this.ctx, props);
|
50
|
+
}
|
51
|
+
|
52
|
+
CustomDrawing(props) {
|
53
|
+
return new _drawings.CustomDrawingNode(this.ctx, props);
|
54
|
+
}
|
55
|
+
|
56
|
+
Line(props) {
|
57
|
+
return new _drawings.LineNode(this.ctx, props);
|
58
|
+
}
|
59
|
+
|
60
|
+
Oval(props) {
|
61
|
+
return new _drawings.OvalNode(this.ctx, props);
|
62
|
+
}
|
63
|
+
|
64
|
+
Patch(props) {
|
65
|
+
return new _drawings.PatchNode(this.ctx, props);
|
66
|
+
}
|
67
|
+
|
68
|
+
Points(props) {
|
69
|
+
return new _drawings.PointsNode(this.ctx, props);
|
70
|
+
}
|
71
|
+
|
72
|
+
Rect(props) {
|
73
|
+
return new _drawings.RectNode(this.ctx, props);
|
74
|
+
}
|
75
|
+
|
76
|
+
RRect(props) {
|
77
|
+
return new _drawings.RRectNode(this.ctx, props);
|
78
|
+
}
|
79
|
+
|
80
|
+
Vertices(props) {
|
81
|
+
return new _drawings.VerticesNode(this.ctx, props);
|
82
|
+
}
|
83
|
+
|
84
|
+
Text(props) {
|
85
|
+
return new _drawings.TextNode(this.ctx, props);
|
86
|
+
}
|
87
|
+
|
88
|
+
TextPath(props) {
|
89
|
+
return new _drawings.TextPathNode(this.ctx, props);
|
90
|
+
}
|
91
|
+
|
92
|
+
TextBlob(props) {
|
93
|
+
return new _drawings.TextBlobNode(this.ctx, props);
|
94
|
+
}
|
95
|
+
|
96
|
+
Glyphs(props) {
|
97
|
+
return new _drawings.GlyphsNode(this.ctx, props);
|
98
|
+
}
|
99
|
+
|
100
|
+
DiffRect(props) {
|
101
|
+
return new _drawings.DiffRectNode(this.ctx, props);
|
102
|
+
}
|
103
|
+
|
104
|
+
Picture(props) {
|
105
|
+
return new _drawings.PictureNode(this.ctx, props);
|
106
|
+
}
|
107
|
+
|
108
|
+
ImageSVG(props) {
|
109
|
+
return new _drawings.ImageSVGNode(this.ctx, props);
|
110
|
+
} // BlurMaskFilters
|
111
|
+
|
112
|
+
|
113
|
+
BlurMaskFilter(props) {
|
114
|
+
return new _paint.BlurMaskFilterNode(this.ctx, props);
|
115
|
+
} // ImageFilters
|
116
|
+
|
117
|
+
|
118
|
+
BlendImageFilter(props) {
|
119
|
+
return new _paint.BlendImageFilterNode(this.ctx, props);
|
120
|
+
}
|
121
|
+
|
122
|
+
DropShadowImageFilter(props) {
|
123
|
+
return new _paint.DropShadowImageFilterNode(this.ctx, props);
|
124
|
+
}
|
125
|
+
|
126
|
+
DisplacementMapImageFilter(props) {
|
127
|
+
return new _paint.DisplacementMapImageFilterNode(this.ctx, props);
|
128
|
+
}
|
129
|
+
|
130
|
+
BlurImageFilter(props) {
|
131
|
+
return new _paint.BlurImageFilterNode(this.ctx, props);
|
132
|
+
}
|
133
|
+
|
134
|
+
OffsetImageFilter(props) {
|
135
|
+
return new _paint.OffsetImageFilterNode(this.ctx, props);
|
136
|
+
}
|
137
|
+
|
138
|
+
MorphologyImageFilter(props) {
|
139
|
+
return new _ImageFilters.MorphologyImageFilterNode(this.ctx, props);
|
140
|
+
}
|
141
|
+
|
142
|
+
RuntimeShaderImageFilter(props) {
|
143
|
+
return new _paint.RuntimeShaderImageFilterNode(this.ctx, props);
|
144
|
+
} // Color Filters
|
145
|
+
|
146
|
+
|
147
|
+
MatrixColorFilter(props) {
|
148
|
+
return new _ColorFilters.MatrixColorFilterNode(this.ctx, props);
|
149
|
+
}
|
150
|
+
|
151
|
+
BlendColorFilter(props) {
|
152
|
+
return new _ColorFilters.BlendColorFilterNode(this.ctx, props);
|
153
|
+
}
|
154
|
+
|
155
|
+
LumaColorFilter() {
|
156
|
+
return new _ColorFilters.LumaColorFilterNode(this.ctx);
|
157
|
+
}
|
158
|
+
|
159
|
+
LinearToSRGBGammaColorFilter() {
|
160
|
+
return new _ColorFilters.LinearToSRGBGammaColorFilterNode(this.ctx);
|
161
|
+
}
|
162
|
+
|
163
|
+
SRGBToLinearGammaColorFilter() {
|
164
|
+
return new _ColorFilters.SRGBToLinearGammaColorFilterNode(this.ctx);
|
165
|
+
}
|
166
|
+
|
167
|
+
LerpColorFilter(props) {
|
168
|
+
return new _ColorFilters.LerpColorFilterNode(this.ctx, props);
|
169
|
+
} // Shaders
|
170
|
+
|
171
|
+
|
172
|
+
Shader(props) {
|
173
|
+
return new _Shaders.ShaderNode(this.ctx, props);
|
174
|
+
}
|
175
|
+
|
176
|
+
ImageShader(props) {
|
177
|
+
return new _Shaders.ImageShaderNode(this.ctx, props);
|
178
|
+
}
|
179
|
+
|
180
|
+
ColorShader(props) {
|
181
|
+
return new _Shaders.ColorNode(this.ctx, props);
|
182
|
+
}
|
183
|
+
|
184
|
+
SweepGradient(props) {
|
185
|
+
return new _Shaders.SweepGradientNode(this.ctx, props);
|
186
|
+
}
|
187
|
+
|
188
|
+
Turbulence(props) {
|
189
|
+
return new _Shaders.TurbulenceNode(this.ctx, props);
|
190
|
+
}
|
191
|
+
|
192
|
+
FractalNoise(props) {
|
193
|
+
return new _Shaders.FractalNoiseNode(this.ctx, props);
|
194
|
+
}
|
195
|
+
|
196
|
+
LinearGradient(props) {
|
197
|
+
return new _Shaders.LinearGradientNode(this.ctx, props);
|
198
|
+
}
|
199
|
+
|
200
|
+
RadialGradient(props) {
|
201
|
+
return new _Shaders.RadialGradientNode(this.ctx, props);
|
202
|
+
}
|
203
|
+
|
204
|
+
TwoPointConicalGradient(props) {
|
205
|
+
return new _Shaders.TwoPointConicalGradientNode(this.ctx, props);
|
206
|
+
} // Path Effects
|
207
|
+
|
208
|
+
|
209
|
+
CornerPathEffect(props) {
|
210
|
+
return new _paint.CornerPathEffectNode(this.ctx, props);
|
211
|
+
}
|
212
|
+
|
213
|
+
DiscretePathEffect(props) {
|
214
|
+
return new _paint.DiscretePathEffectNode(this.ctx, props);
|
215
|
+
}
|
216
|
+
|
217
|
+
DashPathEffect(props) {
|
218
|
+
return new _paint.DashPathEffectNode(this.ctx, props);
|
219
|
+
}
|
220
|
+
|
221
|
+
Path1DPathEffect(props) {
|
222
|
+
return new _paint.Path1DPathEffectNode(this.ctx, props);
|
223
|
+
}
|
224
|
+
|
225
|
+
Path2DPathEffect(props) {
|
226
|
+
return new _paint.Path2DPathEffectNode(this.ctx, props);
|
227
|
+
}
|
228
|
+
|
229
|
+
SumPathEffect() {
|
230
|
+
return new _paint.SumPathEffectNode(this.ctx);
|
231
|
+
}
|
232
|
+
|
233
|
+
Line2DPathEffect(props) {
|
234
|
+
return new _paint.Line2DPathEffectNode(this.ctx, props);
|
235
|
+
}
|
236
|
+
|
237
|
+
Blend(props) {
|
238
|
+
return new _paint.BlendNode(this.ctx, props);
|
239
|
+
}
|
240
|
+
|
241
|
+
BackdropFilter(props) {
|
242
|
+
return new _drawings.BackdropFilterNode(this.ctx, props);
|
243
|
+
}
|
244
|
+
|
245
|
+
Box(props) {
|
246
|
+
return new _drawings.BoxNode(this.ctx, props);
|
247
|
+
}
|
248
|
+
|
249
|
+
BoxShadow(props) {
|
250
|
+
return new _drawings.BoxShadowNode(this.ctx, props);
|
251
|
+
}
|
252
|
+
|
253
|
+
}
|
254
|
+
|
255
|
+
exports.JsiSkDOM = JsiSkDOM;
|
256
|
+
//# sourceMappingURL=JsiSkDOM.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["JsiSkDOM.ts"],"names":["JsiSkDOM","constructor","ctx","Group","props","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","CustomDrawing","CustomDrawingNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode"],"mappings":";;;;;;;AA2DA;;AAwBA;;AAiBA;;AAQA;;AAWA;;AACA;;AACA;;AAGO,MAAMA,QAAN,CAAgC;AACrCC,EAAAA,WAAW,CAASC,GAAT,EAA2B;AAAA,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AACpG,KAAD,EAA+B;AAC7C,WAAO,IAAIqG,2BAAJ,CAAyB,KAAKvG,GAA9B,EAAmCE,KAAnC,CAAP;AACD;;AAEDsG,EAAAA,KAAK,CAACtG,KAAD,EAAoB;AACvB,WAAO,IAAIuG,gBAAJ,CAAc,KAAKzG,GAAnB,EAAwBE,KAAxB,CAAP;AACD;;AAEDwG,EAAAA,cAAc,CAACxG,KAAD,EAAuB;AACnC,WAAO,IAAIyG,4BAAJ,CAAuB,KAAK3G,GAA5B,EAAiCE,KAAjC,CAAP;AACD;;AAED0G,EAAAA,GAAG,CAAC1G,KAAD,EAAkB;AACnB,WAAO,IAAI2G,iBAAJ,CAAY,KAAK7G,GAAjB,EAAsBE,KAAtB,CAAP;AACD;;AAED4G,EAAAA,SAAS,CAAC5G,KAAD,EAAwB;AAC/B,WAAO,IAAI6G,uBAAJ,CAAkB,KAAK/G,GAAvB,EAA4BE,KAA5B,CAAP;AACD;;AAnOoC","sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Group(props?: GroupProps) {\n return new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return new BoxShadowNode(this.ctx, props);\n }\n}\n"]}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.JsiNode = exports.JsiDeclarationNode = void 0;
|
7
|
+
|
8
|
+
var _types = require("../types");
|
9
|
+
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
+
|
12
|
+
class JsiNode {
|
13
|
+
constructor(ctx, type, props) {
|
14
|
+
this.type = type;
|
15
|
+
this.props = props;
|
16
|
+
|
17
|
+
_defineProperty(this, "_children", []);
|
18
|
+
|
19
|
+
_defineProperty(this, "Skia", void 0);
|
20
|
+
|
21
|
+
_defineProperty(this, "depMgr", void 0);
|
22
|
+
|
23
|
+
this.Skia = ctx.Skia;
|
24
|
+
this.depMgr = ctx.depMgr;
|
25
|
+
}
|
26
|
+
|
27
|
+
setProps(props) {
|
28
|
+
this.props = props;
|
29
|
+
}
|
30
|
+
|
31
|
+
setProp(name, v) {
|
32
|
+
const hasChanged = this.props[name] !== v;
|
33
|
+
this.props[name] = v;
|
34
|
+
return hasChanged;
|
35
|
+
}
|
36
|
+
|
37
|
+
getProps() {
|
38
|
+
return this.props;
|
39
|
+
}
|
40
|
+
|
41
|
+
children() {
|
42
|
+
return this._children;
|
43
|
+
}
|
44
|
+
|
45
|
+
addChild(child) {
|
46
|
+
this._children.push(child);
|
47
|
+
}
|
48
|
+
|
49
|
+
dispose() {
|
50
|
+
this.depMgr.unsubscribeNode(this);
|
51
|
+
|
52
|
+
this._children.forEach(child => child.dispose());
|
53
|
+
}
|
54
|
+
|
55
|
+
removeChild(child) {
|
56
|
+
const index = this._children.indexOf(child);
|
57
|
+
|
58
|
+
if (index !== -1) {
|
59
|
+
const [node] = this._children.splice(index, 1);
|
60
|
+
|
61
|
+
node.dispose();
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
insertChildBefore(child, before) {
|
66
|
+
const index = this._children.indexOf(child);
|
67
|
+
|
68
|
+
if (index !== -1) {
|
69
|
+
this._children.splice(index, 1);
|
70
|
+
}
|
71
|
+
|
72
|
+
const beforeIndex = this._children.indexOf(before);
|
73
|
+
|
74
|
+
this._children.splice(beforeIndex, 0, child);
|
75
|
+
}
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
exports.JsiNode = JsiNode;
|
80
|
+
|
81
|
+
class JsiDeclarationNode extends JsiNode {
|
82
|
+
constructor(ctx, declarationType, type, props) {
|
83
|
+
super(ctx, type, props);
|
84
|
+
this.declarationType = declarationType;
|
85
|
+
|
86
|
+
_defineProperty(this, "invalidate", () => {});
|
87
|
+
}
|
88
|
+
|
89
|
+
addChild(child) {
|
90
|
+
if (!(child instanceof JsiDeclarationNode)) {
|
91
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
92
|
+
}
|
93
|
+
|
94
|
+
super.addChild(child);
|
95
|
+
this.invalidate();
|
96
|
+
}
|
97
|
+
|
98
|
+
insertChildBefore(child, before) {
|
99
|
+
if (!(child instanceof JsiDeclarationNode)) {
|
100
|
+
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
101
|
+
}
|
102
|
+
|
103
|
+
super.insertChildBefore(child, before);
|
104
|
+
this.invalidate();
|
105
|
+
}
|
106
|
+
|
107
|
+
dispose() {
|
108
|
+
this.invalidate();
|
109
|
+
super.dispose();
|
110
|
+
}
|
111
|
+
|
112
|
+
setInvalidate(invalidate) {
|
113
|
+
this.invalidate = invalidate;
|
114
|
+
}
|
115
|
+
|
116
|
+
setProps(props) {
|
117
|
+
super.setProps(props);
|
118
|
+
this.invalidate();
|
119
|
+
}
|
120
|
+
|
121
|
+
setProp(name, v) {
|
122
|
+
const hasChanged = super.setProp(name, v);
|
123
|
+
|
124
|
+
if (hasChanged) {
|
125
|
+
this.invalidate();
|
126
|
+
}
|
127
|
+
|
128
|
+
return hasChanged;
|
129
|
+
}
|
130
|
+
|
131
|
+
isPaint() {
|
132
|
+
return this.declarationType === _types.DeclarationType.Paint;
|
133
|
+
}
|
134
|
+
|
135
|
+
isImageFilter() {
|
136
|
+
return this.declarationType === _types.DeclarationType.ImageFilter;
|
137
|
+
}
|
138
|
+
|
139
|
+
isColorFilter() {
|
140
|
+
return this.declarationType === _types.DeclarationType.ColorFilter;
|
141
|
+
}
|
142
|
+
|
143
|
+
isShader() {
|
144
|
+
return this.declarationType === _types.DeclarationType.Shader;
|
145
|
+
}
|
146
|
+
|
147
|
+
isMaskFilter() {
|
148
|
+
return this.declarationType === _types.DeclarationType.MaskFilter;
|
149
|
+
}
|
150
|
+
|
151
|
+
isPathEffect() {
|
152
|
+
return this.declarationType === _types.DeclarationType.PathEffect;
|
153
|
+
}
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
exports.JsiDeclarationNode = JsiDeclarationNode;
|
158
|
+
//# sourceMappingURL=Node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Node.ts"],"names":["JsiNode","constructor","ctx","type","props","Skia","depMgr","setProps","setProp","name","v","hasChanged","getProps","children","_children","addChild","child","push","dispose","unsubscribeNode","forEach","removeChild","index","indexOf","node","splice","insertChildBefore","before","beforeIndex","JsiDeclarationNode","declarationType","Error","invalidate","setInvalidate","isPaint","DeclarationType","Paint","isImageFilter","ImageFilter","isColorFilter","ColorFilter","isShader","Shader","isMaskFilter","MaskFilter","isPathEffect","PathEffect"],"mappings":";;;;;;;AAUA;;;;AAQO,MAAeA,OAAf,CAA6C;AAKlDC,EAAAA,WAAW,CAACC,GAAD,EAA0BC,IAA1B,EAAoDC,KAApD,EAA8D;AAAA,SAApCD,IAAoC,GAApCA,IAAoC;AAAA,SAAVC,KAAU,GAAVA,KAAU;;AAAA,uCAJ/B,EAI+B;;AAAA;;AAAA;;AACvE,SAAKC,IAAL,GAAYH,GAAG,CAACG,IAAhB;AACA,SAAKC,MAAL,GAAcJ,GAAG,CAACI,MAAlB;AACD;;AAEDC,EAAAA,QAAQ,CAACH,KAAD,EAAW;AACjB,SAAKA,KAAL,GAAaA,KAAb;AACD;;AAEDI,EAAAA,OAAO,CAAoBC,IAApB,EAA6BC,CAA7B,EAAsC;AAC3C,UAAMC,UAAU,GAAG,KAAKP,KAAL,CAAWK,IAAX,MAAqBC,CAAxC;AACA,SAAKN,KAAL,CAAWK,IAAX,IAAmBC,CAAnB;AACA,WAAOC,UAAP;AACD;;AAEDC,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKR,KAAZ;AACD;;AAEDS,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKC,SAAZ;AACD;;AAEDC,EAAAA,QAAQ,CAACC,KAAD,EAAuB;AAC7B,SAAKF,SAAL,CAAeG,IAAf,CAAoBD,KAApB;AACD;;AAEDE,EAAAA,OAAO,GAAG;AACR,SAAKZ,MAAL,CAAYa,eAAZ,CAA4B,IAA5B;;AACA,SAAKL,SAAL,CAAeM,OAAf,CAAwBJ,KAAD,IAAWA,KAAK,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K,uBAAgBW,UAAhD;AACD;;AA1EH","sourcesContent":["import type {\n SkColorFilter,\n Skia,\n SkImageFilter,\n SkMaskFilter,\n SkShader,\n SkPathEffect,\n SkPaint,\n} from \"../../skia/types\";\nimport type { Node, DeclarationNode, NodeType } from \"../types\";\nimport { DeclarationType } from \"../types\";\nimport type { DependencyManager } from \"../../renderer/DependencyManager\";\n\nexport interface NodeContext {\n Skia: Skia;\n depMgr: DependencyManager;\n}\n\nexport abstract class JsiNode<P> implements Node<P> {\n protected _children: JsiNode<unknown>[] = [];\n protected Skia: Skia;\n protected depMgr: DependencyManager;\n\n constructor(ctx: NodeContext, public type: NodeType, protected props: P) {\n this.Skia = ctx.Skia;\n this.depMgr = ctx.depMgr;\n }\n\n setProps(props: P) {\n this.props = props;\n }\n\n setProp<K extends keyof P>(name: K, v: P[K]) {\n const hasChanged = this.props[name] !== v;\n this.props[name] = v;\n return hasChanged;\n }\n\n getProps() {\n return this.props;\n }\n\n children() {\n return this._children;\n }\n\n addChild(child: Node<unknown>) {\n this._children.push(child as JsiNode<unknown>);\n }\n\n dispose() {\n this.depMgr.unsubscribeNode(this);\n this._children.forEach((child) => child.dispose());\n }\n\n removeChild(child: Node<unknown>) {\n const index = this._children.indexOf(child as JsiNode<unknown>);\n if (index !== -1) {\n const [node] = this._children.splice(index, 1);\n node.dispose();\n }\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>) {\n const index = this._children.indexOf(child as JsiNode<unknown>);\n if (index !== -1) {\n this._children.splice(index, 1);\n }\n const beforeIndex = this._children.indexOf(before as JsiNode<unknown>);\n this._children.splice(beforeIndex, 0, child as JsiNode<unknown>);\n }\n}\n\nexport type Invalidate = () => void;\n\nexport abstract class JsiDeclarationNode<\n P,\n T,\n Nullable extends null | never = never\n >\n extends JsiNode<P>\n implements DeclarationNode<P, T, Nullable>\n{\n private invalidate: Invalidate = () => {};\n\n constructor(\n ctx: NodeContext,\n public declarationType: DeclarationType,\n type: NodeType,\n props: P\n ) {\n super(ctx, type, props);\n }\n\n abstract materialize(): T | Nullable;\n\n addChild(child: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n this.invalidate();\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n this.invalidate();\n }\n\n dispose() {\n this.invalidate();\n super.dispose();\n }\n\n setInvalidate(invalidate: Invalidate) {\n this.invalidate = invalidate;\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.invalidate();\n }\n\n setProp<K extends keyof P>(name: K, v: P[K]) {\n const hasChanged = super.setProp(name, v);\n if (hasChanged) {\n this.invalidate();\n }\n return hasChanged;\n }\n\n isPaint(): this is DeclarationNode<unknown, SkPaint> {\n return this.declarationType === DeclarationType.Paint;\n }\n\n isImageFilter(): this is DeclarationNode<unknown, SkImageFilter> {\n return this.declarationType === DeclarationType.ImageFilter;\n }\n\n isColorFilter(): this is DeclarationNode<unknown, SkColorFilter> {\n return this.declarationType === DeclarationType.ColorFilter;\n }\n\n isShader(): this is DeclarationNode<unknown, SkShader> {\n return this.declarationType === DeclarationType.Shader;\n }\n\n isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter> {\n return this.declarationType === DeclarationType.MaskFilter;\n }\n\n isPathEffect(): this is DeclarationNode<unknown, SkPathEffect> {\n return this.declarationType === DeclarationType.PathEffect;\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|