@shopify/react-native-skia 0.1.150 → 0.1.152
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +4 -5
- package/android/cpp/jni/JniLoad.cpp +7 -5
- package/android/cpp/jni/JniSkiaManager.cpp +2 -15
- package/android/cpp/jni/include/JniSkiaBaseView.h +68 -0
- package/android/cpp/jni/include/JniSkiaDrawView.h +64 -47
- package/android/cpp/jni/include/JniSkiaManager.h +8 -10
- package/android/cpp/jni/include/JniSkiaPictureView.h +96 -0
- package/android/cpp/rnskia-android/{RNSkPlatformContextImpl.h → RNSkAndroidPlatformContext.h} +4 -4
- package/android/cpp/rnskia-android/RNSkAndroidView.h +100 -0
- package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp +91 -0
- package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.h +39 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +15 -6
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +5 -4
- package/android/src/main/java/com/shopify/reactnative/skia/PlatformContext.java +5 -11
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +143 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +17 -145
- package/android/src/main/java/com/shopify/reactnative/skia/{RNSkiaViewManager.java → SkiaDrawViewManager.java} +4 -15
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaManager.java +1 -10
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +45 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureViewManager.java +64 -0
- package/cpp/jsi/JsiValueWrapper.h +11 -0
- package/cpp/rnskia/RNSkInfoParameter.h +4 -14
- package/cpp/rnskia/RNSkJsView.cpp +211 -0
- package/cpp/rnskia/RNSkJsView.h +115 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +6 -6
- package/cpp/rnskia/RNSkManager.cpp +7 -7
- package/cpp/rnskia/RNSkManager.h +7 -7
- package/cpp/rnskia/RNSkPictureView.h +124 -0
- package/cpp/rnskia/RNSkView.h +287 -0
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.h +38 -0
- package/ios/RNSkia-iOS/{RNSkDrawViewImpl.mm → RNSkMetalCanvasProvider.mm} +40 -23
- package/ios/RNSkia-iOS/{PlatformContext.h → RNSkiOSPlatformContext.h} +4 -4
- package/ios/RNSkia-iOS/{PlatformContext.mm → RNSkiOSPlatformContext.mm} +5 -5
- package/ios/RNSkia-iOS/RNSkiOSView.h +34 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +19 -11
- package/ios/RNSkia-iOS/SkiaManager.mm +3 -3
- package/ios/RNSkia-iOS/SkiaPictureViewManager.h +8 -0
- package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +51 -0
- package/ios/RNSkia-iOS/SkiaUIView.h +26 -0
- package/ios/RNSkia-iOS/{SkiaDrawView.mm → SkiaUIView.mm} +29 -23
- package/lib/commonjs/animation/decay/decay.js.map +1 -1
- package/lib/commonjs/animation/decay/index.js.map +1 -1
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
- package/lib/commonjs/animation/decay/types.js.map +1 -1
- package/lib/commonjs/animation/functions/index.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolate.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -1
- package/lib/commonjs/animation/index.js.map +1 -1
- package/lib/commonjs/animation/spring/Spring.js.map +1 -1
- package/lib/commonjs/animation/spring/functions/index.js.map +1 -1
- package/lib/commonjs/animation/spring/functions/spring.js.map +1 -1
- package/lib/commonjs/animation/spring/index.js.map +1 -1
- package/lib/commonjs/animation/spring/runSpring.js +1 -1
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/types.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.js +1 -1
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/Easing.js.map +1 -1
- package/lib/commonjs/animation/timing/createTiming.js +2 -6
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/bezier.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +6 -10
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/index.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/timing.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/types.js.map +1 -1
- package/lib/commonjs/animation/timing/index.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useLoop.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.js +1 -3
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/animation/types.js.map +1 -1
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/GroupNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Color.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js +2 -2
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/FillNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/LineNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/OvalNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PictureNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PointsNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/RectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Text.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.js +2 -4
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/index.js.map +1 -1
- package/lib/commonjs/dom/types/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/types/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/types/Shaders.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/external/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.js +6 -10
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +0 -2
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +1 -1
- 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/BackdropBlur.js +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/image/index.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/index.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- 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/Fill.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.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- 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.map +1 -1
- package/lib/commonjs/renderer/components/text/index.js.map +1 -1
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -1
- 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/Math.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
- package/lib/commonjs/renderer/typeddash.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js.map +1 -1
- package/lib/commonjs/renderer/useContextBridge.js.map +1 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/Skia.web.js.map +1 -1
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/core/Font.js.map +1 -1
- package/lib/commonjs/skia/core/Image.js.map +1 -1
- package/lib/commonjs/skia/core/Matrix.js.map +1 -1
- package/lib/commonjs/skia/core/Picture.js.map +1 -1
- package/lib/commonjs/skia/core/RRect.js.map +1 -1
- package/lib/commonjs/skia/core/Rect.js.map +1 -1
- package/lib/commonjs/skia/core/SVG.js.map +1 -1
- package/lib/commonjs/skia/core/Typeface.js.map +1 -1
- package/lib/commonjs/skia/core/Vector.js +1 -1
- package/lib/commonjs/skia/core/Vector.js.map +1 -1
- package/lib/commonjs/skia/core/index.js.map +1 -1
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/skia/types/Canvas.js.map +1 -1
- package/lib/commonjs/skia/types/Color.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -1
- package/lib/commonjs/skia/types/ContourMeasure.js.map +1 -1
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Data/DataFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Data/index.js.map +1 -1
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
- package/lib/commonjs/skia/types/Font/index.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Image/index.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -1
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/Path/PathFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Path/index.js.map +1 -1
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/Picture.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/PictureFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/index.js.map +1 -1
- package/lib/commonjs/skia/types/Point.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/types/RSXform.js.map +1 -1
- package/lib/commonjs/skia/types/Rect.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVGFactory.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/index.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/index.js.map +1 -1
- package/lib/commonjs/skia/types/TextBlob.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -1
- package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -1
- package/lib/commonjs/skia/types/Vertices/index.js.map +1 -1
- package/lib/commonjs/skia/types/index.js.map +1 -1
- package/lib/commonjs/skia/web/Host.js +1 -1
- package/lib/commonjs/skia/web/Host.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/commonjs/skia/web/index.js.map +1 -1
- package/lib/commonjs/values/api.js.map +1 -1
- package/lib/commonjs/values/api.web.js.map +1 -1
- package/lib/commonjs/values/hooks/index.js.map +1 -1
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/index.js.map +1 -1
- package/lib/commonjs/values/selector.js.map +1 -1
- package/lib/commonjs/values/types.js.map +1 -1
- package/lib/commonjs/values/web/RNSkAnimation.js +2 -2
- package/lib/commonjs/values/web/RNSkAnimation.js.map +1 -1
- package/lib/commonjs/values/web/RNSkClockValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkValue.js.map +1 -1
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/values/web/index.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +213 -0
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -0
- package/lib/commonjs/views/SkiaPictureView.js +112 -0
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -0
- package/lib/commonjs/views/SkiaPictureView.web.js +31 -0
- package/lib/commonjs/views/SkiaPictureView.web.js.map +1 -0
- package/lib/commonjs/views/SkiaView.js +2 -2
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +14 -203
- package/lib/commonjs/views/SkiaView.web.js.map +1 -1
- package/lib/commonjs/views/api.js.map +1 -1
- package/lib/commonjs/views/index.js +13 -0
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/views/useDrawCallback.js.map +1 -1
- package/lib/commonjs/views/useTouchHandler.js +6 -6
- package/lib/commonjs/views/useTouchHandler.js.map +1 -1
- package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
- package/lib/commonjs/web/WithSkiaWeb.js +1 -1
- package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/module/animation/decay/decay.js.map +1 -1
- package/lib/module/animation/decay/index.js.map +1 -1
- package/lib/module/animation/decay/runDecay.js.map +1 -1
- package/lib/module/animation/decay/types.js.map +1 -1
- package/lib/module/animation/functions/index.js.map +1 -1
- package/lib/module/animation/functions/interpolate.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/module/animation/functions/interpolateVector.js.map +1 -1
- package/lib/module/animation/index.js.map +1 -1
- package/lib/module/animation/spring/Spring.js.map +1 -1
- package/lib/module/animation/spring/functions/index.js.map +1 -1
- package/lib/module/animation/spring/functions/spring.js.map +1 -1
- package/lib/module/animation/spring/index.js.map +1 -1
- package/lib/module/animation/spring/runSpring.js +1 -1
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/types.js.map +1 -1
- package/lib/module/animation/spring/useSpring.js +1 -1
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/Easing.js.map +1 -1
- package/lib/module/animation/timing/createTiming.js +2 -6
- package/lib/module/animation/timing/createTiming.js.map +1 -1
- package/lib/module/animation/timing/functions/bezier.js.map +1 -1
- package/lib/module/animation/timing/functions/getResolvedParams.js +6 -10
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +1 -1
- package/lib/module/animation/timing/functions/index.js.map +1 -1
- package/lib/module/animation/timing/functions/timing.js.map +1 -1
- package/lib/module/animation/timing/functions/types.js.map +1 -1
- package/lib/module/animation/timing/index.js.map +1 -1
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useLoop.js.map +1 -1
- package/lib/module/animation/timing/useTiming.js +1 -3
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/animation/types.js.map +1 -1
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/GroupNode.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/PaintContext.js.map +1 -1
- package/lib/module/dom/nodes/PaintNode.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Color.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +2 -2
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/DiffRectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/FillNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -1
- package/lib/module/dom/nodes/drawings/LineNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/OvalNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PictureNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PointsNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/RectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Text.js.map +1 -1
- package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/index.js.map +1 -1
- package/lib/module/dom/nodes/index.js.map +1 -1
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.js +2 -4
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/nodes/paint/index.js.map +1 -1
- package/lib/module/dom/types/ColorFilters.js.map +1 -1
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/ImageFilters.js.map +1 -1
- package/lib/module/dom/types/MaskFilters.js.map +1 -1
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/PathEffects.js.map +1 -1
- package/lib/module/dom/types/Shaders.js.map +1 -1
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/external/index.js.map +1 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.js +6 -10
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +0 -2
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Drawing.js.map +1 -1
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +1 -1
- 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/BackdropBlur.js +1 -1
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/backdrop/index.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/index.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/image/index.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/index.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/index.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/index.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- 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/Fill.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.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/shapes/index.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- 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.map +1 -1
- package/lib/module/renderer/components/text/index.js.map +1 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Animations/index.js.map +1 -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/Math.js.map +1 -1
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/module/renderer/processors/math/index.js.map +1 -1
- package/lib/module/renderer/typeddash.js.map +1 -1
- package/lib/module/renderer/useCanvas.js.map +1 -1
- package/lib/module/renderer/useContextBridge.js.map +1 -1
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/Skia.web.js.map +1 -1
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/core/Font.js.map +1 -1
- package/lib/module/skia/core/Image.js.map +1 -1
- package/lib/module/skia/core/Matrix.js.map +1 -1
- package/lib/module/skia/core/Picture.js.map +1 -1
- package/lib/module/skia/core/RRect.js.map +1 -1
- package/lib/module/skia/core/Rect.js.map +1 -1
- package/lib/module/skia/core/SVG.js.map +1 -1
- package/lib/module/skia/core/Typeface.js.map +1 -1
- package/lib/module/skia/core/Vector.js +1 -1
- package/lib/module/skia/core/Vector.js.map +1 -1
- package/lib/module/skia/core/index.js.map +1 -1
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/skia/types/Canvas.js.map +1 -1
- package/lib/module/skia/types/Color.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/index.js.map +1 -1
- package/lib/module/skia/types/ContourMeasure.js.map +1 -1
- package/lib/module/skia/types/Data/Data.js.map +1 -1
- package/lib/module/skia/types/Data/DataFactory.js.map +1 -1
- package/lib/module/skia/types/Data/index.js.map +1 -1
- package/lib/module/skia/types/Font/Font.js.map +1 -1
- package/lib/module/skia/types/Font/index.js.map +1 -1
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/module/skia/types/Image/index.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/index.js.map +1 -1
- package/lib/module/skia/types/JsiInstance.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/module/skia/types/Paint/Paint.js.map +1 -1
- package/lib/module/skia/types/Paint/index.js.map +1 -1
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/Path/PathFactory.js.map +1 -1
- package/lib/module/skia/types/Path/index.js.map +1 -1
- package/lib/module/skia/types/PathEffect.js.map +1 -1
- package/lib/module/skia/types/Picture/Picture.js.map +1 -1
- package/lib/module/skia/types/Picture/PictureFactory.js.map +1 -1
- package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/module/skia/types/Picture/index.js.map +1 -1
- package/lib/module/skia/types/Point.js.map +1 -1
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/types/RSXform.js.map +1 -1
- package/lib/module/skia/types/Rect.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -1
- package/lib/module/skia/types/SVG/SVG.js.map +1 -1
- package/lib/module/skia/types/SVG/SVGFactory.js.map +1 -1
- package/lib/module/skia/types/SVG/index.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/types/Shader/ShaderFactory.js.map +1 -1
- package/lib/module/skia/types/Shader/index.js.map +1 -1
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/types/Surface/Surface.js.map +1 -1
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/module/skia/types/Surface/index.js.map +1 -1
- package/lib/module/skia/types/TextBlob.js.map +1 -1
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -1
- package/lib/module/skia/types/Typeface/index.js.map +1 -1
- package/lib/module/skia/types/Vertices/Vertices.js.map +1 -1
- package/lib/module/skia/types/Vertices/index.js.map +1 -1
- package/lib/module/skia/types/index.js.map +1 -1
- package/lib/module/skia/web/Host.js +1 -1
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColor.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkShader.js.map +1 -1
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/skia/web/index.js.map +1 -1
- package/lib/module/values/api.js.map +1 -1
- package/lib/module/values/api.web.js.map +1 -1
- package/lib/module/values/hooks/index.js.map +1 -1
- package/lib/module/values/hooks/useClockValue.js.map +1 -1
- package/lib/module/values/hooks/useComputedValue.js.map +1 -1
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/index.js.map +1 -1
- package/lib/module/values/selector.js.map +1 -1
- package/lib/module/values/types.js.map +1 -1
- package/lib/module/values/web/RNSkAnimation.js +2 -2
- package/lib/module/values/web/RNSkAnimation.js.map +1 -1
- package/lib/module/values/web/RNSkClockValue.js.map +1 -1
- package/lib/module/values/web/RNSkComputedValue.js +1 -1
- package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/values/web/RNSkValue.js.map +1 -1
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/values/web/index.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +198 -0
- package/lib/module/views/SkiaBaseWebView.js.map +1 -0
- package/lib/module/views/SkiaPictureView.js +94 -0
- package/lib/module/views/SkiaPictureView.js.map +1 -0
- package/lib/module/views/SkiaPictureView.web.js +19 -0
- package/lib/module/views/SkiaPictureView.web.js.map +1 -0
- package/lib/module/views/SkiaView.js +2 -2
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +15 -201
- package/lib/module/views/SkiaView.web.js.map +1 -1
- package/lib/module/views/api.js.map +1 -1
- package/lib/module/views/index.js +1 -0
- package/lib/module/views/index.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/module/views/useDrawCallback.js.map +1 -1
- package/lib/module/views/useTouchHandler.js +6 -6
- package/lib/module/views/useTouchHandler.js.map +1 -1
- package/lib/module/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.js +1 -1
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/module/web/index.js.map +1 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +1 -1
- package/lib/typescript/src/animation/spring/runSpring.d.ts +1 -1
- package/lib/typescript/src/animation/spring/useSpring.d.ts +1 -1
- package/lib/typescript/src/animation/timing/createTiming.d.ts +1 -1
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +1 -1
- package/lib/typescript/src/animation/timing/runTiming.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useTiming.d.ts +1 -1
- package/lib/typescript/src/mock/index.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
- package/lib/typescript/src/renderer/HostConfig.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +4 -4
- package/lib/typescript/src/renderer/typeddash.d.ts +2 -2
- package/lib/typescript/src/skia/core/Font.d.ts +1 -1
- package/lib/typescript/src/skia/core/Vector.d.ts +2 -2
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +2 -2
- package/lib/typescript/src/views/SkiaBaseWebView.d.ts +58 -0
- package/lib/typescript/src/views/SkiaPictureView.d.ts +27 -0
- package/lib/typescript/src/views/SkiaPictureView.web.d.ts +7 -0
- package/lib/typescript/src/views/SkiaView.d.ts +4 -4
- package/lib/typescript/src/views/SkiaView.web.d.ts +6 -53
- package/lib/typescript/src/views/index.d.ts +1 -0
- package/lib/typescript/src/views/types.d.ts +7 -2
- package/lib/typescript/src/web/LoadSkiaWeb.d.ts +2 -2
- package/package.json +6 -6
- package/src/renderer/HostConfig.ts +3 -4
- package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
- package/src/renderer/processors/Animations/Animations.ts +11 -4
- package/src/renderer/typeddash.ts +3 -2
- package/src/values/web/RNSkComputedValue.ts +6 -1
- package/src/views/SkiaBaseWebView.tsx +177 -0
- package/src/views/SkiaPictureView.tsx +93 -0
- package/src/views/SkiaPictureView.web.tsx +23 -0
- package/src/views/SkiaView.tsx +6 -7
- package/src/views/SkiaView.web.tsx +18 -167
- package/src/views/index.ts +1 -0
- package/src/views/types.ts +9 -2
- package/android/cpp/jni/JniSkiaDrawView.cpp +0 -113
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.cpp +0 -73
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.h +0 -48
- package/cpp/rnskia/RNSkDrawView.cpp +0 -315
- package/cpp/rnskia/RNSkDrawView.h +0 -226
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.h +0 -52
- package/ios/RNSkia-iOS/SkiaDrawView.h +0 -23
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["Config","Gentle","mass","stiffness","damping","velocity","Wobbly","WobblySlow","Stiff","Default","Spring","config"],"sources":["Spring.ts"],"sourcesContent":["import type { SpringConfig } from \"./types\";\n\n/*\n Spring animation configurations\n*/\nconst Config = {\n Gentle: {\n mass: 1,\n stiffness: 170,\n damping: 19,\n velocity: 0,\n },\n Wobbly: {\n mass: 1,\n stiffness: 180,\n damping: 12,\n velocity: 0,\n },\n WobblySlow: {\n mass: 4,\n stiffness: 180,\n damping: 25,\n velocity: 0,\n },\n Stiff: {\n mass: 1,\n stiffness: 200,\n damping: 20,\n velocity: 0,\n },\n Default: {\n mass: 1,\n stiffness: 100,\n damping: 10,\n velocity: 0,\n },\n};\n\nexport const Spring = {\n Config,\n Gentle: (config: SpringConfig = {}) => ({\n ...Config.Gentle,\n ...config,\n }),\n Wobbly: (config: SpringConfig = {}) => ({\n ...Config.Wobbly,\n ...config,\n }),\n WobblySlow: (config: SpringConfig = {}) => ({\n ...Config.WobblySlow,\n ...config,\n }),\n Stiff: (config: SpringConfig = {}) => ({\n ...Config.Stiff,\n ...config,\n }),\n Default: (config: SpringConfig = {}) => ({\n ...Config.Default,\n ...config,\n }),\n};\n"],"mappings":"AAEA;AACA;AACA;AACA,MAAMA,MAAM,GAAG;EACbC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,SAAS,EAAE,GAFL;IAGNC,OAAO,EAAE,EAHH;IAINC,QAAQ,EAAE;EAJJ,CADK;EAObC,MAAM,EAAE;IACNJ,IAAI,EAAE,CADA;IAENC,SAAS,EAAE,GAFL;IAGNC,OAAO,EAAE,EAHH;IAINC,QAAQ,EAAE;EAJJ,CAPK;EAabE,UAAU,EAAE;IACVL,IAAI,EAAE,CADI;IAEVC,SAAS,EAAE,GAFD;IAGVC,OAAO,EAAE,EAHC;IAIVC,QAAQ,EAAE;EAJA,CAbC;EAmBbG,KAAK,EAAE;IACLN,IAAI,EAAE,CADD;IAELC,SAAS,EAAE,GAFN;IAGLC,OAAO,EAAE,EAHJ;IAILC,QAAQ,EAAE;EAJL,CAnBM;EAyBbI,OAAO,EAAE;IACPP,IAAI,EAAE,CADC;IAEPC,SAAS,EAAE,GAFJ;IAGPC,OAAO,EAAE,EAHF;IAIPC,QAAQ,EAAE;EAJH;AAzBI,CAAf;AAiCA,OAAO,MAAMK,MAAM,GAAG;EACpBV,MADoB;EAEpBC,MAAM,EAAE;IAAA,IAACU,MAAD,uEAAwB,EAAxB;IAAA,OAAgC,EACtC,GAAGX,MAAM,CAACC,MAD4B;MAEtC,GAAGU;IAFmC,CAAhC;EAAA,CAFY;EAMpBL,MAAM,EAAE;IAAA,IAACK,MAAD,uEAAwB,EAAxB;IAAA,OAAgC,EACtC,GAAGX,MAAM,CAACM,MAD4B;MAEtC,GAAGK;IAFmC,CAAhC;EAAA,CANY;EAUpBJ,UAAU,EAAE;IAAA,IAACI,MAAD,uEAAwB,EAAxB;IAAA,OAAgC,EAC1C,GAAGX,MAAM,CAACO,UADgC;MAE1C,GAAGI;IAFuC,CAAhC;EAAA,CAVQ;EAcpBH,KAAK,EAAE;IAAA,IAACG,MAAD,uEAAwB,EAAxB;IAAA,OAAgC,EACrC,GAAGX,MAAM,CAACQ,KAD2B;MAErC,GAAGG;IAFkC,CAAhC;EAAA,CAda;EAkBpBF,OAAO,EAAE;IAAA,IAACE,MAAD,uEAAwB,EAAxB;IAAA,OAAgC,EACvC,GAAGX,MAAM,CAACS,OAD6B;MAEvC,GAAGE;IAFoC,CAAhC;EAAA;AAlBW,CAAf"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["createSpringEasing"],"sources":["index.ts"],"sourcesContent":["export { createSpringEasing } from \"./spring\";\n"],"mappings":"AAAA,SAASA,kBAAT,QAAmC,UAAnC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["createSpringEasing","params","config","mass","stiffness","damping","velocity","getSpringEasing","initialVelocity","state","w0","Math","sqrt","zeta","wd","a","b","update","t","duration","progress","exp","cos","sin","getDurationMs","frame","elapsed","rest","durationMs","easing"],"sources":["spring.ts"],"sourcesContent":["import type { SpringConfig } from \"../types\";\nimport type { TimingConfig } from \"../../types\";\n\n/**\n * @description Returns a cached jsContext function for a spring with duration\n * @param mass The mass of the spring\n * @param stiffness The stiffness of the spring\n * @param damping Spring damping\n * @param velocity The initial velocity\n */\nexport const createSpringEasing = (\n params: Partial<SpringConfig>\n): TimingConfig => {\n const config = {\n mass: 1,\n stiffness: 100,\n damping: 10,\n velocity: 0,\n ...params,\n };\n config.velocity /= 100;\n return getSpringEasing(config);\n};\n\nconst getSpringEasing = (config: Required<SpringConfig>) => {\n const { stiffness, mass, damping, velocity: initialVelocity } = config;\n // Setup spring state\n const state = {\n w0: Math.sqrt(stiffness / mass),\n zeta: 0,\n wd: 0,\n a: 1,\n b: 0,\n };\n state.zeta = damping / (2 * Math.sqrt(stiffness * mass));\n state.wd =\n state.zeta < 1 ? state.w0 * Math.sqrt(1 - state.zeta * state.zeta) : 0;\n state.a = 1;\n state.b =\n state.zeta < 1\n ? (state.zeta * state.w0 + -initialVelocity) / state.wd\n : -initialVelocity + state.w0;\n\n const update = (t: number, duration?: number) => {\n let progress = duration ? (duration * t) / 1000 : t;\n if (state.zeta < 1) {\n progress =\n Math.exp(-progress * state.zeta * state.w0) *\n (state.a * Math.cos(state.wd * progress) +\n state.b * Math.sin(state.wd * progress));\n } else {\n progress =\n (state.a + state.b * progress) * Math.exp(-progress * state.w0);\n }\n if (t === 0 || t === 1) {\n return t;\n }\n return 1 - progress;\n };\n\n const getDurationMs = () => {\n var frame = 1 / 6;\n var elapsed = 0;\n var rest = 0;\n while (true) {\n elapsed += frame;\n if (update(elapsed) === 1) {\n rest++;\n if (rest >= 6) {\n break;\n }\n } else {\n rest = 0;\n }\n }\n var durationMs = elapsed * frame * 1000;\n return durationMs + 1000;\n };\n\n const durationMs = getDurationMs();\n\n return {\n easing: (t: number) => update(t, durationMs),\n duration: durationMs,\n };\n};\n"],"mappings":"AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,kBAAkB,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,aAAa,EAAhC;EAEA,OAAO;IACLK,MAAM,EAAGX,CAAD,IAAeD,MAAM,CAACC,CAAD,EAAIU,UAAJ,CADxB;IAELT,QAAQ,EAAES;EAFL,CAAP;AAID,CA7DD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["Spring","runSpring","useSpring"],"sources":["index.ts"],"sourcesContent":["export { Spring } from \"./Spring\";\nexport { runSpring } from \"./runSpring\";\nexport { useSpring } from \"./useSpring\";\n"],"mappings":"AAAA,SAASA,MAAT,QAAuB,UAAvB;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,SAAT,QAA0B,aAA1B"}
|
@@ -16,6 +16,6 @@ import { createSpringEasing } from "./functions/spring";
|
|
16
16
|
*/
|
17
17
|
|
18
18
|
export const runSpring = (value, toOrParams, config, callback) => {
|
19
|
-
return runTiming(value, toOrParams, createSpringEasing(config
|
19
|
+
return runTiming(value, toOrParams, createSpringEasing(config ?? Spring.Config.Default), callback);
|
20
20
|
};
|
21
21
|
//# sourceMappingURL=runSpring.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["runTiming","Spring","createSpringEasing","runSpring","value","toOrParams","config","callback","Config","Default"],"sources":["runSpring.ts"],"sourcesContent":["import type { SkiaMutableValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n SpringConfig,\n AnimationCallback,\n} from \"../types\";\nimport { runTiming } from \"../timing/runTiming\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runSpring = (\n value: SkiaMutableValue<number>,\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n return runTiming(\n value,\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n};\n"],"mappings":"AAMA,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,kBAAT,QAAmC,oBAAnC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;EAClB,OAAOP,SAAS,CACdI,KADc,EAEdC,UAFc,EAGdH,kBAAkB,CAACI,MAAM,IAAIL,MAAM,CAACO,MAAP,CAAcC,OAAzB,CAHJ,EAIdF,QAJc,CAAhB;AAMD,CAZM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface SpringConfig {\n mass?: number;\n stiffness?: number;\n velocity?: number;\n damping?: number;\n}\n"],"mappings":""}
|
@@ -9,5 +9,5 @@ import { createSpringEasing } from "./functions/spring";
|
|
9
9
|
* @returns
|
10
10
|
*/
|
11
11
|
|
12
|
-
export const useSpring = (toOrParams, config, callback) => useTiming(toOrParams, createSpringEasing(config
|
12
|
+
export const useSpring = (toOrParams, config, callback) => useTiming(toOrParams, createSpringEasing(config ?? Spring.Config.Default), callback);
|
13
13
|
//# sourceMappingURL=useSpring.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["useTiming","Spring","createSpringEasing","useSpring","toOrParams","config","callback","Config","Default"],"sources":["useSpring.ts"],"sourcesContent":["import type { SkiaValue } from \"../../values/types\";\nimport type {\n SpringConfig,\n AnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport { useTiming } from \"../timing\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creats a spring based animation value that will run whenever\n * the animation parameters change.\n * @param toOrParams\n * @param config\n * @returns\n */\nexport const useSpring = (\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaValue<number> =>\n useTiming(\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n"],"mappings":"AAMA,SAASA,SAAT,QAA0B,WAA1B;AAEA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,kBAAT,QAAmC,oBAAnC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAKvBN,SAAS,CACPI,UADO,EAEPF,kBAAkB,CAACG,MAAM,IAAIJ,MAAM,CAACM,MAAP,CAAcC,OAAzB,CAFX,EAGPF,QAHO,CALJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["bezier","Easing","step0","n","step1","linear","t","ease","quad","cubic","poly","sin","Math","cos","PI","circle","sqrt","exp","elastic","bounciness","p","back","s","bounce","t2_","t2","x1","y1","x2","y2","in","easing","out","inOut"],"sources":["Easing.ts"],"sourcesContent":["// eslint-disable-next-line max-len\n// Taken from https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/Animated/src/Easing.js\n\nimport { bezier } from \"./functions\";\n\nexport class Easing {\n static step0(n: number): number {\n return n > 0 ? 1 : 0;\n }\n\n static step1(n: number): number {\n return n >= 1 ? 1 : 0;\n }\n\n static linear(t: number): number {\n return t;\n }\n\n static ease(t: number): number {\n return Easing.bezier(0.42, 0, 1, 1)(t);\n }\n\n static quad(t: number): number {\n return t * t;\n }\n\n static cubic(t: number): number {\n return t * t * t;\n }\n\n static poly(n: number): (t: number) => number {\n return (t: number): number => t ** n;\n }\n\n static sin(t: number): number {\n return 1 - Math.cos((t * Math.PI) / 2);\n }\n\n static circle(t: number): number {\n return 1 - Math.sqrt(1 - t * t);\n }\n\n static exp(t: number): number {\n return 2 ** (10 * (t - 1));\n }\n\n static elastic(bounciness = 1): (t: number) => number {\n const p = bounciness * Math.PI;\n return (t): number =>\n 1 - Math.cos((t * Math.PI) / 2) ** 3 * Math.cos(t * p);\n }\n\n static back(s = 1.70158): (t: number) => number {\n return (t): number => t * t * ((s + 1) * t - s);\n }\n\n static bounce(t: number): number {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n const t2_ = t - 1.5 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n const t2_ = t - 2.25 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.9375;\n }\n\n const t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n\n static bezier(\n x1: number,\n y1: number,\n x2: number,\n y2: number\n ): (t: number) => number {\n return bezier(x1, y1, x2, y2);\n }\n\n static in(easing: (t: number) => number): (t: number) => number {\n return easing;\n }\n\n static out(easing: (t: number) => number): (t: number) => number {\n return (t): number => 1 - easing(1 - t);\n }\n\n static inOut(easing: (t: number) => number): (t: number) => number {\n return (t): number => {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n\n return 1 - easing((1 - t) * 2) / 2;\n };\n }\n}\n"],"mappings":"AAAA;AACA;AAEA,SAASA,MAAT,QAAuB,aAAvB;AAEA,OAAO,MAAMC,MAAN,CAAa;EACN,OAALC,KAAK,CAACC,CAAD,EAAoB;IAC9B,OAAOA,CAAC,GAAG,CAAJ,GAAQ,CAAR,GAAY,CAAnB;EACD;;EAEW,OAALC,KAAK,CAACD,CAAD,EAAoB;IAC9B,OAAOA,CAAC,IAAI,CAAL,GAAS,CAAT,GAAa,CAApB;EACD;;EAEY,OAANE,MAAM,CAACC,CAAD,EAAoB;IAC/B,OAAOA,CAAP;EACD;;EAEU,OAAJC,IAA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ions";
|
|
16
16
|
*/
|
17
17
|
|
18
18
|
export const createTiming = (params, value, callback) => {
|
19
|
-
var _ref, _params$from;
|
20
|
-
|
21
19
|
// Update from to be either the declared from value,
|
22
20
|
// the current value of the value or zero
|
23
21
|
const resolvedParams = { ...params,
|
24
|
-
from:
|
22
|
+
from: params.from ?? (value === null || value === void 0 ? void 0 : value.current) ?? 0
|
25
23
|
}; // Update function for the animation value
|
26
24
|
|
27
25
|
const animationFunction = (t, state) => {
|
28
|
-
var _params$loop, _params$yoyo;
|
29
|
-
|
30
26
|
// Update the input value using the provided update function
|
31
|
-
const nextState = timing(t, params.duration, params.easing,
|
27
|
+
const nextState = timing(t, params.duration, params.easing, params.loop ?? false, params.yoyo ?? false, state ?? {
|
32
28
|
current: params.from,
|
33
29
|
finished: false
|
34
30
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["ValueApi","timing","createTiming","params","value","callback","resolvedParams","from","current","animationFunction","t","state","nextState","duration","easing","loop","yoyo","finished","to","createAnimation"],"sources":["createTiming.ts"],"sourcesContent":["import type {\n TimingConfig,\n RequiredAnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport type { AnimationState, SkiaMutableValue } from \"../../values/types\";\nimport { ValueApi } from \"../../values/api\";\n\nimport { timing } from \"./functions\";\n\n/**\n * Creates an animation that is driven by a clock value.\n * The value will be run from / to the value in params and modified\n * by the provided easing curve for the length of the duration. When\n * the value has reached its desired \"to\" value the animation\n * will be stopped. If loop is set to true, the animation will continue\n * to run until stopped.\n *\n * @param params Animation parameters\n * @param config Spring or timing configuration\n * @param value Optional value that the animation will update\n * @params an animation value that can be used to start/stop\n * the animation.\n */\nexport const createTiming = (\n params: RequiredAnimationParams & Required<TimingConfig>,\n value?: SkiaMutableValue<number>,\n callback?: AnimationCallback\n) => {\n // Update from to be either the declared from value,\n // the current value of the value or zero\n const resolvedParams = {\n ...params,\n from: params.from ?? value?.current ?? 0,\n };\n\n // Update function for the animation value\n const animationFunction = (t: number, state: AnimationState | undefined) => {\n // Update the input value using the provided update function\n const nextState = timing(\n t,\n params.duration,\n params.easing,\n params.loop ?? false,\n params.yoyo ?? false,\n state ?? { current: params.from!, finished: false }\n );\n const current =\n nextState.current * (resolvedParams.to - resolvedParams.from!) +\n resolvedParams.from!;\n if (callback && nextState.finished === true) {\n callback(current);\n }\n return {\n ...nextState,\n current,\n };\n };\n\n // Create animation value\n return ValueApi.createAnimation(animationFunction);\n};\n"],"mappings":"AAMA,SAASA,QAAT,QAAyB,kBAAzB;AAEA,SAASC,MAAT,QAAuB,aAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,YAAY,GAAG,CAC1BC,MAD0B,EAE1BC,KAF0B,EAG1BC,QAH0B,KAIvB;EACH;EACA;EACA,MAAMC,cAAc,GAAG,EACrB,GAAGH,MADkB;IAErBI,IAAI,EAAEJ,MAAM,CAACI,IAAP,KAAeH,KAAf,aAAeA,KAAf,uBAAeA,KAAK,CAAEI,OAAtB,KAAiC;EAFlB,CAAvB,CAHG,CAQH;;EACA,MAAMC,iBAAiB,GAAG,CAACC,CAAD,EAAYC,KAAZ,KAAkD;IAC1E;IACA,MAAMC,SAAS,GAAGX,MAAM,CACtBS,CADsB,EAEtBP,MAAM,CAACU,QAFe,EAGtBV,MAAM,CAACW,MAHe,EAItBX,MAAM,CAACY,IAAP,IAAe,KAJO,EAKtBZ,MAAM,CAACa,IAAP,IAAe,KALO,EAMtBL,KAAK,IAAI;MAAEH,OAAO,EAAEL,MAAM,CAACI,IAAlB;MAAyBU,QAAQ,EAAE;IAAnC,CANa,CAAxB;IAQA,MAAMT,OAAO,GACXI,SAAS,CAACJ,OAAV,IAAqBF,cAAc,CAACY,EAAf,GAAoBZ,cAAc,CAACC,IAAxD,IACAD,cAAc,CAACC,IAFjB;;IAGA,IAAIF,QAAQ,IAAIO,SAAS,CAACK,QAAV,KAAuB,IAAvC,EAA6C;MAC3CZ,QAAQ,CAACG,OAAD,CAAR;IACD;;IACD,OAAO,EACL,GAAGI,SADE;MAELJ;IAFK,CAAP;EAID,CApBD,CATG,CA+BH;;;EACA,OAAOR,QAAQ,CAACmB,eAAT,CAAyBV,iBAAzB,CAAP;AACD,CArCM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","Float32Array","a","aA1","aA2","b","c","calcBezier","aT","getSlope","binarySubdivide","aX","_aA","_aB","mX1","mX2","currentX","currentT","i","aA","aB","Math","abs","newtonRaphsonIterate","_aGuessT","aGuessT","currentSlope","bezier","mY1","mY2","Error","sampleValues","Array","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","x"],"sources":["bezier.ts"],"sourcesContent":["// eslint-disable-next-line max-len\n// Taken from https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/Animated/src/bezier.js\n\nconst NEWTON_ITERATIONS = 4;\nconst NEWTON_MIN_SLOPE = 0.001;\nconst SUBDIVISION_PRECISION = 0.0000001;\nconst SUBDIVISION_MAX_ITERATIONS = 10;\n\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nconst float32ArraySupported = typeof Float32Array === \"function\";\n\nfunction a(aA1: number, aA2: number): number {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction b(aA1: number, aA2: number): number {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction c(aA1: number): number {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT: number, aA1: number, aA2: number): number {\n return ((a(aA1, aA2) * aT + b(aA1, aA2)) * aT + c(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT: number, aA1: number, aA2: number): number {\n return 3.0 * a(aA1, aA2) * aT * aT + 2.0 * b(aA1, aA2) * aT + c(aA1);\n}\n\nfunction binarySubdivide({\n aX,\n _aA,\n _aB,\n mX1,\n mX2,\n}: {\n aX: number;\n _aA: number;\n _aB: number;\n mX1: number;\n mX2: number;\n}): number {\n let currentX;\n let currentT;\n let i = 0;\n let aA = _aA;\n let aB = _aB;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (\n Math.abs(currentX) > SUBDIVISION_PRECISION &&\n ++i < SUBDIVISION_MAX_ITERATIONS\n );\n\n return currentT;\n}\n\nfunction newtonRaphsonIterate(\n aX: number,\n _aGuessT: number,\n mX1: number,\n mX2: number\n): number {\n let aGuessT = _aGuessT;\n for (let i = 0; i < NEWTON_ITERATIONS; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n}\n\nexport function bezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number\n): (x: number) => number {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error(\"bezier x values must be in [0, 1] range\");\n }\n\n // Precompute samples table\n const sampleValues = float32ArraySupported\n ? new Float32Array(kSplineTableSize)\n : new Array(kSplineTableSize);\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX: number): number {\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n\n for (\n ;\n currentSample !== lastSample && sampleValues[currentSample] <= aX;\n ++currentSample\n ) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n const dist =\n (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n\n if (initialSlope === 0.0) {\n return guessForT;\n }\n\n return binarySubdivide({\n aX,\n _aA: intervalStart,\n _aB: intervalStart + kSampleStepSize,\n mX1,\n mX2,\n });\n }\n\n return function (x: number): number {\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n }\n\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n\n if (x === 1) {\n return 1;\n }\n\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n"],"mappings":"AAAA;AACA;AAEA,MAAMA,iBAAiB,GAAG,CAA1B;AACA,MAAMC,gBAAgB,GAAG,KAAzB;AACA,MAAMC,qBAAqB,GAAG,SAA9B;AACA,MAAMC,0BAA0B,GAAG,EAAnC;AAEA,MAAMC,gBAAgB,GAAG,EAAzB;AACA,MAAMC,eAAe,GAAG,OAAOD,gBAAgB,GAAG,GAA1B,CAAxB;AAEA,MAAME,qBAAqB,GAAG,OAAOC,YAAP,KAAwB,UAAtD;;AAEA,SAASC,CAAT,CAAWC,GAAX,EAAwBC,GAAxB,EAA6C;EAC3C,OAAO,MAAM,MAAMA,GAAZ,GAAkB,MAAMD,GAA/B;AACD;;AAED,SAASE,CAAT,CAAWF,GAAX,EAAwBC,GAAxB,EAA6C;EAC3C,OAAO,MAAMA,GAAN,GAAY,MAAMD,GAAzB;AACD;;AAED,SAASG,CAAT,CAAWH,GAAX,EAAgC;EAC9B,OAAO,MAAMA,GAAb;AACD,C,CAED;;;AACA,SAASI,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AC0B,QAAQ,CAACO,CAAD,CAAT,EAAcZ,GAAd,EAAmBC,GAAnB,CAAjB;EACD,CAfD;AAgBD"}
|
@@ -21,13 +21,11 @@ export const getResolvedParams = (toOrParams, config) => {
|
|
21
21
|
if (typeof toOrParams === "number") {
|
22
22
|
resolvedParameters.to = toOrParams;
|
23
23
|
} else {
|
24
|
-
var _toOrParams$from, _toOrParams$to, _toOrParams$loop, _toOrParams$yoyo;
|
25
|
-
|
26
24
|
resolvedParameters = {
|
27
|
-
from:
|
28
|
-
to:
|
29
|
-
loop:
|
30
|
-
yoyo:
|
25
|
+
from: toOrParams.from ?? resolvedParameters.from,
|
26
|
+
to: toOrParams.to ?? resolvedParameters.to,
|
27
|
+
loop: toOrParams.loop ?? resolvedParameters.loop,
|
28
|
+
yoyo: toOrParams.yoyo ?? resolvedParameters.yoyo
|
31
29
|
};
|
32
30
|
}
|
33
31
|
|
@@ -35,10 +33,8 @@ export const getResolvedParams = (toOrParams, config) => {
|
|
35
33
|
};
|
36
34
|
|
37
35
|
if (config) {
|
38
|
-
|
39
|
-
|
40
|
-
resolvedConfig.duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : DefaultTimingConfig.duration;
|
41
|
-
resolvedConfig.easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : DefaultTimingConfig.easing;
|
36
|
+
resolvedConfig.duration = config.duration ?? DefaultTimingConfig.duration;
|
37
|
+
resolvedConfig.easing = config.easing ?? DefaultTimingConfig.easing;
|
42
38
|
}
|
43
39
|
|
44
40
|
return { ...resolvedParameters,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["DefaultParameters","to","loop","yoyo","immediate","DefaultTimingConfig","duration","easing","t","getResolvedParams","toOrParams","config","resolvedParameters","from","resolvedConfig"],"sources":["getResolvedParams.ts"],"sourcesContent":["import type {\n RequiredAnimationParams,\n AnimationParams,\n TimingConfig,\n} from \"../../types\";\n\nconst DefaultParameters = {\n to: 1,\n loop: false,\n yoyo: false,\n immediate: true,\n};\n\nconst DefaultTimingConfig = {\n duration: 1000,\n easing: (t: number) => t,\n};\n\n/**\n * Resolves parameters from optional values to a single object\n * @param toOrParams Params or to value\n * @param config timing/spring configuration\n */\nexport const getResolvedParams = (\n toOrParams: number | AnimationParams,\n config?: TimingConfig\n): RequiredAnimationParams & Required<TimingConfig> => {\n let resolvedParameters: RequiredAnimationParams = {\n ...DefaultParameters,\n };\n\n if (typeof toOrParams === \"number\") {\n resolvedParameters.to = toOrParams;\n } else {\n resolvedParameters = {\n from: toOrParams.from ?? resolvedParameters.from,\n to: toOrParams.to ?? resolvedParameters.to,\n loop: toOrParams.loop ?? resolvedParameters.loop,\n yoyo: toOrParams.yoyo ?? resolvedParameters.yoyo,\n };\n }\n\n const resolvedConfig: Required<TimingConfig> = { ...DefaultTimingConfig };\n if (config) {\n resolvedConfig.duration = config.duration ?? DefaultTimingConfig.duration;\n resolvedConfig.easing = config.easing ?? DefaultTimingConfig.easing;\n }\n\n return { ...resolvedParameters, ...resolvedConfig };\n};\n"],"mappings":"AAMA,MAAMA,iBAAiB,GAAG;EACxBC,EAAE,EAAE,CADoB;EAExBC,IAAI,EAAE,KAFkB;EAGxBC,IAAI,EAAE,KAHkB;EAIxBC,SAAS,EAAE;AAJa,CAA1B;AAOA,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAE,IADgB;EAE1BC,MAAM,EAAGC,CAAD,IAAeA;AAFG,CAA5B;AAKA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,iBAAiB,GAAG,CAC/BC,UAD+B,EAE/BC,MAF+B,KAGsB;EACrD,IAAIC,kBAA2C,GAAG,EAChD,GAAGZ;EAD6C,CAAlD;;EAIA,IAAI,OAAOU,UAAP,KAAsB,QAA1B,EAAoC;IAClCE,kBAAkB,CAACX,EAAnB,GAAwBS,UAAxB;EACD,CAFD,MAEO;IACLE,kBAAkB,GAAG;MACnBC,IAAI,EAAEH,UAAU,CAACG,IAAX,IAAmBD,kBAAkB,CAACC,IADzB;MAEnBZ,EAAE,EAAES,UAAU,CAACT,EAAX,IAAiBW,kBAAkB,CAACX,EAFrB;MAGnBC,IAAI,EAAEQ,UAAU,CAACR,IAAX,IAAmBU,kBAAkB,CAACV,IAHzB;MAInBC,IAAI,EAAEO,UAAU,CAACP,IAAX,IAAmBS,kBAAkB,CAACT;IAJzB,CAArB;EAMD;;EAED,MAAMW,cAAsC,GAAG,EAAE,GAAGT;EAAL,CAA/C;;EACA,IAAIM,MAAJ,EAAY;IACVG,cAAc,CAACR,QAAf,GAA0BK,MAAM,CAACL,QAAP,IAAmBD,mBAAmB,CAACC,QAAjE;IACAQ,cAAc,CAACP,MAAf,GAAwBI,MAAM,CAACJ,MAAP,IAAiBF,mBAAmB,CAACE,MAA7D;EACD;;EAED,OAAO,EAAE,GAAGK,kBAAL;IAAyB,GAAGE;EAA5B,CAAP;AACD,CA1BM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["bezier","timing"],"sources":["index.ts"],"sourcesContent":["export { bezier } from \"./bezier\";\nexport { timing } from \"./timing\";\nexport * from \"./types\";\nexport * from \"./getResolvedParams\";\n"],"mappings":"AAAA,SAASA,MAAT,QAAuB,UAAvB;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,cAAc,SAAd;AACA,cAAc,qBAAd"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["timing","t","duration","easing","loop","yoyo","state","current","finished","n","Math","max","min"],"sources":["timing.ts"],"sourcesContent":["import type { AnimationState } from \"../../../values/types\";\n\n/**\n * Calculates and returns a timing value based on the\n * input parameters. The timing value is a number between\n * 0 and 1.\n * @param t\n * @param duration\n * @param easing\n * @param loop\n * @param yoyo\n * @param onStop\n * @returns\n */\nexport const timing = (\n t: number,\n duration: number,\n easing: (t: number) => number,\n loop: boolean,\n yoyo: boolean,\n state: AnimationState\n) => {\n let current = t / duration;\n let { finished } = state;\n // Side effect to stop animation when duration is reached (if loop is false)\n if (current >= 1.0 && !loop) {\n finished = true;\n current = 1.0;\n }\n // calculate return value\n let n = current % 1;\n if (yoyo) {\n n = current % 2.0 >= 1.0 ? 1 - (current % 1) : current % 1;\n } else if (!loop) {\n if (current >= 1.0) {\n n = 1.0;\n }\n }\n current = easing(Math.max(0, Math.min(1, n)));\n return {\n current,\n finished,\n };\n};\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,MAAM,GAAG,CACpBC,CADoB,EAEpBC,QAFoB,EAGpBC,MAHoB,EAIpBC,IAJoB,EAKpBC,IALoB,EAMpBC,KANoB,KAOjB;EACH,IAAIC,OAAO,GAAGN,CAAC,GAAGC,QAAlB;EACA,IAAI;IAAEM;EAAF,IAAeF,KAAnB,CAFG,CAGH;;EACA,IAAIC,OAAO,IAAI,GAAX,IAAkB,CAACH,IAAvB,EAA6B;IAC3BI,QAAQ,GAAG,IAAX;IACAD,OAAO,GAAG,GAAV;EACD,CAPE,CAQH;;;EACA,IAAIE,CAAC,GAAGF,OAAO,GAAG,CAAlB;;EACA,IAAIF,IAAJ,EAAU;IACRI,CAAC,GAAGF,OAAO,GAAG,GAAV,IAAiB,GAAjB,GAAuB,IAAKA,OAAO,GAAG,CAAtC,GAA2CA,OAAO,GAAG,CAAzD;EACD,CAFD,MAEO,IAAI,CAACH,IAAL,EAAW;IAChB,IAAIG,OAAO,IAAI,GAAf,EAAoB;MAClBE,CAAC,GAAG,GAAJ;IACD;EACF;;EACDF,OAAO,GAAGJ,MAAM,CAACO,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYD,IAAI,CAACE,GAAL,CAAS,CAAT,EAAYH,CAAZ,CAAZ,CAAD,CAAhB;EACA,OAAO;IACLF,OADK;IAELC;EAFK,CAAP;AAID,CA7BM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type EasingFunction = (value: number) => number;\n\nexport interface TimingConfig {\n from?: number;\n to?: number;\n duration?: number;\n easing?: EasingFunction;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["Easing","useTiming","useLoop","runTiming"],"sources":["index.ts"],"sourcesContent":["export { Easing } from \"./Easing\";\nexport { useTiming } from \"./useTiming\";\nexport { useLoop } from \"./useLoop\";\nexport { runTiming } from \"./runTiming\";\n"],"mappings":"AAAA,SAASA,MAAT,QAAuB,UAAvB;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,SAAT,QAA0B,aAA1B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["getResolvedParams","createTiming","runTiming","value","toOrParams","config","callback","resolvedParameters","animation"],"sources":["runTiming.ts"],"sourcesContent":["import type { SkiaMutableValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring or timing configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runTiming = (\n value: SkiaMutableValue<number>,\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n const resolvedParameters = getResolvedParams(toOrParams, config);\n const animation = createTiming(resolvedParameters, value, callback);\n value.animation = animation;\n return animation;\n};\n"],"mappings":"AAOA,SAASA,iBAAT,QAAkC,aAAlC;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;EAClB,MAAMC,kBAAkB,GAAGP,iBAAiB,CAACI,UAAD,EAAaC,MAAb,CAA5C;EACA,MAAMG,SAAS,GAAGP,YAAY,CAACM,kBAAD,EAAqBJ,KAArB,EAA4BG,QAA5B,CAA9B;EACAH,KAAK,CAACK,SAAN,GAAkBA,SAAlB;EACA,OAAOA,SAAP;AACD,CAVM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["useTiming","useLoop","config","yoyo","loop"],"sources":["useLoop.ts"],"sourcesContent":["import type { TimingConfig } from \"../types\";\n\nimport { useTiming } from \"./useTiming\";\n\n/**\n * Configures a looped timing value. The value will go back and forth\n * between 0 and 1 and back.\n * @param config Timing configuration for easing and duration\n * @returns A value that can be used for further animations\n */\nexport const useLoop = (config?: TimingConfig) =>\n useTiming(\n {\n yoyo: true,\n loop: true,\n },\n config\n );\n"],"mappings":"AAEA,SAASA,SAAT,QAA0B,aAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,OAAO,GAAIC,MAAD,IACrBF,SAAS,CACP;EACEG,IAAI,EAAE,IADR;EAEEC,IAAI,EAAE;AAFR,CADO,EAKPF,MALO,CADJ"}
|
@@ -11,8 +11,6 @@ import { createTiming } from "./createTiming";
|
|
11
11
|
*/
|
12
12
|
|
13
13
|
export const useTiming = (toOrParams, config, callback) => {
|
14
|
-
var _resolvedParameters$f;
|
15
|
-
|
16
14
|
// Resolve parameters - keep a cached version to avoid
|
17
15
|
// unnecesary re-renders.
|
18
16
|
const prevCfgRef = useRef();
|
@@ -26,7 +24,7 @@ export const useTiming = (toOrParams, config, callback) => {
|
|
26
24
|
return prevCfgRef.current;
|
27
25
|
}, [config, toOrParams]); // Create value
|
28
26
|
|
29
|
-
const value = useValue(
|
27
|
+
const value = useValue(resolvedParameters.from ?? 0); // Create timing animation - keep a cached version to avoid
|
30
28
|
// uneccessary recreation of animations
|
31
29
|
|
32
30
|
const prevAnimationRef = useRef();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useRef","useValue","getResolvedParams","createTiming","useTiming","toOrParams","config","callback","prevCfgRef","resolvedParameters","nextParams","equals","current","value","from","prevAnimationRef","prevParamsRef","animation","undefined","a","b","JSON","stringify"],"sources":["useTiming.ts"],"sourcesContent":["import { useEffect, useMemo, useRef } from \"react\";\n\nimport type { SkiaValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\nimport { useValue } from \"../../values/hooks/useValue\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n\n/**\n * Creats an animation value that will run whenever\n * the animation parameters change. The animation start immediately.\n * @param toOrParams\n * @param config\n * @returns A value that is animated\n */\nexport const useTiming = (\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaValue<number> => {\n // Resolve parameters - keep a cached version to avoid\n // unnecesary re-renders.\n const prevCfgRef = useRef<ReturnType<typeof getResolvedParams>>();\n const resolvedParameters = useMemo(() => {\n const nextParams = getResolvedParams(toOrParams, config);\n if (!equals(prevCfgRef.current, nextParams)) {\n prevCfgRef.current = nextParams;\n }\n return prevCfgRef.current!;\n }, [config, toOrParams]);\n\n // Create value\n const value = useValue(resolvedParameters.from ?? 0);\n\n // Create timing animation - keep a cached version to avoid\n // uneccessary recreation of animations\n const prevAnimationRef = useRef<SkiaAnimation>();\n const prevParamsRef = useRef<typeof resolvedParameters>();\n const animation = useMemo(() => {\n if (!equals(prevParamsRef.current, resolvedParameters)) {\n prevParamsRef.current = resolvedParameters;\n prevAnimationRef.current = createTiming(\n resolvedParameters,\n value,\n callback\n );\n }\n return prevAnimationRef.current!;\n }, [callback, resolvedParameters, value]);\n\n // Run animation on the value - and stop it on unmount\n useEffect(() => {\n value.animation = animation;\n return () => (value.animation = undefined);\n }, [animation, value]);\n\n // Return the value that is animated\n return value;\n};\n\nconst equals = <T1, T2>(a: T1, b: T2) => {\n return JSON.stringify(a) === JSON.stringify(b);\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,EAA6BC,MAA7B,QAA2C,OAA3C;AAQA,SAASC,QAAT,QAAyB,6BAAzB;AAEA,SAASC,iBAAT,QAAkC,aAAlC;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAID;EACtB;EACA;EACA,MAAMC,UAAU,GAAGR,MAAM,EAAzB;EACA,MAAMS,kBAAkB,GAAGV,OAAO,CAAC,MAAM;IACvC,MAAMW,UAAU,GAAGR,iBAAiB,CAACG,UAAD,EAAaC,MAAb,CAApC;;IACA,IAAI,CAACK,MAAM,CAACH,UAAU,CAACI,OAAZ,EAAqBF,UAArB,CAAX,EAA6C;MAC3CF,UAAU,CAACI,OAAX,GAAqBF,UAArB;IACD;;IACD,OAAOF,UAAU,CAACI,OAAlB;EACD,CANiC,EAM/B,CAACN,MAAD,EAASD,UAAT,CAN+B,CAAlC,CAJsB,CAYtB;;EACA,MAAMQ,KAAK,GAAGZ,QAAQ,CAACQ,kBAAkB,CAACK,IAAnB,IAA2B,CAA5B,CAAtB,CAbsB,CAetB;EACA;;EACA,MAAMC,gBAAgB,GAAGf,MAAM,EAA/B;EACA,MAAMgB,aAAa,GAAGhB,MAAM,EAA5B;EACA,MAAMiB,SAAS,GAAGlB,OAAO,CAAC,MAAM;IAC9B,IAAI,CAACY,MAAM,CAACK,aAAa,CAACJ,OAAf,EAAwBH,kBAAxB,CAAX,EAAwD;MACtDO,aAAa,CAACJ,OAAd,GAAwBH,kBAAxB;MACAM,gBAAgB,CAACH,OAAjB,GAA2BT,YAAY,CACrCM,kBADqC,EAErCI,KAFqC,EAGrCN,QAHqC,CAAvC;IAKD;;IACD,OAAOQ,gBAAgB,CAACH,OAAxB;EACD,CAVwB,EAUtB,CAACL,QAAD,EAAWE,kBAAX,EAA+BI,KAA/B,CAVsB,CAAzB,CAnBsB,CA+BtB;;EACAf,SAAS,CAAC,MAAM;IACde,KAAK,CAACI,SAAN,GAAkBA,SAAlB;IACA,OAAO,MAAOJ,KAAK,CAACI,SAAN,GAAkBC,SAAhC;EACD,CAHQ,EAGN,CAACD,SAAD,EAAYJ,KAAZ,CAHM,CAAT,CAhCsB,CAqCtB;;EACA,OAAOA,KAAP;AACD,CA3CM;;AA6CP,MAAMF,MAAM,GAAG,CAASQ,CAAT,EAAgBC,CAAhB,KAA0B;EACvC,OAAOC,IAAI,CAACC,SAAL,CAAeH,CAAf,MAAsBE,IAAI,CAACC,SAAL,CAAeF,CAAf,CAA7B;AACD,CAFD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface SpringConfig {\n mass?: number;\n stiffness?: number;\n damping?: number;\n velocity?: number;\n}\n\nexport interface TimingConfig {\n duration?: number;\n easing?: (t: number) => number;\n}\n\nexport interface AnimationParams {\n from?: number;\n to?: number;\n loop?: boolean;\n yoyo?: boolean;\n}\n\nexport type RequiredAnimationParams = Required<Omit<AnimationParams, \"from\">> &\n Pick<AnimationParams, \"from\">;\n\nexport type AnimationCallback = (current: number) => void;\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["JsiDeclarationNode","PaintNode","isSkPaint","JsiRenderNode","JsiDrawingNode","constructor","ctx","type","props","derived","deriveProps","setProps","setProp","name","value","hasChanged","addChild","child","Error","insertChildBefore","before","renderNode","paint","draw","current","materialize","children","map"],"sources":["DrawingNode.ts"],"sourcesContent":["import type {\n DrawingContext,\n DrawingNodeProps,\n Node,\n NodeType,\n RenderNode,\n} from \"../types\";\n\nimport type { NodeContext } from \"./Node\";\nimport { JsiDeclarationNode } from \"./Node\";\nimport { PaintNode } from \"./PaintNode\";\nimport { isSkPaint, JsiRenderNode } from \"./RenderNode\";\n\nexport abstract class JsiDrawingNode<P extends DrawingNodeProps, C>\n extends JsiRenderNode<P>\n implements RenderNode<P>\n{\n protected derived?: C;\n\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, type, props);\n this.derived = this.deriveProps();\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.derived = this.deriveProps();\n }\n\n setProp<K extends keyof P>(name: K, value: P[K]) {\n const hasChanged = super.setProp(name, value);\n if (hasChanged) {\n this.derived = this.deriveProps();\n }\n return hasChanged;\n }\n\n addChild(child: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n this.derived = this.deriveProps();\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n this.derived = this.deriveProps();\n }\n\n renderNode(ctx: DrawingContext): void {\n if (this.props.paint && isSkPaint(this.props.paint)) {\n this.draw({ ...ctx, paint: this.props.paint });\n } else if (this.props.paint && this.props.paint.current != null) {\n this.draw({ ...ctx, paint: this.props.paint.current.materialize() });\n } else {\n this.draw(ctx);\n }\n this.children().map((child) => {\n if (child instanceof PaintNode) {\n const paint = child.materialize();\n this.draw({ ...ctx, paint });\n }\n });\n }\n\n protected abstract draw(ctx: DrawingContext): void;\n protected abstract deriveProps(): C;\n}\n"],"mappings":";;AASA,SAASA,kBAAT,QAAmC,QAAnC;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,cAAzC;AAEA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AAWc,KAAZ,CAAjC,EAAqD;MACnD,KAAKC,IAAL,CAAU,EAAE,GAAGjB,GAAL;QAAUgB,KAAK,EAAE,KAAKd,KAAL,CAAWc;MAA5B,CAAV;IACD,CAFD,MAEO,IAAI,KAAKd,KAAL,CAAWc,KAAX,IAAoB,KAAKd,KAAL,CAAWc,KAAX,CAAiBE,OAAjB,IAA4B,IAApD,EAA0D;MAC/D,KAAKD,IAAL,CAAU,EAAE,GAAGjB,GAAL;QAAUgB,KAAK,EAAE,KAAKd,KAAL,CAAWc,KAAX,CAAiBE,OAAjB,CAAyBC,WAAzB;MAAjB,CAAV;IACD,CAFM,MAEA;MACL,KAAKF,IAAL,CAAUjB,GAAV;IACD;;IACD,KAAKoB,QAAL,GAAgBC,GAAhB,CAAqBV,KAAD,IAAW;MAC7B,IAAIA,KAAK,YAAYhB,SAArB,EAAgC;QAC9B,MAAMqB,KAAK,GAAGL,KAAK,CAACQ,WAAN,EAAd;QACA,KAAKF,IAAL,CAAU,EAAE,GAAGjB,GAAL;UAAUgB;QAAV,CAAV;MACD;IACF,CALD;EAMD;;AAnDH"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["NodeType","JsiRenderNode","GroupNode","constructor","ctx","props","Group","renderNode","children","map","child","render"],"sources":["GroupNode.ts"],"sourcesContent":["import type { DrawingContext, GroupProps } from \"../types\";\nimport { NodeType } from \"../types\";\nimport type { RenderNode } from \"../types/Node\";\n\nimport { JsiRenderNode } from \"./RenderNode\";\nimport type { NodeContext } from \"./Node\";\n\nexport class GroupNode\n extends JsiRenderNode<GroupProps>\n implements RenderNode<GroupProps>\n{\n constructor(ctx: NodeContext, props: GroupProps) {\n super(ctx, NodeType.Group, props);\n }\n\n renderNode(ctx: DrawingContext): void {\n this.children().map((child) => {\n if (child instanceof JsiRenderNode) {\n child.render(ctx);\n }\n });\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,UAAzB;AAGA,SAASC,aAAT,QAA8B,cAA9B;AAGA,OAAO,MAAMC,SAAN,SACGD,aADH,CAGP;EACEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,KAApB,EAA2BD,KAA3B;EACD;;EAEDE,UAAU,CAACH,GAAD,EAA4B;IACpC,KAAKI,QAAL,GAAgBC,GAAhB,CAAqBC,KAAD,IAAW;MAC7B,IAAIA,KAAK,YAAYT,aAArB,EAAoC;QAClCS,KAAK,CAACC,MAAN,CAAaP,GAAb;MACD;IACF,CAJD;EAKD;;AAXH"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["JsiSkDOM.ts"],"names":["FillNode","ImageNode","CircleNode","PathNode","LineNode","PatchNode","PointsNode","RectNode","RRectNode","VerticesNode","TextNode","OvalNode","CustomDrawingNode","TextPathNode","TextBlobNode","GlyphsNode","DiffRectNode","PictureNode","ImageSVGNode","BackdropFilterNode","BoxNode","BoxShadowNode","BlendImageFilterNode","BlurImageFilterNode","BlurMaskFilterNode","DisplacementMapImageFilterNode","DropShadowImageFilterNode","OffsetImageFilterNode","RuntimeShaderImageFilterNode","CornerPathEffectNode","DiscretePathEffectNode","DashPathEffectNode","Path1DPathEffectNode","Path2DPathEffectNode","SumPathEffectNode","Line2DPathEffectNode","BlendNode","MatrixColorFilterNode","LumaColorFilterNode","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilterNode","BlendColorFilterNode","LerpColorFilterNode","LinearGradientNode","ShaderNode","ImageShaderNode","TwoPointConicalGradientNode","TurbulenceNode","SweepGradientNode","RadialGradientNode","FractalNoiseNode","ColorNode","MorphologyImageFilterNode","GroupNode","PaintNode","JsiSkDOM","constructor","ctx","Group","props","Paint","Fill","Image","Circle","Path","CustomDrawing","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","BlurImageFilter","OffsetImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","LerpColorFilter","Shader","ImageShader","ColorShader","SweepGradient","Turbulence","FractalNoise","LinearGradient","RadialGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow"],"mappings":"AA2DA,SACEA,QADF,EAEEC,SAFF,EAGEC,UAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,SANF,EAOEC,UAPF,EAQEC,QARF,EASEC,SATF,EAUEC,YAVF,EAWEC,QAXF,EAYEC,QAZF,EAaEC,iBAbF,EAcEC,YAdF,EAeEC,YAfF,EAgBEC,UAhBF,EAiBEC,YAjBF,EAkBEC,WAlBF,EAmBEC,YAnBF,EAoBEC,kBApBF,EAqBEC,OArBF,EAsBEC,aAtBF,QAuBO,YAvBP;AAwBA,SACEC,oBADF,EAEEC,mBAFF,EAGEC,kBAHF,EAIEC,8BAJF,EAKEC,yBALF,EAMEC,qBANF,EAOEC,4BAPF,EAQEC,oBARF,EASEC,sBATF,EAUEC,kBAVF,EAWEC,oBAXF,EAYEC,oBAZF,EAaEC,iBAbF,EAcEC,oBAdF,EAeEC,SAfF,QAgBO,SAhBP;AAiBA,SACEC,qBADF,EAEEC,mBAFF,EAGEC,gCAHF,EAIEC,gCAJF,EAKEC,oBALF,EAMEC,mBANF,QAOO,sBAPP;AAQA,SACEC,kBADF,EAEEC,UAFF,EAGEC,eAHF,EAIEC,2BAJF,EAKEC,cALF,EAMEC,iBANF,EAOEC,kBAPF,EAQEC,gBARF,EASEC,SATF,QAUO,iBAVP;AAWA,SAASC,yBAAT,QAA0C,sBAA1C;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAGA,OAAO,M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,gBAAgB,CAAClD,KAAD,EAA+B;AAC7C,WAAO,IAAIxB,oBAAJ,CAAyB,KAAKsB,GAA9B,EAAmCE,KAAnC,CAAP;AACD;;AAEDmD,EAAAA,KAAK,CAACnD,KAAD,EAAoB;AACvB,WAAO,IAAIvB,SAAJ,CAAc,KAAKqB,GAAnB,EAAwBE,KAAxB,CAAP;AACD;;AAEDoD,EAAAA,cAAc,CAACpD,KAAD,EAAuB;AACnC,WAAO,IAAIxC,kBAAJ,CAAuB,KAAKsC,GAA5B,EAAiCE,KAAjC,CAAP;AACD;;AAEDqD,EAAAA,GAAG,CAACrD,KAAD,EAAkB;AACnB,WAAO,IAAIvC,OAAJ,CAAY,KAAKqC,GAAjB,EAAsBE,KAAtB,CAAP;AACD;;AAEDsD,EAAAA,SAAS,CAACtD,KAAD,EAAwB;AAC/B,WAAO,IAAItC,aAAJ,CAAkB,KAAKoC,GAAvB,EAA4BE,KAA5B,CAAP;AACD;;AAnOoC","sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Group(props?: GroupProps) {\n return new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return new BoxShadowNode(this.ctx, props);\n }\n}\n"]}
|
1
|
+
{"version":3,"names":["FillNode","ImageNode","CircleNode","PathNode","LineNode","PatchNode","PointsNode","RectNode","RRectNode","VerticesNode","TextNode","OvalNode","CustomDrawingNode","TextPathNode","TextBlobNode","GlyphsNode","DiffRectNode","PictureNode","ImageSVGNode","BackdropFilterNode","BoxNode","BoxShadowNode","BlendImageFilterNode","BlurImageFilterNode","BlurMaskFilterNode","DisplacementMapImageFilterNode","DropShadowImageFilterNode","OffsetImageFilterNode","RuntimeShaderImageFilterNode","CornerPathEffectNode","DiscretePathEffectNode","DashPathEffectNode","Path1DPathEffectNode","Path2DPathEffectNode","SumPathEffectNode","Line2DPathEffectNode","BlendNode","MatrixColorFilterNode","LumaColorFilterNode","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilterNode","BlendColorFilterNode","LerpColorFilterNode","LinearGradientNode","ShaderNode","ImageShaderNode","TwoPointConicalGradientNode","TurbulenceNode","SweepGradientNode","RadialGradientNode","FractalNoiseNode","ColorNode","MorphologyImageFilterNode","GroupNode","PaintNode","JsiSkDOM","constructor","ctx","Group","props","Paint","Fill","Image","Circle","Path","CustomDrawing","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","BlurImageFilter","OffsetImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","LerpColorFilter","Shader","ImageShader","ColorShader","SweepGradient","Turbulence","FractalNoise","LinearGradient","RadialGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Group(props?: GroupProps) {\n return new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return new BoxShadowNode(this.ctx, props);\n }\n}\n"],"mappings":"AA2DA,SACEA,QADF,EAEEC,SAFF,EAGEC,UAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,SANF,EAOEC,UAPF,EAQEC,QARF,EASEC,SATF,EAUEC,YAVF,EAWEC,QAXF,EAYEC,QAZF,EAaEC,iBAbF,EAcEC,YAdF,EAeEC,YAfF,EAgBEC,UAhBF,EAiBEC,YAjBF,EAkBEC,WAlBF,EAmBEC,YAnBF,EAoBEC,kBApBF,EAqBEC,OArBF,EAsBEC,aAtBF,QAuBO,YAvBP;AAwBA,SACEC,oBADF,EAEEC,mBAFF,EAGEC,kBAHF,EAIEC,8BAJF,EAKEC,yBALF,EAMEC,qBANF,EAOEC,4BAPF,EAQEC,oBARF,EASEC,sBATF,EAUEC,kBAVF,EAWEC,oBAXF,EAYEC,oBAZF,EAaEC,iBAbF,EAcEC,oBAdF,EAeEC,SAfF,QAgBO,SAhBP;AAiBA,SACEC,qBADF,EAEEC,mBAFF,EAGEC,gCAHF,EAIEC,gCAJF,EAKEC,oBALF,EAMEC,mBANF,QAOO,sBAPP;AAQA,SACEC,kBADF,EAEEC,UAFF,EAGEC,eAHF,EAIEC,2BAJ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D;;EAEDoD,cAAc,CAACpD,KAAD,EAAuB;IACnC,OAAO,IAAIxC,kBAAJ,CAAuB,KAAKsC,GAA5B,EAAiCE,KAAjC,CAAP;EACD;;EAEDqD,GAAG,CAACrD,KAAD,EAAkB;IACnB,OAAO,IAAIvC,OAAJ,CAAY,KAAKqC,GAAjB,EAAsBE,KAAtB,CAAP;EACD;;EAEDsD,SAAS,CAACtD,KAAD,EAAwB;IAC/B,OAAO,IAAItC,aAAJ,CAAkB,KAAKoC,GAAvB,EAA4BE,KAA5B,CAAP;EACD;;AAnOoC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["DeclarationType","JsiNode","constructor","ctx","type","props","Skia","depMgr","setProps","setProp","name","v","hasChanged","getProps","children","_children","addChild","child","push","dispose","unsubscribeNode","forEach","removeChild","index","indexOf","node","splice","insertChildBefore","before","beforeIndex","JsiDeclarationNode","declarationType","Error","invalidate","setInvalidate","isPaint","Paint","isImageFilter","ImageFilter","isColorFilter","ColorFilter","isShader","Shader","isMaskFilter","MaskFilter","isPathEffect","PathEffect"],"sources":["Node.ts"],"sourcesContent":["import type {\n SkColorFilter,\n Skia,\n SkImageFilter,\n SkMaskFilter,\n SkShader,\n SkPathEffect,\n SkPaint,\n} from \"../../skia/types\";\nimport type { Node, DeclarationNode, NodeType } from \"../types\";\nimport { DeclarationType } from \"../types\";\nimport type { DependencyManager } from \"../../renderer/DependencyManager\";\n\nexport interface NodeContext {\n Skia: Skia;\n depMgr: DependencyManager;\n}\n\nexport abstract class JsiNode<P> implements Node<P> {\n protected _children: JsiNode<unknown>[] = [];\n protected Skia: Skia;\n protected depMgr: DependencyManager;\n\n constructor(ctx: NodeContext, public type: NodeType, protected props: P) {\n this.Skia = ctx.Skia;\n this.depMgr = ctx.depMgr;\n }\n\n setProps(props: P) {\n this.props = props;\n }\n\n setProp<K extends keyof P>(name: K, v: P[K]) {\n const hasChanged = this.props[name] !== v;\n this.props[name] = v;\n return hasChanged;\n }\n\n getProps() {\n return this.props;\n }\n\n children() {\n return this._children;\n }\n\n addChild(child: Node<unknown>) {\n this._children.push(child as JsiNode<unknown>);\n }\n\n dispose() {\n this.depMgr.unsubscribeNode(this);\n this._children.forEach((child) => child.dispose());\n }\n\n removeChild(child: Node<unknown>) {\n const index = this._children.indexOf(child as JsiNode<unknown>);\n if (index !== -1) {\n const [node] = this._children.splice(index, 1);\n node.dispose();\n }\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>) {\n const index = this._children.indexOf(child as JsiNode<unknown>);\n if (index !== -1) {\n this._children.splice(index, 1);\n }\n const beforeIndex = this._children.indexOf(before as JsiNode<unknown>);\n this._children.splice(beforeIndex, 0, child as JsiNode<unknown>);\n }\n}\n\nexport type Invalidate = () => void;\n\nexport abstract class JsiDeclarationNode<\n P,\n T,\n Nullable extends null | never = never\n >\n extends JsiNode<P>\n implements DeclarationNode<P, T, Nullable>\n{\n private invalidate: Invalidate = () => {};\n\n constructor(\n ctx: NodeContext,\n public declarationType: DeclarationType,\n type: NodeType,\n props: P\n ) {\n super(ctx, type, props);\n }\n\n abstract materialize(): T | Nullable;\n\n addChild(child: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n this.invalidate();\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof JsiDeclarationNode)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n this.invalidate();\n }\n\n dispose() {\n this.invalidate();\n super.dispose();\n }\n\n setInvalidate(invalidate: Invalidate) {\n this.invalidate = invalidate;\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.invalidate();\n }\n\n setProp<K extends keyof P>(name: K, v: P[K]) {\n const hasChanged = super.setProp(name, v);\n if (hasChanged) {\n this.invalidate();\n }\n return hasChanged;\n }\n\n isPaint(): this is DeclarationNode<unknown, SkPaint> {\n return this.declarationType === DeclarationType.Paint;\n }\n\n isImageFilter(): this is DeclarationNode<unknown, SkImageFilter> {\n return this.declarationType === DeclarationType.ImageFilter;\n }\n\n isColorFilter(): this is DeclarationNode<unknown, SkColorFilter> {\n return this.declarationType === DeclarationType.ColorFilter;\n }\n\n isShader(): this is DeclarationNode<unknown, SkShader> {\n return this.declarationType === DeclarationType.Shader;\n }\n\n isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter> {\n return this.declarationType === DeclarationType.MaskFilter;\n }\n\n isPathEffect(): this is DeclarationNode<unknown, SkPathEffect> {\n return this.declarationType === DeclarationType.PathEffect;\n }\n}\n"],"mappings":";;AAUA,SAASA,eAAT,QAAgC,UAAhC;AAQA,OAAO,MAAeC,OAAf,CAA6C;EAKlDC,WAAW,CAACC,GAAD,EAA0BC,IAA1B,EAAoDC,KAApD,EAA8D;IAAA,KAApCD,IAAoC,GAApCA,IAAoC;IAAA,KAAVC,KAAU,GAAVA,KAAU;;IAAA,mCAJ/B,EAI+B;;IAAA;;IAAA;;IACvE,KAAKC,IAAL,GAAYH,GAAG,CAACG,IAAhB;IACA,KAAKC,MAAL,GAAcJ,GAAG,CAACI,MAAlB;EACD;;EAEDC,QAAQ,CAACH,KAAD,EAAW;IACjB,KAAKA,KAAL,GAAaA,KAAb;EACD;;EAEDI,OAAO,CAAoBC,IAApB,EAA6BC,CAA7B,EAAsC;IAC3C,MAAMC,UAAU,GAAG,KAAKP,KAAL,CAAWK,IAAX,MAAqBC,CAAxC;IACA,KAAKN,KAAL,CAAWK,IAAX,IAAmBC,CAAnB;IACA,OAAOC,UAAP;EACD;;EAEDC,QAAQ,GAAG;IACT,OAAO,KAAKR,KAAZ;EACD;;EAEDS,QAAQ,GAAG;IACT,OAAO,KAAKC,SAAZ;EACD;;EAEDC,QAAQ,CAACC,KAAD,EAAuB;IAC7B,KAAKF,SAAL,CAAeG,IAAf,CAAoBD,KAApB;EACD;;EAEDE,OAAO,GAAG;IACR,KAAKZ,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AAL,KAAyB/B,eAAe,CAAC8C,UAAhD;EACD;;AA1EH"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["PaintContext.ts"],"sourcesContent":["import type {\n BlendMode,\n PaintStyle,\n SkColorFilter,\n SkImageFilter,\n SkMaskFilter,\n SkPathEffect,\n SkShader,\n StrokeCap,\n StrokeJoin,\n} from \"../../skia/types\";\nimport type { SkColor } from \"../../skia/types/Color\";\n\nexport interface PaintContext {\n color?: SkColor;\n strokeWidth?: number;\n blendMode?: BlendMode;\n style?: PaintStyle;\n strokeJoin?: StrokeJoin;\n strokeCap?: StrokeCap;\n strokeMiter?: number;\n opacity?: number;\n antiAlias?: boolean;\n\n shader?: SkShader;\n colorFilter?: SkColorFilter;\n imageFilter?: SkImageFilter;\n maskFilter?: SkMaskFilter;\n pathEffect?: SkPathEffect;\n}\n"],"mappings":""}
|