@shopify/react-native-skia 0.1.129 → 0.1.132
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
- package/cpp/api/JsiSkCanvas.h +2 -2
- package/cpp/api/JsiSkFont.h +6 -2
- package/cpp/api/JsiSkMatrix.h +40 -27
- package/cpp/api/JsiSkPaint.h +3 -1
- package/cpp/api/JsiSkPath.h +67 -61
- package/cpp/api/JsiSkPathFactory.h +14 -1
- package/cpp/api/JsiSkRuntimeEffect.h +7 -9
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
- package/cpp/api/JsiSkTypeface.h +11 -2
- package/cpp/api/JsiSkTypefaceFactory.h +5 -1
- package/cpp/api/JsiSkVertices.h +0 -2
- package/cpp/rnskia/RNSkInfoParameter.h +2 -0
- package/cpp/rnskia/values/RNSkValue.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +7 -1
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkBitmap.h +4 -2
- package/cpp/skia/include/core/SkCanvas.h +31 -20
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +1 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
- package/cpp/skia/include/core/SkDrawable.h +7 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
- package/cpp/skia/include/core/SkFont.h +4 -3
- package/cpp/skia/include/core/SkFontArguments.h +33 -1
- package/cpp/skia/include/core/SkGraphics.h +13 -0
- package/cpp/skia/include/core/SkImage.h +67 -22
- package/cpp/skia/include/core/SkImageEncoder.h +0 -3
- package/cpp/skia/include/core/SkImageGenerator.h +4 -3
- package/cpp/skia/include/core/SkImageInfo.h +35 -142
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkPaint.h +4 -19
- package/cpp/skia/include/core/SkPath.h +20 -33
- package/cpp/skia/include/core/SkPathBuilder.h +1 -6
- package/cpp/skia/include/core/SkPixelRef.h +1 -1
- package/cpp/skia/include/core/SkPixmap.h +3 -2
- package/cpp/skia/include/core/SkRSXform.h +1 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
- package/cpp/skia/include/core/SkSpan.h +5 -5
- package/cpp/skia/include/core/SkString.h +5 -8
- package/cpp/skia/include/core/SkSurface.h +21 -0
- package/cpp/skia/include/core/SkTypeface.h +20 -4
- package/cpp/skia/include/core/SkTypes.h +9 -5
- package/cpp/skia/include/effects/SkGradientShader.h +9 -18
- package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
- package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
- package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
- package/cpp/skia/include/gpu/graphite/Context.h +124 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
- package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
- package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
- package/cpp/skia/include/ports/SkCFObject.h +0 -4
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
- package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
- package/cpp/skia/include/private/SkChecksum.h +11 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
- package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
- package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
- package/cpp/skia/include/private/SkMacros.h +13 -18
- package/cpp/skia/include/private/SkMutex.h +8 -0
- package/cpp/skia/include/private/SkPathRef.h +2 -16
- package/cpp/skia/include/private/SkSLDefines.h +9 -1
- package/cpp/skia/include/private/SkSLIRNode.h +6 -5
- package/cpp/skia/include/private/SkSLLayout.h +11 -10
- package/cpp/skia/include/private/SkSLModifiers.h +4 -3
- package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
- package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
- package/cpp/skia/include/private/SkSLStatement.h +2 -3
- package/cpp/skia/include/private/SkSLString.h +17 -56
- package/cpp/skia/include/private/SkSLSymbol.h +4 -4
- package/cpp/skia/include/private/SkShadowFlags.h +3 -1
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +4 -3
- package/cpp/skia/include/private/SkTHash.h +66 -24
- package/cpp/skia/include/private/SkTLogic.h +2 -32
- package/cpp/skia/include/private/SkTemplates.h +2 -2
- package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
- package/cpp/skia/include/private/SkVx.h +28 -28
- package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
- package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
- package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
- package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
- package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
- package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
- package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +4 -0
- package/cpp/skia/include/sksl/DSLBlock.h +8 -3
- package/cpp/skia/include/sksl/DSLCase.h +6 -6
- package/cpp/skia/include/sksl/DSLCore.h +89 -78
- package/cpp/skia/include/sksl/DSLExpression.h +78 -45
- package/cpp/skia/include/sksl/DSLFunction.h +23 -18
- package/cpp/skia/include/sksl/DSLLayout.h +14 -16
- package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
- package/cpp/skia/include/sksl/DSLStatement.h +16 -10
- package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
- package/cpp/skia/include/sksl/DSLType.h +27 -23
- package/cpp/skia/include/sksl/DSLVar.h +72 -61
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
- package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
- package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
- package/cpp/skia/include/utils/SkCamera.h +2 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
- package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
- package/cpp/skia/include/utils/SkParse.h +2 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
- package/cpp/skia/include/utils/SkTextUtils.h +8 -4
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
- package/cpp/utils/RNSkLog.h +27 -0
- package/ios/RNSkia-iOS/PlatformContext.h +1 -1
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +3 -2
- package/lib/commonjs/animation/functions/index.js +47 -17
- package/lib/commonjs/animation/functions/index.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +19 -35
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +2 -2
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +10 -7
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Compose.js +9 -6
- package/lib/commonjs/renderer/components/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js +7 -6
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js +13 -10
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +7 -4
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js +3 -2
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js +6 -44
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js +3 -2
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/index.js +13 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Circles.js +2 -4
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
- package/lib/commonjs/renderer/processors/Clips.js +5 -5
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
- package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
- package/lib/commonjs/renderer/processors/Color.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +4 -4
- package/lib/commonjs/renderer/processors/Font.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paint.js +18 -14
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paths.js +4 -4
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
- package/lib/commonjs/renderer/processors/Radius.js +2 -4
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
- package/lib/commonjs/renderer/processors/Rects.js +8 -59
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
- package/lib/commonjs/renderer/processors/Transform.js +26 -17
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
- package/lib/commonjs/renderer/processors/index.js +26 -13
- package/lib/commonjs/renderer/processors/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/index.js +0 -26
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js +30 -0
- package/lib/commonjs/renderer/useCanvas.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +1 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/Skia.web.js +12 -0
- package/lib/commonjs/skia/Skia.web.js.map +1 -0
- package/lib/commonjs/skia/core/Data.js +9 -4
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/core/Font.js +2 -4
- package/lib/commonjs/skia/core/Font.js.map +1 -1
- package/lib/commonjs/skia/core/Matrix.js +15 -0
- package/lib/commonjs/skia/core/Matrix.js.map +1 -0
- package/lib/commonjs/skia/core/Paint.js +4 -12
- package/lib/commonjs/skia/core/Paint.js.map +1 -1
- package/lib/commonjs/skia/core/Path.js +14 -2
- package/lib/commonjs/skia/core/Path.js.map +1 -1
- package/lib/commonjs/skia/core/RRect.js +13 -0
- package/lib/commonjs/skia/core/RRect.js.map +1 -0
- package/lib/commonjs/skia/core/Rect.js +47 -0
- package/lib/commonjs/skia/core/Rect.js.map +1 -0
- package/lib/commonjs/skia/core/Vector.js +49 -0
- package/lib/commonjs/skia/core/Vector.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +51 -25
- package/lib/commonjs/skia/core/index.js.map +1 -1
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.js +58 -1
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.js +1 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/Point.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.js +7 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js +51 -1
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
- package/lib/commonjs/skia/web/Host.js.map +1 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -6
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +18 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +113 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
- package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +97 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +4 -4
- package/lib/commonjs/skia/web/index.js.map +1 -1
- package/lib/commonjs/values/web/api.js +2 -2
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +216 -0
- package/lib/commonjs/views/SkiaView.web.js.map +1 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/views/useTouchHandler.js +70 -46
- package/lib/commonjs/views/useTouchHandler.js.map +1 -1
- package/lib/commonjs/web/index.js +20 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/module/animation/functions/index.js +4 -2
- package/lib/module/animation/functions/index.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +36 -0
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/module/animation/functions/interpolateVector.js +7 -0
- package/lib/module/animation/functions/interpolateVector.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +15 -26
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +2 -2
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +5 -2
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Compose.js +5 -2
- package/lib/module/renderer/components/Compose.js.map +1 -1
- package/lib/module/renderer/components/Group.js +7 -6
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Mask.js +7 -3
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +6 -3
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/image/BoxFit.js +7 -8
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js +3 -2
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js +3 -2
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js +10 -7
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js +6 -3
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/Gradient.js +3 -3
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js +6 -45
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js +20 -19
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js +7 -4
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Line.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js +3 -2
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +5 -3
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js +4 -3
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js +1 -1
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js +3 -2
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js +5 -3
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js +3 -2
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js +3 -2
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js +3 -3
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/index.js +1 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.js.map +1 -1
- package/lib/module/renderer/nodes/Drawing.js +3 -3
- package/lib/module/renderer/nodes/Drawing.js.map +1 -1
- package/lib/module/renderer/nodes/Node.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Circles.js +2 -4
- package/lib/module/renderer/processors/Circles.js.map +1 -1
- package/lib/module/renderer/processors/Clips.js +3 -3
- package/lib/module/renderer/processors/Clips.js.map +1 -1
- package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
- package/lib/module/renderer/processors/Color.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +3 -2
- package/lib/module/renderer/processors/Font.js.map +1 -1
- package/lib/module/renderer/processors/Paint.js +8 -5
- package/lib/module/renderer/processors/Paint.js.map +1 -1
- package/lib/module/renderer/processors/Paths.js +2 -2
- package/lib/module/renderer/processors/Paths.js.map +1 -1
- package/lib/module/renderer/processors/Radius.js +2 -3
- package/lib/module/renderer/processors/Radius.js.map +1 -1
- package/lib/module/renderer/processors/Rects.js +7 -26
- package/lib/module/renderer/processors/Rects.js.map +1 -1
- package/lib/module/renderer/processors/Transform.js +24 -16
- package/lib/module/renderer/processors/Transform.js.map +1 -1
- package/lib/module/renderer/processors/index.js +2 -1
- package/lib/module/renderer/processors/index.js.map +1 -1
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/module/renderer/processors/math/index.js +0 -2
- package/lib/module/renderer/processors/math/index.js.map +1 -1
- package/lib/module/renderer/useCanvas.js +13 -0
- package/lib/module/renderer/useCanvas.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +2 -2
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/Skia.web.js +3 -0
- package/lib/module/skia/Skia.web.js.map +1 -0
- package/lib/module/skia/core/Data.js +11 -5
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/core/Font.js +2 -4
- package/lib/module/skia/core/Font.js.map +1 -1
- package/lib/module/skia/core/Matrix.js +4 -0
- package/lib/module/skia/core/Matrix.js.map +1 -0
- package/lib/module/skia/core/Paint.js +3 -7
- package/lib/module/skia/core/Paint.js.map +1 -1
- package/lib/module/skia/core/Path.js +11 -2
- package/lib/module/skia/core/Path.js.map +1 -1
- package/lib/module/skia/core/RRect.js +3 -0
- package/lib/module/skia/core/RRect.js.map +1 -0
- package/lib/module/skia/core/Rect.js +17 -0
- package/lib/module/skia/core/Rect.js.map +1 -0
- package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
- package/lib/module/skia/core/Vector.js.map +1 -0
- package/lib/module/skia/core/index.js +5 -3
- package/lib/module/skia/core/index.js.map +1 -1
- package/lib/module/skia/types/Font/Font.js.map +1 -1
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/module/skia/types/Matrix.js +55 -0
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Path/Path.js +1 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/Point.js.map +1 -1
- package/lib/module/skia/types/RRect.js +3 -1
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js +48 -0
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
- package/lib/module/skia/web/Host.js.map +1 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +19 -6
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
- package/lib/module/skia/web/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/module/skia/web/JsiSkData.js +8 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -0
- package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkFont.js +101 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
- package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +28 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/JsiSkPath.js +311 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +18 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +16 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +21 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +8 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkShader.js +8 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
- package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +18 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +17 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +61 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -0
- package/lib/module/skia/web/index.js +1 -1
- package/lib/module/skia/web/index.js.map +1 -1
- package/lib/module/values/web/api.js +2 -2
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +202 -0
- package/lib/module/views/SkiaView.web.js.map +1 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/module/views/useTouchHandler.js +64 -43
- package/lib/module/views/useTouchHandler.js.map +1 -1
- package/lib/module/web/index.js +8 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/typescript/src/animation/functions/index.d.ts +4 -2
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
- package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
- package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
- package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
- package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -9
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
- package/lib/typescript/src/renderer/index.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
- package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
- package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
- package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
- package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
- package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
- package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
- package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +4 -4
- package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
- package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
- package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
- package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
- package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
- package/lib/typescript/src/skia/core/index.d.ts +5 -3
- package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
- package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
- package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
- package/lib/typescript/src/skia/types/Font/Font.d.ts +8 -9
- package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
- package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
- package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
- package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
- package/lib/typescript/src/skia/types/Path/Path.d.ts +29 -23
- package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
- package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
- package/lib/typescript/src/skia/types/Point.d.ts +1 -0
- package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +5 -6
- package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
- package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
- package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
- package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
- package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
- package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
- package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -1
- package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
- package/lib/typescript/src/views/types.d.ts +1 -0
- package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
- package/lib/typescript/src/web/index.d.ts +5 -0
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +5 -6
- package/src/animation/functions/index.ts +4 -2
- package/src/animation/functions/interpolatePaths.ts +38 -0
- package/src/animation/functions/interpolateVector.ts +26 -0
- package/src/index.ts +1 -0
- package/src/renderer/Canvas.tsx +13 -35
- package/src/renderer/DrawingContext.ts +3 -4
- package/src/renderer/HostConfig.ts +2 -2
- package/src/renderer/components/Blend.tsx +12 -10
- package/src/renderer/components/Compose.tsx +2 -2
- package/src/renderer/components/Group.tsx +11 -6
- package/src/renderer/components/Mask.tsx +5 -3
- package/src/renderer/components/Paint.tsx +5 -4
- package/src/renderer/components/Picture.tsx +1 -1
- package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
- package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
- package/src/renderer/components/colorFilters/Compose.ts +3 -2
- package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
- package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
- package/src/renderer/components/image/BoxFit.ts +7 -13
- package/src/renderer/components/image/Image.tsx +3 -3
- package/src/renderer/components/image/ImageSVG.tsx +3 -3
- package/src/renderer/components/image/ImageShader.tsx +8 -7
- package/src/renderer/components/imageFilters/Blur.tsx +12 -10
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
- package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
- package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
- package/src/renderer/components/imageFilters/Offset.tsx +5 -4
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
- package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
- package/src/renderer/components/imageFilters/getInput.ts +3 -2
- package/src/renderer/components/maskFilters/Blur.tsx +2 -2
- package/src/renderer/components/pathEffects/Corner.tsx +2 -2
- package/src/renderer/components/pathEffects/Dash.tsx +2 -2
- package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
- package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
- package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
- package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
- package/src/renderer/components/pathEffects/Sum.tsx +7 -5
- package/src/renderer/components/shaders/Color.tsx +7 -5
- package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
- package/src/renderer/components/shaders/Gradient.ts +7 -10
- package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
- package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
- package/src/renderer/components/shaders/Shader.tsx +6 -58
- package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
- package/src/renderer/components/shaders/Turbulence.tsx +1 -2
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
- package/src/renderer/components/shapes/Box.tsx +36 -17
- package/src/renderer/components/shapes/Circle.tsx +3 -4
- package/src/renderer/components/shapes/DiffRect.tsx +1 -1
- package/src/renderer/components/shapes/FitBox.tsx +1 -1
- package/src/renderer/components/shapes/Line.tsx +2 -1
- package/src/renderer/components/shapes/Oval.tsx +6 -4
- package/src/renderer/components/shapes/Patch.tsx +6 -10
- package/src/renderer/components/shapes/Path.tsx +3 -3
- package/src/renderer/components/shapes/Points.tsx +2 -2
- package/src/renderer/components/shapes/Rect.tsx +6 -4
- package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
- package/src/renderer/components/shapes/Vertices.tsx +5 -4
- package/src/renderer/components/text/Glyphs.tsx +6 -3
- package/src/renderer/components/text/Text.tsx +2 -2
- package/src/renderer/components/text/TextBlob.tsx +1 -1
- package/src/renderer/components/text/TextPath.tsx +3 -4
- package/src/renderer/index.ts +1 -1
- package/src/renderer/nodes/Declaration.tsx +1 -1
- package/src/renderer/nodes/Drawing.tsx +3 -2
- package/src/renderer/nodes/Node.ts +1 -1
- package/src/renderer/processors/Animations/Animations.ts +0 -3
- package/src/renderer/processors/Circles.ts +4 -4
- package/src/renderer/processors/Clips.ts +9 -4
- package/src/{skia/core → renderer/processors}/Color.ts +2 -3
- package/src/renderer/processors/Font.ts +10 -3
- package/src/renderer/processors/Paint.ts +12 -7
- package/src/renderer/processors/Paths.ts +3 -3
- package/src/renderer/processors/Radius.ts +3 -4
- package/src/renderer/processors/Rects.ts +10 -45
- package/src/renderer/processors/Transform.ts +28 -19
- package/src/renderer/processors/index.ts +2 -1
- package/src/renderer/processors/math/Coordinates.ts +1 -1
- package/src/renderer/processors/math/Transforms.ts +2 -1
- package/src/renderer/processors/math/index.ts +0 -2
- package/src/renderer/useCanvas.ts +21 -0
- package/src/skia/NativeSetup.ts +2 -2
- package/src/skia/Skia.web.ts +3 -0
- package/src/skia/core/Data.ts +17 -14
- package/src/skia/core/Font.ts +2 -4
- package/src/skia/core/Matrix.ts +6 -0
- package/src/skia/core/Paint.ts +2 -6
- package/src/skia/core/Path.ts +14 -6
- package/src/skia/core/RRect.tsx +5 -0
- package/src/skia/core/Rect.ts +33 -0
- package/src/skia/core/Vector.ts +11 -0
- package/src/skia/core/index.ts +5 -3
- package/src/skia/types/ContourMeasure.tsx +2 -4
- package/src/skia/types/Data/Data.ts +1 -1
- package/src/skia/types/Data/DataFactory.ts +4 -4
- package/src/skia/types/Font/Font.ts +9 -14
- package/src/skia/types/FontMgr/FontMgr.ts +1 -1
- package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
- package/src/skia/types/Image/ImageFactory.ts +3 -3
- package/src/skia/types/Matrix.ts +79 -14
- package/src/skia/types/Path/Path.ts +34 -23
- package/src/skia/types/Path/PathFactory.ts +7 -0
- package/src/skia/types/Picture/Picture.ts +2 -2
- package/src/skia/types/Point.ts +2 -0
- package/src/skia/types/RRect.ts +5 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -10
- package/src/skia/types/SVG/SVGFactory.ts +2 -2
- package/src/skia/types/Shader/Shader.ts +61 -0
- package/src/skia/types/Skia.ts +1 -1
- package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
- package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
- package/src/skia/web/JsiImageFilterFactory.ts +144 -0
- package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +19 -11
- package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
- package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
- package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
- package/src/skia/web/JsiSkContourMeasure.ts +35 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
- package/src/skia/web/JsiSkData.ts +13 -0
- package/src/skia/web/JsiSkDataFactory.ts +35 -0
- package/src/skia/web/JsiSkFont.ts +128 -0
- package/src/skia/web/JsiSkFontMgr.ts +42 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/{api/JsiSkImage.ts → JsiSkImage.ts} +1 -1
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
- package/src/skia/web/JsiSkMatrix.ts +54 -0
- package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +6 -5
- package/src/skia/web/JsiSkPath.ts +369 -0
- package/src/skia/web/JsiSkPathEffect.ts +14 -0
- package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
- package/src/skia/web/JsiSkPathFactory.ts +54 -0
- package/src/skia/web/JsiSkPicture.ts +45 -0
- package/src/skia/web/JsiSkPictureFactory.ts +20 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
- package/src/skia/web/JsiSkPoint.ts +19 -0
- package/src/skia/web/JsiSkRRect.ts +27 -0
- package/src/skia/web/JsiSkRSXform.ts +16 -0
- package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
- package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
- package/src/skia/web/JsiSkSVGFactory.ts +20 -0
- package/src/skia/web/JsiSkShader.ts +14 -0
- package/src/skia/web/JsiSkShaderFactory.ts +178 -0
- package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
- package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
- package/src/skia/web/JsiSkTextBlob.ts +14 -0
- package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
- package/src/skia/web/JsiSkTypeface.ts +28 -0
- package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
- package/src/skia/web/JsiSkVertices.ts +23 -0
- package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
- package/src/skia/web/JsiSkia.ts +98 -0
- package/src/skia/web/index.ts +1 -1
- package/src/values/web/api.ts +2 -2
- package/src/views/SkiaView.web.tsx +192 -0
- package/src/views/types.ts +1 -0
- package/src/views/useTouchHandler.ts +82 -51
- package/src/web/index.ts +13 -0
- package/cpp/skia/include/core/SkCustomMesh.h +0 -202
- package/cpp/skia/include/core/SkStringView.h +0 -185
- package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
- package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
- package/cpp/skia/include/private/SkTOptional.h +0 -362
- package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
- package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
- package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
- package/lib/commonjs/skia/core/Color.js.map +0 -1
- package/lib/commonjs/skia/core/Shader.js +0 -18
- package/lib/commonjs/skia/core/Shader.js.map +0 -1
- package/lib/commonjs/skia/web/api/Host.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
- package/lib/commonjs/skia/web/api/index.js +0 -26
- package/lib/commonjs/skia/web/api/index.js.map +0 -1
- package/lib/module/renderer/processors/math/Matrix3.js +0 -55
- package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/module/renderer/processors/math/Vector.js.map +0 -1
- package/lib/module/skia/core/Color.js.map +0 -1
- package/lib/module/skia/core/Shader.js +0 -7
- package/lib/module/skia/core/Shader.js.map +0 -1
- package/lib/module/skia/web/api/Host.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
- package/lib/module/skia/web/api/index.js +0 -13
- package/lib/module/skia/web/api/index.js.map +0 -1
- package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
- package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
- package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
- package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
- package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
- package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
- package/src/renderer/processors/math/Matrix3.ts +0 -73
- package/src/renderer/processors/math/Vector.ts +0 -38
- package/src/skia/__tests__/Rects.spec.ts +0 -40
- package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
- package/src/skia/core/Shader.ts +0 -9
- package/src/skia/web/api/index.ts +0 -15
- package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
- package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
- package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
- package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -7,8 +7,6 @@ exports.SweepGradient = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var _skia = require("../../../skia");
|
11
|
-
|
12
10
|
var _Declaration = require("../../nodes/Declaration");
|
13
11
|
|
14
12
|
var _Gradient = require("./Gradient");
|
@@ -17,21 +15,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
17
15
|
|
18
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
17
|
|
20
|
-
const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
18
|
+
const onDeclare = (0, _Declaration.createDeclaration)((_ref, _, _ref2) => {
|
21
19
|
let {
|
22
20
|
c,
|
23
21
|
start,
|
24
22
|
end,
|
25
23
|
...gradientProps
|
26
24
|
} = _ref;
|
25
|
+
let {
|
26
|
+
Skia
|
27
|
+
} = _ref2;
|
27
28
|
const {
|
28
29
|
colors,
|
29
30
|
positions,
|
30
31
|
mode,
|
31
32
|
localMatrix,
|
32
33
|
flags
|
33
|
-
} = (0, _Gradient.processGradientProps)(gradientProps);
|
34
|
-
return
|
34
|
+
} = (0, _Gradient.processGradientProps)(Skia, gradientProps);
|
35
|
+
return Skia.Shader.MakeSweepGradient(c.x, c.y, colors, positions, mode, localMatrix, flags, start, end);
|
35
36
|
});
|
36
37
|
|
37
38
|
const SweepGradient = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["SweepGradient.tsx"],"names":["onDeclare","c","start","end","gradientProps","colors","positions","mode","localMatrix","flags","
|
1
|
+
{"version":3,"sources":["SweepGradient.tsx"],"names":["onDeclare","_","c","start","end","gradientProps","Skia","colors","positions","mode","localMatrix","flags","Shader","MakeSweepGradient","x","y","SweepGradient","props"],"mappings":";;;;;;;AAAA;;AAGA;;AAIA;;;;;;AAQA,MAAMA,SAAS,GAAG,oCAChB,OAAsCC,CAAtC,YAAsD;AAAA,MAArD;AAAEC,IAAAA,CAAF;AAAKC,IAAAA,KAAL;AAAYC,IAAAA,GAAZ;AAAiB,OAAGC;AAApB,GAAqD;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AACpD,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,SAAV;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA,WAA3B;AAAwCC,IAAAA;AAAxC,MACJ,oCAAqBL,IAArB,EAA2BD,aAA3B,CADF;AAEA,SAAOC,IAAI,CAACM,MAAL,CAAYC,iBAAZ,CACLX,CAAC,CAACY,CADG,EAELZ,CAAC,CAACa,CAFG,EAGLR,MAHK,EAILC,SAJK,EAKLC,IALK,EAMLC,WANK,EAOLC,KAPK,EAQLR,KARK,EASLC,GATK,CAAP;AAWD,CAfe,CAAlB;;AAkBO,MAAMY,aAAa,GAAIC,KAAD,IAA8C;AACzE,sBAAO;AAAe,IAAA,SAAS,EAAEjB;AAA1B,KAAyCiB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { AnimatedProps } from \"../../processors\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { Vector } from \"../../../skia/types\";\n\nimport type { GradientProps } from \"./Gradient\";\nimport { processGradientProps } from \"./Gradient\";\n\nexport interface SweepGradientProps extends GradientProps {\n c: Vector;\n start?: number;\n end?: number;\n}\n\nconst onDeclare = createDeclaration<SweepGradientProps>(\n ({ c, start, end, ...gradientProps }, _, { Skia }) => {\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(Skia, gradientProps);\n return Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n }\n);\n\nexport const SweepGradient = (props: AnimatedProps<SweepGradientProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|
@@ -7,15 +7,13 @@ exports.Turbulence = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var _skia = require("../../../skia");
|
11
|
-
|
12
10
|
var _Declaration = require("../../nodes/Declaration");
|
13
11
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
13
|
|
16
14
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
17
15
|
|
18
|
-
const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
16
|
+
const onDeclare = (0, _Declaration.createDeclaration)((_ref, _, _ref2) => {
|
19
17
|
let {
|
20
18
|
freqX,
|
21
19
|
freqY,
|
@@ -24,7 +22,10 @@ const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
|
24
22
|
tileWidth,
|
25
23
|
tileHeight
|
26
24
|
} = _ref;
|
27
|
-
|
25
|
+
let {
|
26
|
+
Skia
|
27
|
+
} = _ref2;
|
28
|
+
return Skia.Shader.MakeTurbulence(freqX, freqY, octaves, seed, tileWidth, tileHeight);
|
28
29
|
});
|
29
30
|
|
30
31
|
const Turbulence = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Turbulence.tsx"],"names":["onDeclare","freqX","freqY","octaves","seed","tileWidth","tileHeight","Skia","Shader","MakeTurbulence","Turbulence","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA
|
1
|
+
{"version":3,"sources":["Turbulence.tsx"],"names":["onDeclare","_","freqX","freqY","octaves","seed","tileWidth","tileHeight","Skia","Shader","MakeTurbulence","Turbulence","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;AAYA,MAAMA,SAAS,GAAG,oCAChB,OAAyDC,CAAzD,YAAyE;AAAA,MAAxE;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,OAAhB;AAAyBC,IAAAA,IAAzB;AAA+BC,IAAAA,SAA/B;AAA0CC,IAAAA;AAA1C,GAAwE;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AACvE,SAAOA,IAAI,CAACC,MAAL,CAAYC,cAAZ,CACLR,KADK,EAELC,KAFK,EAGLC,OAHK,EAILC,IAJK,EAKLC,SALK,EAMLC,UANK,CAAP;AAQD,CAVe,CAAlB;;AAaO,MAAMI,UAAU,GAAIC,KAAD,IAA2C;AACnE,sBAAO;AAAe,IAAA,SAAS,EAAEZ;AAA1B,KAAyCY,KAAzC,EAAP;AACD,CAFM;;;AAIPD,UAAU,CAACE,YAAX,GAA0B;AACxBR,EAAAA,IAAI,EAAE,CADkB;AAExBC,EAAAA,SAAS,EAAE,CAFa;AAGxBC,EAAAA,UAAU,EAAE;AAHY,CAA1B","sourcesContent":["import React from \"react\";\n\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface TurbulenceProps {\n freqX: number;\n freqY: number;\n octaves: number;\n seed: number;\n tileWidth: number;\n tileHeight: number;\n}\n\nconst onDeclare = createDeclaration<TurbulenceProps>(\n ({ freqX, freqY, octaves, seed, tileWidth, tileHeight }, _, { Skia }) => {\n return Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n);\n\nexport const Turbulence = (props: AnimatedProps<TurbulenceProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nTurbulence.defaultProps = {\n seed: 0,\n tileWidth: 0,\n tileHeight: 0,\n};\n"]}
|
@@ -7,8 +7,6 @@ exports.TwoPointConicalGradient = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var _skia = require("../../../skia");
|
11
|
-
|
12
10
|
var _Declaration = require("../../nodes/Declaration");
|
13
11
|
|
14
12
|
var _Gradient = require("./Gradient");
|
@@ -17,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
17
15
|
|
18
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
17
|
|
20
|
-
const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
18
|
+
const onDeclare = (0, _Declaration.createDeclaration)((_ref, _, _ref2) => {
|
21
19
|
let {
|
22
20
|
start,
|
23
21
|
startR,
|
@@ -25,14 +23,17 @@ const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
|
25
23
|
endR,
|
26
24
|
...gradientProps
|
27
25
|
} = _ref;
|
26
|
+
let {
|
27
|
+
Skia
|
28
|
+
} = _ref2;
|
28
29
|
const {
|
29
30
|
colors,
|
30
31
|
positions,
|
31
32
|
mode,
|
32
33
|
localMatrix,
|
33
34
|
flags
|
34
|
-
} = (0, _Gradient.processGradientProps)(gradientProps);
|
35
|
-
return
|
35
|
+
} = (0, _Gradient.processGradientProps)(Skia, gradientProps);
|
36
|
+
return Skia.Shader.MakeTwoPointConicalGradient(start, startR, end, endR, colors, positions, mode, localMatrix, flags);
|
36
37
|
});
|
37
38
|
|
38
39
|
const TwoPointConicalGradient = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["TwoPointConicalGradient.tsx"],"names":["onDeclare","start","startR","end","endR","gradientProps","colors","positions","mode","localMatrix","flags","
|
1
|
+
{"version":3,"sources":["TwoPointConicalGradient.tsx"],"names":["onDeclare","_","start","startR","end","endR","gradientProps","Skia","colors","positions","mode","localMatrix","flags","Shader","MakeTwoPointConicalGradient","TwoPointConicalGradient","props"],"mappings":";;;;;;;AAAA;;AAGA;;AAIA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,OAAiDC,CAAjD,YAAiE;AAAA,MAAhE;AAAEC,IAAAA,KAAF;AAASC,IAAAA,MAAT;AAAiBC,IAAAA,GAAjB;AAAsBC,IAAAA,IAAtB;AAA4B,OAAGC;AAA/B,GAAgE;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAC/D,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,SAAV;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA,WAA3B;AAAwCC,IAAAA;AAAxC,MACJ,oCAAqBL,IAArB,EAA2BD,aAA3B,CADF;AAEA,SAAOC,IAAI,CAACM,MAAL,CAAYC,2BAAZ,CACLZ,KADK,EAELC,MAFK,EAGLC,GAHK,EAILC,IAJK,EAKLG,MALK,EAMLC,SANK,EAOLC,IAPK,EAQLC,WARK,EASLC,KATK,CAAP;AAWD,CAfe,CAAlB;;AAkBO,MAAMG,uBAAuB,GAClCC,KADqC,IAElC;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEhB;AAA1B,KAAyCgB,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\n\nimport type { AnimatedProps } from \"../../processors\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { Vector } from \"../../../skia/types\";\n\nimport type { GradientProps } from \"./Gradient\";\nimport { processGradientProps } from \"./Gradient\";\n\nexport interface TwoPointConicalGradientProps extends GradientProps {\n start: Vector;\n startR: number;\n end: Vector;\n endR: number;\n}\n\nconst onDeclare = createDeclaration<TwoPointConicalGradientProps>(\n ({ start, startR, end, endR, ...gradientProps }, _, { Skia }) => {\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(Skia, gradientProps);\n return Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n);\n\nexport const TwoPointConicalGradient = (\n props: AnimatedProps<TwoPointConicalGradientProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|
@@ -7,30 +7,30 @@ exports.BoxShadow = exports.Box = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _types = require("../../../skia/types");
|
11
11
|
|
12
12
|
var _nodes = require("../../nodes");
|
13
13
|
|
14
|
-
var
|
14
|
+
var _Declaration = require("../../nodes/Declaration");
|
15
15
|
|
16
|
-
var
|
16
|
+
var _Color = require("../../processors/Color");
|
17
17
|
|
18
|
-
var
|
18
|
+
var _RRect = require("../../../skia/types/RRect");
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
23
23
|
|
24
|
-
const inflate = function (box, dx, dy) {
|
25
|
-
let tx = arguments.length >
|
26
|
-
let ty = arguments.length >
|
27
|
-
return
|
24
|
+
const inflate = function (Skia, box, dx, dy) {
|
25
|
+
let tx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
26
|
+
let ty = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
27
|
+
return Skia.RRectXY(Skia.XYWHRect(box.rect.x - dx + tx, box.rect.y - dy + ty, box.rect.width + 2 * dx, box.rect.height + 2 * dy), box.rx + dx, box.ry + dy);
|
28
28
|
};
|
29
29
|
|
30
|
-
const deflate = function (box, dx, dy) {
|
31
|
-
let tx = arguments.length >
|
32
|
-
let ty = arguments.length >
|
33
|
-
return inflate(box, -dx, -dy, tx, ty);
|
30
|
+
const deflate = function (Skia, box, dx, dy) {
|
31
|
+
let tx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
32
|
+
let ty = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
33
|
+
return inflate(Skia, box, -dx, -dy, tx, ty);
|
34
34
|
};
|
35
35
|
|
36
36
|
const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
|
@@ -67,12 +67,13 @@ const onDraw = (0, _nodes.createDrawing)((ctx, _ref2, node) => {
|
|
67
67
|
let {
|
68
68
|
box: defaultBox
|
69
69
|
} = _ref2;
|
70
|
-
const box = (0, _Rects.isRRect)(defaultBox) ? defaultBox : (0, _processors.rrect)(defaultBox, 0, 0);
|
71
70
|
const {
|
72
71
|
canvas,
|
73
72
|
paint,
|
74
|
-
opacity
|
73
|
+
opacity,
|
74
|
+
Skia
|
75
75
|
} = ctx;
|
76
|
+
const box = (0, _RRect.isRRect)(defaultBox) ? defaultBox : Skia.RRectXY(defaultBox, 0, 0);
|
76
77
|
const shadows = node.visit(ctx).filter(isBoxShadow);
|
77
78
|
shadows.filter(shadow => !shadow.inner).map(shadow => {
|
78
79
|
const {
|
@@ -82,12 +83,10 @@ const onDraw = (0, _nodes.createDrawing)((ctx, _ref2, node) => {
|
|
82
83
|
dx = 0,
|
83
84
|
dy = 0
|
84
85
|
} = shadow;
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
lPaint.setMaskFilter(_skia.Skia.MaskFilter.MakeBlur(_skia.BlurStyle.Normal, blur, true));
|
90
|
-
canvas.drawRRect(inflate(box, spread, spread, dx, dy), lPaint);
|
86
|
+
const lPaint = Skia.Paint();
|
87
|
+
lPaint.setColor((0, _Color.processColor)(Skia, color, opacity));
|
88
|
+
lPaint.setMaskFilter(Skia.MaskFilter.MakeBlur(_types.BlurStyle.Normal, blur, true));
|
89
|
+
canvas.drawRRect(inflate(Skia, box, spread, spread, dx, dy), lPaint);
|
91
90
|
});
|
92
91
|
canvas.drawRRect(box, paint);
|
93
92
|
shadows.filter(shadow => shadow.inner).map(shadow => {
|
@@ -98,16 +97,14 @@ const onDraw = (0, _nodes.createDrawing)((ctx, _ref2, node) => {
|
|
98
97
|
dx = 0,
|
99
98
|
dy = 0
|
100
99
|
} = shadow;
|
101
|
-
const delta =
|
100
|
+
const delta = Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));
|
102
101
|
canvas.save();
|
103
|
-
canvas.clipRRect(box,
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
const inner = deflate(box, spread, spread, dx, dy);
|
110
|
-
const outer = inflate(box, delta.x, delta.y);
|
102
|
+
canvas.clipRRect(box, _types.ClipOp.Intersect, false);
|
103
|
+
const lPaint = Skia.Paint();
|
104
|
+
lPaint.setColor((0, _Color.processColor)(Skia, color, opacity));
|
105
|
+
lPaint.setMaskFilter(Skia.MaskFilter.MakeBlur(_types.BlurStyle.Normal, blur, true));
|
106
|
+
const inner = deflate(Skia, box, spread, spread, dx, dy);
|
107
|
+
const outer = inflate(Skia, box, delta.x, delta.y);
|
111
108
|
canvas.drawDRRect(outer, inner, lPaint);
|
112
109
|
canvas.restore();
|
113
110
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Box.tsx"],"names":["inflate","box","dx","dy","tx","ty","rect","x","y","width","height","rx","ry","deflate","onDeclare","spread","blur","color","inner","__typename__","BoxShadow","props","isBoxShadow","s","onDraw","ctx","node","defaultBox","canvas","paint","opacity","shadows","visit","filter","shadow","map","lPaint","
|
1
|
+
{"version":3,"sources":["Box.tsx"],"names":["inflate","Skia","box","dx","dy","tx","ty","RRectXY","XYWHRect","rect","x","y","width","height","rx","ry","deflate","onDeclare","spread","blur","color","inner","__typename__","BoxShadow","props","isBoxShadow","s","onDraw","ctx","node","defaultBox","canvas","paint","opacity","shadows","visit","filter","shadow","map","lPaint","Paint","setColor","setMaskFilter","MaskFilter","MakeBlur","BlurStyle","Normal","drawRRect","delta","Point","Math","abs","save","clipRRect","ClipOp","Intersect","outer","drawDRRect","restore","Box","defaultProps"],"mappings":";;;;;;;AAAA;;AASA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEA,MAAMA,OAAO,GAAG,UACdC,IADc,EAEdC,GAFc,EAGdC,EAHc,EAIdC,EAJc;AAAA,MAKdC,EALc,uEAKT,CALS;AAAA,MAMdC,EANc,uEAMT,CANS;AAAA,SAQdL,IAAI,CAACM,OAAL,CACEN,IAAI,CAACO,QAAL,CACEN,GAAG,CAACO,IAAJ,CAASC,CAAT,GAAaP,EAAb,GAAkBE,EADpB,EAEEH,GAAG,CAACO,IAAJ,CAASE,CAAT,GAAaP,EAAb,GAAkBE,EAFpB,EAGEJ,GAAG,CAACO,IAAJ,CAASG,KAAT,GAAiB,IAAIT,EAHvB,EAIED,GAAG,CAACO,IAAJ,CAASI,MAAT,GAAkB,IAAIT,EAJxB,CADF,EAOEF,GAAG,CAACY,EAAJ,GAASX,EAPX,EAQED,GAAG,CAACa,EAAJ,GAASX,EARX,CARc;AAAA,CAAhB;;AAmBA,MAAMY,OAAO,GAAG,UACdf,IADc,EAEdC,GAFc,EAGdC,EAHc,EAIdC,EAJc;AAAA,MAKdC,EALc,uEAKT,CALS;AAAA,MAMdC,EANc,uEAMT,CANS;AAAA,SAOXN,OAAO,CAACC,IAAD,EAAOC,GAAP,EAAY,CAACC,EAAb,EAAiB,CAACC,EAAlB,EAAsBC,EAAtB,EAA0BC,EAA1B,CAPI;AAAA,CAAhB;;AAoBA,MAAMW,SAAS,GAAG,oCAChB,QAA4C;AAAA,MAA3C;AAAEd,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUc,IAAAA,MAAV;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA,KAAxB;AAA+BC,IAAAA;AAA/B,GAA2C;AAC1C,SAAO;AAAElB,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUc,IAAAA,MAAV;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA,KAAxB;AAA+BC,IAAAA,KAA/B;AAAsCC,IAAAA,YAAY,EAAE;AAApD,GAAP;AACD,CAHe,CAAlB;;AAMO,MAAMC,SAAS,GAAIC,KAAD,IAA0C;AACjE,sBAAO;AAAe,IAAA,SAAS,EAAEP;AAA1B,KAAyCO,KAAzC,EAAP;AACD,CAFM;;;;AAIP,MAAMC,WAAW,GAAIC,CAAD,IAClBA,CAAC,CAACJ,YAAF,KAAmB,WADrB;;AAOA,MAAMK,MAAM,GAAG,0BAAwB,CAACC,GAAD,SAA2BC,IAA3B,KAAoC;AAAA,MAA9B;AAAE3B,IAAAA,GAAG,EAAE4B;AAAP,GAA8B;AACzE,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA,OAAjB;AAA0BhC,IAAAA;AAA1B,MAAmC2B,GAAzC;AACA,QAAM1B,GAAG,GAAG,oBAAQ4B,UAAR,IAAsBA,UAAtB,GAAmC7B,IAAI,CAACM,OAAL,CAAauB,UAAb,EAAyB,CAAzB,EAA4B,CAA5B,CAA/C;AACA,QAAMI,OAAO,GAAGL,IAAI,CAACM,KAAL,CAAWP,GAAX,EAAgBQ,MAAhB,CAAsCX,WAAtC,CAAhB;AACAS,EAAAA,OAAO,CACJE,MADH,CACWC,MAAD,IAAY,CAACA,MAAM,CAAChB,KAD9B,EAEGiB,GAFH,CAEQD,MAAD,IAAY;AACf,UAAM;AAAEjB,MAAAA,KAAK,GAAG,OAAV;AAAmBD,MAAAA,IAAnB;AAAyBD,MAAAA,MAAM,GAAG,CAAlC;AAAqCf,MAAAA,EAAE,GAAG,CAA1C;AAA6CC,MAAAA,EAAE,GAAG;AAAlD,QAAwDiC,MAA9D;AACA,UAAME,MAAM,GAAGtC,IAAI,CAACuC,KAAL,EAAf;AACAD,IAAAA,MAAM,CAACE,QAAP,CAAgB,yBAAaxC,IAAb,EAAmBmB,KAAnB,EAA0Ba,OAA1B,CAAhB;AACAM,IAAAA,MAAM,CAACG,aAAP,CACEzC,IAAI,CAAC0C,UAAL,CAAgBC,QAAhB,CAAyBC,iBAAUC,MAAnC,EAA2C3B,IAA3C,EAAiD,IAAjD,CADF;AAGAY,IAAAA,MAAM,CAACgB,SAAP,CAAiB/C,OAAO,CAACC,IAAD,EAAOC,GAAP,EAAYgB,MAAZ,EAAoBA,MAApB,EAA4Bf,EAA5B,EAAgCC,EAAhC,CAAxB,EAA6DmC,MAA7D;AACD,GAVH;AAWAR,EAAAA,MAAM,CAACgB,SAAP,CAAiB7C,GAAjB,EAAsB8B,KAAtB;AAEAE,EAAAA,OAAO,CACJE,MADH,CACWC,MAAD,IAAYA,MAAM,CAAChB,KAD7B,EAEGiB,GAFH,CAEQD,MAAD,IAAY;AACf,UAAM;AAAEjB,MAAAA,KAAK,GAAG,OAAV;AAAmBD,MAAAA,IAAnB;AAAyBD,MAAAA,MAAM,GAAG,CAAlC;AAAqCf,MAAAA,EAAE,GAAG,CAA1C;AAA6CC,MAAAA,EAAE,GAAG;AAAlD,QAAwDiC,MAA9D;AACA,UAAMW,KAAK,GAAG/C,IAAI,CAACgD,KAAL,CAAW,KAAKC,IAAI,CAACC,GAAL,CAAShD,EAAT,CAAhB,EAA8B,KAAK+C,IAAI,CAACC,GAAL,CAAS/C,EAAT,CAAnC,CAAd;AACA2B,IAAAA,MAAM,CAACqB,IAAP;AACArB,IAAAA,MAAM,CAACsB,SAAP,CAAiBnD,GAAjB,EAAsBoD,cAAOC,SAA7B,EAAwC,KAAxC;AACA,UAAMhB,MAAM,GAAGtC,IAAI,CAACuC,KAAL,EAAf;AACAD,IAAAA,MAAM,CAACE,QAAP,CAAgB,yBAAaxC,IAAb,EAAmBmB,KAAnB,EAA0Ba,OAA1B,CAAhB;AACAM,IAAAA,MAAM,CAACG,aAAP,CACEzC,IAAI,CAAC0C,UAAL,CAAgBC,QAAhB,CAAyBC,iBAAUC,MAAnC,EAA2C3B,IAA3C,EAAiD,IAAjD,CADF;AAGA,UAAME,KAAK,GAAGL,OAAO,CAACf,IAAD,EAAOC,GAAP,EAAYgB,MAAZ,EAAoBA,MAApB,EAA4Bf,EAA5B,EAAgCC,EAAhC,CAArB;AACA,UAAMoD,KAAK,GAAGxD,OAAO,CAACC,IAAD,EAAOC,GAAP,EAAY8C,KAAK,CAACtC,CAAlB,EAAqBsC,KAAK,CAACrC,CAA3B,CAArB;AACAoB,IAAAA,MAAM,CAAC0B,UAAP,CAAkBD,KAAlB,EAAyBnC,KAAzB,EAAgCkB,MAAhC;AACAR,IAAAA,MAAM,CAAC2B,OAAP;AACD,GAhBH;AAiBD,CAlCc,CAAf;;AAoCO,MAAMC,GAAG,GAAInC,KAAD,IAAoC;AACrD,sBAAO;AAAW,IAAA,MAAM,EAAEG;AAAnB,KAA+BH,KAA/B,EAAP;AACD,CAFM;;;AAIPmC,GAAG,CAACC,YAAJ,GAAmB;AACjB1B,EAAAA,OAAO,EAAE;AADQ,CAAnB","sourcesContent":["import React from \"react\";\n\nimport type {\n Color,\n SkRRect,\n SkJSIInstance,\n SkRect,\n Skia,\n} from \"../../../skia/types\";\nimport { ClipOp, BlurStyle } from \"../../../skia/types\";\nimport { createDrawing } from \"../../nodes\";\nimport type { AnimatedProps, CustomPaintProps } from \"../../processors\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport { processColor } from \"../../processors/Color\";\nimport { isRRect } from \"../../../skia/types/RRect\";\n\nconst inflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) =>\n Skia.RRectXY(\n Skia.XYWHRect(\n box.rect.x - dx + tx,\n box.rect.y - dy + ty,\n box.rect.width + 2 * dx,\n box.rect.height + 2 * dy\n ),\n box.rx + dx,\n box.ry + dy\n );\n\nconst deflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) => inflate(Skia, box, -dx, -dy, tx, ty);\n\ninterface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n\ninterface BoxShadowDecl extends BoxShadowProps, SkJSIInstance<\"BoxShadow\"> {}\n\nconst onDeclare = createDeclaration<BoxShadowProps>(\n ({ dx, dy, spread, blur, color, inner }) => {\n return { dx, dy, spread, blur, color, inner, __typename__: \"BoxShadow\" };\n }\n);\n\nexport const BoxShadow = (props: AnimatedProps<BoxShadowProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nconst isBoxShadow = (s: SkJSIInstance<string>): s is BoxShadowDecl =>\n s.__typename__ === \"BoxShadow\";\n\ninterface BoxProps extends CustomPaintProps {\n box: SkRRect | SkRect;\n}\n\nconst onDraw = createDrawing<BoxProps>((ctx, { box: defaultBox }, node) => {\n const { canvas, paint, opacity, Skia } = ctx;\n const box = isRRect(defaultBox) ? defaultBox : Skia.RRectXY(defaultBox, 0, 0);\n const shadows = node.visit(ctx).filter<BoxShadowDecl>(isBoxShadow);\n shadows\n .filter((shadow) => !shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const lPaint = Skia.Paint();\n lPaint.setColor(processColor(Skia, color, opacity));\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n canvas.drawRRect(inflate(Skia, box, spread, spread, dx, dy), lPaint);\n });\n canvas.drawRRect(box, paint);\n\n shadows\n .filter((shadow) => shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const delta = Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));\n canvas.save();\n canvas.clipRRect(box, ClipOp.Intersect, false);\n const lPaint = Skia.Paint();\n lPaint.setColor(processColor(Skia, color, opacity));\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n const inner = deflate(Skia, box, spread, spread, dx, dy);\n const outer = inflate(Skia, box, delta.x, delta.y);\n canvas.drawDRRect(outer, inner, lPaint);\n canvas.restore();\n });\n});\n\nexport const Box = (props: AnimatedProps<BoxProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nBox.defaultProps = {\n shadows: [],\n};\n"]}
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
10
10
|
var _Drawing = require("../../nodes/Drawing");
|
11
11
|
|
12
|
-
var _Vector = require("../../processors/math/Vector");
|
13
|
-
|
14
12
|
var _processors = require("../../processors");
|
15
13
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -20,12 +18,13 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
20
18
|
const onDraw = (0, _Drawing.createDrawing)((_ref, def) => {
|
21
19
|
let {
|
22
20
|
canvas,
|
23
|
-
paint
|
21
|
+
paint,
|
22
|
+
Skia
|
24
23
|
} = _ref;
|
25
24
|
const {
|
26
25
|
c,
|
27
26
|
r
|
28
|
-
} = (0, _processors.processCircle)(def);
|
27
|
+
} = (0, _processors.processCircle)(Skia, def);
|
29
28
|
canvas.drawCircle(c.x, c.y, r, paint);
|
30
29
|
});
|
31
30
|
|
@@ -37,6 +36,9 @@ const Circle = props => {
|
|
37
36
|
|
38
37
|
exports.Circle = Circle;
|
39
38
|
Circle.defaultProps = {
|
40
|
-
c:
|
39
|
+
c: {
|
40
|
+
x: 0,
|
41
|
+
y: 0
|
42
|
+
}
|
41
43
|
};
|
42
44
|
//# sourceMappingURL=Circle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Circle.tsx"],"names":["onDraw","def","canvas","paint","c","r","drawCircle","x","y","Circle","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAOA;;AACA
|
1
|
+
{"version":3,"sources":["Circle.tsx"],"names":["onDraw","def","canvas","paint","Skia","c","r","drawCircle","x","y","Circle","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;;;;;AAIA,MAAMA,MAAM,GAAG,4BAA2B,OAA0BC,GAA1B,KAAkC;AAAA,MAAjC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAAiC;AAC1E,QAAM;AAAEC,IAAAA,CAAF;AAAKC,IAAAA;AAAL,MAAW,+BAAcF,IAAd,EAAoBH,GAApB,CAAjB;AACAC,EAAAA,MAAM,CAACK,UAAP,CAAkBF,CAAC,CAACG,CAApB,EAAuBH,CAAC,CAACI,CAAzB,EAA4BH,CAA5B,EAA+BH,KAA/B;AACD,CAHc,CAAf;;AAKO,MAAMO,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAW,IAAA,MAAM,EAAEX;AAAnB,KAA+BW,KAA/B,EAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;AACpBP,EAAAA,CAAC,EAAE;AAAEG,IAAAA,CAAC,EAAE,CAAL;AAAQC,IAAAA,CAAC,EAAE;AAAX;AADiB,CAAtB","sourcesContent":["import React from \"react\";\n\nimport type {\n CustomPaintProps,\n AnimatedProps,\n CircleDef,\n} from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport { processCircle } from \"../../processors\";\n\nexport type CircleProps = CircleDef & CustomPaintProps;\n\nconst onDraw = createDrawing<CircleProps>(({ canvas, paint, Skia }, def) => {\n const { c, r } = processCircle(Skia, def);\n canvas.drawCircle(c.x, c.y, r, paint);\n});\n\nexport const Circle = (props: AnimatedProps<CircleProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nCircle.defaultProps = {\n c: { x: 0, y: 0 },\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["DiffRect.tsx"],"names":["onDraw","canvas","paint","inner","outer","drawDRRect","DiffRect","props"],"mappings":";;;;;;;AAAA;;AAKA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAqB;AACvCH,EAAAA,MAAM,CAACI,UAAP,CAAkBD,KAAlB,EAAyBD,KAAzB,EAAgCD,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMI,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAEP;AAAnB,KAA+BO,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps } from \"../../processors\";\nimport type { SkRRect } from \"../../../skia\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { createDrawing } from \"../../nodes/Drawing\";\n\nexport interface DiffRectProps extends CustomPaintProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nconst onDraw = createDrawing<DiffRectProps>(\n ({ canvas, paint }, { inner, outer }) => {\n canvas.drawDRRect(outer, inner, paint);\n }\n);\n\nexport const DiffRect = (props: AnimatedProps<DiffRectProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
1
|
+
{"version":3,"sources":["DiffRect.tsx"],"names":["onDraw","canvas","paint","inner","outer","drawDRRect","DiffRect","props"],"mappings":";;;;;;;AAAA;;AAKA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAqB;AACvCH,EAAAA,MAAM,CAACI,UAAP,CAAkBD,KAAlB,EAAyBD,KAAzB,EAAgCD,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMI,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAEP;AAAnB,KAA+BO,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps } from \"../../processors\";\nimport type { SkRRect } from \"../../../skia/types\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { createDrawing } from \"../../nodes/Drawing\";\n\nexport interface DiffRectProps extends CustomPaintProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nconst onDraw = createDrawing<DiffRectProps>(\n ({ canvas, paint }, { inner, outer }) => {\n canvas.drawDRRect(outer, inner, paint);\n }\n);\n\nexport const DiffRect = (props: AnimatedProps<DiffRectProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["FitBox.tsx"],"names":["fitbox","fit","src","dst","rects","FitBox","children","transform","defaultProps"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;;;;;AASO,MAAMA,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;AAC5D,QAAMC,KAAK,GAAG,qBAASH,GAAT,EAAcC,GAAd,EAAmBC,GAAnB,CAAd;AACA,SAAO,sBAAUC,KAAK,CAACF,GAAhB,EAAqBE,KAAK,CAACD,GAA3B,CAAP;AACD,CAHM;;;;AAKA,MAAME,MAAM,GAAG,QAA2C;AAAA,MAA1C;AAAEJ,IAAAA,GAAF;AAAOC,IAAAA,GAAP;AAAYC,IAAAA,GAAZ;AAAiBG,IAAAA;AAAjB,GAA0C;AAC/D,QAAMC,SAAS,GAAG,oBAAQ,MAAMP,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAApB,EAAqC,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAArC,CAAlB;AACA,sBAAO,6BAAC,YAAD;AAAO,IAAA,SAAS,EAAEK;AAAlB,KAA8BD,QAA9B,CAAP;AACD,CAHM;;;AAKPD,MAAM,CAACG,YAAP,GAAsB;AACpBP,EAAAA,GAAG,EAAE;AADe,CAAtB","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport type { Fit } from \"../image\";\nimport { rect2rect, fitRects } from \"../image\";\nimport type { SkRect } from \"../../../skia\";\nimport { Group } from \"../Group\";\n\ninterface FitProps {\n fit: Fit;\n src: SkRect;\n dst: SkRect;\n children: ReactNode | ReactNode[];\n}\n\nexport const fitbox = (fit: Fit, src: SkRect, dst: SkRect) => {\n const rects = fitRects(fit, src, dst);\n return rect2rect(rects.src, rects.dst);\n};\n\nexport const FitBox = ({ fit, src, dst, children }: FitProps) => {\n const transform = useMemo(() => fitbox(fit, src, dst), [dst, fit, src]);\n return <Group transform={transform}>{children}</Group>;\n};\n\nFitBox.defaultProps = {\n fit: \"contain\",\n};\n"]}
|
1
|
+
{"version":3,"sources":["FitBox.tsx"],"names":["fitbox","fit","src","dst","rects","FitBox","children","transform","defaultProps"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;;;;;AASO,MAAMA,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;AAC5D,QAAMC,KAAK,GAAG,qBAASH,GAAT,EAAcC,GAAd,EAAmBC,GAAnB,CAAd;AACA,SAAO,sBAAUC,KAAK,CAACF,GAAhB,EAAqBE,KAAK,CAACD,GAA3B,CAAP;AACD,CAHM;;;;AAKA,MAAME,MAAM,GAAG,QAA2C;AAAA,MAA1C;AAAEJ,IAAAA,GAAF;AAAOC,IAAAA,GAAP;AAAYC,IAAAA,GAAZ;AAAiBG,IAAAA;AAAjB,GAA0C;AAC/D,QAAMC,SAAS,GAAG,oBAAQ,MAAMP,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAApB,EAAqC,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAArC,CAAlB;AACA,sBAAO,6BAAC,YAAD;AAAO,IAAA,SAAS,EAAEK;AAAlB,KAA8BD,QAA9B,CAAP;AACD,CAHM;;;AAKPD,MAAM,CAACG,YAAP,GAAsB;AACpBP,EAAAA,GAAG,EAAE;AADe,CAAtB","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport type { Fit } from \"../image\";\nimport { rect2rect, fitRects } from \"../image\";\nimport type { SkRect } from \"../../../skia/types\";\nimport { Group } from \"../Group\";\n\ninterface FitProps {\n fit: Fit;\n src: SkRect;\n dst: SkRect;\n children: ReactNode | ReactNode[];\n}\n\nexport const fitbox = (fit: Fit, src: SkRect, dst: SkRect) => {\n const rects = fitRects(fit, src, dst);\n return rect2rect(rects.src, rects.dst);\n};\n\nexport const FitBox = ({ fit, src, dst, children }: FitProps) => {\n const transform = useMemo(() => fitbox(fit, src, dst), [dst, fit, src]);\n return <Group transform={transform}>{children}</Group>;\n};\n\nFitBox.defaultProps = {\n fit: \"contain\",\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Line.tsx"],"names":["onDraw","canvas","paint","p1","p2","drawLine","x","y","Line","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;
|
1
|
+
{"version":3,"sources":["Line.tsx"],"names":["onDraw","canvas","paint","p1","p2","drawLine","x","y","Line","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BAAyB,iBAAmC;AAAA,MAAlC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAkC;AAAA,MAAf;AAAEC,IAAAA,EAAF;AAAMC,IAAAA;AAAN,GAAe;AACzEH,EAAAA,MAAM,CAACI,QAAP,CAAgBF,EAAE,CAACG,CAAnB,EAAsBH,EAAE,CAACI,CAAzB,EAA4BH,EAAE,CAACE,CAA/B,EAAkCF,EAAE,CAACG,CAArC,EAAwCL,KAAxC;AACD,CAFc,CAAf;;AAIO,MAAMM,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAW,IAAA,MAAM,EAAET;AAAnB,KAA+BS,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport type { Vector } from \"../../../skia/types\";\n\nexport interface LineProps extends CustomPaintProps {\n p1: Vector;\n p2: Vector;\n}\nconst onDraw = createDrawing<LineProps>(({ canvas, paint }, { p1, p2 }) => {\n canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);\n});\n\nexport const Line = (props: AnimatedProps<LineProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -18,9 +18,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
18
18
|
const onDraw = (0, _nodes.createDrawing)((_ref, rectProps) => {
|
19
19
|
let {
|
20
20
|
canvas,
|
21
|
-
paint
|
21
|
+
paint,
|
22
|
+
Skia
|
22
23
|
} = _ref;
|
23
|
-
const rect = (0, _processors.processRect)(rectProps);
|
24
|
+
const rect = (0, _processors.processRect)(Skia, rectProps);
|
24
25
|
canvas.drawOval(rect, paint);
|
25
26
|
});
|
26
27
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Oval.tsx"],"names":["onDraw","rectProps","canvas","paint","rect","drawOval","Oval","props","defaultProps","x","y"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;;;;;AAIA,MAAMA,MAAM,GAAG,
|
1
|
+
{"version":3,"sources":["Oval.tsx"],"names":["onDraw","rectProps","canvas","paint","Skia","rect","drawOval","Oval","props","defaultProps","x","y"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;;;;;AAIA,MAAMA,MAAM,GAAG,0BACb,OAA0BC,SAA1B,KAAwC;AAAA,MAAvC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAAuC;AACtC,QAAMC,IAAI,GAAG,6BAAYD,IAAZ,EAAkBH,SAAlB,CAAb;AACAC,EAAAA,MAAM,CAACI,QAAP,CAAgBD,IAAhB,EAAsBF,KAAtB;AACD,CAJY,CAAf;;AAOO,MAAMI,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAW,IAAA,MAAM,EAAER;AAAnB,KAA+BQ,KAA/B,EAAP;AACD,CAFM;;;AAIPD,IAAI,CAACE,YAAL,GAAoB;AAClBC,EAAAA,CAAC,EAAE,CADe;AAElBC,EAAAA,CAAC,EAAE;AAFe,CAApB","sourcesContent":["import React from \"react\";\n\nimport type {\n CustomPaintProps,\n RectDef,\n AnimatedProps,\n} from \"../../processors\";\nimport { processRect } from \"../../processors\";\nimport { createDrawing } from \"../../nodes\";\n\nexport type OvalProps = RectDef & CustomPaintProps;\n\nconst onDraw = createDrawing<OvalProps>(\n ({ canvas, paint, Skia }, rectProps) => {\n const rect = processRect(Skia, rectProps);\n canvas.drawOval(rect, paint);\n }\n);\n\nexport const Oval = (props: AnimatedProps<OvalProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nOval.defaultProps = {\n x: 0,\n y: 0,\n};\n"]}
|
@@ -9,10 +9,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
10
10
|
var _processors = require("../../processors");
|
11
11
|
|
12
|
-
var
|
12
|
+
var _types = require("../../../skia/types");
|
13
13
|
|
14
14
|
var _nodes = require("../../nodes");
|
15
15
|
|
16
|
+
var _Color = require("../../processors/Color");
|
17
|
+
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
19
|
|
18
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -21,7 +23,8 @@ const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
|
|
21
23
|
let {
|
22
24
|
canvas,
|
23
25
|
paint,
|
24
|
-
opacity
|
26
|
+
opacity,
|
27
|
+
Skia
|
25
28
|
} = _ref;
|
26
29
|
let {
|
27
30
|
colors,
|
@@ -30,14 +33,14 @@ const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
|
|
30
33
|
blendMode
|
31
34
|
} = _ref2;
|
32
35
|
// If the colors are provided, the default blendMode is set to dstOver, if not, the default is set to srcOver
|
33
|
-
const defaultBlendMode = colors ?
|
34
|
-
const mode = blendMode ?
|
36
|
+
const defaultBlendMode = colors ? _types.BlendMode.DstOver : _types.BlendMode.SrcOver;
|
37
|
+
const mode = blendMode ? _types.BlendMode[(0, _processors.enumKey)(blendMode)] : defaultBlendMode;
|
35
38
|
canvas.drawPatch( // Patch requires a path with the following constraints:
|
36
39
|
// M tl
|
37
40
|
// C c1 c2 br
|
38
41
|
// C c1 c2 bl
|
39
42
|
// C c1 c2 tl (the redundant point in the last command is removed)
|
40
|
-
[patch[0].pos, patch[0].c2, patch[1].c1, patch[1].pos, patch[1].c2, patch[2].c1, patch[2].pos, patch[2].c2, patch[3].c1, patch[3].pos, patch[3].c2, patch[0].c1], colors ? colors.map(c => (0,
|
43
|
+
[patch[0].pos, patch[0].c2, patch[1].c1, patch[1].pos, patch[1].c2, patch[2].c1, patch[2].pos, patch[2].c2, patch[3].c1, patch[3].pos, patch[3].c2, patch[0].c1], colors ? colors.map(c => (0, _Color.processColor)(Skia, c, opacity)) : undefined, texture, mode, paint);
|
41
44
|
});
|
42
45
|
|
43
46
|
const Patch = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Patch.tsx"],"names":["onDraw","canvas","paint","opacity","colors","patch","texture","blendMode","defaultBlendMode","BlendMode","DstOver","SrcOver","mode","drawPatch","pos","c2","c1","map","c","undefined","Patch","props"],"mappings":";;;;;;;AAAA;;
|
1
|
+
{"version":3,"sources":["Patch.tsx"],"names":["onDraw","canvas","paint","opacity","Skia","colors","patch","texture","blendMode","defaultBlendMode","BlendMode","DstOver","SrcOver","mode","drawPatch","pos","c2","c1","map","c","undefined","Patch","props"],"mappings":";;;;;;;AAAA;;AAGA;;AAEA;;AACA;;AACA;;;;;;AAoBA,MAAMA,MAAM,GAAG,0BACb,iBAA6E;AAAA,MAA5E;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA,OAAjB;AAA0BC,IAAAA;AAA1B,GAA4E;AAAA,MAA1C;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA,OAAjB;AAA0BC,IAAAA;AAA1B,GAA0C;AAC3E;AACA,QAAMC,gBAAgB,GAAGJ,MAAM,GAAGK,iBAAUC,OAAb,GAAuBD,iBAAUE,OAAhE;AACA,QAAMC,IAAI,GAAGL,SAAS,GAAGE,iBAAU,yBAAQF,SAAR,CAAV,CAAH,GAAmCC,gBAAzD;AACAR,EAAAA,MAAM,CAACa,SAAP,EACE;AACA;AACA;AACA;AACA;AACA,GACER,KAAK,CAAC,CAAD,CAAL,CAASS,GADX,EAEET,KAAK,CAAC,CAAD,CAAL,CAASU,EAFX,EAGEV,KAAK,CAAC,CAAD,CAAL,CAASW,EAHX,EAIEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAJX,EAKET,KAAK,CAAC,CAAD,CAAL,CAASU,EALX,EAMEV,KAAK,CAAC,CAAD,CAAL,CAASW,EANX,EAOEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAPX,EAQET,KAAK,CAAC,CAAD,CAAL,CAASU,EARX,EASEV,KAAK,CAAC,CAAD,CAAL,CAASW,EATX,EAUEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAVX,EAWET,KAAK,CAAC,CAAD,CAAL,CAASU,EAXX,EAYEV,KAAK,CAAC,CAAD,CAAL,CAASW,EAZX,CANF,EAoBEZ,MAAM,GAAGA,MAAM,CAACa,GAAP,CAAYC,CAAD,IAAO,yBAAaf,IAAb,EAAmBe,CAAnB,EAAsBhB,OAAtB,CAAlB,CAAH,GAAuDiB,SApB/D,EAqBEb,OArBF,EAsBEM,IAtBF,EAuBEX,KAvBF;AAyBD,CA9BY,CAAf;;AAiCO,MAAMmB,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAEtB;AAAnB,KAA+BsB,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, SkEnum, AnimatedProps } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { SkPoint, Color, Vector } from \"../../../skia/types\";\nimport { BlendMode } from \"../../../skia/types\";\nimport { createDrawing } from \"../../nodes\";\nimport { processColor } from \"../../processors/Color\";\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends CustomPaintProps {\n colors?: readonly Color[];\n patch: readonly [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nconst onDraw = createDrawing<PatchProps>(\n ({ canvas, paint, opacity, Skia }, { colors, patch, texture, blendMode }) => {\n // If the colors are provided, the default blendMode is set to dstOver, if not, the default is set to srcOver\n const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const mode = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n canvas.drawPatch(\n // Patch requires a path with the following constraints:\n // M tl\n // C c1 c2 br\n // C c1 c2 bl\n // C c1 c2 tl (the redundant point in the last command is removed)\n [\n patch[0].pos,\n patch[0].c2,\n patch[1].c1,\n patch[1].pos,\n patch[1].c2,\n patch[2].c1,\n patch[2].pos,\n patch[2].c2,\n patch[3].c1,\n patch[3].pos,\n patch[3].c2,\n patch[0].c1,\n ],\n colors ? colors.map((c) => processColor(Skia, c, opacity)) : undefined,\n texture,\n mode,\n paint\n );\n }\n);\n\nexport const Patch = (props: AnimatedProps<PatchProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -11,7 +11,7 @@ var _nodes = require("../../nodes");
|
|
11
11
|
|
12
12
|
var _processors = require("../../processors");
|
13
13
|
|
14
|
-
var
|
14
|
+
var _types = require("../../../skia/types");
|
15
15
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
17
|
|
@@ -20,7 +20,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
20
20
|
const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
|
21
21
|
let {
|
22
22
|
canvas,
|
23
|
-
paint
|
23
|
+
paint,
|
24
|
+
Skia
|
24
25
|
} = _ref;
|
25
26
|
let {
|
26
27
|
start,
|
@@ -34,11 +35,11 @@ const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
|
|
34
35
|
const hasStrokeOptions = stroke !== undefined;
|
35
36
|
const hasFillType = !!fillType;
|
36
37
|
const willMutatePath = hasStartOffset || hasEndOffset || hasStrokeOptions || hasFillType;
|
37
|
-
const pristinePath = (0, _processors.processPath)(pathProps.path);
|
38
|
+
const pristinePath = (0, _processors.processPath)(Skia, pathProps.path);
|
38
39
|
const path = willMutatePath ? pristinePath.copy() : pristinePath;
|
39
40
|
|
40
41
|
if (hasFillType) {
|
41
|
-
path.setFillType(
|
42
|
+
path.setFillType(_types.FillType[(0, _processors.enumKey)(fillType)]);
|
42
43
|
}
|
43
44
|
|
44
45
|
if (hasStrokeOptions) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Path.tsx"],"names":["onDraw","canvas","paint","start","end","stroke","fillType","pathProps","hasStartOffset","hasEndOffset","hasStrokeOptions","undefined","hasFillType","willMutatePath","pristinePath","path","copy","setFillType","FillType","trim","drawPath","Path","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AACA;;;;;;AAgBA,MAAMA,MAAM,GAAG,0BACb,
|
1
|
+
{"version":3,"sources":["Path.tsx"],"names":["onDraw","canvas","paint","Skia","start","end","stroke","fillType","pathProps","hasStartOffset","hasEndOffset","hasStrokeOptions","undefined","hasFillType","willMutatePath","pristinePath","path","copy","setFillType","FillType","trim","drawPath","Path","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AACA;;;;;;AAgBA,MAAMA,MAAM,GAAG,0BACb,iBAA6E;AAAA,MAA5E;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAA4E;AAAA,MAAnD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,GAAT;AAAcC,IAAAA,MAAd;AAAsBC,IAAAA,QAAtB;AAAgC,OAAGC;AAAnC,GAAmD;AAC3E,QAAMC,cAAc,GAAGL,KAAK,KAAK,CAAjC;AACA,QAAMM,YAAY,GAAGL,GAAG,KAAK,CAA7B;AACA,QAAMM,gBAAgB,GAAGL,MAAM,KAAKM,SAApC;AACA,QAAMC,WAAW,GAAG,CAAC,CAACN,QAAtB;AACA,QAAMO,cAAc,GAClBL,cAAc,IAAIC,YAAlB,IAAkCC,gBAAlC,IAAsDE,WADxD;AAEA,QAAME,YAAY,GAAG,6BAAYZ,IAAZ,EAAkBK,SAAS,CAACQ,IAA5B,CAArB;AACA,QAAMA,IAAI,GAAGF,cAAc,GAAGC,YAAY,CAACE,IAAb,EAAH,GAAyBF,YAApD;;AACA,MAAIF,WAAJ,EAAiB;AACfG,IAAAA,IAAI,CAACE,WAAL,CAAiBC,gBAAS,yBAAQZ,QAAR,CAAT,CAAjB;AACD;;AACD,MAAII,gBAAJ,EAAsB;AACpBK,IAAAA,IAAI,CAACV,MAAL,CAAYA,MAAZ;AACD;;AACD,MAAIG,cAAc,IAAIC,YAAtB,EAAoC;AAClCM,IAAAA,IAAI,CAACI,IAAL,CAAUhB,KAAV,EAAiBC,GAAjB,EAAsB,KAAtB;AACD;;AACDJ,EAAAA,MAAM,CAACoB,QAAP,CAAgBL,IAAhB,EAAsBd,KAAtB;AACD,CApBY,CAAf;;AAuBO,MAAMoB,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAW,IAAA,MAAM,EAAEvB;AAAnB,KAA+BuB,KAA/B,EAAP;AACD,CAFM;;;AAIPD,IAAI,CAACE,YAAL,GAAoB;AAClBpB,EAAAA,KAAK,EAAE,CADW;AAElBC,EAAAA,GAAG,EAAE;AAFa,CAApB","sourcesContent":["import React from \"react\";\n\nimport type {\n CustomPaintProps,\n AnimatedProps,\n PathDef,\n SkEnum,\n} from \"../../processors\";\nimport { createDrawing } from \"../../nodes\";\nimport { processPath, enumKey } from \"../../processors\";\nimport { FillType } from \"../../../skia/types\";\n\ninterface StrokeOpts {\n width?: number;\n strokeMiterlimit?: number;\n precision?: number;\n}\n\nexport interface PathProps extends CustomPaintProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nconst onDraw = createDrawing<PathProps>(\n ({ canvas, paint, Skia }, { start, end, stroke, fillType, ...pathProps }) => {\n const hasStartOffset = start !== 0;\n const hasEndOffset = end !== 1;\n const hasStrokeOptions = stroke !== undefined;\n const hasFillType = !!fillType;\n const willMutatePath =\n hasStartOffset || hasEndOffset || hasStrokeOptions || hasFillType;\n const pristinePath = processPath(Skia, pathProps.path);\n const path = willMutatePath ? pristinePath.copy() : pristinePath;\n if (hasFillType) {\n path.setFillType(FillType[enumKey(fillType)]);\n }\n if (hasStrokeOptions) {\n path.stroke(stroke);\n }\n if (hasStartOffset || hasEndOffset) {\n path.trim(start, end, false);\n }\n canvas.drawPath(path, paint);\n }\n);\n\nexport const Path = (props: AnimatedProps<PathProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nPath.defaultProps = {\n start: 0,\n end: 1,\n};\n"]}
|
@@ -7,7 +7,7 @@ exports.Points = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _types = require("../../../skia/types");
|
11
11
|
|
12
12
|
var _Paint = require("../../processors/Paint");
|
13
13
|
|
@@ -27,7 +27,7 @@ const onDraw = (0, _Drawing.createDrawing)((_ref, _ref2) => {
|
|
27
27
|
mode
|
28
28
|
} = _ref2;
|
29
29
|
|
30
|
-
const pointMode =
|
30
|
+
const pointMode = _types.PointMode[(0, _Paint.enumKey)(mode)];
|
31
31
|
|
32
32
|
canvas.drawPoints(pointMode, points, paint);
|
33
33
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Points.tsx"],"names":["onDraw","canvas","paint","points","mode","pointMode","PointMode","drawPoints","Points","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAEA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAqB;;AACvC,QAAMC,SAAS,GAAGC,
|
1
|
+
{"version":3,"sources":["Points.tsx"],"names":["onDraw","canvas","paint","points","mode","pointMode","PointMode","drawPoints","Points","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAEA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAqB;;AACvC,QAAMC,SAAS,GAAGC,iBAAU,oBAAQF,IAAR,CAAV,CAAlB;;AACAH,EAAAA,MAAM,CAACM,UAAP,CAAkBF,SAAlB,EAA6BF,MAA7B,EAAqCD,KAArC;AACD,CAJY,CAAf;;AAOO,MAAMM,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAW,IAAA,MAAM,EAAET;AAAnB,KAA+BS,KAA/B,EAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;AACpBN,EAAAA,IAAI,EAAE;AADc,CAAtB","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, SkEnum } from \"../../processors\";\nimport type { SkPoint } from \"../../../skia/types\";\nimport { PointMode } from \"../../../skia/types\";\nimport { enumKey } from \"../../processors/Paint\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { createDrawing } from \"../../nodes/Drawing\";\n\nexport interface PointsProps extends CustomPaintProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nconst onDraw = createDrawing<PointsProps>(\n ({ canvas, paint }, { points, mode }) => {\n const pointMode = PointMode[enumKey(mode)];\n canvas.drawPoints(pointMode, points, paint);\n }\n);\n\nexport const Points = (props: AnimatedProps<PointsProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nPoints.defaultProps = {\n mode: \"points\",\n};\n"]}
|
@@ -18,9 +18,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
18
18
|
const onDraw = (0, _Drawing.createDrawing)((_ref, rectProps) => {
|
19
19
|
let {
|
20
20
|
canvas,
|
21
|
-
paint
|
21
|
+
paint,
|
22
|
+
Skia
|
22
23
|
} = _ref;
|
23
|
-
const rect = (0, _processors.processRect)(rectProps);
|
24
|
+
const rect = (0, _processors.processRect)(Skia, rectProps);
|
24
25
|
canvas.drawRect(rect, paint);
|
25
26
|
});
|
26
27
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Rect.tsx"],"names":["onDraw","rectProps","canvas","paint","rect","drawRect","Rect","props"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA;;;;;;AAIA,MAAMA,MAAM,GAAG,
|
1
|
+
{"version":3,"sources":["Rect.tsx"],"names":["onDraw","rectProps","canvas","paint","Skia","rect","drawRect","Rect","props"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA;;;;;;AAIA,MAAMA,MAAM,GAAG,4BACb,OAA0BC,SAA1B,KAAwC;AAAA,MAAvC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAAuC;AACtC,QAAMC,IAAI,GAAG,6BAAYD,IAAZ,EAAkBH,SAAlB,CAAb;AACAC,EAAAA,MAAM,CAACI,QAAP,CAAgBD,IAAhB,EAAsBF,KAAtB;AACD,CAJY,CAAf;;AAOO,MAAMI,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAW,IAAA,MAAM,EAAER;AAAnB,KAA+BQ,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport type {\n CustomPaintProps,\n RectDef,\n AnimatedProps,\n} from \"../../processors\";\nimport { processRect } from \"../../processors\";\n\nexport type RectProps = RectDef & CustomPaintProps;\n\nconst onDraw = createDrawing<RectProps>(\n ({ canvas, paint, Skia }, rectProps) => {\n const rect = processRect(Skia, rectProps);\n canvas.drawRect(rect, paint);\n }\n);\n\nexport const Rect = (props: AnimatedProps<RectProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -18,9 +18,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
18
18
|
const onDraw = (0, _nodes.createDrawing)((_ref, rectProps) => {
|
19
19
|
let {
|
20
20
|
canvas,
|
21
|
-
paint
|
21
|
+
paint,
|
22
|
+
Skia
|
22
23
|
} = _ref;
|
23
|
-
const rrect = (0, _processors.processRRect)(rectProps);
|
24
|
+
const rrect = (0, _processors.processRRect)(Skia, rectProps);
|
24
25
|
canvas.drawRRect(rrect, paint);
|
25
26
|
});
|
26
27
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RoundedRect.tsx"],"names":["onDraw","rectProps","canvas","paint","rrect","drawRRect","RoundedRect","props","defaultProps","r"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA;;;;;;AAIA,MAAMA,MAAM,GAAG,0BACb,
|
1
|
+
{"version":3,"sources":["RoundedRect.tsx"],"names":["onDraw","rectProps","canvas","paint","Skia","rrect","drawRRect","RoundedRect","props","defaultProps","r"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA;;;;;;AAIA,MAAMA,MAAM,GAAG,0BACb,OAA0BC,SAA1B,KAAwC;AAAA,MAAvC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAAuC;AACtC,QAAMC,KAAK,GAAG,8BAAaD,IAAb,EAAmBH,SAAnB,CAAd;AACAC,EAAAA,MAAM,CAACI,SAAP,CAAiBD,KAAjB,EAAwBF,KAAxB;AACD,CAJY,CAAf;;AAMO,MAAMI,WAAW,GAAIC,KAAD,IAA4C;AACrE,sBAAO;AAAW,IAAA,MAAM,EAAER;AAAnB,KAA+BQ,KAA/B,EAAP;AACD,CAFM;;;AAIPD,WAAW,CAACE,YAAZ,GAA2B;AACzBC,EAAAA,CAAC,EAAE;AADsB,CAA3B","sourcesContent":["import React from \"react\";\n\nimport { createDrawing } from \"../../nodes\";\nimport type {\n CustomPaintProps,\n RRectDef,\n AnimatedProps,\n} from \"../../processors\";\nimport { processRRect } from \"../../processors\";\n\nexport type RoundedRectProps = RRectDef & CustomPaintProps;\n\nconst onDraw = createDrawing<RoundedRectProps>(\n ({ canvas, paint, Skia }, rectProps) => {\n const rrect = processRRect(Skia, rectProps);\n canvas.drawRRect(rrect, paint);\n }\n);\nexport const RoundedRect = (props: AnimatedProps<RoundedRectProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nRoundedRect.defaultProps = {\n r: 0,\n};\n"]}
|