@shopify/react-native-skia 0.1.215 → 0.1.218
Sign up to get free protection for your applications and to get access to all the features.
- package/android/build.gradle +22 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +3 -3
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +56 -2
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseViewManager.java +3 -3
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomViewManager.java +14 -1
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +16 -1
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureViewManager.java +15 -1
- package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +2 -2
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDomViewManagerDelegate.java +34 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDomViewManagerInterface.java +18 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDrawViewManagerDelegate.java +34 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDrawViewManagerInterface.java +18 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerDelegate.java +34 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerInterface.java +18 -0
- package/android/src/paper/java/com/shopify/reactnative/skia/NativeSkiaModuleSpec.java +38 -0
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +5 -0
- package/ios/RNSkia-iOS/SkiaDomView.h +7 -0
- package/ios/RNSkia-iOS/SkiaDomView.mm +64 -0
- package/ios/RNSkia-iOS/SkiaDomViewManager.mm +1 -1
- package/ios/RNSkia-iOS/SkiaDrawView.h +7 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +72 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +1 -1
- package/ios/RNSkia-iOS/SkiaPictureView.h +7 -0
- package/ios/RNSkia-iOS/SkiaPictureView.mm +66 -0
- package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +1 -1
- package/ios/RNSkia-iOS/SkiaUIView.h +15 -2
- package/ios/RNSkia-iOS/SkiaUIView.mm +48 -16
- package/ios/RNSkiaModule.h +10 -1
- package/ios/RNSkiaModule.mm +8 -1
- package/lib/commonjs/Platform/IPlatform.d.ts +1 -3
- package/lib/commonjs/Platform/IPlatform.js.map +1 -1
- package/lib/commonjs/Platform/Platform.js +0 -2
- package/lib/commonjs/Platform/Platform.js.map +1 -1
- package/lib/commonjs/Platform/Platform.web.js +0 -4
- package/lib/commonjs/Platform/Platform.web.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolate.d.ts +1 -1
- package/lib/commonjs/animation/timing/functions/types.d.ts +1 -1
- package/lib/commonjs/animation/types.d.ts +2 -2
- package/lib/commonjs/dom/nodes/Node.d.ts +1 -1
- package/lib/commonjs/dom/types/Common.d.ts +8 -8
- package/lib/commonjs/dom/types/DeclarationContext.d.ts +1 -1
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +5 -5
- package/lib/commonjs/dom/types/Node.d.ts +1 -1
- package/lib/commonjs/dom/types/SkDOM.d.ts +4 -4
- package/lib/commonjs/external/reanimated/renderHelpers.d.ts +1 -0
- package/lib/commonjs/external/reanimated/renderHelpers.js +16 -5
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +1 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.d.ts +3 -3
- package/lib/commonjs/renderer/HostConfig.d.ts +12 -12
- package/lib/commonjs/renderer/HostConfig.js +1 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.d.ts +1 -1
- package/lib/commonjs/renderer/Reconciler.js +1 -0
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.d.ts +2 -2
- package/lib/commonjs/renderer/components/Drawing.d.ts +2 -2
- package/lib/commonjs/renderer/components/Group.d.ts +2 -2
- package/lib/commonjs/renderer/components/Mask.d.ts +2 -1
- package/lib/commonjs/renderer/components/Paint.d.ts +2 -2
- package/lib/commonjs/renderer/components/Picture.d.ts +2 -2
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/commonjs/renderer/components/colorFilters/Lerp.d.ts +2 -2
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
- package/lib/commonjs/renderer/components/colorFilters/Matrix.d.ts +2 -2
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
- package/lib/commonjs/renderer/components/image/Image.d.ts +2 -2
- package/lib/commonjs/renderer/components/image/ImageSVG.d.ts +2 -2
- package/lib/commonjs/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/Blur.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/Morphology.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/Offset.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
- package/lib/commonjs/renderer/components/imageFilters/Shadow.d.ts +2 -2
- package/lib/commonjs/renderer/components/maskFilters/Blur.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Corner.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Dash.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Discrete.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Line2D.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Path1D.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Path2D.d.ts +2 -2
- package/lib/commonjs/renderer/components/pathEffects/Sum.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/Color.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/FractalNoise.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/LinearGradient.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/RadialGradient.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/Shader.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/SweepGradient.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/Turbulence.d.ts +2 -2
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Box.d.ts +3 -3
- package/lib/commonjs/renderer/components/shapes/Circle.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/DiffRect.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Fill.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/FitBox.d.ts +2 -1
- package/lib/commonjs/renderer/components/shapes/Line.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Oval.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Patch.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Path.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Rect.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/RoundedRect.d.ts +2 -2
- package/lib/commonjs/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/commonjs/renderer/components/text/Glyphs.d.ts +2 -2
- package/lib/commonjs/renderer/components/text/Text.d.ts +2 -2
- package/lib/commonjs/renderer/components/text/TextBlob.d.ts +2 -2
- package/lib/commonjs/renderer/components/text/TextPath.d.ts +2 -2
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +6 -6
- package/lib/commonjs/skia/NativeSetup.js +5 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/core/Font.d.ts +2 -2
- package/lib/commonjs/skia/types/Color.d.ts +2 -2
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
- package/lib/commonjs/skia/types/Data/Data.d.ts +6 -6
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
- package/lib/commonjs/skia/types/MaskFilter.d.ts +1 -1
- package/lib/commonjs/skia/types/Matrix.d.ts +3 -3
- package/lib/commonjs/skia/types/Path/Path.d.ts +1 -1
- package/lib/commonjs/skia/types/PathEffect.d.ts +1 -1
- package/lib/commonjs/skia/types/Point.d.ts +1 -1
- package/lib/commonjs/skia/types/RSXform.d.ts +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.d.ts +2 -2
- package/lib/commonjs/skia/types/TextBlob.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/commonjs/specs/NativeSkiaModule.d.ts +6 -0
- package/lib/commonjs/specs/NativeSkiaModule.js +14 -0
- package/lib/commonjs/specs/NativeSkiaModule.js.map +1 -0
- package/lib/commonjs/specs/NativeSkiaModule.web.d.ts +2 -0
- package/lib/commonjs/specs/NativeSkiaModule.web.js +13 -0
- package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -0
- package/lib/commonjs/specs/SkiaDomViewNativeComponent.d.ts +8 -0
- package/lib/commonjs/specs/SkiaDomViewNativeComponent.js +16 -0
- package/lib/commonjs/specs/SkiaDomViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +16 -0
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js +16 -0
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js.map +1 -0
- package/lib/commonjs/values/selector.d.ts +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.d.ts +1 -1
- package/lib/commonjs/views/SkiaDomView.d.ts +1 -1
- package/lib/commonjs/views/SkiaDomView.js +3 -1
- package/lib/commonjs/views/SkiaDomView.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.d.ts +1 -1
- package/lib/commonjs/views/SkiaPictureView.js +3 -3
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
- package/lib/commonjs/views/SkiaView.d.ts +1 -1
- package/lib/commonjs/views/SkiaView.js +3 -4
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/types.d.ts +6 -6
- package/lib/commonjs/web/WithSkiaWeb.d.ts +2 -2
- package/lib/module/Platform/IPlatform.d.ts +1 -3
- package/lib/module/Platform/IPlatform.js.map +1 -1
- package/lib/module/Platform/Platform.js +1 -3
- package/lib/module/Platform/Platform.js.map +1 -1
- package/lib/module/Platform/Platform.web.js +0 -4
- package/lib/module/Platform/Platform.web.js.map +1 -1
- package/lib/module/animation/functions/interpolate.d.ts +1 -1
- package/lib/module/animation/timing/functions/types.d.ts +1 -1
- package/lib/module/animation/types.d.ts +2 -2
- package/lib/module/dom/nodes/Node.d.ts +1 -1
- package/lib/module/dom/types/Common.d.ts +8 -8
- package/lib/module/dom/types/DeclarationContext.d.ts +1 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +5 -5
- package/lib/module/dom/types/Node.d.ts +1 -1
- package/lib/module/dom/types/SkDOM.d.ts +4 -4
- package/lib/module/external/reanimated/renderHelpers.d.ts +1 -0
- package/lib/module/external/reanimated/renderHelpers.js +12 -5
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +1 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DependencyManager.d.ts +3 -3
- package/lib/module/renderer/HostConfig.d.ts +12 -12
- package/lib/module/renderer/HostConfig.js +2 -1
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Reconciler.d.ts +1 -1
- package/lib/module/renderer/Reconciler.js +1 -0
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/Blend.d.ts +2 -2
- package/lib/module/renderer/components/Drawing.d.ts +2 -2
- package/lib/module/renderer/components/Group.d.ts +2 -2
- package/lib/module/renderer/components/Mask.d.ts +2 -1
- package/lib/module/renderer/components/Paint.d.ts +2 -2
- package/lib/module/renderer/components/Picture.d.ts +2 -2
- package/lib/module/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
- package/lib/module/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/module/renderer/components/colorFilters/Lerp.d.ts +2 -2
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
- package/lib/module/renderer/components/colorFilters/Matrix.d.ts +2 -2
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
- package/lib/module/renderer/components/image/Image.d.ts +2 -2
- package/lib/module/renderer/components/image/ImageSVG.d.ts +2 -2
- package/lib/module/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/Blur.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/Morphology.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/Offset.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
- package/lib/module/renderer/components/imageFilters/Shadow.d.ts +2 -2
- package/lib/module/renderer/components/maskFilters/Blur.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Corner.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Dash.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Discrete.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Line2D.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Path1D.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Path2D.d.ts +2 -2
- package/lib/module/renderer/components/pathEffects/Sum.d.ts +2 -2
- package/lib/module/renderer/components/shaders/Color.d.ts +2 -2
- package/lib/module/renderer/components/shaders/FractalNoise.d.ts +2 -2
- package/lib/module/renderer/components/shaders/LinearGradient.d.ts +2 -2
- package/lib/module/renderer/components/shaders/RadialGradient.d.ts +2 -2
- package/lib/module/renderer/components/shaders/Shader.d.ts +2 -2
- package/lib/module/renderer/components/shaders/SweepGradient.d.ts +2 -2
- package/lib/module/renderer/components/shaders/Turbulence.d.ts +2 -2
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Box.d.ts +3 -3
- package/lib/module/renderer/components/shapes/Circle.d.ts +2 -2
- package/lib/module/renderer/components/shapes/DiffRect.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Fill.d.ts +2 -2
- package/lib/module/renderer/components/shapes/FitBox.d.ts +2 -1
- package/lib/module/renderer/components/shapes/Line.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Oval.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Patch.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Path.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Rect.d.ts +2 -2
- package/lib/module/renderer/components/shapes/RoundedRect.d.ts +2 -2
- package/lib/module/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/module/renderer/components/text/Glyphs.d.ts +2 -2
- package/lib/module/renderer/components/text/Text.d.ts +2 -2
- package/lib/module/renderer/components/text/TextBlob.d.ts +2 -2
- package/lib/module/renderer/components/text/TextPath.d.ts +2 -2
- package/lib/module/renderer/processors/Animations/Animations.d.ts +6 -6
- package/lib/module/skia/NativeSetup.js +2 -1
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/core/Font.d.ts +2 -2
- package/lib/module/skia/types/Color.d.ts +2 -2
- package/lib/module/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
- package/lib/module/skia/types/Data/Data.d.ts +6 -6
- package/lib/module/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
- package/lib/module/skia/types/MaskFilter.d.ts +1 -1
- package/lib/module/skia/types/Matrix.d.ts +3 -3
- package/lib/module/skia/types/Path/Path.d.ts +1 -1
- package/lib/module/skia/types/PathEffect.d.ts +1 -1
- package/lib/module/skia/types/Point.d.ts +1 -1
- package/lib/module/skia/types/RSXform.d.ts +1 -1
- package/lib/module/skia/types/Shader/Shader.d.ts +2 -2
- package/lib/module/skia/types/TextBlob.d.ts +1 -1
- package/lib/module/skia/web/JsiSkData.d.ts +1 -1
- package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/module/specs/NativeSkiaModule.d.ts +6 -0
- package/lib/module/specs/NativeSkiaModule.js +4 -0
- package/lib/module/specs/NativeSkiaModule.js.map +1 -0
- package/lib/module/specs/NativeSkiaModule.web.d.ts +2 -0
- package/lib/module/specs/NativeSkiaModule.web.js +4 -0
- package/lib/module/specs/NativeSkiaModule.web.js.map +1 -0
- package/lib/module/specs/SkiaDomViewNativeComponent.d.ts +8 -0
- package/lib/module/specs/SkiaDomViewNativeComponent.js +4 -0
- package/lib/module/specs/SkiaDomViewNativeComponent.js.map +1 -0
- package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
- package/lib/module/specs/SkiaDrawViewNativeComponent.js +4 -0
- package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +1 -0
- package/lib/module/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
- package/lib/module/specs/SkiaPictureViewNativeComponent.js +4 -0
- package/lib/module/specs/SkiaPictureViewNativeComponent.js.map +1 -0
- package/lib/module/values/selector.d.ts +1 -1
- package/lib/module/views/SkiaBaseWebView.d.ts +1 -1
- package/lib/module/views/SkiaDomView.d.ts +1 -1
- package/lib/module/views/SkiaDomView.js +2 -1
- package/lib/module/views/SkiaDomView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.d.ts +1 -1
- package/lib/module/views/SkiaPictureView.js +3 -3
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaView.d.ts +1 -1
- package/lib/module/views/SkiaView.js +3 -3
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/types.d.ts +6 -6
- package/lib/module/web/WithSkiaWeb.d.ts +2 -2
- package/lib/typescript/src/Platform/IPlatform.d.ts +1 -3
- package/lib/typescript/src/animation/functions/interpolate.d.ts +1 -1
- package/lib/typescript/src/animation/timing/functions/types.d.ts +1 -1
- package/lib/typescript/src/animation/types.d.ts +2 -2
- package/lib/typescript/src/dom/nodes/Node.d.ts +1 -1
- package/lib/typescript/src/dom/types/Common.d.ts +8 -8
- package/lib/typescript/src/dom/types/DeclarationContext.d.ts +1 -1
- package/lib/typescript/src/dom/types/Drawings.d.ts +5 -5
- package/lib/typescript/src/dom/types/Node.d.ts +1 -1
- package/lib/typescript/src/dom/types/SkDOM.d.ts +4 -4
- package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +1 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
- package/lib/typescript/src/renderer/DependencyManager.d.ts +3 -3
- package/lib/typescript/src/renderer/HostConfig.d.ts +12 -12
- package/lib/typescript/src/renderer/Reconciler.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Blend.d.ts +2 -2
- package/lib/typescript/src/renderer/components/Drawing.d.ts +2 -2
- package/lib/typescript/src/renderer/components/Group.d.ts +2 -2
- package/lib/typescript/src/renderer/components/Mask.d.ts +2 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +2 -2
- package/lib/typescript/src/renderer/components/Picture.d.ts +2 -2
- package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/Image.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +2 -2
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +2 -2
- package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +6 -6
- package/lib/typescript/src/skia/core/Font.d.ts +2 -2
- package/lib/typescript/src/skia/types/Color.d.ts +2 -2
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
- package/lib/typescript/src/skia/types/Data/Data.d.ts +6 -6
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
- package/lib/typescript/src/skia/types/MaskFilter.d.ts +1 -1
- package/lib/typescript/src/skia/types/Matrix.d.ts +3 -3
- package/lib/typescript/src/skia/types/Path/Path.d.ts +1 -1
- package/lib/typescript/src/skia/types/PathEffect.d.ts +1 -1
- package/lib/typescript/src/skia/types/Point.d.ts +1 -1
- package/lib/typescript/src/skia/types/RSXform.d.ts +1 -1
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +2 -2
- package/lib/typescript/src/skia/types/TextBlob.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/typescript/src/specs/NativeSkiaModule.d.ts +6 -0
- package/lib/typescript/src/specs/NativeSkiaModule.web.d.ts +2 -0
- package/lib/typescript/src/specs/SkiaDomViewNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
- package/lib/typescript/src/values/selector.d.ts +1 -1
- package/lib/typescript/src/views/SkiaBaseWebView.d.ts +1 -1
- package/lib/typescript/src/views/SkiaDomView.d.ts +1 -1
- package/lib/typescript/src/views/SkiaPictureView.d.ts +1 -1
- package/lib/typescript/src/views/SkiaView.d.ts +1 -1
- package/lib/typescript/src/views/types.d.ts +6 -6
- package/lib/typescript/src/web/WithSkiaWeb.d.ts +2 -2
- package/package.json +18 -6
- package/react-native-skia.podspec +11 -3
- package/src/Platform/IPlatform.ts +1 -3
- package/src/Platform/Platform.ts +0 -4
- package/src/Platform/Platform.web.tsx +0 -4
- package/src/dom/types/DrawingContext.ts +1 -1
- package/src/external/reanimated/renderHelpers.ts +13 -4
- package/src/renderer/Canvas.tsx +2 -1
- package/src/renderer/HostConfig.ts +2 -0
- package/src/renderer/Reconciler.tsx +2 -1
- package/src/skia/NativeSetup.ts +2 -1
- package/src/specs/NativeSkiaModule.ts +9 -0
- package/src/specs/NativeSkiaModule.web.ts +4 -0
- package/src/specs/SkiaDomViewNativeComponent.ts +10 -0
- package/src/specs/SkiaDrawViewNativeComponent.ts +10 -0
- package/src/specs/SkiaPictureViewNativeComponent.ts +10 -0
- package/src/views/SkiaDomView.tsx +3 -2
- package/src/views/SkiaPictureView.tsx +4 -5
- package/src/views/SkiaView.tsx +4 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ComponentProps, ComponentType } from "react";
|
2
|
-
import { Suspense } from "react";
|
2
|
+
import React, { Suspense } from "react";
|
3
3
|
import { LoadSkiaWeb } from "./LoadSkiaWeb";
|
4
4
|
interface WithSkiaProps {
|
5
5
|
fallback?: ComponentProps<typeof Suspense>["fallback"];
|
@@ -8,5 +8,5 @@ interface WithSkiaProps {
|
|
8
8
|
}>;
|
9
9
|
opts?: Parameters<typeof LoadSkiaWeb>[0];
|
10
10
|
}
|
11
|
-
export declare const WithSkiaWeb: ({ getComponent, fallback, opts, }: WithSkiaProps) => JSX.Element;
|
11
|
+
export declare const WithSkiaWeb: ({ getComponent, fallback, opts, }: WithSkiaProps) => React.JSX.Element;
|
12
12
|
export {};
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"setup-skia-web": "./scripts/setup-canvaskit.js"
|
8
8
|
},
|
9
9
|
"title": "React Native Skia",
|
10
|
-
"version": "0.1.
|
10
|
+
"version": "0.1.218",
|
11
11
|
"description": "High-performance React Native Graphics using Skia",
|
12
12
|
"main": "lib/module/index.js",
|
13
13
|
"files": [
|
@@ -86,22 +86,22 @@
|
|
86
86
|
"@types/jest": "29.5.6",
|
87
87
|
"@types/pixelmatch": "^5.2.4",
|
88
88
|
"@types/pngjs": "^6.0.1",
|
89
|
-
"@types/react
|
89
|
+
"@types/react": "^18.2.37",
|
90
90
|
"@types/react-reconciler": "^0.26.7",
|
91
91
|
"@types/ws": "^8.5.3",
|
92
92
|
"eslint": "8.21.0",
|
93
|
-
"eslint-config-react-native-wcandillon": "3.
|
93
|
+
"eslint-config-react-native-wcandillon": "3.10.2",
|
94
94
|
"eslint-plugin-reanimated": "2.0.0",
|
95
95
|
"jest": "29.6.4",
|
96
96
|
"merge-dirs": "^0.2.1",
|
97
97
|
"pixelmatch": "^5.3.0",
|
98
98
|
"pngjs": "^6.0.0",
|
99
99
|
"react": "18.1.0",
|
100
|
-
"react-native": "0.
|
100
|
+
"react-native": "0.72.6",
|
101
101
|
"react-native-builder-bob": "^0.18.2",
|
102
102
|
"react-native-reanimated": "^3.5.4",
|
103
|
-
"ts-jest": "
|
104
|
-
"typescript": "
|
103
|
+
"ts-jest": "29.1.1",
|
104
|
+
"typescript": "5.1.6",
|
105
105
|
"ws": "^8.11.0"
|
106
106
|
},
|
107
107
|
"dependencies": {
|
@@ -112,6 +112,14 @@
|
|
112
112
|
"node_modules/",
|
113
113
|
"lib/"
|
114
114
|
],
|
115
|
+
"codegenConfig": {
|
116
|
+
"name": "rnskia",
|
117
|
+
"type": "all",
|
118
|
+
"jsSrcsDir": "src/specs",
|
119
|
+
"android": {
|
120
|
+
"javaPackageName": "com.shopify.reactnative.skia"
|
121
|
+
}
|
122
|
+
},
|
115
123
|
"react-native-builder-bob": {
|
116
124
|
"source": "src",
|
117
125
|
"output": "lib",
|
@@ -126,6 +134,10 @@
|
|
126
134
|
"typescript"
|
127
135
|
]
|
128
136
|
},
|
137
|
+
"resolutions": {
|
138
|
+
"@typescript-eslint/eslint-plugin": "6.10.0",
|
139
|
+
"@typescript-eslint/parser": "6.10.0"
|
140
|
+
},
|
129
141
|
"types": "lib/typescript/index.d.ts",
|
130
142
|
"module": "lib/module/index.js",
|
131
143
|
"react-native": "lib/module/index.js"
|
@@ -44,8 +44,16 @@ Pod::Spec.new do |s|
|
|
44
44
|
"cpp/**/*.{h,cpp}"
|
45
45
|
]
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
|
48
|
+
if defined?(install_modules_dependencies()) != nil
|
49
|
+
install_modules_dependencies(s)
|
50
|
+
s.dependency "React"
|
51
|
+
s.dependency "React-callinvoker"
|
52
|
+
s.dependency "React-Core"
|
53
|
+
else
|
54
|
+
s.dependency "React"
|
55
|
+
s.dependency "React-callinvoker"
|
56
|
+
s.dependency "React-Core"
|
57
|
+
end
|
50
58
|
end
|
51
59
|
|
@@ -1,13 +1,11 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
|
-
import type {
|
2
|
+
import type { NodeHandle, ViewComponent } from "react-native";
|
3
3
|
|
4
4
|
import type { DataModule } from "../skia/types";
|
5
5
|
|
6
6
|
export interface IPlatform {
|
7
7
|
OS: string;
|
8
|
-
requireNativeComponent: <T>(viewName: string) => HostComponent<T>;
|
9
8
|
PixelRatio: number;
|
10
|
-
NativeModules: Record<string, any>;
|
11
9
|
findNodeHandle: (
|
12
10
|
componentOrHandle:
|
13
11
|
| null
|
package/src/Platform/Platform.ts
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
import {
|
2
2
|
Image,
|
3
3
|
PixelRatio,
|
4
|
-
requireNativeComponent,
|
5
4
|
Platform as RNPlatform,
|
6
5
|
findNodeHandle,
|
7
|
-
NativeModules,
|
8
6
|
View,
|
9
7
|
} from "react-native";
|
10
8
|
|
@@ -16,13 +14,11 @@ import type { IPlatform } from "./IPlatform";
|
|
16
14
|
export const Platform: IPlatform = {
|
17
15
|
OS: RNPlatform.OS,
|
18
16
|
PixelRatio: PixelRatio.get(),
|
19
|
-
requireNativeComponent,
|
20
17
|
resolveAsset: (source: DataModule) => {
|
21
18
|
return isRNModule(source)
|
22
19
|
? Image.resolveAssetSource(source).uri
|
23
20
|
: source.default;
|
24
21
|
},
|
25
22
|
findNodeHandle,
|
26
|
-
NativeModules,
|
27
23
|
View,
|
28
24
|
};
|
@@ -117,9 +117,6 @@ const View = (({ children, onLayout, style: rawStyle }: ViewProps) => {
|
|
117
117
|
export const Platform: IPlatform = {
|
118
118
|
OS: "web",
|
119
119
|
PixelRatio: window.devicePixelRatio,
|
120
|
-
requireNativeComponent: () => {
|
121
|
-
throw new Error("requireNativeComponent is not supported on the web");
|
122
|
-
},
|
123
120
|
resolveAsset: (source: DataModule) => {
|
124
121
|
if (isRNModule(source)) {
|
125
122
|
throw new Error(
|
@@ -131,6 +128,5 @@ export const Platform: IPlatform = {
|
|
131
128
|
findNodeHandle: () => {
|
132
129
|
throw new Error("findNodeHandle is not supported on the web");
|
133
130
|
},
|
134
|
-
NativeModules: {},
|
135
131
|
View,
|
136
132
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
|
-
|
2
|
+
|
3
3
|
import type { Container } from "../../renderer/Container";
|
4
4
|
import type { AnimatedProps } from "../../renderer/processors";
|
5
5
|
import type { Node } from "../../dom/types";
|
@@ -15,6 +15,13 @@ import {
|
|
15
15
|
|
16
16
|
const _bindings = new WeakMap<Node<unknown>, unknown>();
|
17
17
|
|
18
|
+
export const unbindReanimatedNode = (node: Node<unknown>) => {
|
19
|
+
const previousMapperId = _bindings.get(node);
|
20
|
+
if (previousMapperId !== undefined) {
|
21
|
+
stopMapper(previousMapperId as number);
|
22
|
+
}
|
23
|
+
};
|
24
|
+
|
18
25
|
export function extractReanimatedProps(props: AnimatedProps<any>) {
|
19
26
|
if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {
|
20
27
|
return [props, {}];
|
@@ -76,7 +83,7 @@ export function bindReanimatedProps(
|
|
76
83
|
node: Node<any>,
|
77
84
|
reanimatedProps: AnimatedProps<any>
|
78
85
|
) {
|
79
|
-
if (HAS_REANIMATED2) {
|
86
|
+
if (HAS_REANIMATED2 && !HAS_REANIMATED3) {
|
80
87
|
return bindReanimatedProps2(container, node, reanimatedProps);
|
81
88
|
}
|
82
89
|
if (!HAS_REANIMATED3) {
|
@@ -92,8 +99,10 @@ export function bindReanimatedProps(
|
|
92
99
|
const { SkiaViewApi } = global;
|
93
100
|
const mapperId = startMapper(() => {
|
94
101
|
"worklet";
|
95
|
-
|
96
|
-
|
102
|
+
if (node) {
|
103
|
+
for (const propName in reanimatedProps) {
|
104
|
+
node.setProp(propName, reanimatedProps[propName].value);
|
105
|
+
}
|
97
106
|
}
|
98
107
|
// On React Native we use the SkiaViewApi to redraw because it can
|
99
108
|
// run on the worklet thread (container.redraw can't)
|
package/src/renderer/Canvas.tsx
CHANGED
@@ -11,6 +11,7 @@ import type {
|
|
11
11
|
ReactNode,
|
12
12
|
MutableRefObject,
|
13
13
|
ForwardedRef,
|
14
|
+
FunctionComponent,
|
14
15
|
} from "react";
|
15
16
|
|
16
17
|
import { SkiaDomView, SkiaView } from "../views";
|
@@ -126,7 +127,7 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
|
|
126
127
|
);
|
127
128
|
}
|
128
129
|
}
|
129
|
-
) as
|
130
|
+
) as FunctionComponent<CanvasProps & React.RefAttributes<SkiaDomView>>;
|
130
131
|
|
131
132
|
/**
|
132
133
|
* Combines a list of refs into a single ref. This can be used to provide
|
@@ -7,6 +7,7 @@ import type { SkiaValue } from "../values";
|
|
7
7
|
import {
|
8
8
|
bindReanimatedProps,
|
9
9
|
extractReanimatedProps,
|
10
|
+
unbindReanimatedNode,
|
10
11
|
} from "../external/reanimated/renderHelpers";
|
11
12
|
|
12
13
|
import type { Container } from "./Container";
|
@@ -56,6 +57,7 @@ const appendNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
|
56
57
|
};
|
57
58
|
|
58
59
|
const removeNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
60
|
+
unbindReanimatedNode(child);
|
59
61
|
return parent.removeChild(child);
|
60
62
|
};
|
61
63
|
|
@@ -50,7 +50,8 @@ export class SkiaRoot {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
render(element: ReactNode) {
|
53
|
-
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
54
|
+
skiaReconciler.updateContainer(element as any, this.root, null, () => {
|
54
55
|
hostDebug("updateContainer");
|
55
56
|
});
|
56
57
|
}
|
package/src/skia/NativeSetup.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Platform } from "../Platform";
|
2
|
+
import NativeSkiaModule from "../specs/NativeSkiaModule";
|
2
3
|
|
3
4
|
if (Platform.OS !== "web" && global.SkiaApi == null) {
|
4
5
|
// Initialize RN Skia
|
5
|
-
const SkiaModule =
|
6
|
+
const SkiaModule = NativeSkiaModule;
|
6
7
|
if (SkiaModule == null || typeof SkiaModule.install !== "function") {
|
7
8
|
throw new Error(
|
8
9
|
"Native RNSkia Module cannot be found! Make sure you correctly " +
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { TurboModule } from "react-native/Libraries/TurboModule/RCTExport";
|
2
|
+
import { TurboModuleRegistry } from "react-native";
|
3
|
+
|
4
|
+
export interface Spec extends TurboModule {
|
5
|
+
install: () => boolean;
|
6
|
+
}
|
7
|
+
|
8
|
+
// eslint-disable-next-line import/no-default-export
|
9
|
+
export default TurboModuleRegistry.getEnforcing<Spec>("RNSkiaModule");
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
2
|
+
import type { ViewProps } from "react-native";
|
3
|
+
|
4
|
+
export interface NativeProps extends ViewProps {
|
5
|
+
mode: string;
|
6
|
+
debug?: boolean;
|
7
|
+
}
|
8
|
+
|
9
|
+
// eslint-disable-next-line import/no-default-export
|
10
|
+
export default codegenNativeComponent<NativeProps>("SkiaDomView");
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
2
|
+
import type { ViewProps } from "react-native";
|
3
|
+
|
4
|
+
export interface NativeProps extends ViewProps {
|
5
|
+
mode: string;
|
6
|
+
debug?: boolean;
|
7
|
+
}
|
8
|
+
|
9
|
+
// eslint-disable-next-line import/no-default-export
|
10
|
+
export default codegenNativeComponent<NativeProps>("SkiaDrawView");
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
2
|
+
import type { ViewProps } from "react-native";
|
3
|
+
|
4
|
+
export interface NativeProps extends ViewProps {
|
5
|
+
mode: string;
|
6
|
+
debug?: boolean;
|
7
|
+
}
|
8
|
+
|
9
|
+
// eslint-disable-next-line import/no-default-export
|
10
|
+
export default codegenNativeComponent<NativeProps>("SkiaPictureView");
|
@@ -4,14 +4,15 @@ import type { HostComponent } from "react-native";
|
|
4
4
|
import type { SkRect } from "../skia/types";
|
5
5
|
import type { SkiaValue } from "../values";
|
6
6
|
import { Platform } from "../Platform";
|
7
|
+
import SkiaDomViewNativeComponent from "../specs/SkiaDomViewNativeComponent";
|
7
8
|
|
8
9
|
import { SkiaViewApi } from "./api";
|
9
10
|
import { SkiaViewNativeId } from "./SkiaView";
|
10
|
-
import type {
|
11
|
+
import type { SkiaDomViewProps } from "./types";
|
11
12
|
|
12
13
|
const NativeSkiaDomView: HostComponent<SkiaDomViewProps> =
|
13
14
|
Platform.OS !== "web"
|
14
|
-
?
|
15
|
+
? SkiaDomViewNativeComponent
|
15
16
|
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16
17
|
(null as any);
|
17
18
|
|
@@ -2,14 +2,13 @@ import React from "react";
|
|
2
2
|
|
3
3
|
import type { SkRect } from "../skia/types";
|
4
4
|
import type { SkiaValue } from "../values";
|
5
|
-
import
|
5
|
+
import SkiaPictureViewNativeComponent from "../specs/SkiaPictureViewNativeComponent";
|
6
6
|
|
7
7
|
import { SkiaViewApi } from "./api";
|
8
8
|
import { SkiaViewNativeId } from "./SkiaView";
|
9
|
-
import type {
|
9
|
+
import type { SkiaPictureViewProps } from "./types";
|
10
10
|
|
11
|
-
const NativeSkiaPictureView =
|
12
|
-
Platform.requireNativeComponent<NativeSkiaViewProps>("SkiaPictureView");
|
11
|
+
const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
|
13
12
|
|
14
13
|
export class SkiaPictureView extends React.Component<SkiaPictureViewProps> {
|
15
14
|
constructor(props: SkiaPictureViewProps) {
|
@@ -78,7 +77,7 @@ export class SkiaPictureView extends React.Component<SkiaPictureViewProps> {
|
|
78
77
|
<NativeSkiaPictureView
|
79
78
|
collapsable={false}
|
80
79
|
nativeID={`${this._nativeId}`}
|
81
|
-
mode={mode}
|
80
|
+
mode={mode ?? "default"}
|
82
81
|
debug={debug}
|
83
82
|
{...viewProps}
|
84
83
|
/>
|
package/src/views/SkiaView.tsx
CHANGED
@@ -2,15 +2,14 @@ import React from "react";
|
|
2
2
|
|
3
3
|
import type { SkRect } from "../skia/types";
|
4
4
|
import type { SkiaValue } from "../values";
|
5
|
-
import
|
5
|
+
import SkiaDrawViewNativeComponent from "../specs/SkiaDrawViewNativeComponent";
|
6
6
|
|
7
7
|
import { SkiaViewApi } from "./api";
|
8
|
-
import type {
|
8
|
+
import type { SkiaDrawViewProps } from "./types";
|
9
9
|
|
10
10
|
export const SkiaViewNativeId = { current: 1000 };
|
11
11
|
|
12
|
-
const NativeSkiaView =
|
13
|
-
Platform.requireNativeComponent<NativeSkiaViewProps>("SkiaDrawView");
|
12
|
+
const NativeSkiaView = SkiaDrawViewNativeComponent;
|
14
13
|
|
15
14
|
export class SkiaView extends React.Component<SkiaDrawViewProps> {
|
16
15
|
constructor(props: SkiaDrawViewProps) {
|
@@ -79,7 +78,7 @@ export class SkiaView extends React.Component<SkiaDrawViewProps> {
|
|
79
78
|
<NativeSkiaView
|
80
79
|
collapsable={false}
|
81
80
|
nativeID={`${this._nativeId}`}
|
82
|
-
mode={mode}
|
81
|
+
mode={mode ?? "default"}
|
83
82
|
debug={debug}
|
84
83
|
{...viewProps}
|
85
84
|
/>
|