@shopify/react-native-skia 0.1.171 → 0.1.173
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +1 -0
- package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +5 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +106 -5
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +3 -1
- package/cpp/api/JsiSkSurface.h +7 -1
- package/cpp/api/JsiSkSurfaceFactory.h +15 -2
- package/cpp/rnskia/RNSkDomView.cpp +2 -4
- package/cpp/rnskia/RNSkJsView.cpp +3 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +2 -2
- package/cpp/rnskia/RNSkPictureView.h +3 -0
- package/cpp/rnskia/RNSkPlatformContext.h +9 -0
- package/cpp/rnskia/dom/JsiDomApi.h +1 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.cpp +117 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.h +49 -0
- package/cpp/rnskia/dom/base/Declaration.h +88 -0
- package/cpp/rnskia/dom/base/DeclarationContext.h +79 -0
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +25 -9
- package/cpp/rnskia/dom/base/DrawingContext.cpp +32 -186
- package/cpp/rnskia/dom/base/DrawingContext.h +45 -64
- package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +35 -106
- package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +28 -9
- package/cpp/rnskia/dom/base/JsiDomNode.h +46 -17
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +81 -67
- package/cpp/rnskia/dom/base/NodeProp.h +12 -2
- package/cpp/rnskia/dom/base/NodePropsContainer.h +15 -16
- package/cpp/rnskia/dom/nodes/JsiBackdropFilterNode.h +22 -11
- package/cpp/rnskia/dom/nodes/JsiBlendNode.h +43 -59
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +16 -17
- package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +6 -5
- package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +45 -69
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +8 -1
- package/cpp/rnskia/dom/nodes/JsiGroupNode.h +1 -1
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +121 -161
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +1 -0
- package/cpp/rnskia/dom/nodes/JsiLayerNode.h +28 -18
- package/cpp/rnskia/dom/nodes/JsiPaintNode.h +82 -45
- package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +68 -101
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +3 -2
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +150 -207
- package/cpp/rnskia/dom/props/BezierProps.h +4 -2
- package/cpp/rnskia/dom/props/BlendModeProp.h +4 -2
- package/cpp/rnskia/dom/props/BoxShadowProps.h +8 -10
- package/cpp/rnskia/dom/props/CircleProp.h +6 -5
- package/cpp/rnskia/dom/props/ClipProp.h +6 -4
- package/cpp/rnskia/dom/props/ColorProp.h +8 -4
- package/cpp/rnskia/dom/props/DrawingProp.h +5 -3
- package/cpp/rnskia/dom/props/FontProp.h +4 -2
- package/cpp/rnskia/dom/props/GlyphsProp.h +4 -2
- package/cpp/rnskia/dom/props/ImageProps.h +9 -6
- package/cpp/rnskia/dom/props/LayerProp.h +6 -4
- package/cpp/rnskia/dom/props/MatrixProp.h +4 -2
- package/cpp/rnskia/dom/props/NumbersProp.h +8 -4
- package/cpp/rnskia/dom/props/PaintProps.h +55 -92
- package/cpp/rnskia/dom/props/PathProp.h +4 -2
- package/cpp/rnskia/dom/props/PictureProp.h +4 -2
- package/cpp/rnskia/dom/props/PointProp.h +4 -2
- package/cpp/rnskia/dom/props/PointsProp.h +8 -4
- package/cpp/rnskia/dom/props/RRectProp.h +23 -16
- package/cpp/rnskia/dom/props/RadiusProp.h +4 -2
- package/cpp/rnskia/dom/props/RectProp.h +18 -12
- package/cpp/rnskia/dom/props/StrokeProps.h +8 -4
- package/cpp/rnskia/dom/props/SvgProp.h +4 -2
- package/cpp/rnskia/dom/props/TextBlobProp.h +10 -8
- package/cpp/rnskia/dom/props/TileModeProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformsProps.h +5 -7
- package/cpp/rnskia/dom/props/UniformsProp.h +4 -2
- package/cpp/rnskia/dom/props/VertexModeProp.h +4 -2
- package/cpp/rnskia/dom/props/VerticesProps.h +7 -11
- package/ios/RNSkia-iOS/DisplayLink.mm +22 -24
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +57 -50
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +2 -0
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +38 -25
- package/ios/RNSkia-iOS/SkiaDomViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaManager.mm +12 -10
- package/ios/RNSkia-iOS/SkiaMetalRenderer.h +5 -0
- package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +53 -0
- package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaUIView.mm +63 -53
- package/ios/RNSkiaModule.mm +5 -7
- package/lib/commonjs/animation/decay/decay.d.ts +2 -0
- package/lib/commonjs/animation/decay/index.d.ts +1 -0
- package/lib/commonjs/animation/decay/runDecay.d.ts +10 -0
- package/lib/commonjs/animation/decay/types.d.ts +21 -0
- package/lib/commonjs/animation/functions/index.d.ts +4 -0
- package/lib/commonjs/animation/functions/interpolate.d.ts +17 -0
- package/lib/commonjs/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/commonjs/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/commonjs/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/commonjs/animation/index.d.ts +4 -0
- package/lib/commonjs/animation/spring/Spring.d.ts +65 -0
- package/lib/commonjs/animation/spring/functions/index.d.ts +1 -0
- package/lib/commonjs/animation/spring/functions/spring.d.ts +10 -0
- package/lib/commonjs/animation/spring/index.d.ts +3 -0
- package/lib/commonjs/animation/spring/runSpring.d.ts +16 -0
- package/lib/commonjs/animation/spring/types.d.ts +6 -0
- package/lib/commonjs/animation/spring/useSpring.d.ts +10 -0
- package/lib/commonjs/animation/timing/Easing.d.ts +19 -0
- package/lib/commonjs/animation/timing/createTiming.d.ts +17 -0
- package/lib/commonjs/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/commonjs/animation/timing/functions/index.d.ts +4 -0
- package/lib/commonjs/animation/timing/functions/timing.d.ts +17 -0
- package/lib/commonjs/animation/timing/functions/types.d.ts +7 -0
- package/lib/commonjs/animation/timing/index.d.ts +4 -0
- package/lib/commonjs/animation/timing/runTiming.d.ts +16 -0
- package/lib/commonjs/animation/timing/useLoop.d.ts +8 -0
- package/lib/commonjs/animation/timing/useTiming.d.ts +10 -0
- package/lib/commonjs/animation/types.d.ts +18 -0
- package/lib/commonjs/dom/nodes/DrawingNode.d.ts +14 -0
- package/lib/commonjs/dom/nodes/DrawingNode.js +5 -1
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/GroupNode.d.ts +7 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +64 -0
- package/lib/commonjs/dom/nodes/LayerNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/LayerNode.js +13 -6
- package/lib/commonjs/dom/nodes/LayerNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.d.ts +38 -0
- package/lib/commonjs/dom/nodes/Node.js +8 -26
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintContext.d.ts +18 -0
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/PaintNode.js +32 -15
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.d.ts +26 -0
- package/lib/commonjs/dom/nodes/RenderNode.js +19 -187
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.d.ts +7 -0
- package/lib/commonjs/dom/nodes/datatypes/Enum.d.ts +1 -0
- package/lib/commonjs/dom/nodes/datatypes/Fitting.d.ts +33 -0
- package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +92 -0
- package/lib/commonjs/dom/nodes/datatypes/Path.d.ts +4 -0
- package/lib/commonjs/dom/nodes/datatypes/Radius.d.ts +3 -0
- package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +5 -0
- package/lib/commonjs/dom/nodes/datatypes/Transform.d.ts +3 -0
- package/lib/commonjs/dom/nodes/datatypes/index.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js +25 -7
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.d.ts +15 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js +3 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/FillNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/ImageNode.d.ts +25 -0
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/LineNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/OvalNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/PatchNode.d.ts +18 -0
- package/lib/commonjs/dom/nodes/drawings/PathNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/PictureNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/PointsNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +10 -0
- package/lib/commonjs/dom/nodes/drawings/RectNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/Text.d.ts +30 -0
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/index.d.ts +18 -0
- package/lib/commonjs/dom/nodes/index.d.ts +3 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.js +16 -47
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.d.ts +35 -0
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.d.ts +42 -0
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +45 -42
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/MaskFilters.d.ts +8 -0
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/PathEffects.d.ts +39 -0
- package/lib/commonjs/dom/nodes/paint/PathEffects.js +30 -72
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.d.ts +43 -0
- package/lib/commonjs/dom/nodes/paint/Shaders.js +28 -18
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/index.d.ts +6 -0
- package/lib/commonjs/dom/types/ColorFilters.d.ts +12 -0
- package/lib/commonjs/dom/types/Common.d.ts +56 -0
- package/lib/commonjs/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/commonjs/dom/types/DeclarationContext.js +118 -0
- package/lib/commonjs/dom/types/DeclarationContext.js.map +1 -0
- package/lib/commonjs/dom/types/DrawingContext.d.ts +22 -0
- package/lib/commonjs/dom/types/DrawingContext.js +330 -0
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +104 -0
- package/lib/commonjs/dom/types/ImageFilters.d.ts +37 -0
- package/lib/commonjs/dom/types/MaskFilters.d.ts +7 -0
- package/lib/commonjs/dom/types/Node.d.ts +23 -0
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +67 -0
- package/lib/commonjs/dom/types/PathEffects.d.ts +28 -0
- package/lib/commonjs/dom/types/Shaders.d.ts +59 -0
- package/lib/commonjs/dom/types/SkDOM.d.ts +71 -0
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.d.ts +12 -0
- package/lib/commonjs/dom/types/index.js +13 -0
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/external/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/commonjs/index.d.ts +11 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.d.ts +16 -0
- package/lib/commonjs/renderer/Canvas.d.ts +11 -0
- package/lib/commonjs/renderer/Canvas.js +3 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +12 -0
- package/lib/commonjs/renderer/DependencyManager.d.ts +46 -0
- package/lib/commonjs/renderer/DrawingContext.d.ts +7 -0
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +132 -0
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.d.ts +19 -0
- package/lib/commonjs/renderer/HostConfig.js +1 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -0
- package/lib/commonjs/renderer/Offscreen.js +31 -0
- package/lib/commonjs/renderer/Offscreen.js.map +1 -0
- package/lib/commonjs/renderer/Reconciler.d.ts +13 -0
- package/lib/commonjs/renderer/Reconciler.js +0 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.d.ts +4 -0
- package/lib/commonjs/renderer/components/Drawing.d.ts +3 -0
- package/lib/commonjs/renderer/components/Group.d.ts +8 -0
- package/lib/commonjs/renderer/components/Mask.d.ts +9 -0
- package/lib/commonjs/renderer/components/Paint.d.ts +4 -0
- package/lib/commonjs/renderer/components/Picture.d.ts +4 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.d.ts +9 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/commonjs/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.d.ts +5 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/commonjs/renderer/components/image/Image.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/ImageShader.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/index.d.ts +3 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/commonjs/renderer/components/index.d.ts +16 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.d.ts +4 -0
- package/lib/commonjs/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.d.ts +3 -0
- package/lib/commonjs/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/commonjs/renderer/components/shaders/Color.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/Shader.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/index.d.ts +9 -0
- package/lib/commonjs/renderer/components/shapes/Box.d.ts +5 -0
- package/lib/commonjs/renderer/components/shapes/Circle.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Fill.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.d.ts +20 -0
- package/lib/commonjs/renderer/components/shapes/Line.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Oval.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Patch.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Path.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Points.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/index.d.ts +13 -0
- package/lib/commonjs/renderer/components/text/Glyphs.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/Text.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/TextBlob.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/TextPath.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/index.d.ts +4 -0
- package/lib/commonjs/renderer/index.d.ts +2 -0
- package/lib/commonjs/renderer/index.js +0 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +17 -0
- package/lib/commonjs/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/commonjs/renderer/processors/index.d.ts +2 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/commonjs/renderer/processors/math/Math.d.ts +15 -0
- package/lib/commonjs/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/commonjs/renderer/processors/math/index.d.ts +3 -0
- package/lib/commonjs/renderer/typeddash.d.ts +3 -0
- package/lib/commonjs/skia/NativeSetup.d.ts +1 -0
- package/lib/commonjs/skia/Skia.d.ts +8 -0
- package/lib/commonjs/skia/Skia.web.d.ts +1 -0
- package/lib/commonjs/skia/core/Data.d.ts +3 -0
- package/lib/commonjs/skia/core/Font.d.ts +5 -0
- package/lib/commonjs/skia/core/Image.d.ts +5 -0
- package/lib/commonjs/skia/core/Matrix.d.ts +2 -0
- package/lib/commonjs/skia/core/Picture.d.ts +8 -0
- package/lib/commonjs/skia/core/RRect.d.ts +2 -0
- package/lib/commonjs/skia/core/Rect.d.ts +8 -0
- package/lib/commonjs/skia/core/SVG.d.ts +2 -0
- package/lib/commonjs/skia/core/Typeface.d.ts +5 -0
- package/lib/commonjs/skia/core/Vector.d.ts +12 -0
- package/lib/commonjs/skia/core/index.d.ts +10 -0
- package/lib/commonjs/skia/index.d.ts +3 -0
- package/lib/commonjs/skia/types/Canvas.d.ts +381 -0
- package/lib/commonjs/skia/types/Color.d.ts +2 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/commonjs/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/commonjs/skia/types/ContourMeasure.d.ts +41 -0
- package/lib/commonjs/skia/types/Data/Data.d.ts +12 -0
- package/lib/commonjs/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/commonjs/skia/types/Data/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Font/Font.d.ts +180 -0
- package/lib/commonjs/skia/types/Font/index.d.ts +1 -0
- package/lib/commonjs/skia/types/Image/Image.d.ts +75 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/commonjs/skia/types/Image/index.d.ts +2 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/commonjs/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/commonjs/skia/types/JsiInstance.d.ts +3 -0
- package/lib/commonjs/skia/types/MaskFilter.d.ts +21 -0
- package/lib/commonjs/skia/types/Matrix.d.ts +34 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/commonjs/skia/types/Paint/Paint.d.ts +136 -0
- package/lib/commonjs/skia/types/Paint/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Path/Path.d.ts +474 -0
- package/lib/commonjs/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/commonjs/skia/types/Path/index.d.ts +2 -0
- package/lib/commonjs/skia/types/PathEffect.d.ts +75 -0
- package/lib/commonjs/skia/types/Picture/Picture.d.ts +27 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/commonjs/skia/types/Picture/index.d.ts +3 -0
- package/lib/commonjs/skia/types/Point.d.ts +10 -0
- package/lib/commonjs/skia/types/RRect.d.ts +7 -0
- package/lib/commonjs/skia/types/RSXform.d.ts +2 -0
- package/lib/commonjs/skia/types/Rect.d.ts +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.d.ts +52 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/commonjs/skia/types/SVG/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Shader/Shader.d.ts +10 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/commonjs/skia/types/Shader/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Size.d.ts +4 -0
- package/lib/commonjs/skia/types/Skia.d.ts +66 -0
- package/lib/commonjs/skia/types/Surface/Surface.d.ts +29 -0
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.d.ts +17 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/index.d.ts +2 -0
- package/lib/commonjs/skia/types/TextBlob.d.ts +44 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/commonjs/skia/types/Typeface/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/commonjs/skia/types/Vertices/index.d.ts +1 -0
- package/lib/commonjs/skia/types/index.d.ts +28 -0
- package/lib/commonjs/skia/web/Host.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/commonjs/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.d.ts +12 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkData.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkPaint.d.ts +28 -0
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +57 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkPoint.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkRRect.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +7 -0
- package/lib/commonjs/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.d.ts +16 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/commonjs/skia/web/JsiSkSurface.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +4 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/commonjs/skia/web/JsiSkia.d.ts +3 -0
- package/lib/commonjs/skia/web/index.d.ts +1 -0
- package/lib/commonjs/values/api.d.ts +5 -0
- package/lib/commonjs/values/api.web.d.ts +2 -0
- package/lib/commonjs/values/hooks/index.d.ts +4 -0
- package/lib/commonjs/values/hooks/useClockValue.d.ts +6 -0
- package/lib/commonjs/values/hooks/useComputedValue.d.ts +8 -0
- package/lib/commonjs/values/hooks/useValue.d.ts +7 -0
- package/lib/commonjs/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/commonjs/values/index.d.ts +4 -0
- package/lib/commonjs/values/selector.d.ts +14 -0
- package/lib/commonjs/values/types.d.ts +63 -0
- package/lib/commonjs/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/commonjs/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/commonjs/values/web/RNSkComputedValue.d.ts +10 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +12 -0
- package/lib/commonjs/values/web/RNSkValue.d.ts +14 -0
- package/lib/commonjs/values/web/api.d.ts +2 -0
- package/lib/commonjs/values/web/index.d.ts +1 -0
- package/lib/commonjs/views/SkiaBaseWebView.d.ts +62 -0
- package/lib/commonjs/views/SkiaBaseWebView.js +6 -4
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.d.ts +31 -0
- package/lib/commonjs/views/SkiaDomView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaDomView.web.js +3 -14
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.d.ts +27 -0
- package/lib/commonjs/views/SkiaPictureView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaPictureView.web.js +0 -7
- package/lib/commonjs/views/SkiaPictureView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaView.d.ts +30 -0
- package/lib/commonjs/views/SkiaView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaView.web.js +0 -7
- package/lib/commonjs/views/SkiaView.web.js.map +1 -1
- package/lib/commonjs/views/api.d.ts +5 -0
- package/lib/commonjs/views/index.d.ts +6 -0
- package/lib/commonjs/views/types.d.ts +91 -0
- package/lib/commonjs/views/useDrawCallback.d.ts +8 -0
- package/lib/commonjs/views/useTouchHandler.d.ts +22 -0
- package/lib/commonjs/web/LoadSkiaWeb.d.ts +6 -0
- package/lib/commonjs/web/WithSkiaWeb.d.ts +12 -0
- package/lib/commonjs/web/index.d.ts +2 -0
- package/lib/module/animation/decay/decay.d.ts +2 -0
- package/lib/module/animation/decay/index.d.ts +1 -0
- package/lib/module/animation/decay/runDecay.d.ts +10 -0
- package/lib/module/animation/decay/types.d.ts +21 -0
- package/lib/module/animation/functions/index.d.ts +4 -0
- package/lib/module/animation/functions/interpolate.d.ts +17 -0
- package/lib/module/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/module/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/module/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/module/animation/index.d.ts +4 -0
- package/lib/module/animation/spring/Spring.d.ts +65 -0
- package/lib/module/animation/spring/functions/index.d.ts +1 -0
- package/lib/module/animation/spring/functions/spring.d.ts +10 -0
- package/lib/module/animation/spring/index.d.ts +3 -0
- package/lib/module/animation/spring/runSpring.d.ts +16 -0
- package/lib/module/animation/spring/types.d.ts +6 -0
- package/lib/module/animation/spring/useSpring.d.ts +10 -0
- package/lib/module/animation/timing/Easing.d.ts +19 -0
- package/lib/module/animation/timing/createTiming.d.ts +17 -0
- package/lib/module/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/module/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/module/animation/timing/functions/index.d.ts +4 -0
- package/lib/module/animation/timing/functions/timing.d.ts +17 -0
- package/lib/module/animation/timing/functions/types.d.ts +7 -0
- package/lib/module/animation/timing/index.d.ts +4 -0
- package/lib/module/animation/timing/runTiming.d.ts +16 -0
- package/lib/module/animation/timing/useLoop.d.ts +8 -0
- package/lib/module/animation/timing/useTiming.d.ts +10 -0
- package/lib/module/animation/types.d.ts +18 -0
- package/lib/module/dom/nodes/DrawingNode.d.ts +14 -0
- package/lib/module/dom/nodes/DrawingNode.js +5 -1
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/GroupNode.d.ts +7 -0
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +64 -0
- package/lib/module/dom/nodes/LayerNode.d.ts +8 -0
- package/lib/module/dom/nodes/LayerNode.js +13 -7
- package/lib/module/dom/nodes/LayerNode.js.map +1 -1
- package/lib/module/dom/nodes/Node.d.ts +38 -0
- package/lib/module/dom/nodes/Node.js +8 -25
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/PaintContext.d.ts +18 -0
- package/lib/module/dom/nodes/PaintContext.js.map +1 -1
- package/lib/module/dom/nodes/PaintNode.d.ts +8 -0
- package/lib/module/dom/nodes/PaintNode.js +32 -15
- package/lib/module/dom/nodes/PaintNode.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.d.ts +26 -0
- package/lib/module/dom/nodes/RenderNode.js +20 -187
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.d.ts +7 -0
- package/lib/module/dom/nodes/datatypes/Enum.d.ts +1 -0
- package/lib/module/dom/nodes/datatypes/Fitting.d.ts +33 -0
- package/lib/module/dom/nodes/datatypes/Gradient.d.ts +92 -0
- package/lib/module/dom/nodes/datatypes/Path.d.ts +4 -0
- package/lib/module/dom/nodes/datatypes/Radius.d.ts +3 -0
- package/lib/module/dom/nodes/datatypes/Rect.d.ts +5 -0
- package/lib/module/dom/nodes/datatypes/Transform.d.ts +3 -0
- package/lib/module/dom/nodes/datatypes/index.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js +23 -4
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.d.ts +15 -0
- package/lib/module/dom/nodes/drawings/Box.js +3 -0
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/DiffRectNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/FillNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/ImageNode.d.ts +25 -0
- package/lib/module/dom/nodes/drawings/ImageSVG.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/LineNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/OvalNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/PatchNode.d.ts +18 -0
- package/lib/module/dom/nodes/drawings/PathNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/PictureNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/PointsNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/RRectNode.d.ts +10 -0
- package/lib/module/dom/nodes/drawings/RectNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/Text.d.ts +30 -0
- package/lib/module/dom/nodes/drawings/VerticesNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/index.d.ts +18 -0
- package/lib/module/dom/nodes/index.d.ts +3 -0
- package/lib/module/dom/nodes/paint/BlendNode.d.ts +8 -0
- package/lib/module/dom/nodes/paint/BlendNode.js +15 -46
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.d.ts +35 -0
- package/lib/module/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.d.ts +42 -0
- package/lib/module/dom/nodes/paint/ImageFilters.js +48 -41
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/MaskFilters.d.ts +8 -0
- package/lib/module/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/PathEffects.d.ts +39 -0
- package/lib/module/dom/nodes/paint/PathEffects.js +29 -72
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.d.ts +43 -0
- package/lib/module/dom/nodes/paint/Shaders.js +28 -18
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/nodes/paint/index.d.ts +6 -0
- package/lib/module/dom/types/ColorFilters.d.ts +12 -0
- package/lib/module/dom/types/Common.d.ts +56 -0
- package/lib/module/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/module/dom/types/DeclarationContext.js +107 -0
- package/lib/module/dom/types/DeclarationContext.js.map +1 -0
- package/lib/module/dom/types/DrawingContext.d.ts +22 -0
- package/lib/module/dom/types/DrawingContext.js +322 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +104 -0
- package/lib/module/dom/types/ImageFilters.d.ts +37 -0
- package/lib/module/dom/types/MaskFilters.d.ts +7 -0
- package/lib/module/dom/types/Node.d.ts +23 -0
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +67 -0
- package/lib/module/dom/types/PathEffects.d.ts +28 -0
- package/lib/module/dom/types/Shaders.d.ts +59 -0
- package/lib/module/dom/types/SkDOM.d.ts +71 -0
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.d.ts +12 -0
- package/lib/module/dom/types/index.js +1 -0
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/external/index.d.ts +1 -0
- package/lib/module/external/reanimated/index.d.ts +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/module/index.d.ts +11 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.d.ts +16 -0
- package/lib/module/renderer/Canvas.d.ts +11 -0
- package/lib/module/renderer/Canvas.js +3 -3
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +12 -0
- package/lib/module/renderer/DependencyManager.d.ts +46 -0
- package/lib/module/renderer/DrawingContext.d.ts +7 -0
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +132 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.d.ts +19 -0
- package/lib/module/renderer/HostConfig.js +1 -0
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -0
- package/lib/module/renderer/Offscreen.js +19 -0
- package/lib/module/renderer/Offscreen.js.map +1 -0
- package/lib/module/renderer/Reconciler.d.ts +13 -0
- package/lib/module/renderer/Reconciler.js +0 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/Blend.d.ts +4 -0
- package/lib/module/renderer/components/Drawing.d.ts +3 -0
- package/lib/module/renderer/components/Group.d.ts +8 -0
- package/lib/module/renderer/components/Mask.d.ts +9 -0
- package/lib/module/renderer/components/Paint.d.ts +4 -0
- package/lib/module/renderer/components/Picture.d.ts +4 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.d.ts +9 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/module/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/Lerp.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/Matrix.d.ts +5 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/module/renderer/components/image/Image.d.ts +4 -0
- package/lib/module/renderer/components/image/ImageSVG.d.ts +4 -0
- package/lib/module/renderer/components/image/ImageShader.d.ts +4 -0
- package/lib/module/renderer/components/image/index.d.ts +3 -0
- package/lib/module/renderer/components/imageFilters/Blur.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Morphology.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Offset.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Shadow.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/module/renderer/components/index.d.ts +16 -0
- package/lib/module/renderer/components/maskFilters/Blur.d.ts +4 -0
- package/lib/module/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/module/renderer/components/pathEffects/Corner.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Dash.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Discrete.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Line2D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Path1D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Path2D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Sum.d.ts +3 -0
- package/lib/module/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/module/renderer/components/shaders/Color.d.ts +4 -0
- package/lib/module/renderer/components/shaders/FractalNoise.d.ts +4 -0
- package/lib/module/renderer/components/shaders/LinearGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/RadialGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/Shader.d.ts +4 -0
- package/lib/module/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/module/renderer/components/shaders/SweepGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/Turbulence.d.ts +4 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/index.d.ts +9 -0
- package/lib/module/renderer/components/shapes/Box.d.ts +5 -0
- package/lib/module/renderer/components/shapes/Circle.d.ts +4 -0
- package/lib/module/renderer/components/shapes/DiffRect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Fill.d.ts +4 -0
- package/lib/module/renderer/components/shapes/FitBox.d.ts +20 -0
- package/lib/module/renderer/components/shapes/Line.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Oval.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Patch.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Path.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Points.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/RoundedRect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Vertices.d.ts +4 -0
- package/lib/module/renderer/components/shapes/index.d.ts +13 -0
- package/lib/module/renderer/components/text/Glyphs.d.ts +4 -0
- package/lib/module/renderer/components/text/Text.d.ts +4 -0
- package/lib/module/renderer/components/text/TextBlob.d.ts +4 -0
- package/lib/module/renderer/components/text/TextPath.d.ts +4 -0
- package/lib/module/renderer/components/text/index.d.ts +4 -0
- package/lib/module/renderer/index.d.ts +2 -0
- package/lib/module/renderer/index.js +0 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +17 -0
- package/lib/module/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/module/renderer/processors/index.d.ts +2 -0
- package/lib/module/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/module/renderer/processors/math/Math.d.ts +15 -0
- package/lib/module/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/module/renderer/processors/math/index.d.ts +3 -0
- package/lib/module/renderer/typeddash.d.ts +3 -0
- package/lib/module/skia/NativeSetup.d.ts +1 -0
- package/lib/module/skia/Skia.d.ts +8 -0
- package/lib/module/skia/Skia.web.d.ts +1 -0
- package/lib/module/skia/core/Data.d.ts +3 -0
- package/lib/module/skia/core/Font.d.ts +5 -0
- package/lib/module/skia/core/Image.d.ts +5 -0
- package/lib/module/skia/core/Matrix.d.ts +2 -0
- package/lib/module/skia/core/Picture.d.ts +8 -0
- package/lib/module/skia/core/RRect.d.ts +2 -0
- package/lib/module/skia/core/Rect.d.ts +8 -0
- package/lib/module/skia/core/SVG.d.ts +2 -0
- package/lib/module/skia/core/Typeface.d.ts +5 -0
- package/lib/module/skia/core/Vector.d.ts +12 -0
- package/lib/module/skia/core/index.d.ts +10 -0
- package/lib/module/skia/index.d.ts +3 -0
- package/lib/module/skia/types/Canvas.d.ts +381 -0
- package/lib/module/skia/types/Color.d.ts +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/module/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/module/skia/types/ContourMeasure.d.ts +41 -0
- package/lib/module/skia/types/Data/Data.d.ts +12 -0
- package/lib/module/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/module/skia/types/Data/index.d.ts +2 -0
- package/lib/module/skia/types/Font/Font.d.ts +180 -0
- package/lib/module/skia/types/Font/index.d.ts +1 -0
- package/lib/module/skia/types/Image/Image.d.ts +75 -0
- package/lib/module/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/module/skia/types/Image/index.d.ts +2 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/module/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/module/skia/types/JsiInstance.d.ts +3 -0
- package/lib/module/skia/types/MaskFilter.d.ts +21 -0
- package/lib/module/skia/types/Matrix.d.ts +34 -0
- package/lib/module/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/module/skia/types/Paint/Paint.d.ts +136 -0
- package/lib/module/skia/types/Paint/index.d.ts +2 -0
- package/lib/module/skia/types/Path/Path.d.ts +474 -0
- package/lib/module/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/module/skia/types/Path/index.d.ts +2 -0
- package/lib/module/skia/types/PathEffect.d.ts +75 -0
- package/lib/module/skia/types/Picture/Picture.d.ts +27 -0
- package/lib/module/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/module/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/module/skia/types/Picture/index.d.ts +3 -0
- package/lib/module/skia/types/Point.d.ts +10 -0
- package/lib/module/skia/types/RRect.d.ts +7 -0
- package/lib/module/skia/types/RSXform.d.ts +2 -0
- package/lib/module/skia/types/Rect.d.ts +6 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.d.ts +52 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/module/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/module/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/module/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/module/skia/types/SVG/index.d.ts +2 -0
- package/lib/module/skia/types/Shader/Shader.d.ts +10 -0
- package/lib/module/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/module/skia/types/Shader/index.d.ts +2 -0
- package/lib/module/skia/types/Size.d.ts +4 -0
- package/lib/module/skia/types/Skia.d.ts +66 -0
- package/lib/module/skia/types/Surface/Surface.d.ts +29 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -1
- package/lib/module/skia/types/Surface/SurfaceFactory.d.ts +17 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/module/skia/types/Surface/index.d.ts +2 -0
- package/lib/module/skia/types/TextBlob.d.ts +44 -0
- package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/module/skia/types/Typeface/index.d.ts +2 -0
- package/lib/module/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/module/skia/types/Vertices/index.d.ts +1 -0
- package/lib/module/skia/types/index.d.ts +28 -0
- package/lib/module/skia/web/Host.d.ts +19 -0
- package/lib/module/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/module/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/module/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/module/skia/web/JsiSkContourMeasure.d.ts +12 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/module/skia/web/JsiSkData.d.ts +8 -0
- package/lib/module/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/module/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/module/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/module/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/module/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/module/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkMatrix.d.ts +13 -0
- package/lib/module/skia/web/JsiSkPaint.d.ts +28 -0
- package/lib/module/skia/web/JsiSkPath.d.ts +57 -0
- package/lib/module/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/module/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/module/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/module/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/module/skia/web/JsiSkPoint.d.ts +9 -0
- package/lib/module/skia/web/JsiSkRRect.d.ts +11 -0
- package/lib/module/skia/web/JsiSkRSXform.d.ts +7 -0
- package/lib/module/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +16 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/module/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/module/skia/web/JsiSkSurface.d.ts +9 -0
- package/lib/module/skia/web/JsiSkSurface.js +4 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.d.ts +13 -0
- package/lib/module/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/module/skia/web/JsiSkia.d.ts +3 -0
- package/lib/module/skia/web/index.d.ts +1 -0
- package/lib/module/values/api.d.ts +5 -0
- package/lib/module/values/api.web.d.ts +2 -0
- package/lib/module/values/hooks/index.d.ts +4 -0
- package/lib/module/values/hooks/useClockValue.d.ts +6 -0
- package/lib/module/values/hooks/useComputedValue.d.ts +8 -0
- package/lib/module/values/hooks/useValue.d.ts +7 -0
- package/lib/module/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/module/values/index.d.ts +4 -0
- package/lib/module/values/selector.d.ts +14 -0
- package/lib/module/values/types.d.ts +63 -0
- package/lib/module/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/module/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/module/values/web/RNSkComputedValue.d.ts +10 -0
- package/lib/module/values/web/RNSkReadonlyValue.d.ts +12 -0
- package/lib/module/values/web/RNSkValue.d.ts +14 -0
- package/lib/module/values/web/api.d.ts +2 -0
- package/lib/module/values/web/index.d.ts +1 -0
- package/lib/module/views/SkiaBaseWebView.d.ts +62 -0
- package/lib/module/views/SkiaBaseWebView.js +6 -4
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.d.ts +31 -0
- package/lib/module/views/SkiaDomView.web.d.ts +7 -0
- package/lib/module/views/SkiaDomView.web.js +2 -11
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/SkiaPictureView.d.ts +27 -0
- package/lib/module/views/SkiaPictureView.web.d.ts +7 -0
- package/lib/module/views/SkiaPictureView.web.js +0 -5
- package/lib/module/views/SkiaPictureView.web.js.map +1 -1
- package/lib/module/views/SkiaView.d.ts +30 -0
- package/lib/module/views/SkiaView.web.d.ts +7 -0
- package/lib/module/views/SkiaView.web.js +0 -5
- package/lib/module/views/SkiaView.web.js.map +1 -1
- package/lib/module/views/api.d.ts +5 -0
- package/lib/module/views/index.d.ts +6 -0
- package/lib/module/views/types.d.ts +91 -0
- package/lib/module/views/useDrawCallback.d.ts +8 -0
- package/lib/module/views/useTouchHandler.d.ts +22 -0
- package/lib/module/web/LoadSkiaWeb.d.ts +6 -0
- package/lib/module/web/WithSkiaWeb.d.ts +12 -0
- package/lib/module/web/index.d.ts +2 -0
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +33 -34
- package/lib/typescript/src/dom/nodes/Node.d.ts +6 -11
- package/lib/typescript/src/dom/nodes/PaintNode.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/RenderNode.d.ts +2 -3
- package/lib/typescript/src/dom/nodes/drawings/BackdropFilterNode.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +3 -1
- package/lib/typescript/src/dom/nodes/paint/BlendNode.d.ts +3 -7
- package/lib/typescript/src/dom/nodes/paint/ColorFilters.d.ts +10 -11
- package/lib/typescript/src/dom/nodes/paint/ImageFilters.d.ts +11 -11
- package/lib/typescript/src/dom/nodes/paint/MaskFilters.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/paint/PathEffects.d.ts +15 -18
- package/lib/typescript/src/dom/nodes/paint/Shaders.d.ts +11 -12
- package/lib/typescript/src/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/typescript/src/dom/types/DrawingContext.d.ts +18 -1
- package/lib/typescript/src/dom/types/Node.d.ts +4 -10
- package/lib/typescript/src/dom/types/SkDOM.d.ts +22 -23
- package/lib/typescript/src/dom/types/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +4 -3
- package/lib/typescript/src/renderer/HostComponents.d.ts +35 -35
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -0
- package/lib/typescript/src/renderer/index.d.ts +0 -1
- package/lib/typescript/src/skia/types/Surface/Surface.d.ts +4 -0
- package/lib/typescript/src/skia/types/Surface/SurfaceFactory.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +2 -1
- package/package.json +5 -4
- package/src/dom/nodes/DrawingNode.ts +5 -1
- package/src/dom/nodes/LayerNode.ts +13 -11
- package/src/dom/nodes/Node.ts +18 -41
- package/src/dom/nodes/PaintContext.ts +1 -0
- package/src/dom/nodes/PaintNode.ts +28 -18
- package/src/dom/nodes/RenderNode.ts +25 -183
- package/src/dom/nodes/drawings/BackdropFilterNode.ts +18 -11
- package/src/dom/nodes/drawings/Box.ts +6 -4
- package/src/dom/nodes/paint/BlendNode.ts +16 -63
- package/src/dom/nodes/paint/ColorFilters.ts +32 -55
- package/src/dom/nodes/paint/ImageFilters.ts +58 -53
- package/src/dom/nodes/paint/MaskFilters.ts +5 -7
- package/src/dom/nodes/paint/PathEffects.ts +37 -90
- package/src/dom/nodes/paint/Shaders.ts +31 -29
- package/src/dom/types/DeclarationContext.ts +105 -0
- package/src/dom/types/DrawingContext.ts +304 -1
- package/src/dom/types/Node.ts +4 -20
- package/src/dom/types/SkDOM.ts +22 -43
- package/src/dom/types/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/renderer/Canvas.tsx +3 -3
- package/src/renderer/DrawingContext.ts +4 -5
- package/src/renderer/HostComponents.ts +34 -53
- package/src/renderer/HostConfig.ts +1 -0
- package/src/renderer/Offscreen.tsx +24 -0
- package/src/renderer/Reconciler.tsx +0 -1
- package/src/renderer/index.ts +0 -1
- package/src/skia/types/Surface/Surface.ts +5 -0
- package/src/skia/types/Surface/SurfaceFactory.ts +7 -0
- package/src/skia/web/JsiSkSurface.ts +4 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +21 -2
- package/src/views/SkiaBaseWebView.tsx +6 -2
- package/src/views/SkiaDomView.web.tsx +2 -13
- package/src/views/SkiaPictureView.web.tsx +0 -7
- package/src/views/SkiaView.web.tsx +0 -7
- package/lib/commonjs/renderer/useContextBridge.js +0 -35
- package/lib/commonjs/renderer/useContextBridge.js.map +0 -1
- package/lib/module/renderer/useContextBridge.js +0 -21
- package/lib/module/renderer/useContextBridge.js.map +0 -1
- package/lib/typescript/src/renderer/useContextBridge.d.ts +0 -5
- package/src/renderer/useContextBridge.tsx +0 -21
@@ -1,2 +1,323 @@
|
|
1
|
-
|
1
|
+
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; }
|
2
|
+
|
3
|
+
import { BlendMode, PaintStyle, StrokeCap, StrokeJoin } from "../../skia/types";
|
4
|
+
import { enumKey } from "../nodes/datatypes/Enum";
|
5
|
+
import { JsiDeclarationNode } from "../nodes/Node";
|
6
|
+
import { DeclarationContext } from "./DeclarationContext";
|
7
|
+
export class JsiDrawingContext {
|
8
|
+
constructor(Skia, canvas) {
|
9
|
+
this.Skia = Skia;
|
10
|
+
this.canvas = canvas;
|
11
|
+
|
12
|
+
_defineProperty(this, "paints", void 0);
|
13
|
+
|
14
|
+
_defineProperty(this, "declarationCtx", void 0);
|
15
|
+
|
16
|
+
const paint = this.Skia.Paint();
|
17
|
+
this.paints = [paint];
|
18
|
+
this.declarationCtx = new DeclarationContext(Skia);
|
19
|
+
}
|
20
|
+
|
21
|
+
get paint() {
|
22
|
+
return this.paints[this.paints.length - 1];
|
23
|
+
}
|
24
|
+
|
25
|
+
save() {
|
26
|
+
const childPaint = this.paint.copy();
|
27
|
+
this.paints.push(childPaint);
|
28
|
+
}
|
29
|
+
|
30
|
+
restore() {
|
31
|
+
this.paints.pop();
|
32
|
+
}
|
33
|
+
|
34
|
+
saveAndConcat(node, cache) {
|
35
|
+
if (cache) {
|
36
|
+
this.paints.push(cache);
|
37
|
+
return true;
|
38
|
+
}
|
39
|
+
|
40
|
+
const paint = new ConcatablePaint(this.Skia, this.declarationCtx, node);
|
41
|
+
|
42
|
+
if (!paint.isPristine()) {
|
43
|
+
this.save();
|
44
|
+
paint.concatTo(this.paint);
|
45
|
+
return true;
|
46
|
+
}
|
47
|
+
|
48
|
+
return false;
|
49
|
+
}
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
class ConcatablePaint {
|
54
|
+
constructor(Skia, declCtx, node) {
|
55
|
+
_defineProperty(this, "pristine", true);
|
56
|
+
|
57
|
+
_defineProperty(this, "_color", void 0);
|
58
|
+
|
59
|
+
_defineProperty(this, "_strokeWidth", void 0);
|
60
|
+
|
61
|
+
_defineProperty(this, "_blendMode", void 0);
|
62
|
+
|
63
|
+
_defineProperty(this, "_style", void 0);
|
64
|
+
|
65
|
+
_defineProperty(this, "_strokeJoin", void 0);
|
66
|
+
|
67
|
+
_defineProperty(this, "_strokeCap", void 0);
|
68
|
+
|
69
|
+
_defineProperty(this, "_strokeMiter", void 0);
|
70
|
+
|
71
|
+
_defineProperty(this, "_opacity", 1);
|
72
|
+
|
73
|
+
_defineProperty(this, "_antiAlias", void 0);
|
74
|
+
|
75
|
+
_defineProperty(this, "_imageFilter", void 0);
|
76
|
+
|
77
|
+
_defineProperty(this, "_shader", void 0);
|
78
|
+
|
79
|
+
_defineProperty(this, "_pathEffect", void 0);
|
80
|
+
|
81
|
+
_defineProperty(this, "_colorFilter", void 0);
|
82
|
+
|
83
|
+
_defineProperty(this, "_maskFilter", void 0);
|
84
|
+
|
85
|
+
const props = node.getProps();
|
86
|
+
const children = node.children();
|
87
|
+
this.setColor(props.color !== undefined ? Skia.Color(props.color) : props.color);
|
88
|
+
this.setStrokeWidth(props.strokeWidth);
|
89
|
+
this.setBlendMode(props.blendMode);
|
90
|
+
this.setStyle(props.style);
|
91
|
+
this.setStrokeJoin(props.strokeJoin);
|
92
|
+
this.setStrokeCap(props.strokeCap);
|
93
|
+
this.setStrokeMiter(props.strokeMiter);
|
94
|
+
this.setOpacity(props.opacity);
|
95
|
+
this.setAntiAlias(props.antiAlias);
|
96
|
+
declCtx.save();
|
97
|
+
children.forEach(child => {
|
98
|
+
if (child instanceof JsiDeclarationNode) {
|
99
|
+
child.decorate(declCtx);
|
100
|
+
}
|
101
|
+
});
|
102
|
+
const colorFilter = declCtx.colorFilters.popAllAsOne();
|
103
|
+
const imageFilter = declCtx.imageFilters.popAllAsOne();
|
104
|
+
const shader = declCtx.shaders.pop();
|
105
|
+
const maskFilter = declCtx.maskFilters.pop();
|
106
|
+
const pathEffect = declCtx.pathEffects.popAllAsOne();
|
107
|
+
declCtx.restore();
|
108
|
+
|
109
|
+
if (imageFilter) {
|
110
|
+
this.setImageFilter(imageFilter);
|
111
|
+
}
|
112
|
+
|
113
|
+
if (shader) {
|
114
|
+
this.setShader(shader);
|
115
|
+
}
|
116
|
+
|
117
|
+
if (pathEffect) {
|
118
|
+
this.setPathEffect(pathEffect);
|
119
|
+
}
|
120
|
+
|
121
|
+
if (colorFilter) {
|
122
|
+
this.setColorFilter(colorFilter);
|
123
|
+
}
|
124
|
+
|
125
|
+
if (maskFilter) {
|
126
|
+
this.setMaskFilter(maskFilter);
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
enum(value, key) {
|
131
|
+
if (key !== undefined) {
|
132
|
+
return value[enumKey(key)];
|
133
|
+
}
|
134
|
+
|
135
|
+
return undefined;
|
136
|
+
}
|
137
|
+
|
138
|
+
setValue(key, value) {
|
139
|
+
if (value !== undefined) {
|
140
|
+
this[key] = value;
|
141
|
+
this.pristine = false;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
setColor(color) {
|
146
|
+
this.setValue("_color", color);
|
147
|
+
}
|
148
|
+
|
149
|
+
getColor() {
|
150
|
+
return this._color;
|
151
|
+
}
|
152
|
+
|
153
|
+
setStrokeWidth(strokeWidth) {
|
154
|
+
this.setValue("_strokeWidth", strokeWidth);
|
155
|
+
}
|
156
|
+
|
157
|
+
getStrokeWidth() {
|
158
|
+
return this._strokeWidth;
|
159
|
+
}
|
160
|
+
|
161
|
+
setBlendMode(blendMode) {
|
162
|
+
this.setValue("_blendMode", this.enum(BlendMode, blendMode));
|
163
|
+
}
|
164
|
+
|
165
|
+
getBlendMode() {
|
166
|
+
return this._blendMode;
|
167
|
+
}
|
168
|
+
|
169
|
+
setStyle(style) {
|
170
|
+
this.setValue("_style", this.enum(PaintStyle, style));
|
171
|
+
}
|
172
|
+
|
173
|
+
getStyle() {
|
174
|
+
return this._style;
|
175
|
+
}
|
176
|
+
|
177
|
+
setStrokeJoin(strokeJoin) {
|
178
|
+
this.setValue("_strokeJoin", this.enum(StrokeJoin, strokeJoin));
|
179
|
+
}
|
180
|
+
|
181
|
+
getStrokeJoin() {
|
182
|
+
return this._strokeJoin;
|
183
|
+
}
|
184
|
+
|
185
|
+
setStrokeCap(strokeCap) {
|
186
|
+
this.setValue("_strokeCap", this.enum(StrokeCap, strokeCap));
|
187
|
+
}
|
188
|
+
|
189
|
+
getStrokeCap() {
|
190
|
+
return this._strokeCap;
|
191
|
+
}
|
192
|
+
|
193
|
+
setStrokeMiter(strokeMiter) {
|
194
|
+
this.setValue("_strokeMiter", strokeMiter);
|
195
|
+
}
|
196
|
+
|
197
|
+
getStrokeMiter() {
|
198
|
+
return this._strokeMiter;
|
199
|
+
}
|
200
|
+
|
201
|
+
setOpacity(opacity) {
|
202
|
+
this.setValue("_opacity", opacity);
|
203
|
+
}
|
204
|
+
|
205
|
+
getOpacity() {
|
206
|
+
return this._opacity;
|
207
|
+
}
|
208
|
+
|
209
|
+
setAntiAlias(antiAlias) {
|
210
|
+
this.setValue("_antiAlias", antiAlias);
|
211
|
+
}
|
212
|
+
|
213
|
+
getAntiAlias() {
|
214
|
+
return this._antiAlias;
|
215
|
+
}
|
216
|
+
|
217
|
+
setImageFilter(imageFilter) {
|
218
|
+
this.setValue("_imageFilter", imageFilter);
|
219
|
+
}
|
220
|
+
|
221
|
+
getImageFilter() {
|
222
|
+
return this._imageFilter;
|
223
|
+
}
|
224
|
+
|
225
|
+
setShader(shader) {
|
226
|
+
this.setValue("_shader", shader);
|
227
|
+
}
|
228
|
+
|
229
|
+
getShader() {
|
230
|
+
return this._shader;
|
231
|
+
}
|
232
|
+
|
233
|
+
setPathEffect(pathEffect) {
|
234
|
+
this.setValue("_pathEffect", pathEffect);
|
235
|
+
}
|
236
|
+
|
237
|
+
getPathEffect() {
|
238
|
+
return this._pathEffect;
|
239
|
+
}
|
240
|
+
|
241
|
+
setColorFilter(colorFilter) {
|
242
|
+
this.setValue("_colorFilter", colorFilter);
|
243
|
+
}
|
244
|
+
|
245
|
+
getColorFilter() {
|
246
|
+
return this._colorFilter;
|
247
|
+
}
|
248
|
+
|
249
|
+
setMaskFilter(maskFilter) {
|
250
|
+
this.setValue("_maskFilter", maskFilter);
|
251
|
+
}
|
252
|
+
|
253
|
+
getMaskFilter() {
|
254
|
+
return this._maskFilter;
|
255
|
+
}
|
256
|
+
|
257
|
+
isPristine() {
|
258
|
+
return this.pristine;
|
259
|
+
}
|
260
|
+
|
261
|
+
concatTo(paint) {
|
262
|
+
if (this._opacity !== undefined) {
|
263
|
+
paint.setAlphaf(paint.getAlphaf() * this._opacity);
|
264
|
+
}
|
265
|
+
|
266
|
+
if (this._color !== undefined) {
|
267
|
+
const currentOpacity = paint.getAlphaf();
|
268
|
+
paint.setShader(null);
|
269
|
+
paint.setColor(this._color);
|
270
|
+
paint.setAlphaf(currentOpacity * paint.getAlphaf());
|
271
|
+
}
|
272
|
+
|
273
|
+
if (this._strokeWidth !== undefined) {
|
274
|
+
paint.setStrokeWidth(this._strokeWidth);
|
275
|
+
}
|
276
|
+
|
277
|
+
if (this._blendMode !== undefined) {
|
278
|
+
paint.setBlendMode(this._blendMode);
|
279
|
+
}
|
280
|
+
|
281
|
+
if (this._style !== undefined) {
|
282
|
+
paint.setStyle(this._style);
|
283
|
+
}
|
284
|
+
|
285
|
+
if (this._strokeJoin !== undefined) {
|
286
|
+
paint.setStrokeJoin(this._strokeJoin);
|
287
|
+
}
|
288
|
+
|
289
|
+
if (this._strokeCap !== undefined) {
|
290
|
+
paint.setStrokeCap(this._strokeCap);
|
291
|
+
}
|
292
|
+
|
293
|
+
if (this._strokeMiter !== undefined) {
|
294
|
+
paint.setStrokeMiter(this._strokeMiter);
|
295
|
+
}
|
296
|
+
|
297
|
+
if (this._antiAlias !== undefined) {
|
298
|
+
paint.setAntiAlias(this._antiAlias);
|
299
|
+
}
|
300
|
+
|
301
|
+
if (this._imageFilter !== undefined) {
|
302
|
+
paint.setImageFilter(this._imageFilter);
|
303
|
+
}
|
304
|
+
|
305
|
+
if (this._shader !== undefined) {
|
306
|
+
paint.setShader(this._shader);
|
307
|
+
}
|
308
|
+
|
309
|
+
if (this._pathEffect !== undefined) {
|
310
|
+
paint.setPathEffect(this._pathEffect);
|
311
|
+
}
|
312
|
+
|
313
|
+
if (this._colorFilter !== undefined) {
|
314
|
+
paint.setColorFilter(this._colorFilter);
|
315
|
+
}
|
316
|
+
|
317
|
+
if (this._maskFilter !== undefined) {
|
318
|
+
paint.setMaskFilter(this._maskFilter);
|
319
|
+
}
|
320
|
+
}
|
321
|
+
|
322
|
+
}
|
2
323
|
//# sourceMappingURL=DrawingContext.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["DrawingContext.ts"],"sourcesContent":["import type { SkCanvas, SkPaint } from \"../../skia/types\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n}\n"],"mappings":""}
|
1
|
+
{"version":3,"names":["BlendMode","PaintStyle","StrokeCap","StrokeJoin","enumKey","JsiDeclarationNode","DeclarationContext","JsiDrawingContext","constructor","Skia","canvas","paint","Paint","paints","declarationCtx","length","save","childPaint","copy","push","restore","pop","saveAndConcat","node","cache","ConcatablePaint","isPristine","concatTo","declCtx","props","getProps","children","setColor","color","undefined","Color","setStrokeWidth","strokeWidth","setBlendMode","blendMode","setStyle","style","setStrokeJoin","strokeJoin","setStrokeCap","strokeCap","setStrokeMiter","strokeMiter","setOpacity","opacity","setAntiAlias","antiAlias","forEach","child","decorate","colorFilter","colorFilters","popAllAsOne","imageFilter","imageFilters","shader","shaders","maskFilter","maskFilters","pathEffect","pathEffects","setImageFilter","setShader","setPathEffect","setColorFilter","setMaskFilter","enum","value","key","setValue","pristine","getColor","_color","getStrokeWidth","_strokeWidth","getBlendMode","_blendMode","getStyle","_style","getStrokeJoin","_strokeJoin","getStrokeCap","_strokeCap","getStrokeMiter","_strokeMiter","getOpacity","_opacity","getAntiAlias","_antiAlias","getImageFilter","_imageFilter","getShader","_shader","getPathEffect","_pathEffect","getColorFilter","_colorFilter","getMaskFilter","_maskFilter","setAlphaf","getAlphaf","currentOpacity"],"sources":["DrawingContext.ts"],"sourcesContent":["import type {\n SkCanvas,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkMaskFilter,\n SkPaint,\n SkPathEffect,\n SkShader,\n Skia,\n} from \"../../skia/types\";\nimport { BlendMode, PaintStyle, StrokeCap, StrokeJoin } from \"../../skia/types\";\nimport { enumKey } from \"../nodes/datatypes/Enum\";\nimport { JsiDeclarationNode } from \"../nodes/Node\";\n\nimport type { PaintProps, SkEnum } from \"./Common\";\nimport { DeclarationContext } from \"./DeclarationContext\";\nimport type { Node } from \"./Node\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n saveAndConcat(node: Node<PaintProps>, cache?: SkPaint): boolean;\n restore(): void;\n declarationCtx: DeclarationContext;\n}\n\nexport class JsiDrawingContext implements DrawingContext {\n paints: SkPaint[];\n\n declarationCtx: DeclarationContext;\n\n constructor(private readonly Skia: Skia, public readonly canvas: SkCanvas) {\n const paint = this.Skia.Paint();\n this.paints = [paint];\n this.declarationCtx = new DeclarationContext(Skia);\n }\n\n get paint() {\n return this.paints[this.paints.length - 1];\n }\n\n private save() {\n const childPaint = this.paint.copy();\n this.paints.push(childPaint);\n }\n\n restore(): void {\n this.paints.pop();\n }\n\n saveAndConcat(node: Node<PaintProps>, cache?: SkPaint) {\n if (cache) {\n this.paints.push(cache);\n return true;\n }\n const paint = new ConcatablePaint(this.Skia, this.declarationCtx, node);\n if (!paint.isPristine()) {\n this.save();\n paint.concatTo(this.paint);\n return true;\n }\n return false;\n }\n}\n\nclass ConcatablePaint {\n private pristine = true;\n\n _color?: SkColor;\n _strokeWidth?: number;\n _blendMode?: BlendMode;\n _style?: PaintStyle;\n _strokeJoin?: StrokeJoin;\n _strokeCap?: StrokeCap;\n _strokeMiter?: number;\n _opacity = 1;\n _antiAlias?: boolean;\n\n _imageFilter?: SkImageFilter;\n _shader?: SkShader;\n _pathEffect?: SkPathEffect;\n _colorFilter?: SkColorFilter;\n _maskFilter?: SkMaskFilter;\n\n constructor(Skia: Skia, declCtx: DeclarationContext, node: Node<PaintProps>) {\n const props = node.getProps();\n const children = node.children();\n this.setColor(\n props.color !== undefined ? Skia.Color(props.color) : props.color\n );\n this.setStrokeWidth(props.strokeWidth);\n this.setBlendMode(props.blendMode);\n this.setStyle(props.style);\n this.setStrokeJoin(props.strokeJoin);\n this.setStrokeCap(props.strokeCap);\n this.setStrokeMiter(props.strokeMiter);\n this.setOpacity(props.opacity);\n this.setAntiAlias(props.antiAlias);\n declCtx.save();\n children.forEach((child) => {\n if (child instanceof JsiDeclarationNode) {\n child.decorate(declCtx);\n }\n });\n const colorFilter = declCtx.colorFilters.popAllAsOne();\n const imageFilter = declCtx.imageFilters.popAllAsOne();\n const shader = declCtx.shaders.pop();\n const maskFilter = declCtx.maskFilters.pop();\n const pathEffect = declCtx.pathEffects.popAllAsOne();\n declCtx.restore();\n if (imageFilter) {\n this.setImageFilter(imageFilter);\n }\n if (shader) {\n this.setShader(shader);\n }\n if (pathEffect) {\n this.setPathEffect(pathEffect);\n }\n if (colorFilter) {\n this.setColorFilter(colorFilter);\n }\n if (maskFilter) {\n this.setMaskFilter(maskFilter);\n }\n }\n\n private enum<T>(value: T, key?: Uncapitalize<string>) {\n if (key !== undefined) {\n return value[enumKey(key) as keyof T];\n }\n return undefined;\n }\n\n private setValue<T extends keyof typeof this>(\n key: T,\n value?: typeof this[T]\n ) {\n if (value !== undefined) {\n this[key] = value;\n this.pristine = false;\n }\n }\n\n setColor(color?: SkColor) {\n this.setValue(\"_color\", color);\n }\n\n getColor() {\n return this._color;\n }\n\n setStrokeWidth(strokeWidth?: number) {\n this.setValue(\"_strokeWidth\", strokeWidth);\n }\n\n getStrokeWidth() {\n return this._strokeWidth;\n }\n\n setBlendMode(blendMode?: SkEnum<typeof BlendMode>) {\n this.setValue(\"_blendMode\", this.enum(BlendMode, blendMode));\n }\n\n getBlendMode() {\n return this._blendMode;\n }\n\n setStyle(style?: SkEnum<typeof PaintStyle>) {\n this.setValue(\"_style\", this.enum(PaintStyle, style));\n }\n\n getStyle() {\n return this._style;\n }\n\n setStrokeJoin(strokeJoin?: SkEnum<typeof StrokeJoin>) {\n this.setValue(\"_strokeJoin\", this.enum(StrokeJoin, strokeJoin));\n }\n\n getStrokeJoin() {\n return this._strokeJoin;\n }\n\n setStrokeCap(strokeCap?: SkEnum<typeof StrokeCap>) {\n this.setValue(\"_strokeCap\", this.enum(StrokeCap, strokeCap));\n }\n\n getStrokeCap() {\n return this._strokeCap;\n }\n\n setStrokeMiter(strokeMiter?: number) {\n this.setValue(\"_strokeMiter\", strokeMiter);\n }\n\n getStrokeMiter() {\n return this._strokeMiter;\n }\n\n setOpacity(opacity?: number) {\n this.setValue(\"_opacity\", opacity);\n }\n\n getOpacity() {\n return this._opacity;\n }\n\n setAntiAlias(antiAlias?: boolean) {\n this.setValue(\"_antiAlias\", antiAlias);\n }\n\n getAntiAlias() {\n return this._antiAlias;\n }\n\n setImageFilter(imageFilter?: SkImageFilter) {\n this.setValue(\"_imageFilter\", imageFilter);\n }\n\n getImageFilter() {\n return this._imageFilter;\n }\n\n setShader(shader?: SkShader) {\n this.setValue(\"_shader\", shader);\n }\n\n getShader() {\n return this._shader;\n }\n\n setPathEffect(pathEffect?: SkPathEffect) {\n this.setValue(\"_pathEffect\", pathEffect);\n }\n\n getPathEffect() {\n return this._pathEffect;\n }\n\n setColorFilter(colorFilter?: SkColorFilter) {\n this.setValue(\"_colorFilter\", colorFilter);\n }\n\n getColorFilter() {\n return this._colorFilter;\n }\n\n setMaskFilter(maskFilter?: SkMaskFilter) {\n this.setValue(\"_maskFilter\", maskFilter);\n }\n\n getMaskFilter() {\n return this._maskFilter;\n }\n\n isPristine() {\n return this.pristine;\n }\n\n concatTo(paint: SkPaint) {\n if (this._opacity !== undefined) {\n paint.setAlphaf(paint.getAlphaf() * this._opacity);\n }\n if (this._color !== undefined) {\n const currentOpacity = paint.getAlphaf();\n paint.setShader(null);\n paint.setColor(this._color);\n paint.setAlphaf(currentOpacity * paint.getAlphaf());\n }\n if (this._strokeWidth !== undefined) {\n paint.setStrokeWidth(this._strokeWidth);\n }\n if (this._blendMode !== undefined) {\n paint.setBlendMode(this._blendMode);\n }\n if (this._style !== undefined) {\n paint.setStyle(this._style);\n }\n if (this._strokeJoin !== undefined) {\n paint.setStrokeJoin(this._strokeJoin);\n }\n if (this._strokeCap !== undefined) {\n paint.setStrokeCap(this._strokeCap);\n }\n if (this._strokeMiter !== undefined) {\n paint.setStrokeMiter(this._strokeMiter);\n }\n if (this._antiAlias !== undefined) {\n paint.setAntiAlias(this._antiAlias);\n }\n if (this._imageFilter !== undefined) {\n paint.setImageFilter(this._imageFilter);\n }\n if (this._shader !== undefined) {\n paint.setShader(this._shader);\n }\n if (this._pathEffect !== undefined) {\n paint.setPathEffect(this._pathEffect);\n }\n if (this._colorFilter !== undefined) {\n paint.setColorFilter(this._colorFilter);\n }\n if (this._maskFilter !== undefined) {\n paint.setMaskFilter(this._maskFilter);\n }\n }\n}\n"],"mappings":"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"}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import type { FillType, SkImage, StrokeOpts, Vector, Color, SkPoint, BlendMode, PointMode, VertexMode, SkFont, SkRRect, SkTextBlob, SkPicture, SkSVG, SkPaint, SkRect } from "../../skia/types";
|
2
|
+
import type { CircleDef, Fit, GroupProps, PathDef, RectDef, RRectDef, SkEnum } from "./Common";
|
3
|
+
import type { DrawingContext } from "./DrawingContext";
|
4
|
+
export interface DrawingNodeProps extends GroupProps {
|
5
|
+
paint?: SkPaint;
|
6
|
+
}
|
7
|
+
export declare type ImageProps = DrawingNodeProps & RectDef & {
|
8
|
+
fit?: Fit;
|
9
|
+
image: SkImage;
|
10
|
+
};
|
11
|
+
export declare type CircleProps = CircleDef & DrawingNodeProps;
|
12
|
+
export interface PathProps extends DrawingNodeProps {
|
13
|
+
path: PathDef;
|
14
|
+
start: number;
|
15
|
+
end: number;
|
16
|
+
stroke?: StrokeOpts;
|
17
|
+
fillType?: SkEnum<typeof FillType>;
|
18
|
+
}
|
19
|
+
export interface CustomDrawingNodeProps extends DrawingNodeProps {
|
20
|
+
drawing: (ctx: DrawingContext) => void;
|
21
|
+
}
|
22
|
+
export interface LineProps extends DrawingNodeProps {
|
23
|
+
p1: Vector;
|
24
|
+
p2: Vector;
|
25
|
+
}
|
26
|
+
export declare type OvalProps = RectDef & DrawingNodeProps;
|
27
|
+
export declare type RectProps = RectDef & DrawingNodeProps;
|
28
|
+
export declare type RoundedRectProps = RRectDef & DrawingNodeProps;
|
29
|
+
export interface CubicBezierHandle {
|
30
|
+
pos: Vector;
|
31
|
+
c1: Vector;
|
32
|
+
c2: Vector;
|
33
|
+
}
|
34
|
+
export interface PatchProps extends DrawingNodeProps {
|
35
|
+
colors?: Color[];
|
36
|
+
patch: [
|
37
|
+
CubicBezierHandle,
|
38
|
+
CubicBezierHandle,
|
39
|
+
CubicBezierHandle,
|
40
|
+
CubicBezierHandle
|
41
|
+
];
|
42
|
+
texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];
|
43
|
+
blendMode?: SkEnum<typeof BlendMode>;
|
44
|
+
}
|
45
|
+
export interface VerticesProps extends DrawingNodeProps {
|
46
|
+
colors?: string[];
|
47
|
+
vertices: SkPoint[];
|
48
|
+
textures?: SkPoint[];
|
49
|
+
mode: SkEnum<typeof VertexMode>;
|
50
|
+
blendMode?: SkEnum<typeof BlendMode>;
|
51
|
+
indices?: number[];
|
52
|
+
}
|
53
|
+
export declare type ImageSVGProps = RectDef & {
|
54
|
+
svg: SkSVG;
|
55
|
+
} & DrawingNodeProps;
|
56
|
+
export interface PictureProps extends DrawingNodeProps {
|
57
|
+
picture: SkPicture;
|
58
|
+
}
|
59
|
+
export interface PointsProps extends DrawingNodeProps {
|
60
|
+
points: SkPoint[];
|
61
|
+
mode: SkEnum<typeof PointMode>;
|
62
|
+
}
|
63
|
+
export interface DiffRectProps extends DrawingNodeProps {
|
64
|
+
inner: SkRRect;
|
65
|
+
outer: SkRRect;
|
66
|
+
}
|
67
|
+
export interface TextProps extends DrawingNodeProps {
|
68
|
+
font: SkFont;
|
69
|
+
text: string;
|
70
|
+
x: number;
|
71
|
+
y: number;
|
72
|
+
}
|
73
|
+
export interface TextPathProps extends DrawingNodeProps {
|
74
|
+
font: SkFont;
|
75
|
+
text: string;
|
76
|
+
path: PathDef;
|
77
|
+
initialOffset: number;
|
78
|
+
}
|
79
|
+
export interface TextBlobProps extends DrawingNodeProps {
|
80
|
+
blob: SkTextBlob;
|
81
|
+
x: number;
|
82
|
+
y: number;
|
83
|
+
}
|
84
|
+
export interface Glyph {
|
85
|
+
id: number;
|
86
|
+
pos: SkPoint;
|
87
|
+
}
|
88
|
+
export interface GlyphsProps extends DrawingNodeProps {
|
89
|
+
font: SkFont;
|
90
|
+
x: number;
|
91
|
+
y: number;
|
92
|
+
glyphs: Glyph[];
|
93
|
+
}
|
94
|
+
export interface BoxProps extends DrawingNodeProps {
|
95
|
+
box: SkRRect | SkRect;
|
96
|
+
}
|
97
|
+
export interface BoxShadowProps {
|
98
|
+
dx?: number;
|
99
|
+
dy?: number;
|
100
|
+
spread?: number;
|
101
|
+
blur: number;
|
102
|
+
color?: Color;
|
103
|
+
inner?: boolean;
|
104
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import type { BlendMode, Color, ColorChannel, SkRuntimeEffect, TileMode, Uniforms } from "../../skia/types";
|
2
|
+
import type { Radius, SkEnum, ChildrenProps } from "./Common";
|
3
|
+
export interface BlurImageFilterProps extends ChildrenProps {
|
4
|
+
blur: Radius;
|
5
|
+
mode: SkEnum<typeof TileMode>;
|
6
|
+
}
|
7
|
+
export interface OffsetImageFilterProps extends ChildrenProps {
|
8
|
+
x: number;
|
9
|
+
y: number;
|
10
|
+
}
|
11
|
+
export interface RuntimeShaderImageFilterProps extends ChildrenProps {
|
12
|
+
source: SkRuntimeEffect;
|
13
|
+
uniforms?: Uniforms;
|
14
|
+
}
|
15
|
+
export interface BlendImageFilterProps extends ChildrenProps {
|
16
|
+
mode: BlendMode;
|
17
|
+
}
|
18
|
+
export interface MorphologyImageFilterProps extends ChildrenProps {
|
19
|
+
operator: "erode" | "dilate";
|
20
|
+
radius: Radius;
|
21
|
+
}
|
22
|
+
export interface DropShadowImageFilterProps extends ChildrenProps {
|
23
|
+
dx: number;
|
24
|
+
dy: number;
|
25
|
+
blur: number;
|
26
|
+
color: Color;
|
27
|
+
inner?: boolean;
|
28
|
+
shadowOnly?: boolean;
|
29
|
+
}
|
30
|
+
export interface DisplacementMapImageFilterProps extends ChildrenProps {
|
31
|
+
channelX: SkEnum<typeof ColorChannel>;
|
32
|
+
channelY: SkEnum<typeof ColorChannel>;
|
33
|
+
scale: number;
|
34
|
+
}
|
35
|
+
export interface BlendProps extends ChildrenProps {
|
36
|
+
mode: SkEnum<typeof BlendMode>;
|
37
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { GroupProps } from "./Common";
|
2
|
+
import type { DeclarationType, NodeType } from "./NodeType";
|
3
|
+
import type { DeclarationContext } from "./DeclarationContext";
|
4
|
+
import type { DrawingContext } from "./DrawingContext";
|
5
|
+
export interface Node<P> {
|
6
|
+
type: NodeType;
|
7
|
+
setProps(props: P): void;
|
8
|
+
setProp<K extends keyof P>(name: K, v: P[K]): boolean;
|
9
|
+
getProps(): P;
|
10
|
+
children(): Node<unknown>[];
|
11
|
+
addChild(child: Node<unknown>): void;
|
12
|
+
removeChild(child: Node<unknown>): void;
|
13
|
+
insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;
|
14
|
+
}
|
15
|
+
export declare type Invalidate = () => void;
|
16
|
+
export interface DeclarationNode<P> extends Node<P> {
|
17
|
+
declarationType: DeclarationType;
|
18
|
+
decorate(ctx: DeclarationContext): void;
|
19
|
+
setInvalidate(invalidate: Invalidate): void;
|
20
|
+
}
|
21
|
+
export interface RenderNode<P extends GroupProps> extends Node<P> {
|
22
|
+
render(ctx: DrawingContext): void;
|
23
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type { GroupProps } from \"./Common\";\nimport type { DeclarationType, NodeType } from \"./NodeType\";\nimport type { DeclarationContext } from \"./DeclarationContext\";\nimport type { DrawingContext } from \"./DrawingContext\";\n\nexport interface Node<P> {\n type: NodeType;\n\n setProps(props: P): void;\n setProp<K extends keyof P>(name: K, v: P[K]): boolean;\n getProps(): P;\n\n children(): Node<unknown>[];\n addChild(child: Node<unknown>): void;\n removeChild(child: Node<unknown>): void;\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;\n}\n\nexport type Invalidate = () => void;\n\nexport interface DeclarationNode<P> extends Node<P> {\n declarationType: DeclarationType;\n decorate(ctx: DeclarationContext): void;\n\n setInvalidate(invalidate: Invalidate): void;\n}\n\nexport interface RenderNode<P extends GroupProps> extends Node<P> {\n render(ctx: DrawingContext): void;\n}\n"],"mappings":""}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
export declare const enum NodeType {
|
2
|
+
Layer = "skLayer",
|
3
|
+
Shader = "skShader",
|
4
|
+
ImageShader = "skImageShader",
|
5
|
+
ColorShader = "skColorShader",
|
6
|
+
Turbulence = "skTurbulence",
|
7
|
+
FractalNoise = "skFractalNoise",
|
8
|
+
LinearGradient = "skLinearGradient",
|
9
|
+
RadialGradient = "skRadialGradient",
|
10
|
+
SweepGradient = "skSweepGradient",
|
11
|
+
TwoPointConicalGradient = "skTwoPointConicalGradient",
|
12
|
+
BlurMaskFilter = "skBlurMaskFilter",
|
13
|
+
DiscretePathEffect = "skDiscretePathEffect",
|
14
|
+
DashPathEffect = "skDashPathEffect",
|
15
|
+
Path1DPathEffect = "skPath1DPathEffect",
|
16
|
+
Path2DPathEffect = "skPath2DPathEffect",
|
17
|
+
CornerPathEffect = "skCornerPathEffect",
|
18
|
+
SumPathEffect = "skSumPathEffect",
|
19
|
+
Line2DPathEffect = "skLine2DPathEffect",
|
20
|
+
MatrixColorFilter = "skMatrixColorFilter",
|
21
|
+
BlendColorFilter = "skBlendColorFilter",
|
22
|
+
LinearToSRGBGammaColorFilter = "skLinearToSRGBGammaColorFilter",
|
23
|
+
SRGBToLinearGammaColorFilter = "skSRGBToLinearGammaColorFilter",
|
24
|
+
LumaColorFilter = "skLumaColorFilter",
|
25
|
+
LerpColorFilter = "skLerpColorFilter",
|
26
|
+
OffsetImageFilter = "skOffsetImageFilter",
|
27
|
+
DisplacementMapImageFilter = "skDisplacementMapImageFilter",
|
28
|
+
BlurImageFilter = "skBlurImageFilter",
|
29
|
+
DropShadowImageFilter = "skDropShadowImageFilter",
|
30
|
+
MorphologyImageFilter = "skMorphologyImageFilter",
|
31
|
+
BlendImageFilter = "skBlendImageFilter",
|
32
|
+
RuntimeShaderImageFilter = "skRuntimeShaderImageFilter",
|
33
|
+
Blend = "skBlend",
|
34
|
+
BackdropFilter = "skBackdropFilter",
|
35
|
+
Box = "skBox",
|
36
|
+
BoxShadow = "skBoxShadow",
|
37
|
+
Group = "skGroup",
|
38
|
+
Drawing = "skDrawing",
|
39
|
+
Paint = "skPaint",
|
40
|
+
Circle = "skCircle",
|
41
|
+
Fill = "skFill",
|
42
|
+
Image = "skImage",
|
43
|
+
Points = "skPoints",
|
44
|
+
Path = "skPath",
|
45
|
+
Rect = "skRect",
|
46
|
+
RRect = "skRRect",
|
47
|
+
Oval = "skOval",
|
48
|
+
Line = "skLine",
|
49
|
+
Patch = "skPatch",
|
50
|
+
Vertices = "skVertices",
|
51
|
+
DiffRect = "skDiffRect",
|
52
|
+
Text = "skText",
|
53
|
+
TextPath = "skTextPath",
|
54
|
+
TextBlob = "skTextBlob",
|
55
|
+
Glyphs = "skGlyphs",
|
56
|
+
Picture = "skPicture",
|
57
|
+
ImageSVG = "skImageSVG"
|
58
|
+
}
|
59
|
+
export declare const enum DeclarationType {
|
60
|
+
Paint = 0,
|
61
|
+
Shader = 1,
|
62
|
+
ImageFilter = 2,
|
63
|
+
ColorFilter = 3,
|
64
|
+
PathEffect = 4,
|
65
|
+
MaskFilter = 5,
|
66
|
+
Unknown = 6
|
67
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import type { Path1DEffectStyle, SkMatrix } from "../../skia/types";
|
2
|
+
import type { ChildrenProps, PathDef, SkEnum } from "./Common";
|
3
|
+
export interface CornerPathEffectProps extends ChildrenProps {
|
4
|
+
r: number;
|
5
|
+
}
|
6
|
+
export interface DiscretePathEffectProps extends ChildrenProps {
|
7
|
+
length: number;
|
8
|
+
deviation: number;
|
9
|
+
seed: number;
|
10
|
+
}
|
11
|
+
export interface DashPathEffectProps extends ChildrenProps {
|
12
|
+
intervals: number[];
|
13
|
+
phase?: number;
|
14
|
+
}
|
15
|
+
export interface Path1DPathEffectProps extends ChildrenProps {
|
16
|
+
path: PathDef;
|
17
|
+
advance: number;
|
18
|
+
phase: number;
|
19
|
+
style: SkEnum<typeof Path1DEffectStyle>;
|
20
|
+
}
|
21
|
+
export interface Path2DPathEffectProps extends ChildrenProps {
|
22
|
+
matrix: SkMatrix;
|
23
|
+
path: PathDef;
|
24
|
+
}
|
25
|
+
export interface Line2DPathEffectProps extends ChildrenProps {
|
26
|
+
width: number;
|
27
|
+
matrix: SkMatrix;
|
28
|
+
}
|