@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
@@ -0,0 +1,44 @@
|
|
1
|
+
import type { Canvas, CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { BlendMode, ClipOp, FilterMode, MipmapMode, PointMode, SaveLayerFlag, SkCanvas, SkColor, SkFont, SkImage, SkImageFilter, SkMatrix, SkPaint, SkPath, SkPicture, SkPoint, SkRect, SkRRect, SkSVG, SkTextBlob, SkVertices } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkCanvas extends HostObject<Canvas, "Canvas"> implements SkCanvas {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Canvas);
|
6
|
+
drawRect(rect: SkRect, paint: SkPaint): void;
|
7
|
+
drawImage(image: SkImage, x: number, y: number, paint?: SkPaint): void;
|
8
|
+
drawImageRect(img: SkImage, src: SkRect, dest: SkRect, paint: SkPaint, fastSample?: boolean): void;
|
9
|
+
drawImageCubic(img: SkImage, left: number, top: number, B: number, C: number, paint?: SkPaint | null): void;
|
10
|
+
drawImageOptions(img: SkImage, left: number, top: number, fm: FilterMode, mm: MipmapMode, paint?: SkPaint | null): void;
|
11
|
+
drawImageNine(img: SkImage, center: SkRect, dest: SkRect, filter: FilterMode, paint?: SkPaint | null): void;
|
12
|
+
drawImageRectCubic(img: SkImage, src: SkRect, dest: SkRect, B: number, C: number, paint?: SkPaint | null): void;
|
13
|
+
drawImageRectOptions(img: SkImage, src: SkRect, dest: SkRect, fm: FilterMode, mm: MipmapMode, paint?: SkPaint | null): void;
|
14
|
+
drawPaint(paint: SkPaint): void;
|
15
|
+
drawLine(x0: number, y0: number, x1: number, y1: number, paint: SkPaint): void;
|
16
|
+
drawCircle(cx: number, cy: number, radius: number, paint: SkPaint): void;
|
17
|
+
drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint): void;
|
18
|
+
drawPatch(cubics: SkPoint[], colors?: SkColor[] | null, texs?: SkPoint[] | null, mode?: BlendMode | null, paint?: SkPaint): void;
|
19
|
+
restoreToCount(saveCount: number): void;
|
20
|
+
drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint): void;
|
21
|
+
drawArc(oval: SkRect, startAngle: number, sweepAngle: number, useCenter: boolean, paint: SkPaint): void;
|
22
|
+
drawRRect(rrect: SkRRect, paint: SkPaint): void;
|
23
|
+
drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;
|
24
|
+
drawOval(oval: SkRect, paint: SkPaint): void;
|
25
|
+
drawPath(path: SkPath, paint: SkPaint): void;
|
26
|
+
drawText(str: string, x: number, y: number, paint: SkPaint, font: SkFont): void;
|
27
|
+
drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint): void;
|
28
|
+
drawGlyphs(glyphs: number[], positions: SkPoint[], x: number, y: number, font: SkFont, paint: SkPaint): void;
|
29
|
+
drawSvg(_svgDom: SkSVG, _width?: number, _height?: number): void;
|
30
|
+
save(): number;
|
31
|
+
saveLayer(paint?: SkPaint, bounds?: SkRect | null, backdrop?: SkImageFilter | null, flags?: SaveLayerFlag): number;
|
32
|
+
restore(): void;
|
33
|
+
rotate(rotationInDegrees: number, rx: number, ry: number): void;
|
34
|
+
scale(sx: number, sy: number): void;
|
35
|
+
skew(sx: number, sy: number): void;
|
36
|
+
translate(dx: number, dy: number): void;
|
37
|
+
drawColor(color: SkColor, blendMode?: BlendMode): void;
|
38
|
+
clear(color: SkColor): void;
|
39
|
+
clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean): void;
|
40
|
+
clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean): void;
|
41
|
+
clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;
|
42
|
+
concat(m: SkMatrix): void;
|
43
|
+
drawPicture(skp: SkPicture): void;
|
44
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, ColorFilter } from "canvaskit-wasm";
|
2
|
+
import type { SkColorFilter } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkColorFilter extends HostObject<ColorFilter, "ColorFilter"> implements SkColorFilter {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: ColorFilter);
|
6
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { ColorFilterFactory, SkColorFilter, InputColorMatrix, SkColor, BlendMode } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkColorFilter } from "./JsiSkColorFilter";
|
5
|
+
export declare class JsiSkColorFilterFactory extends Host implements ColorFilterFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
MakeMatrix(cMatrix: InputColorMatrix): JsiSkColorFilter;
|
8
|
+
MakeBlend(color: SkColor, mode: BlendMode): JsiSkColorFilter;
|
9
|
+
MakeCompose(outer: SkColorFilter, inner: SkColorFilter): JsiSkColorFilter;
|
10
|
+
MakeLerp(t: number, dst: SkColorFilter, src: SkColorFilter): JsiSkColorFilter;
|
11
|
+
MakeLinearToSRGBGamma(): JsiSkColorFilter;
|
12
|
+
MakeSRGBToLinearGamma(): JsiSkColorFilter;
|
13
|
+
MakeLumaColorFilter(): SkColorFilter;
|
14
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { CanvasKit, ContourMeasure } from "canvaskit-wasm";
|
2
|
+
import type { SkContourMeasure } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import { JsiSkPath } from "./JsiSkPath";
|
5
|
+
import { JsiSkPoint } from "./JsiSkPoint";
|
6
|
+
export declare class JsiSkContourMeasure extends HostObject<ContourMeasure, "ContourMeasure"> implements SkContourMeasure {
|
7
|
+
constructor(CanvasKit: CanvasKit, ref: ContourMeasure);
|
8
|
+
getPosTan(distance: number): [position: JsiSkPoint, tangent: JsiSkPoint];
|
9
|
+
getSegment(startD: number, stopD: number, startWithMoveTo: boolean): JsiSkPath;
|
10
|
+
isClosed(): boolean;
|
11
|
+
length(): number;
|
12
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CanvasKit, ContourMeasureIter } from "canvaskit-wasm";
|
2
|
+
import type { SkContourMeasureIter } from "../types/ContourMeasure";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import { JsiSkContourMeasure } from "./JsiSkContourMeasure";
|
5
|
+
export declare class JsiSkContourMeasureIter extends HostObject<ContourMeasureIter, "ContourMeasureIter"> implements SkContourMeasureIter {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: ContourMeasureIter);
|
7
|
+
next(): JsiSkContourMeasure | null;
|
8
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SkData } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
declare type Data = ArrayBuffer;
|
5
|
+
export declare class JsiSkData extends HostObject<Data, "Data"> implements SkData {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: Data);
|
7
|
+
}
|
8
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SkData } from "../types";
|
3
|
+
import type { DataFactory } from "../types/Data/DataFactory";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
import { JsiSkData } from "./JsiSkData";
|
6
|
+
export declare class JsiSkDataFactory extends Host implements DataFactory {
|
7
|
+
constructor(CanvasKit: CanvasKit);
|
8
|
+
fromURI(uri: string): Promise<JsiSkData>;
|
9
|
+
/**
|
10
|
+
* Creates a new Data object from a byte array.
|
11
|
+
* @param bytes An array of bytes representing the data
|
12
|
+
*/
|
13
|
+
fromBytes(bytes: Uint8Array): JsiSkData;
|
14
|
+
/**
|
15
|
+
* Creates a new Data object from a base64 encoded string.
|
16
|
+
* @param base64 A Base64 encoded string representing the data
|
17
|
+
*/
|
18
|
+
fromBase64(base64: string): SkData;
|
19
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { CanvasKit, Font } from "canvaskit-wasm";
|
2
|
+
import type { FontEdging, FontHinting, SkFont, SkPaint, SkPoint, SkTypeface } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import { JsiSkRect } from "./JsiSkRect";
|
5
|
+
import { JsiSkTypeface } from "./JsiSkTypeface";
|
6
|
+
export declare class JsiSkFont extends HostObject<Font, "Font"> implements SkFont {
|
7
|
+
constructor(CanvasKit: CanvasKit, ref: Font);
|
8
|
+
getTextWidth(text: string, paint?: SkPaint | undefined): number;
|
9
|
+
getMetrics(): {
|
10
|
+
ascent: number;
|
11
|
+
descent: number;
|
12
|
+
leading: number;
|
13
|
+
bounds: JsiSkRect | undefined;
|
14
|
+
};
|
15
|
+
getGlyphIDs(str: string, numCodePoints?: number): number[];
|
16
|
+
getGlyphWidths(glyphs: number[], paint?: SkPaint | null): number[];
|
17
|
+
getGlyphIntercepts(glyphs: number[], positions: SkPoint[], top: number, bottom: number): number[];
|
18
|
+
getScaleX(): number;
|
19
|
+
getSize(): number;
|
20
|
+
getSkewX(): number;
|
21
|
+
isEmbolden(): boolean;
|
22
|
+
getTypeface(): JsiSkTypeface | null;
|
23
|
+
setEdging(edging: FontEdging): void;
|
24
|
+
setEmbeddedBitmaps(embeddedBitmaps: boolean): void;
|
25
|
+
setHinting(hinting: FontHinting): void;
|
26
|
+
setLinearMetrics(linearMetrics: boolean): void;
|
27
|
+
setScaleX(sx: number): void;
|
28
|
+
setSize(points: number): void;
|
29
|
+
setSkewX(sx: number): void;
|
30
|
+
setEmbolden(embolden: boolean): void;
|
31
|
+
setSubpixel(subpixel: boolean): void;
|
32
|
+
setTypeface(face: SkTypeface | null): void;
|
33
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { CanvasKit, Image } from "canvaskit-wasm";
|
2
|
+
import type { ImageFormat, FilterMode, MipmapMode, SkImage, SkMatrix, SkShader, TileMode } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkImage extends HostObject<Image, "Image"> implements SkImage {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Image);
|
6
|
+
height(): number;
|
7
|
+
width(): number;
|
8
|
+
makeShaderOptions(tx: TileMode, ty: TileMode, fm: FilterMode, mm: MipmapMode, localMatrix?: SkMatrix): SkShader;
|
9
|
+
makeShaderCubic(tx: TileMode, ty: TileMode, B: number, C: number, localMatrix?: SkMatrix): SkShader;
|
10
|
+
encodeToBytes(fmt?: ImageFormat, quality?: number): Uint8Array;
|
11
|
+
encodeToBase64(fmt?: ImageFormat, quality?: number): string;
|
12
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SkData, ImageInfo } from "../types";
|
3
|
+
import type { ImageFactory } from "../types/Image/ImageFactory";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
import { JsiSkImage } from "./JsiSkImage";
|
6
|
+
export declare class JsiSkImageFactory extends Host implements ImageFactory {
|
7
|
+
constructor(CanvasKit: CanvasKit);
|
8
|
+
MakeImageFromEncoded(encoded: SkData): JsiSkImage | null;
|
9
|
+
MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): JsiSkImage | null;
|
10
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, ImageFilter } from "canvaskit-wasm";
|
2
|
+
import type { SkImageFilter } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkImageFilter extends HostObject<ImageFilter, "ImageFilter"> implements SkImageFilter {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: ImageFilter);
|
6
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { ColorChannel, ImageFilterFactory, SkColor, SkColorFilter, SkImageFilter, BlendMode, SkRect, SkRuntimeShaderBuilder, SkShader, TileMode } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkImageFilter } from "./JsiSkImageFilter";
|
5
|
+
export declare class JsiSkImageFilterFactory extends Host implements ImageFilterFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
MakeOffset(dx: number, dy: number, input: SkImageFilter | null): JsiSkImageFilter;
|
8
|
+
MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input: SkImageFilter | null): SkImageFilter;
|
9
|
+
MakeShader(shader: SkShader, _input: SkImageFilter | null): SkImageFilter;
|
10
|
+
MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input: SkImageFilter | null): JsiSkImageFilter;
|
11
|
+
MakeColorFilter(cf: SkColorFilter, input: SkImageFilter | null): JsiSkImageFilter;
|
12
|
+
MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null): JsiSkImageFilter;
|
13
|
+
MakeDropShadow(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
|
14
|
+
MakeDropShadowOnly(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
|
15
|
+
MakeErode(rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
|
16
|
+
MakeDilate(rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
|
17
|
+
MakeBlend(mode: BlendMode, background: SkImageFilter, foreground: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
|
18
|
+
MakeRuntimeShader(_builder: SkRuntimeShaderBuilder, _childShaderName: string | null, _input: SkImageFilter | null): SkImageFilter;
|
19
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, MaskFilter } from "canvaskit-wasm";
|
2
|
+
import type { SkMaskFilter } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkMaskFilter extends HostObject<MaskFilter, "MaskFilter"> implements SkMaskFilter {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: MaskFilter);
|
6
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { BlurStyle } from "../types";
|
3
|
+
import type { MaskFilterFactory } from "../types/MaskFilter";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
import { JsiSkMaskFilter } from "./JsiSkMaskFilter";
|
6
|
+
export declare class JsiSkMaskFilterFactory extends Host implements MaskFilterFactory {
|
7
|
+
constructor(CanvasKit: CanvasKit);
|
8
|
+
MakeBlur(style: BlurStyle, sigma: number, respectCTM: boolean): JsiSkMaskFilter;
|
9
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { CanvasKit, Matrix3x3 } from "canvaskit-wasm";
|
2
|
+
import type { SkMatrix } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkMatrix extends HostObject<Matrix3x3, "Matrix"> implements SkMatrix {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Matrix3x3);
|
6
|
+
concat(matrix: SkMatrix): void;
|
7
|
+
translate(x: number, y: number): void;
|
8
|
+
scale(x: number, y?: number): void;
|
9
|
+
skew(x: number, y: number): void;
|
10
|
+
rotate(value: number): void;
|
11
|
+
identity(): void;
|
12
|
+
get(): number[];
|
13
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import type { CanvasKit, Paint } from "canvaskit-wasm";
|
2
|
+
import type { StrokeJoin, BlendMode, SkColor, SkColorFilter, SkImageFilter, SkPaint, SkShader, StrokeCap, PaintStyle, SkMaskFilter, SkPathEffect } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkPaint extends HostObject<Paint, "Paint"> implements SkPaint {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Paint);
|
6
|
+
copy(): JsiSkPaint;
|
7
|
+
reset(): void;
|
8
|
+
getAlphaf(): number;
|
9
|
+
getColor(): Float32Array;
|
10
|
+
getStrokeCap(): number;
|
11
|
+
getStrokeJoin(): number;
|
12
|
+
getStrokeMiter(): number;
|
13
|
+
getStrokeWidth(): number;
|
14
|
+
setAlphaf(alpha: number): void;
|
15
|
+
setAntiAlias(aa: boolean): void;
|
16
|
+
setBlendMode(blendMode: BlendMode): void;
|
17
|
+
setColor(color: SkColor): void;
|
18
|
+
setColorFilter(filter: SkColorFilter | null): void;
|
19
|
+
setImageFilter(filter: SkImageFilter | null): void;
|
20
|
+
setMaskFilter(filter: SkMaskFilter | null): void;
|
21
|
+
setPathEffect(effect: SkPathEffect | null): void;
|
22
|
+
setShader(shader: SkShader | null): void;
|
23
|
+
setStrokeCap(cap: StrokeCap): void;
|
24
|
+
setStrokeJoin(join: StrokeJoin): void;
|
25
|
+
setStrokeMiter(limit: number): void;
|
26
|
+
setStrokeWidth(width: number): void;
|
27
|
+
setStyle(style: PaintStyle): void;
|
28
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import type { CanvasKit, Path } from "canvaskit-wasm";
|
2
|
+
import type { FillType, PathCommand, PathOp, SkMatrix, SkPath, SkPoint, SkRect, SkRRect, StrokeOpts } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import { JsiSkPoint } from "./JsiSkPoint";
|
5
|
+
import { JsiSkRect } from "./JsiSkRect";
|
6
|
+
export declare class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
7
|
+
constructor(CanvasKit: CanvasKit, ref: Path);
|
8
|
+
addPath(src: SkPath, matrix?: SkMatrix, extend?: boolean): this;
|
9
|
+
addArc(oval: SkRect, startAngleInDegrees: number, sweepAngleInDegrees: number): this;
|
10
|
+
addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): this;
|
11
|
+
countPoints(): number;
|
12
|
+
addPoly(points: SkPoint[], close: boolean): this;
|
13
|
+
moveTo(x: number, y: number): this;
|
14
|
+
lineTo(x: number, y: number): this;
|
15
|
+
makeAsWinding(): this | null;
|
16
|
+
offset(dx: number, dy: number): this;
|
17
|
+
rArcTo(rx: number, ry: number, xAxisRotateInDegrees: number, useSmallArc: boolean, isCCW: boolean, dx: number, dy: number): this;
|
18
|
+
rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number): this;
|
19
|
+
rCubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): this;
|
20
|
+
rMoveTo(x: number, y: number): this;
|
21
|
+
rLineTo(x: number, y: number): this;
|
22
|
+
rQuadTo(x1: number, y1: number, x2: number, y2: number): this;
|
23
|
+
setFillType(fill: FillType): void;
|
24
|
+
setIsVolatile(volatile: boolean): void;
|
25
|
+
stroke(opts?: StrokeOpts): this | null;
|
26
|
+
close(): void;
|
27
|
+
reset(): void;
|
28
|
+
rewind(): void;
|
29
|
+
computeTightBounds(): SkRect;
|
30
|
+
arcToOval(oval: SkRect, startAngleInDegrees: number, sweepAngleInDegrees: number, forceMoveTo: boolean): this;
|
31
|
+
arcToRotated(rx: number, ry: number, xAxisRotateInDegrees: number, useSmallArc: boolean, isCCW: boolean, x: number, y: number): this;
|
32
|
+
arcToTangent(x1: number, y1: number, x2: number, y2: number, radius: number): this;
|
33
|
+
conicTo(x1: number, y1: number, x2: number, y2: number, w: number): this;
|
34
|
+
contains(x: number, y: number): boolean;
|
35
|
+
copy(): JsiSkPath;
|
36
|
+
cubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): this;
|
37
|
+
dash(on: number, off: number, phase: number): boolean;
|
38
|
+
equals(other: SkPath): boolean;
|
39
|
+
getBounds(): JsiSkRect;
|
40
|
+
getFillType(): number;
|
41
|
+
quadTo(x1: number, y1: number, x2: number, y2: number): void;
|
42
|
+
addRect(rect: SkRect, isCCW?: boolean): void;
|
43
|
+
addRRect(rrect: SkRRect, isCCW?: boolean): this;
|
44
|
+
getPoint(index: number): JsiSkPoint;
|
45
|
+
isEmpty(): boolean;
|
46
|
+
isVolatile(): boolean;
|
47
|
+
addCircle(x: number, y: number, r: number): this;
|
48
|
+
getLastPt(): JsiSkPoint;
|
49
|
+
op(path: SkPath, op: PathOp): boolean;
|
50
|
+
simplify(): boolean;
|
51
|
+
toSVGString(): string;
|
52
|
+
trim(startT: number, stopT: number, isComplement: boolean): this | null;
|
53
|
+
transform(m3: SkMatrix): void;
|
54
|
+
interpolate(end: SkPath, t: number): JsiSkPath | null;
|
55
|
+
isInterpolatable(path2: SkPath): boolean;
|
56
|
+
toCmds(): PathCommand[];
|
57
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, PathEffect } from "canvaskit-wasm";
|
2
|
+
import type { SkPathEffect } from "../types/PathEffect";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkPathEffect extends HostObject<PathEffect, "PathEffect"> implements SkPathEffect {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: PathEffect);
|
6
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { Path1DEffectStyle, PathEffectFactory, SkMatrix, SkPath, SkPathEffect } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkPathEffect } from "./JsiSkPathEffect";
|
5
|
+
export declare class JsiSkPathEffectFactory extends Host implements PathEffectFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
MakeCorner(radius: number): JsiSkPathEffect | null;
|
8
|
+
MakeDash(intervals: number[], phase?: number): JsiSkPathEffect;
|
9
|
+
MakeDiscrete(segLength: number, dev: number, seedAssist: number): JsiSkPathEffect;
|
10
|
+
MakeCompose(_outer: SkPathEffect, _inner: SkPathEffect): SkPathEffect;
|
11
|
+
MakeSum(_outer: SkPathEffect, _inner: SkPathEffect): SkPathEffect;
|
12
|
+
MakeLine2D(width: number, matrix: SkMatrix): JsiSkPathEffect | null;
|
13
|
+
MakePath1D(path: SkPath, advance: number, phase: number, style: Path1DEffectStyle): JsiSkPathEffect | null;
|
14
|
+
MakePath2D(matrix: SkMatrix, path: SkPath): JsiSkPathEffect | null;
|
15
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { PathCommand, PathOp, SkFont, SkPath } from "../types";
|
3
|
+
import type { PathFactory } from "../types/Path/PathFactory";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
import { JsiSkPath } from "./JsiSkPath";
|
6
|
+
export declare class JsiSkPathFactory extends Host implements PathFactory {
|
7
|
+
constructor(CanvasKit: CanvasKit);
|
8
|
+
Make(): JsiSkPath;
|
9
|
+
MakeFromSVGString(str: string): JsiSkPath | null;
|
10
|
+
MakeFromOp(one: SkPath, two: SkPath, op: PathOp): JsiSkPath | null;
|
11
|
+
MakeFromCmds(cmds: PathCommand[]): JsiSkPath | null;
|
12
|
+
MakeFromText(_text: string, _x: number, _y: number, _font: SkFont): SkPath | null;
|
13
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit, SkPicture as Picture } from "canvaskit-wasm";
|
2
|
+
import type { FilterMode, SkRect, TileMode, SkPicture, SkMatrix } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import { JsiSkShader } from "./JsiSkShader";
|
5
|
+
export declare class JsiSkPicture extends HostObject<Picture, "Picture"> implements SkPicture {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: Picture);
|
7
|
+
makeShader(tmx: TileMode, tmy: TileMode, mode: FilterMode, localMatrix?: SkMatrix, tileRect?: SkRect): JsiSkShader;
|
8
|
+
serialize(): Uint8Array | null;
|
9
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { PictureFactory } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkPicture } from "./JsiSkPicture";
|
5
|
+
export declare class JsiSkPictureFactory extends Host implements PictureFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
MakePicture(bytes: Uint8Array | ArrayBuffer): JsiSkPicture | null;
|
8
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { CanvasKit, PictureRecorder } from "canvaskit-wasm";
|
2
|
+
import type { SkRect } from "../types";
|
3
|
+
import type { SkPictureRecorder } from "../types/Picture/PictureRecorder";
|
4
|
+
import { HostObject } from "./Host";
|
5
|
+
import { JsiSkCanvas } from "./JsiSkCanvas";
|
6
|
+
import { JsiSkPicture } from "./JsiSkPicture";
|
7
|
+
export declare class JsiSkPictureRecorder extends HostObject<PictureRecorder, "PictureRecorder"> implements SkPictureRecorder {
|
8
|
+
constructor(CanvasKit: CanvasKit, ref: PictureRecorder);
|
9
|
+
beginRecording(bounds: SkRect): JsiSkCanvas;
|
10
|
+
finishRecordingAsPicture(): JsiSkPicture;
|
11
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit, Point } from "canvaskit-wasm";
|
2
|
+
import type { SkPoint } from "../types";
|
3
|
+
import { BaseHostObject } from "./Host";
|
4
|
+
export declare class JsiSkPoint extends BaseHostObject<Point, "Point"> implements SkPoint {
|
5
|
+
static fromValue(point: SkPoint): Float32Array;
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: Point);
|
7
|
+
get x(): number;
|
8
|
+
get y(): number;
|
9
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { CanvasKit, RRect } from "canvaskit-wasm";
|
2
|
+
import type { SkRect, SkRRect } from "../types";
|
3
|
+
import { BaseHostObject } from "./Host";
|
4
|
+
import { JsiSkRect } from "./JsiSkRect";
|
5
|
+
export declare class JsiSkRRect extends BaseHostObject<RRect, "RRect"> implements SkRRect {
|
6
|
+
static fromValue(CanvasKit: CanvasKit, rect: SkRRect): Float32Array;
|
7
|
+
constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number);
|
8
|
+
get rx(): number;
|
9
|
+
get ry(): number;
|
10
|
+
get rect(): JsiSkRect;
|
11
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SkRSXform } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare type RSXform = Float32Array;
|
5
|
+
export declare class JsiSkRSXform extends HostObject<RSXform, "RSXform"> implements SkRSXform {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: RSXform);
|
7
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { CanvasKit, Rect } from "canvaskit-wasm";
|
2
|
+
import type { SkRect } from "../types";
|
3
|
+
import { BaseHostObject } from "./Host";
|
4
|
+
export declare class JsiSkRect extends BaseHostObject<Rect, "Rect"> implements SkRect {
|
5
|
+
static fromValue(CanvasKit: CanvasKit, rect: SkRect): Float32Array;
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: Rect);
|
7
|
+
get x(): number;
|
8
|
+
get y(): number;
|
9
|
+
get width(): number;
|
10
|
+
get height(): number;
|
11
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { CanvasKit, RuntimeEffect } from "canvaskit-wasm";
|
2
|
+
import type { SkMatrix, SkShader } from "../types";
|
3
|
+
import type { SkRuntimeEffect } from "../types/RuntimeEffect/RuntimeEffect";
|
4
|
+
import { HostObject } from "./Host";
|
5
|
+
import { JsiSkShader } from "./JsiSkShader";
|
6
|
+
export declare class JsiSkRuntimeEffect extends HostObject<RuntimeEffect, "RuntimeEffect"> implements SkRuntimeEffect {
|
7
|
+
private sksl;
|
8
|
+
constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, sksl: string);
|
9
|
+
source(): string;
|
10
|
+
makeShader(uniforms: number[], localMatrix?: SkMatrix): JsiSkShader;
|
11
|
+
makeShaderWithChildren(uniforms: number[], children?: SkShader[], localMatrix?: SkMatrix): JsiSkShader;
|
12
|
+
getUniform(index: number): import("canvaskit-wasm").SkSLUniform;
|
13
|
+
getUniformCount(): number;
|
14
|
+
getUniformFloatCount(): number;
|
15
|
+
getUniformName(index: number): string;
|
16
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { RuntimeEffectFactory } from "../types/RuntimeEffect/RuntimeEffectFactory";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkRuntimeEffect } from "./JsiSkRuntimeEffect";
|
5
|
+
export declare class JsiSkRuntimeEffectFactory extends Host implements RuntimeEffectFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
Make(sksl: string): JsiSkRuntimeEffect | null;
|
8
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SkData, SkSVG } from "../types";
|
3
|
+
import type { SVGFactory } from "../types/SVG/SVGFactory";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
export declare class JsiSkSVGFactory extends Host implements SVGFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
MakeFromData(_data: SkData): SkSVG | null;
|
8
|
+
MakeFromString(_str: string): SkSVG | null;
|
9
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, Shader } from "canvaskit-wasm";
|
2
|
+
import type { SkShader } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkShader extends HostObject<Shader, "Shader"> implements SkShader {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Shader);
|
6
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { BlendMode, SkColor, SkMatrix, SkPoint, SkShader, TileMode } from "../types";
|
3
|
+
import type { ShaderFactory } from "../types/Shader/ShaderFactory";
|
4
|
+
import { Host } from "./Host";
|
5
|
+
import { JsiSkShader } from "./JsiSkShader";
|
6
|
+
export declare class JsiSkShaderFactory extends Host implements ShaderFactory {
|
7
|
+
constructor(CanvasKit: CanvasKit);
|
8
|
+
MakeLinearGradient(start: SkPoint, end: SkPoint, colors: SkColor[], pos: number[] | null, mode: TileMode, localMatrix?: SkMatrix, flags?: number): JsiSkShader;
|
9
|
+
MakeRadialGradient(center: SkPoint, radius: number, colors: SkColor[], pos: number[] | null, mode: TileMode, localMatrix?: SkMatrix, flags?: number): JsiSkShader;
|
10
|
+
MakeTwoPointConicalGradient(start: SkPoint, startRadius: number, end: SkPoint, endRadius: number, colors: SkColor[], pos: number[] | null, mode: TileMode, localMatrix?: SkMatrix, flags?: number): JsiSkShader;
|
11
|
+
MakeSweepGradient(cx: number, cy: number, colors: SkColor[], pos: number[] | null, mode: TileMode, localMatrix?: SkMatrix | null, flags?: number, startAngleInDegrees?: number, endAngleInDegrees?: number): JsiSkShader;
|
12
|
+
MakeTurbulence(baseFreqX: number, baseFreqY: number, octaves: number, seed: number, tileW: number, tileH: number): JsiSkShader;
|
13
|
+
MakeFractalNoise(baseFreqX: number, baseFreqY: number, octaves: number, seed: number, tileW: number, tileH: number): JsiSkShader;
|
14
|
+
MakeBlend(mode: BlendMode, one: SkShader, two: SkShader): JsiSkShader;
|
15
|
+
MakeColor(color: SkColor): JsiSkShader;
|
16
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit, Surface } from "canvaskit-wasm";
|
2
|
+
import type { SkCanvas, SkImage, SkRect, SkSurface } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkSurface extends HostObject<Surface, "Surface"> implements SkSurface {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: Surface);
|
6
|
+
flush(): void;
|
7
|
+
getCanvas(): SkCanvas;
|
8
|
+
makeImageSnapshot(bounds?: SkRect): SkImage;
|
9
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGJ,UADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;EACD;;EAEDC,SAAS,GAAa;IACpB,OAAO,
|
1
|
+
{"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","flush","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n flush() {\n this.ref.flush();\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGJ,UADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;EACD;;EAEDC,KAAK,GAAG;IACN,KAAKD,GAAL,CAASC,KAAT;EACD;;EAEDC,SAAS,GAAa;IACpB,OAAO,IAAIR,WAAJ,CAAgB,KAAKK,SAArB,EAAgC,KAAKC,GAAL,CAASE,SAAT,EAAhC,CAAP;EACD;;EAEDC,iBAAiB,CAACC,MAAD,EAA2B;IAC1C,MAAMC,KAAK,GAAG,KAAKL,GAAL,CAASG,iBAAT,CACZC,MAAM,GACFE,KAAK,CAACC,IAAN,CAAWX,SAAS,CAACY,SAAV,CAAoB,KAAKT,SAAzB,EAAoCK,MAApC,CAAX,CADE,GAEFK,SAHQ,CAAd;IAKA,OAAO,IAAId,UAAJ,CAAe,KAAKI,SAApB,EAA+BM,KAA/B,CAAP;EACD;;AApBH"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { SurfaceFactory } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkSurface } from "./JsiSkSurface";
|
5
|
+
export declare class JsiSkSurfaceFactory extends Host implements SurfaceFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
Make(width: number, height: number): JsiSkSurface | null;
|
8
|
+
MakeOffscreen(width: number, height: number): JsiSkSurface | null;
|
9
|
+
}
|
@@ -9,7 +9,27 @@ export class JsiSkSurfaceFactory extends Host {
|
|
9
9
|
const surface = this.CanvasKit.MakeSurface(width, height);
|
10
10
|
|
11
11
|
if (!surface) {
|
12
|
-
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
|
15
|
+
return new JsiSkSurface(this.CanvasKit, surface);
|
16
|
+
}
|
17
|
+
|
18
|
+
MakeOffscreen(width, height) {
|
19
|
+
// OffscreenCanvas may be unvailable in some environments.
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
21
|
+
const OC = globalThis.OffscreenCanvas;
|
22
|
+
let surface;
|
23
|
+
|
24
|
+
if (OC === undefined) {
|
25
|
+
surface = this.CanvasKit.MakeSurface(width, height);
|
26
|
+
} else {
|
27
|
+
const offscreen = new OC(width, height);
|
28
|
+
surface = this.CanvasKit.MakeWebGLCanvasSurface(offscreen);
|
29
|
+
}
|
30
|
+
|
31
|
+
if (!surface) {
|
32
|
+
return null;
|
13
33
|
}
|
14
34
|
|
15
35
|
return new JsiSkSurface(this.CanvasKit, surface);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Host","JsiSkSurface","JsiSkSurfaceFactory","constructor","CanvasKit","Make","width","height","surface","MakeSurface","
|
1
|
+
{"version":3,"names":["Host","JsiSkSurface","JsiSkSurfaceFactory","constructor","CanvasKit","Make","width","height","surface","MakeSurface","MakeOffscreen","OC","globalThis","OffscreenCanvas","undefined","offscreen","MakeWebGLCanvasSurface"],"sources":["JsiSkSurfaceFactory.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SurfaceFactory } from \"../types\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkSurface } from \"./JsiSkSurface\";\n\nexport class JsiSkSurfaceFactory extends Host implements SurfaceFactory {\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(width: number, height: number) {\n const surface = this.CanvasKit.MakeSurface(width, height);\n if (!surface) {\n return null;\n }\n return new JsiSkSurface(this.CanvasKit, surface);\n }\n\n MakeOffscreen(width: number, height: number) {\n // OffscreenCanvas may be unvailable in some environments.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const OC = (globalThis as any).OffscreenCanvas;\n let surface: Surface | null;\n if (OC === undefined) {\n surface = this.CanvasKit.MakeSurface(width, height);\n } else {\n const offscreen = new OC(width, height);\n surface = this.CanvasKit.MakeWebGLCanvasSurface(\n offscreen as unknown as HTMLCanvasElement\n );\n }\n if (!surface) {\n return null;\n }\n return new JsiSkSurface(this.CanvasKit, surface);\n }\n}\n"],"mappings":"AAIA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA,OAAO,MAAMC,mBAAN,SAAkCF,IAAlC,CAAiE;EACtEG,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CAACC,KAAD,EAAgBC,MAAhB,EAAgC;IAClC,MAAMC,OAAO,GAAG,KAAKJ,SAAL,CAAeK,WAAf,CAA2BH,KAA3B,EAAkCC,MAAlC,CAAhB;;IACA,IAAI,CAACC,OAAL,EAAc;MACZ,OAAO,IAAP;IACD;;IACD,OAAO,IAAIP,YAAJ,CAAiB,KAAKG,SAAtB,EAAiCI,OAAjC,CAAP;EACD;;EAEDE,aAAa,CAACJ,KAAD,EAAgBC,MAAhB,EAAgC;IAC3C;IACA;IACA,MAAMI,EAAE,GAAIC,UAAD,CAAoBC,eAA/B;IACA,IAAIL,OAAJ;;IACA,IAAIG,EAAE,KAAKG,SAAX,EAAsB;MACpBN,OAAO,GAAG,KAAKJ,SAAL,CAAeK,WAAf,CAA2BH,KAA3B,EAAkCC,MAAlC,CAAV;IACD,CAFD,MAEO;MACL,MAAMQ,SAAS,GAAG,IAAIJ,EAAJ,CAAOL,KAAP,EAAcC,MAAd,CAAlB;MACAC,OAAO,GAAG,KAAKJ,SAAL,CAAeY,sBAAf,CACRD,SADQ,CAAV;IAGD;;IACD,IAAI,CAACP,OAAL,EAAc;MACZ,OAAO,IAAP;IACD;;IACD,OAAO,IAAIP,YAAJ,CAAiB,KAAKG,SAAtB,EAAiCI,OAAjC,CAAP;EACD;;AA9BqE"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CanvasKit, TextBlob } from "canvaskit-wasm";
|
2
|
+
import type { SkTextBlob } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
export declare class JsiSkTextBlob extends HostObject<TextBlob, "TextBlob"> implements SkTextBlob {
|
5
|
+
constructor(CanvasKit: CanvasKit, ref: TextBlob);
|
6
|
+
}
|