@shopify/react-native-skia 0.1.128 → 0.1.129
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +1 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +1 -3
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Compose.js +2 -6
- package/lib/commonjs/renderer/components/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +1 -3
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +2 -4
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +1 -3
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -3
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +2 -4
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +1 -3
- package/lib/commonjs/renderer/components/shapes/Patch.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/index.js +13 -0
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
- package/lib/commonjs/renderer/processors/Font.js.map +1 -1
- package/lib/commonjs/renderer/processors/Rects.js +5 -1
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
- package/lib/commonjs/skia/Skia.js +2 -36
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/{Color.js → core/Color.js} +1 -1
- package/lib/commonjs/skia/core/Color.js.map +1 -0
- package/lib/commonjs/skia/{Data → core}/Data.js +29 -8
- package/lib/commonjs/skia/core/Data.js.map +1 -0
- package/lib/commonjs/skia/{Font/useFont.js → core/Font.js} +4 -4
- package/lib/commonjs/skia/core/Font.js.map +1 -0
- package/lib/commonjs/skia/{Image/useImage.js → core/Image.js} +4 -4
- package/lib/commonjs/skia/core/Image.js.map +1 -0
- package/lib/commonjs/skia/{Paint/usePaint.js → core/Paint.js} +14 -4
- package/lib/commonjs/skia/core/Paint.js.map +1 -0
- package/lib/commonjs/skia/{Path/usePath.js → core/Path.js} +1 -1
- package/lib/commonjs/skia/core/Path.js.map +1 -0
- package/lib/commonjs/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
- package/lib/commonjs/skia/core/Picture.js.map +1 -0
- package/lib/commonjs/skia/core/SVG.js +15 -0
- package/lib/commonjs/skia/core/SVG.js.map +1 -0
- package/lib/commonjs/skia/{Shader/useShader.js → core/Shader.js} +1 -1
- package/lib/commonjs/skia/core/Shader.js.map +1 -0
- package/lib/commonjs/skia/{Typeface/useTypeface.js → core/Typeface.js} +3 -3
- package/lib/commonjs/skia/core/Typeface.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +136 -0
- package/lib/commonjs/skia/core/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +8 -302
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/commonjs/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/commonjs/skia/types/Color.js +2 -0
- package/lib/commonjs/skia/{ColorFilter/ColorFilterFactory.js.map → types/Color.js.map} +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/ColorFilter/ColorFilterFactory.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/commonjs/skia/types/Data/Data.js +6 -0
- package/lib/commonjs/skia/{Data/DataFactory.js.map → types/Data/Data.js.map} +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/Data/DataFactory.js.map +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/commonjs/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/{Font → types/Font}/index.js +0 -13
- package/lib/commonjs/skia/{FontMgr → types/Font}/index.js.map +1 -1
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js.map +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js.map +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/index.js +13 -0
- package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/Image.js.map +1 -1
- package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/index.js +0 -13
- package/lib/commonjs/skia/types/Image/index.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/commonjs/skia/{JsiInstance.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/commonjs/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/{Matrix.js → types/Matrix.js} +0 -0
- package/lib/commonjs/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/Paint.js +1 -13
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/index.js +0 -13
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/{Path → types/Path}/Path.js +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/Path.js.map +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js.map +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/index.js +0 -13
- package/lib/commonjs/skia/types/Path/index.js.map +1 -0
- package/lib/commonjs/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/index.js +0 -13
- package/lib/commonjs/skia/{Paint → types/Picture}/index.js.map +1 -1
- package/lib/commonjs/skia/{Point.js → types/Point.js} +0 -0
- package/lib/commonjs/skia/{Point.js.map → types/Point.js.map} +0 -0
- package/lib/commonjs/skia/{RRect.js → types/RRect.js} +0 -0
- package/lib/commonjs/skia/{RRect.js.map → types/RRect.js.map} +0 -0
- package/lib/commonjs/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/commonjs/skia/{RSXform.js.map → types/RSXform.js.map} +0 -0
- package/lib/commonjs/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/commonjs/skia/{Rect.js.map → types/Rect.js.map} +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/index.js +0 -13
- package/lib/commonjs/skia/{Font → types/SVG}/index.js.map +1 -1
- package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js.map +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js.map +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/index.js +0 -13
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.js +6 -0
- package/lib/commonjs/skia/{Surface/Surface.js.map → types/Skia.js.map} +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/Surface/Surface.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/commonjs/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/commonjs/skia/{TextBlob.js.map → types/TextBlob.js.map} +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js.map +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js.map +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/index.js +0 -13
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/commonjs/skia/types/index.js +370 -0
- package/lib/commonjs/skia/types/index.js.map +1 -0
- package/lib/commonjs/skia/web/api/Host.js +66 -0
- package/lib/commonjs/skia/web/api/Host.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js +170 -0
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkColor.js +180 -0
- package/lib/commonjs/skia/web/api/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkColorFilter.js +18 -0
- package/lib/commonjs/skia/web/api/JsiSkColorFilter.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkImage.js +56 -0
- package/lib/commonjs/skia/web/api/JsiSkImage.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkPaint.js +106 -0
- package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkRect.js +34 -0
- package/lib/commonjs/skia/web/api/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkSurface.js +31 -0
- package/lib/commonjs/skia/web/api/JsiSkSurface.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js +30 -0
- package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/api/index.js +26 -0
- package/lib/commonjs/skia/web/api/index.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +19 -0
- package/lib/commonjs/skia/web/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/decay/runDecay.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.js.map +1 -1
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/createTiming.js.map +1 -1
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +1 -2
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +1 -2
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Compose.js +1 -3
- package/lib/module/renderer/components/Compose.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +1 -2
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +1 -2
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +1 -2
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +1 -2
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +1 -2
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +1 -2
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +1 -2
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +1 -2
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +1 -2
- package/lib/module/renderer/components/shapes/Patch.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/index.js +1 -0
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.js.map +1 -1
- package/lib/module/renderer/nodes/Node.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Clips.js.map +1 -1
- package/lib/module/renderer/processors/Font.js.map +1 -1
- package/lib/module/renderer/processors/Rects.js +1 -0
- package/lib/module/renderer/processors/Rects.js.map +1 -1
- package/lib/module/renderer/processors/Transform.js.map +1 -1
- package/lib/module/skia/Skia.js +2 -35
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/{Color.js → core/Color.js} +1 -2
- package/lib/module/skia/core/Color.js.map +1 -0
- package/lib/module/skia/core/Data.js +56 -0
- package/lib/module/skia/core/Data.js.map +1 -0
- package/lib/module/skia/{Font/useFont.js → core/Font.js} +5 -5
- package/lib/module/skia/core/Font.js.map +1 -0
- package/lib/module/skia/core/Image.js +8 -0
- package/lib/module/skia/core/Image.js.map +1 -0
- package/lib/module/skia/{Paint/usePaint.js → core/Paint.js} +8 -3
- package/lib/module/skia/core/Paint.js.map +1 -0
- package/lib/module/skia/{Path/usePath.js → core/Path.js} +1 -1
- package/lib/module/skia/core/Path.js.map +1 -0
- package/lib/module/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
- package/lib/module/skia/core/Picture.js.map +1 -0
- package/lib/module/skia/core/SVG.js +4 -0
- package/lib/module/skia/core/SVG.js.map +1 -0
- package/lib/module/skia/{Shader/useShader.js → core/Shader.js} +1 -1
- package/lib/module/skia/core/Shader.js.map +1 -0
- package/lib/module/skia/core/Typeface.js +8 -0
- package/lib/module/skia/core/Typeface.js.map +1 -0
- package/lib/module/skia/core/index.js +11 -0
- package/lib/module/skia/core/index.js.map +1 -0
- package/lib/module/skia/index.js +2 -23
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/module/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/module/skia/types/Color.js +2 -0
- package/lib/module/skia/{ContourMeasure.js.map → types/Color.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/module/skia/{FontMgr/FontMgr.js.map → types/ColorFilter/ColorFilterFactory.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/module/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/module/skia/{FontMgr/FontMgrFactory.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/module/skia/types/Data/Data.js +2 -0
- package/lib/module/skia/{JsiInstance.js.map → types/Data/Data.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/module/skia/{Path/PathFactory.js.map → types/Data/DataFactory.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/module/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/module/skia/types/Font/Font.js.map +1 -0
- package/lib/module/skia/types/Font/index.js +2 -0
- package/lib/module/skia/types/Font/index.js.map +1 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/module/skia/{Picture/Picture.js.map → types/FontMgr/FontMgr.js.map} +0 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/module/skia/{Picture/PictureFactory.js.map → types/FontMgr/FontMgrFactory.js.map} +0 -0
- package/lib/module/skia/types/FontMgr/index.js +3 -0
- package/lib/module/skia/types/FontMgr/index.js.map +1 -0
- package/lib/module/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/module/skia/{Image → types/Image}/Image.js.map +1 -1
- package/lib/module/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/module/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
- package/lib/module/skia/types/Image/index.js +3 -0
- package/lib/module/skia/types/Image/index.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/module/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/module/skia/{Picture/PictureRecorder.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/module/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -0
- package/lib/module/skia/{Matrix.js → types/Matrix.js} +0 -0
- package/lib/module/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/module/skia/{Paint → types/Paint}/Paint.js +0 -6
- package/lib/module/skia/types/Paint/Paint.js.map +1 -0
- package/lib/module/skia/types/Paint/index.js +3 -0
- package/lib/module/skia/types/Paint/index.js.map +1 -0
- package/lib/module/skia/{Path → types/Path}/Path.js +0 -0
- package/lib/module/skia/{Path → types/Path}/Path.js.map +0 -0
- package/lib/module/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/module/skia/{RRect.js.map → types/Path/PathFactory.js.map} +0 -0
- package/lib/module/skia/types/Path/index.js +3 -0
- package/lib/module/skia/types/Path/index.js.map +1 -0
- package/lib/module/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/module/skia/types/PathEffect.js.map +1 -0
- package/lib/module/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/module/skia/{RSXform.js.map → types/Picture/Picture.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/module/skia/{Rect.js.map → types/Picture/PictureFactory.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffect.js.map → types/Picture/PictureRecorder.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/index.js +0 -1
- package/lib/module/skia/types/Picture/index.js.map +1 -0
- package/lib/module/skia/{Point.js → types/Point.js} +0 -0
- package/lib/module/skia/{Point.js.map → types/Point.js.map} +0 -0
- package/lib/module/skia/{RRect.js → types/RRect.js} +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffectFactory.js.map → types/RRect.js.map} +0 -0
- package/lib/module/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/module/skia/{SVG/SVG.js.map → types/RSXform.js.map} +0 -0
- package/lib/module/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/module/skia/{SVG/SVGFactory.js.map → types/Rect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/module/skia/{Shader/ShaderFactory.js.map → types/RuntimeEffect/RuntimeEffect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/module/skia/{Surface/SurfaceFactory.js.map → types/RuntimeEffect/RuntimeEffectFactory.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/module/skia/{TextBlob.js.map → types/SVG/SVG.js.map} +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/module/skia/{Typeface/Typeface.js.map → types/SVG/SVGFactory.js.map} +0 -0
- package/lib/module/skia/types/SVG/index.js +3 -0
- package/lib/module/skia/types/SVG/index.js.map +1 -0
- package/lib/module/skia/{Shader → types/Shader}/Shader.js +0 -0
- package/lib/module/skia/{Shader → types/Shader}/Shader.js.map +0 -0
- package/lib/module/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/module/skia/{Typeface/TypefaceFactory.js.map → types/Shader/ShaderFactory.js.map} +0 -0
- package/lib/module/skia/types/Shader/index.js +3 -0
- package/lib/module/skia/types/Shader/index.js.map +1 -0
- package/lib/module/skia/types/Skia.js +2 -0
- package/lib/module/skia/types/Skia.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/module/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/module/skia/types/TextBlob.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/module/skia/types/Typeface/index.js +3 -0
- package/lib/module/skia/types/Typeface/index.js.map +1 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/module/skia/types/index.js +29 -0
- package/lib/module/skia/types/index.js.map +1 -0
- package/lib/module/skia/web/api/Host.js +36 -0
- package/lib/module/skia/web/api/Host.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkCanvas.js +160 -0
- package/lib/module/skia/web/api/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkColor.js +170 -0
- package/lib/module/skia/web/api/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkColorFilter.js +8 -0
- package/lib/module/skia/web/api/JsiSkColorFilter.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkImage.js +46 -0
- package/lib/module/skia/web/api/JsiSkImage.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkPaint.js +96 -0
- package/lib/module/skia/web/api/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkRect.js +24 -0
- package/lib/module/skia/web/api/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkSurface.js +19 -0
- package/lib/module/skia/web/api/JsiSkSurface.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkSurfaceFactory.js +19 -0
- package/lib/module/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/module/skia/web/api/index.js +13 -0
- package/lib/module/skia/web/api/index.js.map +1 -0
- package/lib/module/skia/web/index.js +2 -0
- package/lib/module/skia/web/index.js.map +1 -0
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +2 -2
- package/lib/typescript/src/animation/spring/runSpring.d.ts +2 -2
- package/lib/typescript/src/animation/spring/useSpring.d.ts +2 -2
- package/lib/typescript/src/animation/timing/createTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/runTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useTiming.d.ts +2 -2
- package/lib/typescript/src/renderer/Canvas.d.ts +4 -4
- package/lib/typescript/src/renderer/DependencyManager.d.ts +2 -2
- package/lib/typescript/src/renderer/DrawingContext.d.ts +1 -2
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +1 -2
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -2
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
- package/lib/typescript/src/renderer/index.d.ts +1 -0
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +3 -3
- package/lib/typescript/src/renderer/processors/Clips.d.ts +1 -2
- package/lib/typescript/src/renderer/processors/Font.d.ts +1 -2
- package/lib/typescript/src/renderer/processors/Rects.d.ts +2 -0
- package/lib/typescript/src/renderer/processors/Transform.d.ts +1 -1
- package/lib/typescript/src/skia/Skia.d.ts +2 -35
- package/lib/typescript/src/skia/{Color.d.ts → core/Color.d.ts} +1 -2
- package/lib/typescript/src/skia/core/Data.d.ts +5 -0
- package/lib/typescript/src/skia/core/Font.d.ts +5 -0
- package/lib/typescript/src/skia/core/Image.d.ts +5 -0
- package/lib/typescript/src/skia/{Paint/usePaint.d.ts → core/Paint.d.ts} +2 -1
- package/lib/typescript/src/skia/{Path/usePath.d.ts → core/Path.d.ts} +1 -2
- package/lib/typescript/src/skia/{Picture/usePicture.d.ts → core/Picture.d.ts} +1 -3
- package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/{Shader/useShader.d.ts → core/Shader.d.ts} +0 -0
- package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/core/index.d.ts +10 -0
- package/lib/typescript/src/skia/index.d.ts +2 -23
- package/lib/typescript/src/skia/{Canvas.d.ts → types/Canvas.d.ts} +0 -0
- package/lib/typescript/src/skia/types/Color.d.ts +2 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.d.ts +0 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{ContourMeasure.d.ts → types/ContourMeasure.d.ts} +0 -0
- package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
- package/lib/typescript/src/skia/{Data → types/Data}/DataFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Data → types/Data}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{Font → types/Font}/Font.d.ts +1 -1
- package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgr.d.ts +1 -1
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/index.d.ts +1 -0
- package/lib/typescript/src/skia/{Image → types/Image}/Image.d.ts +2 -2
- package/lib/typescript/src/skia/{Image → types/Image}/ImageFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Image → types/Image}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.d.ts +0 -0
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.d.ts +2 -2
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{JsiInstance.d.ts → types/JsiInstance.d.ts} +0 -0
- package/lib/typescript/src/skia/{MaskFilter.d.ts → types/MaskFilter.d.ts} +3 -3
- package/lib/typescript/src/skia/{Matrix.d.ts → types/Matrix.d.ts} +0 -0
- package/lib/typescript/src/skia/{Paint → types/Paint}/BlendMode.d.ts +0 -0
- package/lib/typescript/src/skia/{Paint → types/Paint}/Paint.d.ts +5 -6
- package/lib/typescript/src/skia/{Paint → types/Paint}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Path → types/Path}/Path.d.ts +0 -0
- package/lib/typescript/src/skia/{Path → types/Path}/PathFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Path → types/Path}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{PathEffect.d.ts → types/PathEffect.d.ts} +10 -10
- package/lib/typescript/src/skia/{Picture → types/Picture}/Picture.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureRecorder.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Point.d.ts → types/Point.d.ts} +0 -0
- package/lib/typescript/src/skia/{RRect.d.ts → types/RRect.d.ts} +0 -0
- package/lib/typescript/src/skia/{RSXform.d.ts → types/RSXform.d.ts} +0 -0
- package/lib/typescript/src/skia/{Rect.d.ts → types/Rect.d.ts} +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.d.ts +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{SVG → types/SVG}/SVG.d.ts +0 -0
- package/lib/typescript/src/skia/{SVG → types/SVG}/SVGFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{SVG → types/SVG}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Shader → types/Shader}/Shader.d.ts +0 -0
- package/lib/typescript/src/skia/{Shader → types/Shader}/ShaderFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Shader → types/Shader}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{SkiaApi.d.ts → types/Skia.d.ts} +2 -5
- package/lib/typescript/src/skia/{Surface → types/Surface}/Surface.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/SurfaceFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{TextBlob.d.ts → types/TextBlob.d.ts} +0 -0
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/Typeface.d.ts +0 -0
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/TypefaceFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/Vertices.d.ts +0 -0
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/index.d.ts +0 -0
- package/lib/typescript/src/skia/types/index.d.ts +28 -0
- package/lib/typescript/src/skia/web/api/Host.d.ts +18 -0
- package/lib/typescript/src/skia/web/api/JsiSkCanvas.d.ts +44 -0
- package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +3 -0
- package/lib/typescript/src/skia/web/api/JsiSkColorFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/api/JsiSkImage.d.ts +12 -0
- package/lib/typescript/src/skia/web/api/JsiSkPaint.d.ts +26 -0
- package/lib/typescript/src/skia/web/api/JsiSkRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/api/JsiSkSurface.d.ts +8 -0
- package/lib/typescript/src/skia/web/api/JsiSkSurfaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/api/index.d.ts +10 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -0
- package/lib/typescript/src/values/api.d.ts +1 -1
- package/lib/typescript/src/values/api.web.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useValue.d.ts +2 -2
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +2 -2
- package/lib/typescript/src/values/types.d.ts +5 -5
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +2 -2
- package/lib/typescript/src/views/SkiaView.d.ts +4 -4
- package/lib/typescript/src/views/types.d.ts +3 -4
- package/package.json +5 -3
- package/src/animation/decay/runDecay.ts +5 -2
- package/src/animation/functions/interpolateColors.ts +1 -2
- package/src/animation/spring/runSpring.ts +2 -2
- package/src/animation/spring/useSpring.ts +2 -2
- package/src/animation/timing/createTiming.ts +2 -2
- package/src/animation/timing/runTiming.ts +2 -2
- package/src/animation/timing/useTiming.ts +2 -2
- package/src/index.ts +0 -1
- package/src/renderer/Canvas.tsx +4 -5
- package/src/renderer/DependencyManager.tsx +2 -2
- package/src/renderer/DrawingContext.ts +1 -2
- package/src/renderer/components/Blend.tsx +1 -2
- package/src/renderer/components/Compose.tsx +1 -3
- package/src/renderer/components/colorFilters/Lerp.tsx +1 -2
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +1 -2
- package/src/renderer/components/imageFilters/InnerShadow.tsx +1 -2
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +1 -1
- package/src/renderer/components/imageFilters/Shadow.tsx +2 -3
- package/src/renderer/components/maskFilters/Blur.tsx +1 -2
- package/src/renderer/components/pathEffects/Corner.tsx +1 -2
- package/src/renderer/components/pathEffects/Dash.tsx +1 -2
- package/src/renderer/components/pathEffects/Discrete.tsx +1 -2
- package/src/renderer/components/pathEffects/Line2D.tsx +2 -3
- package/src/renderer/components/pathEffects/Path1D.tsx +1 -2
- package/src/renderer/components/pathEffects/Path2D.tsx +2 -3
- package/src/renderer/components/pathEffects/Sum.tsx +1 -2
- package/src/renderer/components/shaders/Gradient.ts +1 -1
- package/src/renderer/components/shapes/Box.tsx +1 -3
- package/src/renderer/components/shapes/DiffRect.tsx +1 -1
- package/src/renderer/components/shapes/Patch.tsx +1 -2
- package/src/renderer/components/text/TextBlob.tsx +1 -1
- package/src/renderer/components/text/TextPath.tsx +1 -2
- package/src/renderer/index.ts +1 -0
- package/src/renderer/nodes/Declaration.tsx +1 -1
- package/src/renderer/nodes/Node.ts +1 -1
- package/src/renderer/processors/Animations/Animations.ts +5 -8
- package/src/renderer/processors/Clips.ts +1 -2
- package/src/renderer/processors/Font.ts +1 -2
- package/src/renderer/processors/Rects.ts +4 -0
- package/src/renderer/processors/Transform.ts +1 -1
- package/src/skia/Skia.ts +2 -38
- package/src/skia/__tests__/Rects.spec.ts +40 -0
- package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
- package/src/skia/{Color.ts → core/Color.ts} +2 -6
- package/src/skia/core/Data.ts +78 -0
- package/src/skia/{Font/useFont.ts → core/Font.ts} +8 -5
- package/src/skia/core/Image.ts +12 -0
- package/src/skia/{Paint/usePaint.ts → core/Paint.ts} +7 -2
- package/src/skia/{Path/usePath.ts → core/Path.ts} +1 -3
- package/src/skia/{Picture/usePicture.ts → core/Picture.ts} +1 -4
- package/src/skia/core/SVG.ts +9 -0
- package/src/skia/{Shader/useShader.ts → core/Shader.ts} +0 -0
- package/src/skia/core/Typeface.ts +11 -0
- package/src/skia/core/index.ts +10 -0
- package/src/skia/index.ts +2 -23
- package/src/skia/{Canvas.ts → types/Canvas.ts} +0 -0
- package/src/skia/types/Color.ts +4 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.ts +0 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.ts +1 -1
- package/src/skia/{ColorFilter → types/ColorFilter}/index.ts +0 -0
- package/src/skia/{ContourMeasure.tsx → types/ContourMeasure.tsx} +0 -0
- package/src/skia/types/Data/Data.ts +5 -0
- package/src/skia/{Data → types/Data}/DataFactory.ts +0 -0
- package/src/skia/{Data → types/Data}/index.ts +0 -0
- package/src/skia/{Font → types/Font}/Font.ts +1 -1
- package/src/skia/types/Font/index.ts +1 -0
- package/src/skia/{FontMgr → types/FontMgr}/FontMgr.ts +1 -1
- package/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.ts +1 -6
- package/src/skia/{FontMgr → types/FontMgr}/index.ts +1 -0
- package/src/skia/{Image → types/Image}/Image.ts +2 -2
- package/src/skia/{Image → types/Image}/ImageFactory.ts +0 -0
- package/src/skia/{Image → types/Image}/index.ts +0 -1
- package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.ts +0 -0
- package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.ts +2 -2
- package/src/skia/{ImageFilter → types/ImageFilter}/index.ts +0 -0
- package/src/skia/{JsiInstance.ts → types/JsiInstance.ts} +0 -0
- package/src/skia/{MaskFilter.ts → types/MaskFilter.ts} +3 -3
- package/src/skia/{Matrix.ts → types/Matrix.ts} +0 -0
- package/src/skia/{Paint → types/Paint}/BlendMode.ts +0 -0
- package/src/skia/{Paint → types/Paint}/Paint.ts +5 -12
- package/src/skia/{Paint → types/Paint}/index.ts +0 -1
- package/src/skia/{Path → types/Path}/Path.ts +0 -0
- package/src/skia/{Path → types/Path}/PathFactory.ts +0 -0
- package/src/skia/{Path → types/Path}/index.ts +0 -1
- package/src/skia/{PathEffect.ts → types/PathEffect.ts} +14 -10
- package/src/skia/{Picture → types/Picture}/Picture.ts +0 -0
- package/src/skia/{Picture → types/Picture}/PictureFactory.ts +0 -0
- package/src/skia/{Picture → types/Picture}/PictureRecorder.ts +0 -0
- package/src/skia/{Picture → types/Picture}/index.ts +0 -1
- package/src/skia/{Point.ts → types/Point.ts} +0 -0
- package/src/skia/{RRect.ts → types/RRect.ts} +0 -0
- package/src/skia/{RSXform.ts → types/RSXform.ts} +0 -0
- package/src/skia/{Rect.ts → types/Rect.ts} +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.ts +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.ts +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.ts +0 -0
- package/src/skia/{SVG → types/SVG}/SVG.ts +0 -0
- package/src/skia/{SVG → types/SVG}/SVGFactory.ts +1 -1
- package/src/skia/{SVG → types/SVG}/index.ts +0 -1
- package/src/skia/{Shader → types/Shader}/Shader.ts +0 -0
- package/src/skia/{Shader → types/Shader}/ShaderFactory.ts +0 -0
- package/src/skia/{Shader → types/Shader}/index.ts +0 -1
- package/src/skia/{SkiaApi.ts → types/Skia.ts} +6 -8
- package/src/skia/{Surface → types/Surface}/Surface.ts +0 -0
- package/src/skia/{Surface → types/Surface}/SurfaceFactory.ts +0 -0
- package/src/skia/{Surface → types/Surface}/index.ts +0 -0
- package/src/skia/{TextBlob.ts → types/TextBlob.ts} +0 -0
- package/src/skia/{Typeface → types/Typeface}/Typeface.ts +0 -0
- package/src/skia/{Typeface → types/Typeface}/TypefaceFactory.ts +1 -1
- package/src/skia/{Typeface → types/Typeface}/index.ts +0 -1
- package/src/skia/{Vertices → types/Vertices}/Vertices.tsx +0 -0
- package/src/skia/{Vertices → types/Vertices}/index.ts +0 -0
- package/src/skia/types/index.ts +28 -0
- package/src/skia/web/api/Host.ts +50 -0
- package/src/skia/web/api/JsiSkCanvas.ts +322 -0
- package/src/skia/web/api/JsiSkColor.ts +181 -0
- package/src/skia/web/api/JsiSkColorFilter.ts +14 -0
- package/src/skia/web/api/JsiSkImage.ts +66 -0
- package/src/skia/web/api/JsiSkPaint.ts +103 -0
- package/src/skia/web/api/JsiSkRect.ts +27 -0
- package/src/skia/web/api/JsiSkSurface.ts +25 -0
- package/src/skia/web/api/JsiSkSurfaceFactory.ts +20 -0
- package/src/skia/web/api/index.ts +15 -0
- package/src/skia/web/index.ts +1 -0
- package/src/values/hooks/useValue.ts +2 -2
- package/src/values/hooks/useValueEffect.ts +2 -5
- package/src/values/types.ts +6 -6
- package/src/values/web/RNSkReadonlyValue.ts +2 -2
- package/src/values/web/api.ts +4 -4
- package/src/views/SkiaView.tsx +3 -3
- package/src/views/types.ts +3 -4
- package/lib/commonjs/skia/Color.js.map +0 -1
- package/lib/commonjs/skia/Data/Data.js.map +0 -1
- package/lib/commonjs/skia/Font/Font.js.map +0 -1
- package/lib/commonjs/skia/Font/useFont.js.map +0 -1
- package/lib/commonjs/skia/Image/index.js.map +0 -1
- package/lib/commonjs/skia/Image/useImage.js.map +0 -1
- package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/commonjs/skia/MaskFilter.js.map +0 -1
- package/lib/commonjs/skia/Paint/Paint.js.map +0 -1
- package/lib/commonjs/skia/Paint/usePaint.js.map +0 -1
- package/lib/commonjs/skia/Path/index.js.map +0 -1
- package/lib/commonjs/skia/Path/usePath.js.map +0 -1
- package/lib/commonjs/skia/PathEffect.js.map +0 -1
- package/lib/commonjs/skia/Picture/index.js.map +0 -1
- package/lib/commonjs/skia/Picture/usePicture.js.map +0 -1
- package/lib/commonjs/skia/SVG/index.js.map +0 -1
- package/lib/commonjs/skia/SVG/useSvg.js +0 -15
- package/lib/commonjs/skia/SVG/useSvg.js.map +0 -1
- package/lib/commonjs/skia/Shader/index.js.map +0 -1
- package/lib/commonjs/skia/Shader/useShader.js.map +0 -1
- package/lib/commonjs/skia/SkiaApi.js +0 -4
- package/lib/commonjs/skia/SkiaApi.js.map +0 -1
- package/lib/commonjs/skia/Typeface/index.js.map +0 -1
- package/lib/commonjs/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/module/skia/Color.js.map +0 -1
- package/lib/module/skia/Data/Data.js +0 -35
- package/lib/module/skia/Data/Data.js.map +0 -1
- package/lib/module/skia/Font/Font.js.map +0 -1
- package/lib/module/skia/Font/index.js +0 -3
- package/lib/module/skia/Font/index.js.map +0 -1
- package/lib/module/skia/Font/useFont.js.map +0 -1
- package/lib/module/skia/FontMgr/index.js +0 -2
- package/lib/module/skia/FontMgr/index.js.map +0 -1
- package/lib/module/skia/Image/index.js +0 -4
- package/lib/module/skia/Image/index.js.map +0 -1
- package/lib/module/skia/Image/useImage.js +0 -8
- package/lib/module/skia/Image/useImage.js.map +0 -1
- package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/module/skia/MaskFilter.js.map +0 -1
- package/lib/module/skia/Paint/Paint.js.map +0 -1
- package/lib/module/skia/Paint/index.js +0 -4
- package/lib/module/skia/Paint/index.js.map +0 -1
- package/lib/module/skia/Paint/usePaint.js.map +0 -1
- package/lib/module/skia/Path/index.js +0 -4
- package/lib/module/skia/Path/index.js.map +0 -1
- package/lib/module/skia/Path/usePath.js.map +0 -1
- package/lib/module/skia/PathEffect.js.map +0 -1
- package/lib/module/skia/Picture/index.js.map +0 -1
- package/lib/module/skia/Picture/usePicture.js.map +0 -1
- package/lib/module/skia/SVG/index.js +0 -4
- package/lib/module/skia/SVG/index.js.map +0 -1
- package/lib/module/skia/SVG/useSvg.js +0 -4
- package/lib/module/skia/SVG/useSvg.js.map +0 -1
- package/lib/module/skia/Shader/index.js +0 -4
- package/lib/module/skia/Shader/index.js.map +0 -1
- package/lib/module/skia/Shader/useShader.js.map +0 -1
- package/lib/module/skia/SkiaApi.js +0 -2
- package/lib/module/skia/SkiaApi.js.map +0 -1
- package/lib/module/skia/Typeface/index.js +0 -4
- package/lib/module/skia/Typeface/index.js.map +0 -1
- package/lib/module/skia/Typeface/useTypeface.js +0 -8
- package/lib/module/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/typescript/src/skia/Data/Data.d.ts +0 -9
- package/lib/typescript/src/skia/Font/index.d.ts +0 -2
- package/lib/typescript/src/skia/Font/useFont.d.ts +0 -6
- package/lib/typescript/src/skia/Image/useImage.d.ts +0 -5
- package/lib/typescript/src/skia/SVG/useSvg.d.ts +0 -2
- package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +0 -5
- package/src/skia/Data/Data.ts +0 -61
- package/src/skia/Font/index.ts +0 -2
- package/src/skia/Image/useImage.ts +0 -9
- package/src/skia/SVG/useSvg.ts +0 -6
- package/src/skia/Typeface/useTypeface.ts +0 -9
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import { isPathEffect } from "../../../skia/PathEffect";
|
8
7
|
|
9
8
|
export interface DashPathEffectProps {
|
10
9
|
intervals: number[];
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import { isPathEffect } from "../../../skia/PathEffect";
|
8
7
|
|
9
8
|
export interface DiscretePathEffectProps {
|
10
9
|
length: number;
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import {
|
8
|
-
import type { SkMatrix } from "../../../skia/Matrix";
|
7
|
+
import type { SkMatrix } from "../../../skia";
|
9
8
|
|
10
9
|
export interface Line2DPathEffectProps {
|
11
10
|
children?: ReactNode | ReactNode[];
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, Path1DEffectStyle, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import { Path1DEffectStyle, isPathEffect } from "../../../skia/PathEffect";
|
8
7
|
import type { SkEnum } from "../../processors/Paint";
|
9
8
|
import { enumKey } from "../../processors/Paint";
|
10
9
|
import type { PathDef } from "../../processors/Paths";
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import {
|
8
|
-
import type { SkMatrix } from "../../../skia/Matrix";
|
7
|
+
import type { SkMatrix } from "../../../skia";
|
9
8
|
import type { PathDef } from "../../processors/Paths";
|
10
9
|
import { processPath } from "../../processors/Paths";
|
11
10
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { ReactNode } from "react";
|
3
3
|
|
4
|
-
import { Skia } from "../../../skia";
|
4
|
+
import { Skia, isPathEffect } from "../../../skia";
|
5
5
|
import { createDeclaration } from "../../nodes/Declaration";
|
6
6
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
7
|
-
import { isPathEffect } from "../../../skia/PathEffect";
|
8
7
|
|
9
8
|
export interface SumPathEffectProps {
|
10
9
|
children?: ReactNode | ReactNode[];
|
@@ -3,7 +3,7 @@ import type { SkEnum } from "../../processors/Paint";
|
|
3
3
|
import type { TransformProps } from "../../processors/Transform";
|
4
4
|
import { enumKey } from "../../processors/Paint";
|
5
5
|
import { localMatrix } from "../../processors/Transform";
|
6
|
-
import type { Color } from "../../../skia
|
6
|
+
import type { Color } from "../../../skia";
|
7
7
|
|
8
8
|
export interface GradientProps extends TransformProps {
|
9
9
|
colors: Color[];
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import React from "react";
|
2
2
|
|
3
|
-
import type { Color, SkRRect } from "../../../skia";
|
3
|
+
import type { Color, SkRRect, SkJSIInstance, SkRect } from "../../../skia";
|
4
4
|
import { ClipOp, BlurStyle, Skia, processColor } from "../../../skia";
|
5
5
|
import { createDrawing } from "../../nodes";
|
6
6
|
import type { AnimatedProps, CustomPaintProps } from "../../processors";
|
7
7
|
import { add, vec, rrect } from "../../processors";
|
8
8
|
import { rect, isRRect } from "../../processors/Rects";
|
9
9
|
import { createDeclaration } from "../../nodes/Declaration";
|
10
|
-
import type { SkJSIInstance } from "../../../skia/JsiInstance";
|
11
|
-
import type { SkRect } from "../../../skia/Rect";
|
12
10
|
|
13
11
|
const inflate = (box: SkRRect, dx: number, dy: number, tx = 0, ty = 0) =>
|
14
12
|
rrect(
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
|
3
3
|
import type { CustomPaintProps } from "../../processors";
|
4
|
-
import type { SkRRect } from "../../../skia
|
4
|
+
import type { SkRRect } from "../../../skia";
|
5
5
|
import type { AnimatedProps } from "../../processors/Animations/Animations";
|
6
6
|
import { createDrawing } from "../../nodes/Drawing";
|
7
7
|
|
@@ -8,9 +8,8 @@ import type {
|
|
8
8
|
} from "../../processors";
|
9
9
|
import { enumKey } from "../../processors";
|
10
10
|
import type { SkPoint, Color } from "../../../skia";
|
11
|
-
import { BlendMode } from "../../../skia";
|
11
|
+
import { BlendMode, processColor } from "../../../skia";
|
12
12
|
import { createDrawing } from "../../nodes";
|
13
|
-
import { processColor } from "../../../skia/Color";
|
14
13
|
|
15
14
|
export interface CubicBezierHandle {
|
16
15
|
pos: Vector;
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
2
2
|
|
3
3
|
import type { CustomPaintProps, AnimatedProps } from "../../processors";
|
4
4
|
import { createDrawing } from "../../nodes/Drawing";
|
5
|
-
import type { SkTextBlob } from "../../../skia
|
5
|
+
import type { SkTextBlob } from "../../../skia";
|
6
6
|
|
7
7
|
export interface TextBlobProps extends CustomPaintProps {
|
8
8
|
blob: SkTextBlob;
|
@@ -2,8 +2,7 @@ import React from "react";
|
|
2
2
|
|
3
3
|
import type { CustomPaintProps, AnimatedProps } from "../../processors";
|
4
4
|
import { createDrawing } from "../../nodes";
|
5
|
-
import type { SkPath } from "../../../skia
|
6
|
-
import type { SkRSXform } from "../../../skia/RSXform";
|
5
|
+
import type { SkPath, SkRSXform } from "../../../skia";
|
7
6
|
import { Skia } from "../../../skia/Skia";
|
8
7
|
import type { FontDef } from "../../processors/Font";
|
9
8
|
import { processFont } from "../../processors/Font";
|
package/src/renderer/index.ts
CHANGED
@@ -2,10 +2,10 @@ import type { DependencyList } from "react";
|
|
2
2
|
import { useCallback } from "react";
|
3
3
|
|
4
4
|
import type { DrawingContext } from "../DrawingContext";
|
5
|
-
import type { SkJSIInstance } from "../../skia/JsiInstance";
|
6
5
|
import type { AnimatedProps } from "../processors";
|
7
6
|
import { isAnimated, materialize } from "../processors";
|
8
7
|
import type { DependencyManager } from "../DependencyManager";
|
8
|
+
import type { SkJSIInstance } from "../../skia";
|
9
9
|
|
10
10
|
import { Node } from "./Node";
|
11
11
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { SkJSIInstance } from "../../skia
|
1
|
+
import type { SkJSIInstance } from "../../skia";
|
2
2
|
import type { DependencyManager } from "../DependencyManager";
|
3
3
|
import type { DrawingContext } from "../DrawingContext";
|
4
4
|
import type { AnimatedProps } from "../processors";
|
@@ -1,12 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkiaValue } from "../../../values";
|
2
2
|
import type { DrawingContext } from "../../DrawingContext";
|
3
3
|
import { mapKeys } from "../../typeddash";
|
4
4
|
|
5
5
|
export type FrameValue<T> = (ctx: DrawingContext) => T;
|
6
6
|
|
7
|
-
export const isValue = (
|
8
|
-
value: unknown
|
9
|
-
): value is SkiaReadonlyValue<unknown> => {
|
7
|
+
export const isValue = (value: unknown): value is SkiaValue<unknown> => {
|
10
8
|
if (value === undefined || value === null) {
|
11
9
|
return false;
|
12
10
|
}
|
@@ -14,8 +12,7 @@ export const isValue = (
|
|
14
12
|
if (
|
15
13
|
typeof value === "object" &&
|
16
14
|
"__typename__" in value &&
|
17
|
-
(value as unknown as
|
18
|
-
"RNSkValue"
|
15
|
+
(value as unknown as SkiaValue<unknown>).__typename__ === "RNSkValue"
|
19
16
|
) {
|
20
17
|
return true;
|
21
18
|
}
|
@@ -37,12 +34,12 @@ export const materialize = <T>(props: AnimatedProps<T>) => {
|
|
37
34
|
mapKeys(props).forEach((key) => {
|
38
35
|
const value = props[key];
|
39
36
|
if (isValue(value)) {
|
40
|
-
result[key] = (value as
|
37
|
+
result[key] = (value as SkiaValue<T[typeof key]>).current;
|
41
38
|
}
|
42
39
|
});
|
43
40
|
return result as T;
|
44
41
|
};
|
45
42
|
|
46
43
|
export type AnimatedProps<T> = {
|
47
|
-
[K in keyof T]: T[K] |
|
44
|
+
[K in keyof T]: T[K] | SkiaValue<T[K]>;
|
48
45
|
};
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import type { SkCanvas, ClipOp } from "../../skia
|
2
|
-
import type { SkRect, SkRRect } from "../../skia";
|
1
|
+
import type { SkCanvas, ClipOp, SkRect, SkRRect } from "../../skia";
|
3
2
|
|
4
3
|
import type { PathDef } from "./Paths";
|
5
4
|
import { processPath, isPathDef } from "./Paths";
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import type { SkFont } from "../../skia";
|
1
|
+
import type { FontMgr, SkFont } from "../../skia";
|
2
2
|
import { Skia } from "../../skia/Skia";
|
3
|
-
import type { FontMgr } from "../../skia/FontMgr/FontMgr";
|
4
3
|
|
5
4
|
export type FontDef = { font: SkFont } | { familyName: string; size: number };
|
6
5
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import type { SkRect, SkRRect } from "../../skia";
|
3
3
|
import { Skia } from "../../skia";
|
4
4
|
|
5
|
+
import type { Vector } from "./math/Vector";
|
5
6
|
import { vec } from "./math/Vector";
|
6
7
|
import type { Radius } from "./Radius";
|
7
8
|
import { processRadius } from "./Radius";
|
@@ -22,6 +23,9 @@ export const bounds = (rects: SkRect[]) => {
|
|
22
23
|
return rect(x, y, width, height);
|
23
24
|
};
|
24
25
|
|
26
|
+
export const isEdge = (pos: Vector, b: SkRect) =>
|
27
|
+
pos.x === b.x || pos.y === b.y || pos.x === b.width || pos.y === b.height;
|
28
|
+
|
25
29
|
export const topLeft = (r: SkRect | SkRRect) =>
|
26
30
|
isRRect(r) ? vec(r.rect.x, r.rect.y) : vec(r.x, r.y);
|
27
31
|
export const topRight = (r: SkRect | SkRRect) =>
|
package/src/skia/Skia.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
/*global SkiaApi*/
|
2
|
-
import "./
|
3
|
-
import type { SkiaApi as SkSkiaApi } from "./SkiaApi";
|
2
|
+
import type { Skia as SkSkiaApi } from "./types";
|
4
3
|
|
5
4
|
/**
|
6
5
|
* Declares the SkiaApi as an available object in the global scope
|
@@ -9,39 +8,4 @@ declare global {
|
|
9
8
|
var SkiaApi: SkSkiaApi;
|
10
9
|
}
|
11
10
|
|
12
|
-
|
13
|
-
* Declares the implemented API with overrides.
|
14
|
-
*/
|
15
|
-
export const Skia = {
|
16
|
-
// Factories
|
17
|
-
Typeface: SkiaApi.Typeface,
|
18
|
-
MaskFilter: SkiaApi.MaskFilter,
|
19
|
-
RuntimeEffect: SkiaApi.RuntimeEffect,
|
20
|
-
Shader: SkiaApi.Shader,
|
21
|
-
ImageFilter: SkiaApi.ImageFilter,
|
22
|
-
PathEffect: SkiaApi.PathEffect,
|
23
|
-
Data: SkiaApi.Data,
|
24
|
-
SVG: SkiaApi.SVG,
|
25
|
-
FontMgr: SkiaApi.FontMgr,
|
26
|
-
TextBlob: SkiaApi.TextBlob,
|
27
|
-
// Constructors
|
28
|
-
Matrix: SkiaApi.Matrix,
|
29
|
-
Font: SkiaApi.Font,
|
30
|
-
Point: SkiaApi.Point,
|
31
|
-
XYWHRect: SkiaApi.XYWHRect,
|
32
|
-
RRectXY: SkiaApi.RRectXY,
|
33
|
-
RuntimeShaderBuilder: SkiaApi.RuntimeShaderBuilder,
|
34
|
-
Paint: SkiaApi.Paint,
|
35
|
-
PictureRecorder: SkiaApi.PictureRecorder,
|
36
|
-
Picture: SkiaApi.Picture,
|
37
|
-
Path: SkiaApi.Path,
|
38
|
-
ColorFilter: SkiaApi.ColorFilter,
|
39
|
-
ContourMeasureIter: SkiaApi.ContourMeasureIter,
|
40
|
-
Color: SkiaApi.Color,
|
41
|
-
RSXform: SkiaApi.RSXform,
|
42
|
-
// For the following methods the factory symmetry is broken to be comptatible with CanvasKit
|
43
|
-
MakeSurface: SkiaApi.Surface.Make,
|
44
|
-
MakeImageFromEncoded: SkiaApi.Image.MakeImageFromEncoded,
|
45
|
-
MakeImage: SkiaApi.Image.MakeImage,
|
46
|
-
MakeVertices: SkiaApi.MakeVertices,
|
47
|
-
};
|
11
|
+
export const Skia = SkiaApi;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import fs from "fs";
|
2
|
+
import path from "path";
|
3
|
+
|
4
|
+
import CanvasKitInit from "canvaskit-wasm";
|
5
|
+
|
6
|
+
import { JsiSkApi } from "../web";
|
7
|
+
|
8
|
+
//import type { SkiaApi } from "../SkiaApi";
|
9
|
+
|
10
|
+
let Skia: ReturnType<typeof JsiSkApi>;
|
11
|
+
|
12
|
+
beforeAll(async () => {
|
13
|
+
const CanvasKit = await CanvasKitInit();
|
14
|
+
Skia = JsiSkApi(CanvasKit);
|
15
|
+
});
|
16
|
+
|
17
|
+
describe("Draw a rectangle", () => {
|
18
|
+
it("Check that CanvasKit and CanvasKit are loaded", async () => {
|
19
|
+
expect(Skia).toBeDefined();
|
20
|
+
});
|
21
|
+
it("Draws a lightblue rectange", () => {
|
22
|
+
const paint = Skia.Paint();
|
23
|
+
paint.setColor(Skia.Color("lightblue"));
|
24
|
+
const rct = Skia.XYWHRect(64, 64, 128, 128);
|
25
|
+
const surface = Skia.Surface.Make(256, 256);
|
26
|
+
expect(surface).toBeDefined();
|
27
|
+
if (!surface) {
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
const canvas = surface.getCanvas();
|
31
|
+
canvas.drawRect(rct, paint);
|
32
|
+
surface.ref.flush();
|
33
|
+
const image = surface.makeImageSnapshot();
|
34
|
+
const png = image.encodeToBytes();
|
35
|
+
const ref = fs.readFileSync(
|
36
|
+
path.resolve(__dirname, "snapshots/lightblue-rect.png")
|
37
|
+
);
|
38
|
+
expect(ref.equals(png)).toBe(true);
|
39
|
+
});
|
40
|
+
});
|
Binary file
|
@@ -1,9 +1,5 @@
|
|
1
|
-
import { Skia } from "
|
2
|
-
|
3
|
-
// This is the JSI color
|
4
|
-
export type SkColor = Float32Array;
|
5
|
-
// Input colors can be string, number or Float32Array
|
6
|
-
export type Color = string | Float32Array | number;
|
1
|
+
import { Skia } from "../Skia";
|
2
|
+
import type { Color } from "../types";
|
7
3
|
|
8
4
|
export const RED = 0;
|
9
5
|
export const GREEN = 1;
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import type { DependencyList } from "react";
|
2
|
+
import { useRef, useEffect, useState } from "react";
|
3
|
+
import { Image } from "react-native";
|
4
|
+
|
5
|
+
import { Skia } from "../Skia";
|
6
|
+
import type { Data, DataSource } from "../types";
|
7
|
+
|
8
|
+
export const useDataCollection = <T>(
|
9
|
+
sources: DataSource[],
|
10
|
+
factory: (data: Data[]) => T,
|
11
|
+
deps: DependencyList = []
|
12
|
+
) => {
|
13
|
+
const [data, setData] = useState<T | null>(null);
|
14
|
+
useEffect(() => {
|
15
|
+
const bytesOrURIs = sources.map((source) => {
|
16
|
+
if (source instanceof Uint8Array) {
|
17
|
+
return source;
|
18
|
+
}
|
19
|
+
return typeof source === "string"
|
20
|
+
? source
|
21
|
+
: Image.resolveAssetSource(source).uri;
|
22
|
+
});
|
23
|
+
Promise.all(
|
24
|
+
bytesOrURIs.map((bytesOrURI) =>
|
25
|
+
bytesOrURI instanceof Uint8Array
|
26
|
+
? Skia.Data.fromBytes(bytesOrURI)
|
27
|
+
: Skia.Data.fromURI(bytesOrURI)
|
28
|
+
)
|
29
|
+
).then((d) => setData(factory(d)));
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
31
|
+
}, deps);
|
32
|
+
return data;
|
33
|
+
};
|
34
|
+
|
35
|
+
export const useRawData = <T>(
|
36
|
+
source: DataSource | null | undefined,
|
37
|
+
factory: (data: Data) => T,
|
38
|
+
onError?: (err: Error) => void
|
39
|
+
) => {
|
40
|
+
const [data, setData] = useState<T | null>(null);
|
41
|
+
const prevSourceRef = useRef<DataSource | null | undefined>();
|
42
|
+
useEffect(() => {
|
43
|
+
// Track to avoid re-fetching the same data
|
44
|
+
if (prevSourceRef.current !== source) {
|
45
|
+
prevSourceRef.current = source;
|
46
|
+
if (source !== null && source !== undefined) {
|
47
|
+
const factoryWrapper = (data2: Data) => {
|
48
|
+
const factoryResult = factory(data2);
|
49
|
+
if (factoryResult === null) {
|
50
|
+
onError && onError(new Error("Could not load data"));
|
51
|
+
setData(null);
|
52
|
+
} else {
|
53
|
+
setData(factoryResult);
|
54
|
+
}
|
55
|
+
};
|
56
|
+
if (source instanceof Uint8Array) {
|
57
|
+
factoryWrapper(Skia.Data.fromBytes(source));
|
58
|
+
} else {
|
59
|
+
const uri =
|
60
|
+
typeof source === "string"
|
61
|
+
? source
|
62
|
+
: Image.resolveAssetSource(source).uri;
|
63
|
+
Skia.Data.fromURI(uri).then((d) => factoryWrapper(d));
|
64
|
+
}
|
65
|
+
}
|
66
|
+
} else {
|
67
|
+
setData(null);
|
68
|
+
}
|
69
|
+
}, [factory, onError, source]);
|
70
|
+
return data;
|
71
|
+
};
|
72
|
+
|
73
|
+
const identity = (data: Data) => data;
|
74
|
+
|
75
|
+
export const useData = (
|
76
|
+
source: DataSource | null | undefined,
|
77
|
+
onError?: (err: Error) => void
|
78
|
+
) => useRawData(source, identity, onError);
|
@@ -1,17 +1,20 @@
|
|
1
1
|
/*global SkiaApi*/
|
2
2
|
import { useMemo } from "react";
|
3
3
|
|
4
|
-
import type { DataSource } from "../Data";
|
5
4
|
import { Skia } from "../Skia";
|
6
|
-
import {
|
5
|
+
import type { DataSource, SkFont } from "../types";
|
7
6
|
|
8
|
-
import
|
7
|
+
import { useTypeface } from "./Typeface";
|
9
8
|
|
10
9
|
/**
|
11
10
|
* Returns a Skia Font object
|
12
11
|
* */
|
13
|
-
export const useFont = (
|
14
|
-
|
12
|
+
export const useFont = (
|
13
|
+
font: DataSource | null | undefined,
|
14
|
+
size?: number,
|
15
|
+
onError?: (err: Error) => void
|
16
|
+
): SkFont | null => {
|
17
|
+
const typeface = useTypeface(font, onError);
|
15
18
|
return useMemo(() => {
|
16
19
|
if (typeface === null) {
|
17
20
|
return null;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Skia } from "../Skia";
|
2
|
+
import type { DataSource } from "../types";
|
3
|
+
|
4
|
+
import { useRawData } from "./Data";
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Returns a Skia Image object
|
8
|
+
* */
|
9
|
+
export const useImage = (
|
10
|
+
source: DataSource | null | undefined,
|
11
|
+
onError?: (err: Error) => void
|
12
|
+
) => useRawData(source, Skia.Image.MakeImageFromEncoded, onError);
|
@@ -1,9 +1,14 @@
|
|
1
1
|
import type { DependencyList } from "react";
|
2
2
|
import { useMemo } from "react";
|
3
3
|
|
4
|
-
import {
|
5
|
-
import type { SkPaint } from "
|
4
|
+
import { Skia } from "../Skia";
|
5
|
+
import type { SkPaint } from "../types";
|
6
6
|
|
7
|
+
export const SkiaPaint = () => {
|
8
|
+
const paint = Skia.Paint();
|
9
|
+
paint.setAntiAlias(true);
|
10
|
+
return paint;
|
11
|
+
};
|
7
12
|
/**
|
8
13
|
* Returns a Skia Paint object
|
9
14
|
* */
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import type { DependencyList } from "react";
|
2
2
|
import { useMemo } from "react";
|
3
3
|
|
4
|
-
import type { SkFont } from "../Font";
|
5
4
|
import { Skia } from "../Skia";
|
6
|
-
|
7
|
-
import type { SkPath } from "./Path";
|
5
|
+
import type { SkFont, SkPath } from "../types";
|
8
6
|
|
9
7
|
/**
|
10
8
|
* Memoizes and returns a Skia Path object with optional initializer
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import type { DependencyList } from "react";
|
2
2
|
import { useMemo } from "react";
|
3
3
|
|
4
|
-
import type { SkCanvas } from "../Canvas";
|
5
|
-
import type { SkRect } from "../Rect";
|
6
4
|
import { Skia } from "../Skia";
|
7
|
-
|
8
|
-
import type { SkPicture } from "./Picture";
|
5
|
+
import type { SkCanvas, SkPicture, SkRect } from "../types";
|
9
6
|
|
10
7
|
/**
|
11
8
|
* Memoizes and returns an SkPicture that can be drawn to another canvas.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Skia } from "../Skia";
|
2
|
+
import type { DataSource } from "../types";
|
3
|
+
|
4
|
+
import { useRawData } from "./Data";
|
5
|
+
|
6
|
+
export const useSVG = (
|
7
|
+
source: DataSource | null | undefined,
|
8
|
+
onError?: (err: Error) => void
|
9
|
+
) => useRawData(source, Skia.SVG.MakeFromData, onError);
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Skia } from "../Skia";
|
2
|
+
import type { DataSource } from "../types";
|
3
|
+
|
4
|
+
import { useRawData } from "./Data";
|
5
|
+
/**
|
6
|
+
* Returns a Skia Typeface object
|
7
|
+
* */
|
8
|
+
export const useTypeface = (
|
9
|
+
source: DataSource | null | undefined,
|
10
|
+
onError?: (err: Error) => void
|
11
|
+
) => useRawData(source, Skia.Typeface.MakeFreeTypeFaceFromData, onError);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from "./Color";
|
2
|
+
export * from "./Data";
|
3
|
+
export * from "./Font";
|
4
|
+
export * from "./Typeface";
|
5
|
+
export * from "./Image";
|
6
|
+
export * from "./Picture";
|
7
|
+
export * from "./SVG";
|
8
|
+
export * from "./Shader";
|
9
|
+
export * from "./Paint";
|
10
|
+
export * from "./Path";
|
package/src/skia/index.ts
CHANGED
@@ -1,24 +1,3 @@
|
|
1
1
|
export { Skia } from "./Skia";
|
2
|
-
export * from "./
|
3
|
-
export * from "./
|
4
|
-
export * from "./Rect";
|
5
|
-
export * from "./RRect";
|
6
|
-
export * from "./Point";
|
7
|
-
export * from "./Path";
|
8
|
-
export * from "./Font";
|
9
|
-
export * from "./Typeface";
|
10
|
-
export * from "./MaskFilter";
|
11
|
-
export * from "./ColorFilter";
|
12
|
-
export * from "./ImageFilter";
|
13
|
-
export * from "./PathEffect";
|
14
|
-
export * from "./RuntimeEffect";
|
15
|
-
export * from "./Shader";
|
16
|
-
export * from "./Image";
|
17
|
-
export * from "./Matrix";
|
18
|
-
export * from "./SVG";
|
19
|
-
export * from "./Surface";
|
20
|
-
export * from "./FontMgr";
|
21
|
-
export * from "./Vertices";
|
22
|
-
export * from "./Color";
|
23
|
-
export * from "./Picture";
|
24
|
-
export * from "./Data";
|
2
|
+
export * from "./core";
|
3
|
+
export * from "./types";
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@ import type { SkJSIInstance } from "../JsiInstance";
|
|
2
2
|
import type { SkPaint } from "../Paint";
|
3
3
|
import type { SkRect } from "../Rect";
|
4
4
|
import type { SkPoint } from "../Point";
|
5
|
-
import type { SkTypeface } from "../Typeface
|
5
|
+
import type { SkTypeface } from "../Typeface";
|
6
6
|
|
7
7
|
export interface FontMetrics {
|
8
8
|
ascent: number; // suggested space above the baseline. < 0
|