@shopify/react-native-skia 0.1.127 → 0.1.130
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
- package/cpp/api/JsiSkRuntimeEffect.h +7 -9
- package/cpp/api/JsiSkVertices.h +0 -2
- package/cpp/rnskia/values/RNSkValue.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +7 -1
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkBitmap.h +4 -2
- package/cpp/skia/include/core/SkCanvas.h +31 -20
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +1 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
- package/cpp/skia/include/core/SkDrawable.h +7 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
- package/cpp/skia/include/core/SkFont.h +4 -3
- package/cpp/skia/include/core/SkFontArguments.h +33 -1
- package/cpp/skia/include/core/SkGraphics.h +13 -0
- package/cpp/skia/include/core/SkImage.h +67 -22
- package/cpp/skia/include/core/SkImageEncoder.h +0 -3
- package/cpp/skia/include/core/SkImageGenerator.h +4 -3
- package/cpp/skia/include/core/SkImageInfo.h +35 -142
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkPaint.h +4 -19
- package/cpp/skia/include/core/SkPath.h +20 -33
- package/cpp/skia/include/core/SkPathBuilder.h +1 -6
- package/cpp/skia/include/core/SkPixelRef.h +1 -1
- package/cpp/skia/include/core/SkPixmap.h +3 -2
- package/cpp/skia/include/core/SkRSXform.h +1 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
- package/cpp/skia/include/core/SkSpan.h +5 -5
- package/cpp/skia/include/core/SkString.h +5 -8
- package/cpp/skia/include/core/SkSurface.h +21 -0
- package/cpp/skia/include/core/SkTypeface.h +20 -4
- package/cpp/skia/include/core/SkTypes.h +9 -5
- package/cpp/skia/include/effects/SkGradientShader.h +9 -18
- package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
- package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
- package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
- package/cpp/skia/include/gpu/graphite/Context.h +124 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
- package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
- package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
- package/cpp/skia/include/ports/SkCFObject.h +0 -4
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
- package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
- package/cpp/skia/include/private/SkChecksum.h +11 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
- package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
- package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
- package/cpp/skia/include/private/SkMacros.h +13 -18
- package/cpp/skia/include/private/SkMutex.h +8 -0
- package/cpp/skia/include/private/SkPathRef.h +2 -16
- package/cpp/skia/include/private/SkSLDefines.h +9 -1
- package/cpp/skia/include/private/SkSLIRNode.h +6 -5
- package/cpp/skia/include/private/SkSLLayout.h +11 -10
- package/cpp/skia/include/private/SkSLModifiers.h +4 -3
- package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
- package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
- package/cpp/skia/include/private/SkSLStatement.h +2 -3
- package/cpp/skia/include/private/SkSLString.h +17 -56
- package/cpp/skia/include/private/SkSLSymbol.h +4 -4
- package/cpp/skia/include/private/SkShadowFlags.h +3 -1
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +4 -3
- package/cpp/skia/include/private/SkTHash.h +66 -24
- package/cpp/skia/include/private/SkTLogic.h +2 -32
- package/cpp/skia/include/private/SkTemplates.h +2 -2
- package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
- package/cpp/skia/include/private/SkVx.h +28 -28
- package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
- package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
- package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
- package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
- package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
- package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
- package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +4 -0
- package/cpp/skia/include/sksl/DSLBlock.h +8 -3
- package/cpp/skia/include/sksl/DSLCase.h +6 -6
- package/cpp/skia/include/sksl/DSLCore.h +89 -78
- package/cpp/skia/include/sksl/DSLExpression.h +78 -45
- package/cpp/skia/include/sksl/DSLFunction.h +23 -18
- package/cpp/skia/include/sksl/DSLLayout.h +14 -16
- package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
- package/cpp/skia/include/sksl/DSLStatement.h +16 -10
- package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
- package/cpp/skia/include/sksl/DSLType.h +27 -23
- package/cpp/skia/include/sksl/DSLVar.h +72 -61
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
- package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
- package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
- package/cpp/skia/include/utils/SkCamera.h +2 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
- package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
- package/cpp/skia/include/utils/SkParse.h +2 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
- package/cpp/skia/include/utils/SkTextUtils.h +8 -4
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
- package/ios/RNSkia-iOS/PlatformContext.h +1 -1
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +1 -1
- 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/shaders/Shader.js +1 -2
- package/lib/commonjs/renderer/components/shaders/Shader.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/shaders/Shader.js +1 -2
- package/lib/module/renderer/components/shaders/Shader.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/shaders/Shader.d.ts +0 -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 +2 -4
- 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/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +4 -2
- package/react-native-skia.podspec +1 -1
- 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/shaders/Shader.tsx +1 -3
- 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 +1 -8
- 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/cpp/skia/include/core/SkCustomMesh.h +0 -202
- package/cpp/skia/include/core/SkStringView.h +0 -185
- package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
- package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
- package/cpp/skia/include/private/SkTOptional.h +0 -362
- package/lib/commonjs/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 +1 @@
|
|
1
|
-
{"version":3,"sources":["Path2D.tsx"],"names":["onDeclare","children","path","matrix","child","filter","isPathEffect","pe","Skia","PathEffect","MakePath2D","MakeCompose","Path2DPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;
|
1
|
+
{"version":3,"sources":["Path2D.tsx"],"names":["onDeclare","children","path","matrix","child","filter","isPathEffect","pe","Skia","PathEffect","MakePath2D","MakeCompose","Path2DPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAIA;;;;;;AAQA,MAAMA,SAAS,GAAG,oCAChB,OAAmBC,QAAnB,KAAgC;AAAA,MAA/B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAA+B;AAC9B,QAAM,CAACC,KAAD,IAAUH,QAAQ,CAACI,MAAT,CAAgBC,kBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,UAAhB,CAA2BP,MAA3B,EAAmC,wBAAYD,IAAZ,CAAnC,CAAX;;AACA,MAAIE,KAAJ,EAAW;AACT,QAAI,CAACG,EAAL,EAAS;AACP,aAAOH,KAAP;AACD;;AACD,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,gBAAgB,GAC3BC,KAD8B,IAE3B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { SkMatrix } from \"../../../skia\";\nimport type { PathDef } from \"../../processors/Paths\";\nimport { processPath } from \"../../processors/Paths\";\n\nexport interface Path2DPathEffectProps {\n children?: ReactNode | ReactNode[];\n matrix: SkMatrix;\n path: PathDef;\n}\n\nconst onDeclare = createDeclaration<Path2DPathEffectProps>(\n ({ path, matrix }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakePath2D(matrix, processPath(path));\n if (child) {\n if (!pe) {\n return child;\n }\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const Path2DPathEffect = (\n props: AnimatedProps<Path2DPathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|
@@ -11,14 +11,12 @@ var _skia = require("../../../skia");
|
|
11
11
|
|
12
12
|
var _Declaration = require("../../nodes/Declaration");
|
13
13
|
|
14
|
-
var _PathEffect = require("../../../skia/PathEffect");
|
15
|
-
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
15
|
|
18
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
17
|
|
20
18
|
const onDeclare = (0, _Declaration.createDeclaration)((_, children) => {
|
21
|
-
const [outer, inner] = children.filter(
|
19
|
+
const [outer, inner] = children.filter(_skia.isPathEffect);
|
22
20
|
return _skia.Skia.PathEffect.MakeCompose(outer, inner);
|
23
21
|
});
|
24
22
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Sum.tsx"],"names":["onDeclare","_","children","outer","inner","filter","isPathEffect","Skia","PathEffect","MakeCompose","SumPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA
|
1
|
+
{"version":3,"sources":["Sum.tsx"],"names":["onDeclare","_","children","outer","inner","filter","isPathEffect","Skia","PathEffect","MakeCompose","SumPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAAsC,CAACC,CAAD,EAAIC,QAAJ,KAAiB;AACvE,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBF,QAAQ,CAACG,MAAT,CAAgBC,kBAAhB,CAAvB;AACA,SAAOC,WAAKC,UAAL,CAAgBC,WAAhB,CAA4BN,KAA5B,EAAmCC,KAAnC,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMM,aAAa,GAAIC,KAAD,IAA8C;AACzE,sBAAO;AAAe,IAAA,SAAS,EAAEX;AAA1B,KAAyCW,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface SumPathEffectProps {\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<SumPathEffectProps>((_, children) => {\n const [outer, inner] = children.filter(isPathEffect);\n return Skia.PathEffect.MakeCompose(outer, inner);\n});\n\nexport const SumPathEffect = (props: AnimatedProps<SumPathEffectProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Gradient.ts"],"names":["processGradientProps","colors","positions","mode","flags","transform","map","color","Skia","Color","TileMode","localMatrix"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAUO,MAAMA,oBAAoB,GAAG;AAAA,MAAC;AACnCC,IAAAA,MADmC;AAEnCC,IAAAA,SAFmC;AAGnCC,IAAAA,IAHmC;AAInCC,IAAAA,KAJmC;AAKnC,OAAGC;AALgC,GAAD;AAAA,SAMd;AACpBJ,IAAAA,MAAM,EAAEA,MAAM,CAACK,GAAP,CAAYC,KAAD,IAAWC,WAAKC,KAAL,CAAWF,KAAX,CAAtB,CADY;AAEpBL,IAAAA,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAe,IAFJ;AAGpBC,IAAAA,IAAI,EAAEO,eAAS,oBAAQP,IAAR,aAAQA,IAAR,cAAQA,IAAR,GAAgB,OAAhB,CAAT,CAHc;AAIpBC,IAAAA,KAJoB;AAKpBO,IAAAA,WAAW,EAAE,4BAAYN,SAAZ;AALO,GANc;AAAA,CAA7B","sourcesContent":["import { Skia, TileMode } from \"../../../skia\";\nimport type { SkEnum } from \"../../processors/Paint\";\nimport type { TransformProps } from \"../../processors/Transform\";\nimport { enumKey } from \"../../processors/Paint\";\nimport { localMatrix } from \"../../processors/Transform\";\nimport type { Color } from \"../../../skia
|
1
|
+
{"version":3,"sources":["Gradient.ts"],"names":["processGradientProps","colors","positions","mode","flags","transform","map","color","Skia","Color","TileMode","localMatrix"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAUO,MAAMA,oBAAoB,GAAG;AAAA,MAAC;AACnCC,IAAAA,MADmC;AAEnCC,IAAAA,SAFmC;AAGnCC,IAAAA,IAHmC;AAInCC,IAAAA,KAJmC;AAKnC,OAAGC;AALgC,GAAD;AAAA,SAMd;AACpBJ,IAAAA,MAAM,EAAEA,MAAM,CAACK,GAAP,CAAYC,KAAD,IAAWC,WAAKC,KAAL,CAAWF,KAAX,CAAtB,CADY;AAEpBL,IAAAA,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAe,IAFJ;AAGpBC,IAAAA,IAAI,EAAEO,eAAS,oBAAQP,IAAR,aAAQA,IAAR,cAAQA,IAAR,GAAgB,OAAhB,CAAT,CAHc;AAIpBC,IAAAA,KAJoB;AAKpBO,IAAAA,WAAW,EAAE,4BAAYN,SAAZ;AALO,GANc;AAAA,CAA7B","sourcesContent":["import { Skia, TileMode } from \"../../../skia\";\nimport type { SkEnum } from \"../../processors/Paint\";\nimport type { TransformProps } from \"../../processors/Transform\";\nimport { enumKey } from \"../../processors/Paint\";\nimport { localMatrix } from \"../../processors/Transform\";\nimport type { Color } from \"../../../skia\";\n\nexport interface GradientProps extends TransformProps {\n colors: Color[];\n positions?: number[];\n mode?: SkEnum<typeof TileMode>;\n flags?: number;\n}\n\nexport const processGradientProps = ({\n colors,\n positions,\n mode,\n flags,\n ...transform\n}: GradientProps) => ({\n colors: colors.map((color) => Skia.Color(color)),\n positions: positions ?? null,\n mode: TileMode[enumKey(mode ?? \"clamp\")],\n flags,\n localMatrix: localMatrix(transform),\n});\n"]}
|
@@ -33,7 +33,6 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
|
|
33
33
|
let {
|
34
34
|
uniforms,
|
35
35
|
source,
|
36
|
-
opaque,
|
37
36
|
...transform
|
38
37
|
} = _ref;
|
39
38
|
const processedUniforms = new Array(source.getUniformCount()).fill(0).flatMap((_, i) => {
|
@@ -64,7 +63,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
|
|
64
63
|
console.warn("Unused uniforms were provided: " + unusedUniform.join(", "));
|
65
64
|
}
|
66
65
|
|
67
|
-
return source.makeShaderWithChildren(processedUniforms,
|
66
|
+
return source.makeShaderWithChildren(processedUniforms, children.filter(_skia.isShader), (0, _processors.localMatrix)(transform));
|
68
67
|
});
|
69
68
|
|
70
69
|
const Shader = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Shader.tsx"],"names":["isVector","obj","x","undefined","y","processValue","value","onDeclare","children","uniforms","source","
|
1
|
+
{"version":3,"sources":["Shader.tsx"],"names":["isVector","obj","x","undefined","y","processValue","value","onDeclare","children","uniforms","source","transform","processedUniforms","Array","getUniformCount","fill","flatMap","_","i","name","getUniformName","Error","isArray","names","Object","keys","length","usedUniforms","map","unusedUniform","indexOf","filter","n","console","warn","join","makeShaderWithChildren","isShader","Shader","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;AAGA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAIC,GAAD,IACf;AACA;AACCA,GAAD,CAAaC,CAAb,KAAmBC,SAAnB,IAAiCF,GAAD,CAAaG,CAAb,KAAmBD,SAHrD;;AAaA,MAAME,YAAY,GAAIC,KAAD,IAAqD;AACxE,MAAIN,QAAQ,CAACM,KAAD,CAAZ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AqBX,IAArB,MAA+B,CAAC,CAApC,EAAuC;AACrC,eAAOA,IAAP;AACD;;AACD,aAAO,IAAP;AACD,KANmB,EAOnBY,MAPmB,CAOXC,CAAD,IAAOA,CAAC,KAAK,IAPD,CAAtB;AAQAC,IAAAA,OAAO,CAACC,IAAR,CACE,oCAAoCL,aAAa,CAACM,IAAd,CAAmB,IAAnB,CADtC;AAGD;;AACD,SAAOzB,MAAM,CAAC0B,sBAAP,CACLxB,iBADK,EAELJ,QAAQ,CAACuB,MAAT,CAAgBM,cAAhB,CAFK,EAGL,6BAAY1B,SAAZ,CAHK,CAAP;AAKD,CArCe,CAAlB;;AAwCO,MAAM2B,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAe,IAAA,SAAS,EAAEhC;AAA1B,KAAyCgC,KAAzC,EAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;AACpB/B,EAAAA,QAAQ,EAAE;AADU,CAAtB","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { isShader } from \"../../../skia\";\nimport type { SkRuntimeEffect } from \"../../../skia\";\nimport type { Vector, AnimatedProps, TransformProps } from \"../../processors\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport { localMatrix } from \"../../processors\";\n\nconst isVector = (obj: unknown): obj is Vector =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (obj as any).x !== undefined && (obj as any).y !== undefined;\n\ntype UniformValue = number | Vector | readonly number[];\n\ntype Uniform = UniformValue | readonly UniformValue[];\n\ninterface Uniforms {\n [name: string]: Uniform;\n}\n\nconst processValue = (value: UniformValue): number | readonly number[] => {\n if (isVector(value)) {\n return [value.x, value.y];\n }\n return value;\n};\n\nexport interface ShaderProps extends TransformProps {\n source: SkRuntimeEffect;\n uniforms: Uniforms;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<ShaderProps>(\n ({ uniforms, source, ...transform }, children) => {\n const processedUniforms = new Array(source.getUniformCount())\n .fill(0)\n .flatMap((_, i) => {\n const name = source.getUniformName(i);\n const value = uniforms[name];\n if (value === undefined) {\n throw new Error(`No value specified for uniform ${name}`);\n }\n if (Array.isArray(value)) {\n return value.flatMap(processValue);\n }\n return processValue(value as UniformValue);\n });\n const names = Object.keys(uniforms);\n if (names.length > source.getUniformCount()) {\n const usedUniforms = new Array(source.getUniformCount())\n .fill(0)\n .map((_, i) => source.getUniformName(i));\n const unusedUniform = names\n .map((name) => {\n if (usedUniforms.indexOf(name) === -1) {\n return name;\n }\n return null;\n })\n .filter((n) => n !== null);\n console.warn(\n \"Unused uniforms were provided: \" + unusedUniform.join(\", \")\n );\n }\n return source.makeShaderWithChildren(\n processedUniforms,\n children.filter(isShader),\n localMatrix(transform)\n );\n }\n);\n\nexport const Shader = (props: AnimatedProps<ShaderProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nShader.defaultProps = {\n uniforms: [],\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Box.tsx"],"names":["inflate","box","dx","dy","tx","ty","rect","x","y","width","height","rx","ry","deflate","onDeclare","spread","blur","color","inner","__typename__","BoxShadow","props","isBoxShadow","s","onDraw","ctx","node","defaultBox","canvas","paint","opacity","shadows","visit","filter","shadow","map","lPaint","Skia","Paint","setColor","setMaskFilter","MaskFilter","MakeBlur","BlurStyle","Normal","drawRRect","delta","Math","abs","save","clipRRect","ClipOp","Intersect","outer","drawDRRect","restore","Box","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AACA;;AACA;;;;;;
|
1
|
+
{"version":3,"sources":["Box.tsx"],"names":["inflate","box","dx","dy","tx","ty","rect","x","y","width","height","rx","ry","deflate","onDeclare","spread","blur","color","inner","__typename__","BoxShadow","props","isBoxShadow","s","onDraw","ctx","node","defaultBox","canvas","paint","opacity","shadows","visit","filter","shadow","map","lPaint","Skia","Paint","setColor","setMaskFilter","MaskFilter","MakeBlur","BlurStyle","Normal","drawRRect","delta","Math","abs","save","clipRRect","ClipOp","Intersect","outer","drawDRRect","restore","Box","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEA,MAAMA,OAAO,GAAG,UAACC,GAAD,EAAeC,EAAf,EAA2BC,EAA3B;AAAA,MAAuCC,EAAvC,uEAA4C,CAA5C;AAAA,MAA+CC,EAA/C,uEAAoD,CAApD;AAAA,SACd,uBACE,iBACEJ,GAAG,CAACK,IAAJ,CAASC,CAAT,GAAaL,EAAb,GAAkBE,EADpB,EAEEH,GAAG,CAACK,IAAJ,CAASE,CAAT,GAAaL,EAAb,GAAkBE,EAFpB,EAGEJ,GAAG,CAACK,IAAJ,CAASG,KAAT,GAAiB,IAAIP,EAHvB,EAIED,GAAG,CAACK,IAAJ,CAASI,MAAT,GAAkB,IAAIP,EAJxB,CADF,EAOEF,GAAG,CAACU,EAAJ,GAAST,EAPX,EAQED,GAAG,CAACW,EAAJ,GAAST,EARX,CADc;AAAA,CAAhB;;AAYA,MAAMU,OAAO,GAAG,UAACZ,GAAD,EAAeC,EAAf,EAA2BC,EAA3B;AAAA,MAAuCC,EAAvC,uEAA4C,CAA5C;AAAA,MAA+CC,EAA/C,uEAAoD,CAApD;AAAA,SACdL,OAAO,CAACC,GAAD,EAAM,CAACC,EAAP,EAAW,CAACC,EAAZ,EAAgBC,EAAhB,EAAoBC,EAApB,CADO;AAAA,CAAhB;;AAcA,MAAMS,SAAS,GAAG,oCAChB,QAA4C;AAAA,MAA3C;AAAEZ,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUY,IAAAA,MAAV;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA,KAAxB;AAA+BC,IAAAA;AAA/B,GAA2C;AAC1C,SAAO;AAAEhB,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUY,IAAAA,MAAV;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA,K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,CAACC,GAAD,EAAM6C,KAAK,CAACvC,CAAZ,EAAeuC,KAAK,CAACtC,CAArB,CAArB;AACAoB,IAAAA,MAAM,CAAC0B,UAAP,CAAkBD,KAAlB,EAAyBnC,KAAzB,EAAgCkB,MAAhC;AACAR,IAAAA,MAAM,CAAC2B,OAAP;AACD,GAhBH;AAiBD,CAlCc,CAAf;;AAoCO,MAAMC,GAAG,GAAInC,KAAD,IAAoC;AACrD,sBAAO;AAAW,IAAA,MAAM,EAAEG;AAAnB,KAA+BH,KAA/B,EAAP;AACD,CAFM;;;AAIPmC,GAAG,CAACC,YAAJ,GAAmB;AACjB1B,EAAAA,OAAO,EAAE;AADQ,CAAnB","sourcesContent":["import React from \"react\";\n\nimport type { Color, SkRRect, SkJSIInstance, SkRect } from \"../../../skia\";\nimport { ClipOp, BlurStyle, Skia, processColor } from \"../../../skia\";\nimport { createDrawing } from \"../../nodes\";\nimport type { AnimatedProps, CustomPaintProps } from \"../../processors\";\nimport { add, vec, rrect } from \"../../processors\";\nimport { rect, isRRect } from \"../../processors/Rects\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\n\nconst inflate = (box: SkRRect, dx: number, dy: number, tx = 0, ty = 0) =>\n rrect(\n rect(\n box.rect.x - dx + tx,\n box.rect.y - dy + ty,\n box.rect.width + 2 * dx,\n box.rect.height + 2 * dy\n ),\n box.rx + dx,\n box.ry + dy\n );\n\nconst deflate = (box: SkRRect, dx: number, dy: number, tx = 0, ty = 0) =>\n inflate(box, -dx, -dy, tx, ty);\n\ninterface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n\ninterface BoxShadowDecl extends BoxShadowProps, SkJSIInstance<\"BoxShadow\"> {}\n\nconst onDeclare = createDeclaration<BoxShadowProps>(\n ({ dx, dy, spread, blur, color, inner }) => {\n return { dx, dy, spread, blur, color, inner, __typename__: \"BoxShadow\" };\n }\n);\n\nexport const BoxShadow = (props: AnimatedProps<BoxShadowProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nconst isBoxShadow = (s: SkJSIInstance<string>): s is BoxShadowDecl =>\n s.__typename__ === \"BoxShadow\";\n\ninterface BoxProps extends CustomPaintProps {\n box: SkRRect | SkRect;\n}\n\nconst onDraw = createDrawing<BoxProps>((ctx, { box: defaultBox }, node) => {\n const box = isRRect(defaultBox) ? defaultBox : rrect(defaultBox, 0, 0);\n const { canvas, paint, opacity } = ctx;\n const shadows = node.visit(ctx).filter<BoxShadowDecl>(isBoxShadow);\n shadows\n .filter((shadow) => !shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const lPaint = Skia.Paint();\n lPaint.setColor(processColor(color, opacity));\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n canvas.drawRRect(inflate(box, spread, spread, dx, dy), lPaint);\n });\n canvas.drawRRect(box, paint);\n\n shadows\n .filter((shadow) => shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const delta = add(vec(10, 10), vec(Math.abs(dx), Math.abs(dy)));\n canvas.save();\n canvas.clipRRect(box, ClipOp.Intersect, false);\n const lPaint = Skia.Paint();\n lPaint.setColor(processColor(color, opacity));\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n const inner = deflate(box, spread, spread, dx, dy);\n const outer = inflate(box, delta.x, delta.y);\n canvas.drawDRRect(outer, inner, lPaint);\n canvas.restore();\n });\n});\n\nexport const Box = (props: AnimatedProps<BoxProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nBox.defaultProps = {\n shadows: [],\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["DiffRect.tsx"],"names":["onDraw","canvas","paint","inner","outer","drawDRRect","DiffRect","props"],"mappings":";;;;;;;AAAA;;AAKA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAqB;AACvCH,EAAAA,MAAM,CAACI,UAAP,CAAkBD,KAAlB,EAAyBD,KAAzB,EAAgCD,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMI,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAEP;AAAnB,KAA+BO,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps } from \"../../processors\";\nimport type { SkRRect } from \"../../../skia
|
1
|
+
{"version":3,"sources":["DiffRect.tsx"],"names":["onDraw","canvas","paint","inner","outer","drawDRRect","DiffRect","props"],"mappings":";;;;;;;AAAA;;AAKA;;;;;;AAOA,MAAMA,MAAM,GAAG,4BACb,iBAAyC;AAAA,MAAxC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAwC;AAAA,MAArB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAqB;AACvCH,EAAAA,MAAM,CAACI,UAAP,CAAkBD,KAAlB,EAAyBD,KAAzB,EAAgCD,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMI,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAEP;AAAnB,KAA+BO,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps } from \"../../processors\";\nimport type { SkRRect } from \"../../../skia\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { createDrawing } from \"../../nodes/Drawing\";\n\nexport interface DiffRectProps extends CustomPaintProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nconst onDraw = createDrawing<DiffRectProps>(\n ({ canvas, paint }, { inner, outer }) => {\n canvas.drawDRRect(outer, inner, paint);\n }\n);\n\nexport const DiffRect = (props: AnimatedProps<DiffRectProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -13,8 +13,6 @@ var _skia = require("../../../skia");
|
|
13
13
|
|
14
14
|
var _nodes = require("../../nodes");
|
15
15
|
|
16
|
-
var _Color = require("../../../skia/Color");
|
17
|
-
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
17
|
|
20
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -39,7 +37,7 @@ const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
|
|
39
37
|
// C c1 c2 br
|
40
38
|
// C c1 c2 bl
|
41
39
|
// C c1 c2 tl (the redundant point in the last command is removed)
|
42
|
-
[patch[0].pos, patch[0].c2, patch[1].c1, patch[1].pos, patch[1].c2, patch[2].c1, patch[2].pos, patch[2].c2, patch[3].c1, patch[3].pos, patch[3].c2, patch[0].c1], colors ? colors.map(c => (0,
|
40
|
+
[patch[0].pos, patch[0].c2, patch[1].c1, patch[1].pos, patch[1].c2, patch[2].c1, patch[2].pos, patch[2].c2, patch[3].c1, patch[3].pos, patch[3].c2, patch[0].c1], colors ? colors.map(c => (0, _skia.processColor)(c, opacity)) : undefined, texture, mode, paint);
|
43
41
|
});
|
44
42
|
|
45
43
|
const Patch = props => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Patch.tsx"],"names":["onDraw","canvas","paint","opacity","colors","patch","texture","blendMode","defaultBlendMode","BlendMode","DstOver","SrcOver","mode","drawPatch","pos","c2","c1","map","c","undefined","Patch","props"],"mappings":";;;;;;;AAAA;;AAQA;;AAEA;;AACA
|
1
|
+
{"version":3,"sources":["Patch.tsx"],"names":["onDraw","canvas","paint","opacity","colors","patch","texture","blendMode","defaultBlendMode","BlendMode","DstOver","SrcOver","mode","drawPatch","pos","c2","c1","map","c","undefined","Patch","props"],"mappings":";;;;;;;AAAA;;AAQA;;AAEA;;AACA;;;;;;AAoBA,MAAMA,MAAM,GAAG,0BACb,iBAAuE;AAAA,MAAtE;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAAsE;AAAA,MAA1C;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA,OAAjB;AAA0BC,IAAAA;AAA1B,GAA0C;AACrE;AACA,QAAMC,gBAAgB,GAAGJ,MAAM,GAAGK,gBAAUC,OAAb,GAAuBD,gBAAUE,OAAhE;AACA,QAAMC,IAAI,GAAGL,SAAS,GAAGE,gBAAU,yBAAQF,SAAR,CAAV,CAAH,GAAmCC,gBAAzD;AACAP,EAAAA,MAAM,CAACY,SAAP,EACE;AACA;AACA;AACA;AACA;AACA,GACER,KAAK,CAAC,CAAD,CAAL,CAASS,GADX,EAEET,KAAK,CAAC,CAAD,CAAL,CAASU,EAFX,EAGEV,KAAK,CAAC,CAAD,CAAL,CAASW,EAHX,EAIEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAJX,EAKET,KAAK,CAAC,CAAD,CAAL,CAASU,EALX,EAMEV,KAAK,CAAC,CAAD,CAAL,CAASW,EANX,EAOEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAPX,EAQET,KAAK,CAAC,CAAD,CAAL,CAASU,EARX,EASEV,KAAK,CAAC,CAAD,CAAL,CAASW,EATX,EAUEX,KAAK,CAAC,CAAD,CAAL,CAASS,GAVX,EAWET,KAAK,CAAC,CAAD,CAAL,CAASU,EAXX,EAYEV,KAAK,CAAC,CAAD,CAAL,CAASW,EAZX,CANF,EAoBEZ,MAAM,GAAGA,MAAM,CAACa,GAAP,CAAYC,CAAD,IAAO,wBAAaA,CAAb,EAAgBf,OAAhB,CAAlB,CAAH,GAAiDgB,SApBzD,EAqBEb,OArBF,EAsBEM,IAtBF,EAuBEV,KAvBF;AAyBD,CA9BY,CAAf;;AAiCO,MAAMkB,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAErB;AAAnB,KAA+BqB,KAA/B,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type {\n CustomPaintProps,\n SkEnum,\n Vector,\n AnimatedProps,\n} from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { SkPoint, Color } from \"../../../skia\";\nimport { BlendMode, processColor } from \"../../../skia\";\nimport { createDrawing } from \"../../nodes\";\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends CustomPaintProps {\n colors?: readonly Color[];\n patch: readonly [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nconst onDraw = createDrawing<PatchProps>(\n ({ canvas, paint, opacity }, { colors, patch, texture, blendMode }) => {\n // If the colors are provided, the default blendMode is set to dstOver, if not, the default is set to srcOver\n const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const mode = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n canvas.drawPatch(\n // Patch requires a path with the following constraints:\n // M tl\n // C c1 c2 br\n // C c1 c2 bl\n // C c1 c2 tl (the redundant point in the last command is removed)\n [\n patch[0].pos,\n patch[0].c2,\n patch[1].c1,\n patch[1].pos,\n patch[1].c2,\n patch[2].c1,\n patch[2].pos,\n patch[2].c2,\n patch[3].c1,\n patch[3].pos,\n patch[3].c2,\n patch[0].c1,\n ],\n colors ? colors.map((c) => processColor(c, opacity)) : undefined,\n texture,\n mode,\n paint\n );\n }\n);\n\nexport const Patch = (props: AnimatedProps<PatchProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["TextBlob.tsx"],"names":["onDraw","canvas","paint","blob","x","y","drawTextBlob","TextBlob","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AASA,MAAMA,MAAM,GAAG,4BACb,iBAAuC;AAAA,MAAtC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAsC;AAAA,MAAnB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,CAAR;AAAWC,IAAAA;AAAX,GAAmB;AACrCJ,EAAAA,MAAM,CAACK,YAAP,CAAoBH,IAApB,EAA0BC,CAA1B,EAA6BC,CAA7B,EAAgCH,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAER;AAAnB,KAA+BQ,KAA/B,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBL,EAAAA,CAAC,EAAE,CADmB;AAEtBC,EAAAA,CAAC,EAAE;AAFmB,CAAxB","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport type { SkTextBlob } from \"../../../skia
|
1
|
+
{"version":3,"sources":["TextBlob.tsx"],"names":["onDraw","canvas","paint","blob","x","y","drawTextBlob","TextBlob","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AASA,MAAMA,MAAM,GAAG,4BACb,iBAAuC;AAAA,MAAtC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAsC;AAAA,MAAnB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,CAAR;AAAWC,IAAAA;AAAX,GAAmB;AACrCJ,EAAAA,MAAM,CAACK,YAAP,CAAoBH,IAApB,EAA0BC,CAA1B,EAA6BC,CAA7B,EAAgCH,KAAhC;AACD,CAHY,CAAf;;AAMO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAER;AAAnB,KAA+BQ,KAA/B,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBL,EAAAA,CAAC,EAAE,CADmB;AAEtBC,EAAAA,CAAC,EAAE;AAFmB,CAAxB","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport type { SkTextBlob } from \"../../../skia\";\n\nexport interface TextBlobProps extends CustomPaintProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nconst onDraw = createDrawing<TextBlobProps>(\n ({ canvas, paint }, { blob, x, y }) => {\n canvas.drawTextBlob(blob, x, y, paint);\n }\n);\n\nexport const TextBlob = (props: AnimatedProps<TextBlobProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nTextBlob.defaultProps = {\n x: 0,\n y: 0,\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["TextPath.tsx"],"names":["onDraw","canvas","paint","fontMgr","text","initialOffset","path","pathDef","fontDef","Skia","Path","MakeFromSVGString","Error","font","ids","getGlyphIDs","widths","getGlyphWidths","rsx","meas","ContourMeasureIter","cont","next","dist","i","length","width","substring","px","py","tx","ty","getPosTan","adjustedX","adjustedY","push","RSXform","blob","TextBlob","MakeFromRSXform","drawTextBlob","TextPath","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;
|
1
|
+
{"version":3,"sources":["TextPath.tsx"],"names":["onDraw","canvas","paint","fontMgr","text","initialOffset","path","pathDef","fontDef","Skia","Path","MakeFromSVGString","Error","font","ids","getGlyphIDs","widths","getGlyphWidths","rsx","meas","ContourMeasureIter","cont","next","dist","i","length","width","substring","px","py","tx","ty","getPosTan","adjustedX","adjustedY","push","RSXform","blob","TextBlob","MakeFromRSXform","drawTextBlob","TextPath","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAG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A,UAAI,CAACD,IAAL,EAAW;AACT;AACA;AACAjB,QAAAA,IAAI,GAAGA,IAAI,CAACuB,SAAL,CAAe,CAAf,EAAkBH,CAAlB,CAAP;AACA;AACD;;AACDD,MAAAA,IAAI,GAAGG,KAAK,GAAG,CAAf;AACD,KAb2C,CAc5C;AACA;;;AACA,UAAM;AAAEE,MAAAA,EAAF;AAAMC,MAAAA,EAAN;AAAUC,MAAAA,EAAV;AAAcC,MAAAA;AAAd,QAAqBV,IAAI,CAACW,SAAL,CAAeT,IAAf,CAA3B;AACA,UAAMU,SAAS,GAAGL,EAAE,GAAIF,KAAK,GAAG,CAAT,GAAcI,EAArC;AACA,UAAMI,SAAS,GAAGL,EAAE,GAAIH,KAAK,GAAG,CAAT,GAAcK,EAArC;AACAb,IAAAA,GAAG,CAACiB,IAAJ,CAAS1B,WAAK2B,OAAL,CAAaN,EAAb,EAAiBC,EAAjB,EAAqBE,SAArB,EAAgCC,SAAhC,CAAT;AACAX,IAAAA,IAAI,IAAIG,KAAK,GAAG,CAAhB;AACD;;AACD,QAAMW,IAAI,GAAG5B,WAAK6B,QAAL,CAAcC,eAAd,CAA8BnC,IAA9B,EAAoCc,GAApC,EAAyCL,IAAzC,CAAb;;AACAZ,EAAAA,MAAM,CAACuC,YAAP,CAAoBH,IAApB,EAA0B,CAA1B,EAA6B,CAA7B,EAAgCnC,KAAhC;AACD,CA3CY,CAAf;;AA8CO,MAAMuC,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAW,IAAA,MAAM,EAAE1C;AAAnB,KAA+B0C,KAA/B,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBtC,EAAAA,aAAa,EAAE;AADO,CAAxB","sourcesContent":["import React from \"react\";\n\nimport type { CustomPaintProps, AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes\";\nimport type { SkPath, SkRSXform } from \"../../../skia\";\nimport { Skia } from \"../../../skia/Skia\";\nimport type { FontDef } from \"../../processors/Font\";\nimport { processFont } from \"../../processors/Font\";\n\nexport type TextPathProps = CustomPaintProps &\n FontDef & {\n text: string;\n path: SkPath | string;\n initialOffset: number;\n };\n\nconst onDraw = createDrawing<TextPathProps>(\n (\n { canvas, paint, fontMgr },\n { text, initialOffset, path: pathDef, ...fontDef }\n ) => {\n const path =\n typeof pathDef === \"string\"\n ? Skia.Path.MakeFromSVGString(pathDef)\n : pathDef;\n if (path === null) {\n throw new Error(\"Invalid path: \" + pathDef);\n }\n const font = processFont(fontMgr, fontDef);\n const ids = font.getGlyphIDs(text);\n const widths = font.getGlyphWidths(ids, paint);\n const rsx: SkRSXform[] = [];\n const meas = Skia.ContourMeasureIter(path, false, 1);\n let cont = meas.next();\n let dist = initialOffset;\n for (let i = 0; i < text.length && cont; i++) {\n const width = widths[i];\n dist += width / 2;\n if (dist > cont.length()) {\n // jump to next contour\n cont = meas.next();\n if (!cont) {\n // We have come to the end of the path - terminate the string\n // right here.\n text = text.substring(0, i);\n break;\n }\n dist = width / 2;\n }\n // Gives us the (x, y) coordinates as well as the cos/sin of the tangent\n // line at that position.\n const { px, py, tx, ty } = cont.getPosTan(dist);\n const adjustedX = px - (width / 2) * tx;\n const adjustedY = py - (width / 2) * ty;\n rsx.push(Skia.RSXform(tx, ty, adjustedX, adjustedY));\n dist += width / 2;\n }\n const blob = Skia.TextBlob.MakeFromRSXform(text, rsx, font);\n canvas.drawTextBlob(blob, 0, 0, paint);\n }\n);\n\nexport const TextPath = (props: AnimatedProps<TextPathProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nTextPath.defaultProps = {\n initialOffset: 0,\n};\n"]}
|
@@ -55,4 +55,17 @@ Object.keys(_useContextBridge).forEach(function (key) {
|
|
55
55
|
}
|
56
56
|
});
|
57
57
|
});
|
58
|
+
|
59
|
+
var _DependencyManager = require("./DependencyManager");
|
60
|
+
|
61
|
+
Object.keys(_DependencyManager).forEach(function (key) {
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
63
|
+
if (key in exports && exports[key] === _DependencyManager[key]) return;
|
64
|
+
Object.defineProperty(exports, key, {
|
65
|
+
enumerable: true,
|
66
|
+
get: function () {
|
67
|
+
return _DependencyManager[key];
|
68
|
+
}
|
69
|
+
});
|
70
|
+
});
|
58
71
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Canvas\";\nexport * from \"./components\";\nexport * from \"./nodes\";\nexport * from \"./useContextBridge\";\n"]}
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Canvas\";\nexport * from \"./components\";\nexport * from \"./nodes\";\nexport * from \"./useContextBridge\";\nexport * from \"./DependencyManager\";\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Declaration.tsx"],"names":["createDeclaration","cb","useDeclaration","deps","isDeclarationNode","node","DeclarationNode","Node","constructor","depMgr","onDeclare","props","memoizable","_props","draw","ctx","children","visit","obj"],"mappings":";;;;;;;AACA;;
|
1
|
+
{"version":3,"sources":["Declaration.tsx"],"names":["createDeclaration","cb","useDeclaration","deps","isDeclarationNode","node","DeclarationNode","Node","constructor","depMgr","onDeclare","props","memoizable","_props","draw","ctx","children","visit","obj"],"mappings":";;;;;;;AACA;;AAIA;;AAIA;;;;AAUO,MAAMA,iBAAiB,GAC5BC,EAD+B,IAEJA,EAFtB;;;;AAIA,MAAMC,cAAc,GAAG,CAC5BD,EAD4B,EAE5BE,IAF4B,KAI5B;AACA,wBAAYF,EAAZ,EAAgBE,IAAhB,aAAgBA,IAAhB,cAAgBA,IAAhB,GAAwB,EAAxB,CALK;;;;AAOA,MAAMC,iBAAiB,GAC5BC,IAD+B,IAEMA,IAAI,YAAYC,eAFhD;;;;AAQA,MAAMA,eAAN,SAAiCC,UAAjC,CAAyC;AAG9CC,EAAAA,WAAW,CACTC,MADS,EAETC,SAFS,EAGTC,KAHS,EAIT;AACA,UAAMF,MAAN,EAAcE,KAAd;;AADA;;AAEA,UAAMC,UAAN,GAAmB,CAAC,4BAAWD,KAAX,CAApB;AACA,SAAKD,SAAL,GAAiBA,SAAjB;AACD;;AAEQ,MAALC,KAAK,CAACA,KAAD,EAA0B;AACjC,SAAKC,UAAL,GAAkB,CAAC,4BAAWD,KAAX,CAAnB;AACA,UAAMA,KAAN,GAAcA,KAAd;AACD;;AAEQ,MAALA,KAAK,GAAG;AACV,WAAO,KAAKE,MAAZ;AACD;;AAEDC,EAAAA,IAAI,CAACC,GAAD,EAAsB;AACxB,UAAMC,QAAQ,GAAG,KAAKC,KAAL,CAAWF,GAAX,CAAjB;AACA,UAAMJ,KAAK,GAAG,6BAAY,KAAKA,KAAjB,CAAd;AACA,UAAMO,GAAG,GAAG,KAAKR,SAAL,CAAeC,KAAf,EAAsBK,QAAtB,EAAgCD,GAAhC,CAAZ;AACA,WAAOG,GAAP;AACD;;AA3B6C","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useCallback } from \"react\";\n\nimport type { DrawingContext } from \"../DrawingContext\";\nimport type { AnimatedProps } from \"../processors\";\nimport { isAnimated, materialize } from \"../processors\";\nimport type { DependencyManager } from \"../DependencyManager\";\nimport type { SkJSIInstance } from \"../../skia\";\n\nimport { Node } from \"./Node\";\n\nexport type DeclarationResult = SkJSIInstance<string> | null;\n\ntype DeclarationCallback<T> = (\n props: T,\n children: DeclarationResult[],\n ctx: DrawingContext\n) => DeclarationResult;\n\nexport const createDeclaration = <T,>(\n cb: DeclarationCallback<T>\n): DeclarationCallback<T> => cb;\n\nexport const useDeclaration = <P,>(\n cb: DeclarationCallback<P>,\n deps?: DependencyList\n) =>\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useCallback(cb, deps ?? []);\n\nexport const isDeclarationNode = (\n node: Node\n): node is DeclarationNode<unknown> => node instanceof DeclarationNode;\n\nexport interface DeclarationProps<P> {\n onDeclare: DeclarationCallback<P>;\n}\n\nexport class DeclarationNode<P> extends Node<P> {\n private onDeclare: DeclarationCallback<P>;\n\n constructor(\n depMgr: DependencyManager,\n onDeclare: DeclarationCallback<P>,\n props: AnimatedProps<P>\n ) {\n super(depMgr, props);\n super.memoizable = !isAnimated(props);\n this.onDeclare = onDeclare;\n }\n\n set props(props: AnimatedProps<P>) {\n this.memoizable = !isAnimated(props);\n super.props = props;\n }\n\n get props() {\n return this._props;\n }\n\n draw(ctx: DrawingContext) {\n const children = this.visit(ctx);\n const props = materialize(this.props);\n const obj = this.onDeclare(props, children, ctx);\n return obj;\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Node.ts"],"names":["NodeType","Node","constructor","depMgr","props","_props","unSubscribeNode","subscribeNode","visit","ctx","children","returnedValues","forEach","child","memoized","memoizable","push","ret","draw"],"mappings":";;;;;;;;;IAKYA,Q;;;WAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;GAAAA,Q,wBAAAA,Q;;AAOL,MAAe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../skia
|
1
|
+
{"version":3,"sources":["Node.ts"],"names":["NodeType","Node","constructor","depMgr","props","_props","unSubscribeNode","subscribeNode","visit","ctx","children","returnedValues","forEach","child","memoized","memoizable","push","ret","draw"],"mappings":";;;;;;;;;IAKYA,Q;;;WAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;GAAAA,Q,wBAAAA,Q;;AAOL,MAAeC,IAAf,CAAiC;AAQtCC,EAAAA,WAAW,CAACC,MAAD,EAA4BC,KAA5B,EAAqD;AAAA,sCAPpC,EAOoC;;AAAA;;AAAA,wCALnD,KAKmD;;AAAA,sCAJ3B,IAI2B;;AAAA;;AAAA;;AAC9D,SAAKC,MAAL,GAAcD,KAAd;AACA,SAAKD,MAAL,GAAcA,MAAd;AACA,SAAKA,MAAL,CAAYG,eAAZ,CAA4B,IAA5B;AACA,SAAKH,MAAL,CAAYI,aAAZ,CAA0B,IAA1B,EAAgCH,KAAhC;AACD;;AAIQ,MAALA,KAAK,CAACA,KAAD,EAA0B;AACjC,SAAKD,MAAL,CAAYG,eAAZ,CAA4B,IAA5B;AACA,SAAKH,MAAL,CAAYI,aAAZ,CAA0B,IAA1B,EAAgCH,KAAhC;AACA,SAAKC,MAAL,GAAcD,KAAd;AACD;;AAEQ,MAALA,KAAK,GAAG;AACV,WAAO,KAAKC,MAAZ;AACD;;AAEDG,EAAAA,KAAK,CAACC,GAAD,EAAsBC,QAAtB,EAAyC;AAC5C,UAAMC,cAAkD,GAAG,EAA3D;AACA,KAACD,QAAD,aAACA,QAAD,cAACA,QAAD,GAAa,KAAKA,QAAlB,EAA4BE,OAA5B,CAAqCC,KAAD,IAAW;AAC7C,UAAIA,KAAK,CAACC,QAAN,IAAkBD,KAAK,CAACE,UAA5B,EAAwC;AACtCJ,QAAAA,cAAc,CAACK,IAAf,CAAoBH,KAAK,CAACC,QAA1B;AACD,OAFD,MAEO;AACL,cAAMG,GAAG,GAAGJ,KAAK,CAACK,IAAN,CAAWT,GAAX,CAAZ;;AACA,YAAIQ,GAAJ,EAAS;AACPN,UAAAA,cAAc,CAACK,IAAf,CAAoBC,GAApB;;AACA,cAAIJ,KAAK,CAACE,UAAV,EAAsB;AACpBF,YAAAA,KAAK,CAACC,QAAN,GAAiBG,GAAjB;AACD;AACF;AACF;AACF,KAZD;AAaA,WAAON,cAAP;AACD;;AA3CqC","sourcesContent":["import type { SkJSIInstance } from \"../../skia\";\nimport type { DependencyManager } from \"../DependencyManager\";\nimport type { DrawingContext } from \"../DrawingContext\";\nimport type { AnimatedProps } from \"../processors\";\n\nexport enum NodeType {\n Declaration = \"skDeclaration\",\n Drawing = \"skDrawing\",\n}\n\ntype DeclarationResult = SkJSIInstance<string> | null;\n\nexport abstract class Node<P = unknown> {\n readonly children: Node[] = [];\n _props: AnimatedProps<P>;\n memoizable = false;\n memoized: DeclarationResult | null = null;\n parent?: Node;\n depMgr: DependencyManager;\n\n constructor(depMgr: DependencyManager, props: AnimatedProps<P>) {\n this._props = props;\n this.depMgr = depMgr;\n this.depMgr.unSubscribeNode(this);\n this.depMgr.subscribeNode(this, props);\n }\n\n abstract draw(ctx: DrawingContext): void | DeclarationResult;\n\n set props(props: AnimatedProps<P>) {\n this.depMgr.unSubscribeNode(this);\n this.depMgr.subscribeNode(this, props);\n this._props = props;\n }\n\n get props() {\n return this._props;\n }\n\n visit(ctx: DrawingContext, children?: Node[]) {\n const returnedValues: Exclude<DeclarationResult, null>[] = [];\n (children ?? this.children).forEach((child) => {\n if (child.memoized && child.memoizable) {\n returnedValues.push(child.memoized);\n } else {\n const ret = child.draw(ctx);\n if (ret) {\n returnedValues.push(ret);\n if (child.memoizable) {\n child.memoized = ret;\n }\n }\n }\n });\n return returnedValues;\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Animations.ts"],"names":["isValue","value","undefined","__typename__","isAnimated","props","Object","values","materialize","result","forEach","key","current"],"mappings":";;;;;;;AAEA;;AAIO,MAAMA,OAAO,
|
1
|
+
{"version":3,"sources":["Animations.ts"],"names":["isValue","value","undefined","__typename__","isAnimated","props","Object","values","materialize","result","forEach","key","current"],"mappings":";;;;;;;AAEA;;AAIO,MAAMA,OAAO,GAAIC,KAAD,IAAiD;AACtE,MAAIA,KAAK,KAAKC,SAAV,IAAuBD,KAAK,KAAK,IAArC,EAA2C;AACzC,WAAO,KAAP;AACD;;AACD,MAAI;AACF,QACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,kBAAkBA,KADlB,IAECA,KAAD,CAAyCE,YAAzC,KAA0D,WAH5D,EAIE;AACA,aAAO,IAAP;AACD;AACF,GARD,CAQE,MAAM,CAAE;;AACV,SAAO,KAAP;AACD,CAdM;;;;AAgBA,MAAMC,UAAU,GAAOC,KAAJ,IAAgC;AACxD,OAAK,MAAMJ,KAAX,IAAoBK,MAAM,CAACC,MAAP,CAAcF,KAAd,CAApB,EAA0C;AACxC,QAAIL,OAAO,CAACC,KAAD,CAAX,EAAoB;AAClB,aAAO,IAAP;AACD;AACF;;AACD,SAAO,KAAP;AACD,CAPM;;;;AASA,MAAMO,WAAW,GAAOH,KAAJ,IAAgC;AACzD,QAAMI,MAAM,GAAG,EAAE,GAAGJ;AAAL,GAAf;AACA,0BAAQA,KAAR,EAAeK,OAAf,CAAwBC,GAAD,IAAS;AAC9B,UAAMV,KAAK,GAAGI,KAAK,CAACM,GAAD,CAAnB;;AACA,QAAIX,OAAO,CAACC,KAAD,CAAX,EAAoB;AAClBQ,MAAAA,MAAM,CAACE,GAAD,CAAN,GAAeV,KAAD,CAAoCW,OAAlD;AACD;AACF,GALD;AAMA,SAAOH,MAAP;AACD,CATM","sourcesContent":["import type { SkiaValue } from \"../../../values\";\nimport type { DrawingContext } from \"../../DrawingContext\";\nimport { mapKeys } from \"../../typeddash\";\n\nexport type FrameValue<T> = (ctx: DrawingContext) => T;\n\nexport const isValue = (value: unknown): value is SkiaValue<unknown> => {\n if (value === undefined || value === null) {\n return false;\n }\n try {\n if (\n typeof value === \"object\" &&\n \"__typename__\" in value &&\n (value as unknown as SkiaValue<unknown>).__typename__ === \"RNSkValue\"\n ) {\n return true;\n }\n } catch {}\n return false;\n};\n\nexport const isAnimated = <T>(props: AnimatedProps<T>) => {\n for (const value of Object.values(props)) {\n if (isValue(value)) {\n return true;\n }\n }\n return false;\n};\n\nexport const materialize = <T>(props: AnimatedProps<T>) => {\n const result = { ...props };\n mapKeys(props).forEach((key) => {\n const value = props[key];\n if (isValue(value)) {\n result[key] = (value as SkiaValue<T[typeof key]>).current;\n }\n });\n return result as T;\n};\n\nexport type AnimatedProps<T> = {\n [K in keyof T]: T[K] | SkiaValue<T[K]>;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Clips.ts"],"names":["processClip","canvas","def","op","path","clipPath","clipRRect","clipRect"],"mappings":";;;;;;;
|
1
|
+
{"version":3,"sources":["Clips.ts"],"names":["processClip","canvas","def","op","path","clipPath","clipRRect","clipRect"],"mappings":";;;;;;;AAGA;;AACA;;AAIO,MAAMA,WAAW,GAAG,CAACC,MAAD,EAAmBC,GAAnB,EAAiCC,EAAjC,KAAgD;AACzE,MAAI,sBAAUD,GAAV,CAAJ,EAAoB;AAClB,UAAME,IAAI,GAAG,wBAAYF,GAAZ,CAAb;AACAD,IAAAA,MAAM,CAACI,QAAP,CAAgBD,IAAhB,EAAsBD,EAAtB,EAA0B,IAA1B;AACD,GAHD,MAGO,IAAI,oBAAQD,GAAR,CAAJ,EAAkB;AACvBD,IAAAA,MAAM,CAACK,SAAP,CAAiBJ,GAAjB,EAAsBC,EAAtB,EAA0B,IAA1B;AACD,GAFM,MAEA;AACLF,IAAAA,MAAM,CAACM,QAAP,CAAgBL,GAAhB,EAAqBC,EAArB,EAAyB,IAAzB;AACD;AACF,CATM","sourcesContent":["import type { SkCanvas, ClipOp, SkRect, SkRRect } from \"../../skia\";\n\nimport type { PathDef } from \"./Paths\";\nimport { processPath, isPathDef } from \"./Paths\";\nimport { isRRect } from \"./Rects\";\n\nexport type ClipDef = SkRRect | SkRect | PathDef;\n\nexport const processClip = (canvas: SkCanvas, def: ClipDef, op: ClipOp) => {\n if (isPathDef(def)) {\n const path = processPath(def);\n canvas.clipPath(path, op, true);\n } else if (isRRect(def)) {\n canvas.clipRRect(def, op, true);\n } else {\n canvas.clipRect(def, op, true);\n }\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Font.ts"],"names":["isFont","fontDef","font","undefined","processFont","fontMgr","selectedFont","familyName","size","typeface","matchFamilyStyle","Error","Skia","Font"],"mappings":";;;;;;;AACA;;
|
1
|
+
{"version":3,"sources":["Font.ts"],"names":["isFont","fontDef","font","undefined","processFont","fontMgr","selectedFont","familyName","size","typeface","matchFamilyStyle","Error","Skia","Font"],"mappings":";;;;;;;AACA;;AAIO,MAAMA,MAAM,GAAIC,OAAD,IACpB;AACA;AACCA,OAAD,CAAiBC,IAAjB,KAA0BC,SAHrB;;;;AAKA,MAAMC,WAAW,GAAG,CAACC,OAAD,EAAmBJ,OAAnB,KAAwC;AACjE,MAAIK,YAAJ;;AACA,MAAIN,MAAM,CAACC,OAAD,CAAV,EAAqB;AACnBK,IAAAA,YAAY,GAAGL,OAAO,CAACC,IAAvB;AACD,GAFD,MAEO;AACL,UAAM;AAAEK,MAAAA,UAAF;AAAcC,MAAAA;AAAd,QAAuBP,OAA7B;AACA,UAAMQ,QAAQ,GAAGJ,OAAO,CAACK,gBAAR,CAAyBH,UAAzB,CAAjB;;AACA,QAAIE,QAAQ,KAAK,IAAjB,EAAuB;AACrB,YAAM,IAAIE,KAAJ,CAAW,yBAAwBJ,UAAW,EAA9C,CAAN;AACD;;AACDD,IAAAA,YAAY,GAAGM,WAAKC,IAAL,CAAUJ,QAAV,EAAoBD,IAApB,CAAf;AACD;;AACD,SAAOF,YAAP;AACD,CAbM","sourcesContent":["import type { FontMgr, SkFont } from \"../../skia\";\nimport { Skia } from \"../../skia/Skia\";\n\nexport type FontDef = { font: SkFont } | { familyName: string; size: number };\n\nexport const isFont = (fontDef: FontDef): fontDef is { font: SkFont } =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (fontDef as any).font !== undefined;\n\nexport const processFont = (fontMgr: FontMgr, fontDef: FontDef) => {\n let selectedFont: SkFont;\n if (isFont(fontDef)) {\n selectedFont = fontDef.font;\n } else {\n const { familyName, size } = fontDef;\n const typeface = fontMgr.matchFamilyStyle(familyName);\n if (typeface === null) {\n throw new Error(`No typeface found for ${familyName}`);\n }\n selectedFont = Skia.Font(typeface, size);\n }\n return selectedFont;\n};\n"]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.topRight = exports.topLeft = exports.rrect = exports.rect = exports.processRect = exports.processRRect = exports.point = exports.isRRect = exports.center = exports.bounds = exports.bottomRight = exports.bottomLeft = void 0;
|
6
|
+
exports.topRight = exports.topLeft = exports.rrect = exports.rect = exports.processRect = exports.processRRect = exports.point = exports.isRRect = exports.isEdge = exports.center = exports.bounds = exports.bottomRight = exports.bottomLeft = void 0;
|
7
7
|
|
8
8
|
var _skia = require("../../skia");
|
9
9
|
|
@@ -34,6 +34,10 @@ const bounds = rects => {
|
|
34
34
|
|
35
35
|
exports.bounds = bounds;
|
36
36
|
|
37
|
+
const isEdge = (pos, b) => pos.x === b.x || pos.y === b.y || pos.x === b.width || pos.y === b.height;
|
38
|
+
|
39
|
+
exports.isEdge = isEdge;
|
40
|
+
|
37
41
|
const topLeft = r => isRRect(r) ? (0, _Vector.vec)(r.rect.x, r.rect.y) : (0, _Vector.vec)(r.x, r.y);
|
38
42
|
|
39
43
|
exports.topLeft = topLeft;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Rects.ts"],"names":["point","x","y","Skia","Point","rect","width","height","XYWHRect","rrect","r","rx","ry","RRectXY","bounds","rects","Math","min","map","max","topLeft","isRRect","topRight","bottomLeft","bottomRight","center","isRRectCtor","def","undefined","isRectCtor","processRect","processRRect"],"mappings":";;;;;;;AAEA;;
|
1
|
+
{"version":3,"sources":["Rects.ts"],"names":["point","x","y","Skia","Point","rect","width","height","XYWHRect","rrect","r","rx","ry","RRectXY","bounds","rects","Math","min","map","max","isEdge","pos","b","topLeft","isRRect","topRight","bottomLeft","bottomRight","center","isRRectCtor","def","undefined","isRectCtor","processRect","processRRect"],"mappings":";;;;;;;AAEA;;AAGA;;AAEA;;AAPA;AASO,MAAMA,KAAK,GAAG,CAACC,CAAD,EAAYC,CAAZ,KAA0BC,WAAKC,KAAL,CAAWH,CAAX,EAAcC,CAAd,CAAxC;;;;AAEA,MAAMG,IAAI,GAAG,CAACJ,CAAD,EAAYC,CAAZ,EAAuBI,KAAvB,EAAsCC,MAAtC,KAClBJ,WAAKK,QAAL,CAAcP,CAAd,EAAiBC,CAAjB,EAAoBI,KAApB,EAA2BC,MAA3B,CADK;;;;AAGA,MAAME,KAAK,GAAG,CAACC,CAAD,EAAYC,EAAZ,EAAwBC,EAAxB,KACnBT,WAAKU,OAAL,CAAaH,CAAb,EAAgBC,EAAhB,EAAoBC,EAApB,CADK;;;;AAGA,MAAME,MAAM,GAAIC,KAAD,IAAqB;AACzC,QAAMd,CAAC,GAAGe,IAAI,CAACC,GAAL,CAAS,GAAGF,KAAK,CAACG,GAAN,CAAWR,CAAD,IAAOA,CAAC,CAACT,CAAnB,CAAZ,CAAV;AACA,QAAMC,CAAC,GAAGc,IAAI,CAACC,GAAL,CAAS,GAAGF,KAAK,CAACG,GAAN,CAAWR,CAAD,IAAOA,CAAC,CAACR,CAAnB,CAAZ,CAAV;AACA,QAAMI,KAAK,GAAGU,IAAI,CAACG,GAAL,CAAS,GAAGJ,KAAK,CAACG,GAAN,CAAWR,CAAD,IAAOA,CAAC,CAACT,CAAF,GAAMS,CAAC,CAACJ,KAAzB,CAAZ,CAAd;AACA,QAAMC,MAAM,GAAGS,IAAI,CAACG,GAAL,CAAS,GAAGJ,KAAK,CAAC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CAAZ,EAAe4B,GAAG,CAACxB,KAAnB,EAA0BwB,GAAG,CAACvB,MAA9B,CAAX;AACD,GAFD,MAEO;AACL,WAAOuB,GAAG,CAACzB,IAAX;AACD;AACF,CANM;;;;AAQA,MAAM6B,YAAY,GAAIJ,GAAD,IAAmB;AAC7C,MAAID,WAAW,CAACC,GAAD,CAAf,EAAsB;AACpB,UAAMpB,CAAC,GAAG,2BAAcoB,GAAG,CAACpB,CAAlB,CAAV;AACA,WAAOD,KAAK,CAACJ,IAAI,CAACyB,GAAG,CAAC7B,CAAL,EAAQ6B,GAAG,CAAC5B,CAAZ,EAAe4B,GAAG,CAACxB,KAAnB,EAA0BwB,GAAG,CAACvB,MAA9B,CAAL,EAA4CG,CAAC,CAACT,CAA9C,EAAiDS,CAAC,CAACR,CAAnD,CAAZ;AACD,GAHD,MAGO;AACL,WAAO4B,GAAG,CAACzB,IAAX;AACD;AACF,CAPM","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { SkRect, SkRRect } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport type { Vector } from \"./math/Vector\";\nimport { vec } from \"./math/Vector\";\nimport type { Radius } from \"./Radius\";\nimport { processRadius } from \"./Radius\";\n\nexport const point = (x: number, y: number) => Skia.Point(x, y);\n\nexport const rect = (x: number, y: number, width: number, height: number) =>\n Skia.XYWHRect(x, y, width, height);\n\nexport const rrect = (r: SkRect, rx: number, ry: number) =>\n Skia.RRectXY(r, rx, ry);\n\nexport const bounds = (rects: SkRect[]) => {\n const x = Math.min(...rects.map((r) => r.x));\n const y = Math.min(...rects.map((r) => r.y));\n const width = Math.max(...rects.map((r) => r.x + r.width));\n const height = Math.max(...rects.map((r) => r.y + r.height));\n return rect(x, y, width, height);\n};\n\nexport const isEdge = (pos: Vector, b: SkRect) =>\n pos.x === b.x || pos.y === b.y || pos.x === b.width || pos.y === b.height;\n\nexport const topLeft = (r: SkRect | SkRRect) =>\n isRRect(r) ? vec(r.rect.x, r.rect.y) : vec(r.x, r.y);\nexport const topRight = (r: SkRect | SkRRect) =>\n isRRect(r) ? vec(r.rect.x + r.rect.width, r.rect.y) : vec(r.x + r.width, r.y);\nexport const bottomLeft = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x, r.rect.y + r.rect.height)\n : vec(r.x, r.y + r.height);\nexport const bottomRight = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x + r.rect.width, r.rect.y + r.rect.height)\n : vec(r.x + r.width, r.y + r.height);\nexport const center = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x + r.rect.width / 2, r.rect.y + r.rect.height / 2)\n : vec(r.x + r.width / 2, r.y + r.height / 2);\n\n// We have an issue to check property existence on JSI backed instances\nconst isRRectCtor = (def: RRectDef): def is RRectCtor =>\n (def as any).rect === undefined;\n// We have an issue to check property existence on JSI backed instances\nconst isRectCtor = (def: RectDef): def is RectCtor =>\n (def as any).rect === undefined;\n// We have an issue to check property existence on JSI backed instances\nexport const isRRect = (def: SkRect | SkRRect): def is SkRRect =>\n (def as any).rect !== undefined;\n\nexport interface RectCtor {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface RRectCtor extends RectCtor {\n r: Radius;\n}\n\nexport type RectDef = RectCtor | { rect: SkRect };\nexport type RRectDef = RRectCtor | { rect: SkRRect };\n\nexport const processRect = (def: RectDef) => {\n if (isRectCtor(def)) {\n return rect(def.x, def.y, def.width, def.height);\n } else {\n return def.rect;\n }\n};\n\nexport const processRRect = (def: RRectDef) => {\n if (isRRectCtor(def)) {\n const r = processRadius(def.r);\n return rrect(rect(def.x, def.y, def.width, def.height), r.x, r.y);\n } else {\n return def.rect;\n }\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Transform.ts"],"names":["processTransform","canvas","transform","origin","matrix","concat","m3","transformOrigin","localMatrix","undefined","translate","a","translateX","x","translateY","y"],"mappings":";;;;;;;AAGA;;AASO,MAAMA,gBAAgB,GAAG,iBAG3B;AAAA,MAFH;AAAEC,IAAAA;AAAF,GAEG;AAAA,MADH;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,MAAb;AAAqBC,IAAAA;AAArB,GACG;;AACH,MAAIF,SAAJ,EAAe;AACb,QAAIE,MAAJ,EAAY;AACVH,MAAAA,MAAM,CAACI,MAAP,CAAcD,MAAd;AACD,KAFD,MAEO;AACL,YAAME,EAAE,GAAG,8BACTH,MAAM,GAAGI,eAAe,CAACJ,MAAD,EAASD,SAAT,CAAlB,GAAwCA,SADrC,CAAX;AAGAD,MAAAA,MAAM,CAACI,MAAP,CAAcC,EAAd;AACD;AACF;AACF,CAdM;;;;AAgBA,MAAME,WAAW,GAAG,SAA2C;AAAA,MAA1C;AAAEN,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAA0C;;AACpE,MAAID,SAAJ,EAAe;AACb,WAAO,8BACLC,MAAM,GAAGI,eAAe,CAACJ,MAAD,EAASD,SAAT,CAAlB,GAAwCA,SADzC,CAAP;AAGD;;AACD,SAAOO,SAAP;AACD,CAPM;;;;AASP,MAAMC,SAAS,GAAIC,CAAD,IAAe,CAAC;AAAEC,EAAAA,UAAU,EAAED,CAAC,CAACE;AAAhB,CAAD,EAAsB;AAAEC,EAAAA,UAAU,EAAEH,CAAC,CAACI;AAAhB,CAAtB,CAAjC;;AAEO,MAAMR,eAAe,GAAG,CAACJ,MAAD,EAAiBD,SAAjB,KAA6C,CAC1E,GAAGQ,SAAS,CAACP,MAAD,CAD8D,EAE1E,GAAGD,SAFuE,EAG1E,GAAGQ,SAAS,CAAC,eAAIP,MAAJ,CAAD,CAH8D,CAArE","sourcesContent":["import type { DrawingContext } from \"../DrawingContext\";\nimport type { SkMatrix } from \"../../skia/
|
1
|
+
{"version":3,"sources":["Transform.ts"],"names":["processTransform","canvas","transform","origin","matrix","concat","m3","transformOrigin","localMatrix","undefined","translate","a","translateX","x","translateY","y"],"mappings":";;;;;;;AAGA;;AASO,MAAMA,gBAAgB,GAAG,iBAG3B;AAAA,MAFH;AAAEC,IAAAA;AAAF,GAEG;AAAA,MADH;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,MAAb;AAAqBC,IAAAA;AAArB,GACG;;AACH,MAAIF,SAAJ,EAAe;AACb,QAAIE,MAAJ,EAAY;AACVH,MAAAA,MAAM,CAACI,MAAP,CAAcD,MAAd;AACD,KAFD,MAEO;AACL,YAAME,EAAE,GAAG,8BACTH,MAAM,GAAGI,eAAe,CAACJ,MAAD,EAASD,SAAT,CAAlB,GAAwCA,SADrC,CAAX;AAGAD,MAAAA,MAAM,CAACI,MAAP,CAAcC,EAAd;AACD;AACF;AACF,CAdM;;;;AAgBA,MAAME,WAAW,GAAG,SAA2C;AAAA,MAA1C;AAAEN,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAA0C;;AACpE,MAAID,SAAJ,EAAe;AACb,WAAO,8BACLC,MAAM,GAAGI,eAAe,CAACJ,MAAD,EAASD,SAAT,CAAlB,GAAwCA,SADzC,CAAP;AAGD;;AACD,SAAOO,SAAP;AACD,CAPM;;;;AASP,MAAMC,SAAS,GAAIC,CAAD,IAAe,CAAC;AAAEC,EAAAA,UAAU,EAAED,CAAC,CAACE;AAAhB,CAAD,EAAsB;AAAEC,EAAAA,UAAU,EAAEH,CAAC,CAACI;AAAhB,CAAtB,CAAjC;;AAEO,MAAMR,eAAe,GAAG,CAACJ,MAAD,EAAiBD,SAAjB,KAA6C,CAC1E,GAAGQ,SAAS,CAACP,MAAD,CAD8D,EAE1E,GAAGD,SAFuE,EAG1E,GAAGQ,SAAS,CAAC,eAAIP,MAAJ,CAAD,CAH8D,CAArE","sourcesContent":["import type { DrawingContext } from \"../DrawingContext\";\nimport type { SkMatrix } from \"../../skia/types\";\n\nimport { neg, processTransform2d } from \"./math\";\nimport type { Transforms2d, Vector } from \"./math\";\n\nexport interface TransformProps {\n transform?: Transforms2d;\n origin?: Vector;\n matrix?: SkMatrix;\n}\n\nexport const processTransform = (\n { canvas }: DrawingContext,\n { transform, origin, matrix }: TransformProps\n) => {\n if (transform) {\n if (matrix) {\n canvas.concat(matrix);\n } else {\n const m3 = processTransform2d(\n origin ? transformOrigin(origin, transform) : transform\n );\n canvas.concat(m3);\n }\n }\n};\n\nexport const localMatrix = ({ transform, origin }: TransformProps) => {\n if (transform) {\n return processTransform2d(\n origin ? transformOrigin(origin, transform) : transform\n );\n }\n return undefined;\n};\n\nconst translate = (a: Vector) => [{ translateX: a.x }, { translateY: a.y }];\n\nexport const transformOrigin = (origin: Vector, transform: Transforms2d) => [\n ...translate(origin),\n ...transform,\n ...translate(neg(origin)),\n];\n"]}
|
@@ -5,45 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Skia = void 0;
|
7
7
|
|
8
|
-
require("./NativeSetup");
|
9
|
-
|
10
8
|
/*global SkiaApi*/
|
11
9
|
|
12
10
|
/**
|
13
|
-
* Declares the
|
11
|
+
* Declares the SkiaApi as an available object in the global scope
|
14
12
|
*/
|
15
|
-
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
|
-
};
|
13
|
+
const Skia = SkiaApi;
|
48
14
|
exports.Skia = Skia;
|
49
15
|
//# sourceMappingURL=Skia.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Skia.ts"],"names":["Skia","
|
1
|
+
{"version":3,"sources":["Skia.ts"],"names":["Skia","SkiaApi"],"mappings":";;;;;;;AAAA;;AAGA;AACA;AACA;AAKO,MAAMA,IAAI,GAAGC,OAAb","sourcesContent":["/*global SkiaApi*/\nimport type { Skia as SkSkiaApi } from \"./types\";\n\n/**\n * Declares the SkiaApi as an available object in the global scope\n */\ndeclare global {\n var SkiaApi: SkSkiaApi;\n}\n\nexport const Skia = SkiaApi;\n"]}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.rgbaColor = exports.processColor = exports.RED = exports.GREEN = exports.BLUE = exports.ALPHA = void 0;
|
7
7
|
|
8
|
-
var _Skia = require("
|
8
|
+
var _Skia = require("../Skia");
|
9
9
|
|
10
10
|
const RED = 0;
|
11
11
|
exports.RED = RED;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Color.ts"],"names":["RED","GREEN","BLUE","ALPHA","rgbaColor","r","g","b","a","Float32Array","processColor","cl","currentOpacity","color","Skia","Color"],"mappings":";;;;;;;AAAA;;AAGO,MAAMA,GAAG,GAAG,CAAZ;;AACA,MAAMC,KAAK,GAAG,CAAd;;AACA,MAAMC,IAAI,GAAG,CAAb;;AACA,MAAMC,KAAK,GAAG,CAAd;;;AAEA,MAAMC,SAAS,GAAG,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,CAAvB,EAAkCC,CAAlC,KACvB,IAAIC,YAAJ,CAAiB,CAACJ,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CADK;;;;AAGA,MAAME,YAAY,GAAG,CAACC,EAAD,EAAYC,cAAZ,KAAuC;AACjE,QAAMC,KAAK,GAAGC,WAAKC,KAAL,CAAWJ,EAAX,CAAd;;AACAE,EAAAA,KAAK,CAACV,KAAD,CAAL,IAAgBS,cAAhB;AACA,SAAOC,KAAP;AACD,CAJM","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { Color } from \"../types\";\n\nexport const RED = 0;\nexport const GREEN = 1;\nexport const BLUE = 2;\nexport const ALPHA = 3;\n\nexport const rgbaColor = (r: number, g: number, b: number, a: number) =>\n new Float32Array([r, g, b, a]);\n\nexport const processColor = (cl: Color, currentOpacity: number) => {\n const color = Skia.Color(cl);\n color[ALPHA] *= currentOpacity;\n return color;\n};\n"]}
|
@@ -29,17 +29,38 @@ const useDataCollection = function (sources, factory) {
|
|
29
29
|
|
30
30
|
exports.useDataCollection = useDataCollection;
|
31
31
|
|
32
|
-
const useRawData = (source, factory) => {
|
32
|
+
const useRawData = (source, factory, onError) => {
|
33
33
|
const [data, setData] = (0, _react.useState)(null);
|
34
|
+
const prevSourceRef = (0, _react.useRef)();
|
34
35
|
(0, _react.useEffect)(() => {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
// Track to avoid re-fetching the same data
|
37
|
+
if (prevSourceRef.current !== source) {
|
38
|
+
prevSourceRef.current = source;
|
39
|
+
|
40
|
+
if (source !== null && source !== undefined) {
|
41
|
+
const factoryWrapper = data2 => {
|
42
|
+
const factoryResult = factory(data2);
|
43
|
+
|
44
|
+
if (factoryResult === null) {
|
45
|
+
onError && onError(new Error("Could not load data"));
|
46
|
+
setData(null);
|
47
|
+
} else {
|
48
|
+
setData(factoryResult);
|
49
|
+
}
|
50
|
+
};
|
39
51
|
|
40
|
-
|
52
|
+
if (source instanceof Uint8Array) {
|
53
|
+
factoryWrapper(_Skia.Skia.Data.fromBytes(source));
|
54
|
+
} else {
|
55
|
+
const uri = typeof source === "string" ? source : _reactNative.Image.resolveAssetSource(source).uri;
|
56
|
+
|
57
|
+
_Skia.Skia.Data.fromURI(uri).then(d => factoryWrapper(d));
|
58
|
+
}
|
59
|
+
}
|
60
|
+
} else {
|
61
|
+
setData(null);
|
41
62
|
}
|
42
|
-
}, [factory, source]);
|
63
|
+
}, [factory, onError, source]);
|
43
64
|
return data;
|
44
65
|
};
|
45
66
|
|
@@ -47,7 +68,7 @@ exports.useRawData = useRawData;
|
|
47
68
|
|
48
69
|
const identity = data => data;
|
49
70
|
|
50
|
-
const useData = source => useRawData(source, identity);
|
71
|
+
const useData = (source, onError) => useRawData(source, identity, onError);
|
51
72
|
|
52
73
|
exports.useData = useData;
|
53
74
|
//# sourceMappingURL=Data.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Data.ts"],"names":["useDataCollection","sources","factory","deps","data","setData","bytesOrURIs","map","source","Uint8Array","Image","resolveAssetSource","uri","Promise","all","bytesOrURI","Skia","Data","fromBytes","fromURI","then","d","useRawData","onError","prevSourceRef","current","undefined","factoryWrapper","data2","factoryResult","Error","identity","useData"],"mappings":";;;;;;;AACA;;AACA;;AAEA;;AAGO,MAAMA,iBAAiB,GAAG,UAC/BC,OAD+B,EAE/BC,OAF+B,EAI5B;AAAA,MADHC,IACG,uEADoB,EACpB;AACH,QAAM,CAACC,IAAD,EAAOC,OAAP,IAAkB,qBAAmB,IAAnB,CAAxB;AACA,wBAAU,MAAM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AAO,CAAC,IAAD,CAAP;AACD,WAHD,MAGO;AACLA,YAAAA,OAAO,CAACwB,aAAD,CAAP;AACD;AACF,SARD;;AASA,YAAIrB,MAAM,YAAYC,UAAtB,EAAkC;AAChCkB,UAAAA,cAAc,CAACX,WAAKC,IAAL,CAAUC,SAAV,CAAoBV,MAApB,CAAD,CAAd;AACD,SAFD,MAEO;AACL,gBAAMI,GAAG,GACP,OAAOJ,MAAP,KAAkB,QAAlB,GACIA,MADJ,GAEIE,mBAAMC,kBAAN,CAAyBH,MAAzB,EAAiCI,GAHvC;;AAIAI,qBAAKC,IAAL,CAAUE,OAAV,CAAkBP,GAAlB,EAAuBQ,IAAvB,CAA6BC,CAAD,IAAOM,cAAc,CAACN,CAAD,CAAjD;AACD;AACF;AACF,KAtBD,MAsBO;AACLhB,MAAAA,OAAO,CAAC,IAAD,CAAP;AACD;AACF,GA3BD,EA2BG,CAACH,OAAD,EAAUqB,OAAV,EAAmBf,MAAnB,CA3BH;AA4BA,SAAOJ,IAAP;AACD,CApCM;;;;AAsCP,MAAM2B,QAAQ,GAAI3B,IAAD,IAAgBA,IAAjC;;AAEO,MAAM4B,OAAO,GAAG,CACrBxB,MADqB,EAErBe,OAFqB,KAGlBD,UAAU,CAACd,MAAD,EAASuB,QAAT,EAAmBR,OAAnB,CAHR","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useRef, useEffect, useState } from \"react\";\nimport { Image } from \"react-native\";\n\nimport { Skia } from \"../Skia\";\nimport type { Data, DataSource } from \"../types\";\n\nexport const useDataCollection = <T>(\n sources: DataSource[],\n factory: (data: Data[]) => T,\n deps: DependencyList = []\n) => {\n const [data, setData] = useState<T | null>(null);\n useEffect(() => {\n const bytesOrURIs = sources.map((source) => {\n if (source instanceof Uint8Array) {\n return source;\n }\n return typeof source === \"string\"\n ? source\n : Image.resolveAssetSource(source).uri;\n });\n Promise.all(\n bytesOrURIs.map((bytesOrURI) =>\n bytesOrURI instanceof Uint8Array\n ? Skia.Data.fromBytes(bytesOrURI)\n : Skia.Data.fromURI(bytesOrURI)\n )\n ).then((d) => setData(factory(d)));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n return data;\n};\n\nexport const useRawData = <T>(\n source: DataSource | null | undefined,\n factory: (data: Data) => T,\n onError?: (err: Error) => void\n) => {\n const [data, setData] = useState<T | null>(null);\n const prevSourceRef = useRef<DataSource | null | undefined>();\n useEffect(() => {\n // Track to avoid re-fetching the same data\n if (prevSourceRef.current !== source) {\n prevSourceRef.current = source;\n if (source !== null && source !== undefined) {\n const factoryWrapper = (data2: Data) => {\n const factoryResult = factory(data2);\n if (factoryResult === null) {\n onError && onError(new Error(\"Could not load data\"));\n setData(null);\n } else {\n setData(factoryResult);\n }\n };\n if (source instanceof Uint8Array) {\n factoryWrapper(Skia.Data.fromBytes(source));\n } else {\n const uri =\n typeof source === \"string\"\n ? source\n : Image.resolveAssetSource(source).uri;\n Skia.Data.fromURI(uri).then((d) => factoryWrapper(d));\n }\n }\n } else {\n setData(null);\n }\n }, [factory, onError, source]);\n return data;\n};\n\nconst identity = (data: Data) => data;\n\nexport const useData = (\n source: DataSource | null | undefined,\n onError?: (err: Error) => void\n) => useRawData(source, identity, onError);\n"]}
|
@@ -9,15 +9,15 @@ var _react = require("react");
|
|
9
9
|
|
10
10
|
var _Skia = require("../Skia");
|
11
11
|
|
12
|
-
var _Typeface = require("
|
12
|
+
var _Typeface = require("./Typeface");
|
13
13
|
|
14
14
|
/*global SkiaApi*/
|
15
15
|
|
16
16
|
/**
|
17
17
|
* Returns a Skia Font object
|
18
18
|
* */
|
19
|
-
const useFont = (font, size) => {
|
20
|
-
const typeface = (0, _Typeface.useTypeface)(font);
|
19
|
+
const useFont = (font, size, onError) => {
|
20
|
+
const typeface = (0, _Typeface.useTypeface)(font, onError);
|
21
21
|
return (0, _react.useMemo)(() => {
|
22
22
|
if (typeface === null) {
|
23
23
|
return null;
|
@@ -33,4 +33,4 @@ const useFont = (font, size) => {
|
|
33
33
|
};
|
34
34
|
|
35
35
|
exports.useFont = useFont;
|
36
|
-
//# sourceMappingURL=
|
36
|
+
//# sourceMappingURL=Font.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Font.ts"],"names":["useFont","font","size","onError","typeface","Skia","Font"],"mappings":";;;;;;;AACA;;AAEA;;AAGA;;AANA;;AAQA;AACA;AACA;AACO,MAAMA,OAAO,GAAG,CACrBC,IADqB,EAErBC,IAFqB,EAGrBC,OAHqB,KAIH;AAClB,QAAMC,QAAQ,GAAG,2BAAYH,IAAZ,EAAkBE,OAAlB,CAAjB;AACA,SAAO,oBAAQ,MAAM;AACnB,QAAIC,QAAQ,KAAK,IAAjB,EAAuB;AACrB,aAAO,IAAP;AACD,KAFD,MAEO,IAAIA,QAAQ,IAAIF,IAAhB,EAAsB;AAC3B,aAAOG,WAAKC,IAAL,CAAUF,QAAV,EAAoBF,IAApB,CAAP;AACD,KAFM,MAEA,IAAIE,QAAQ,IAAI,CAACF,IAAjB,EAAuB;AAC5B,aAAOG,WAAKC,IAAL,CAAUF,QAAV,CAAP;AACD,KAFM,MAEA;AACL,aAAOC,WAAKC,IAAL,EAAP;AACD,KATkB,CAUnB;;AACD,GAXM,EAWJ,CAACF,QAAD,CAXI,CAAP;AAYD,CAlBM","sourcesContent":["/*global SkiaApi*/\nimport { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\nimport type { DataSource, SkFont } from \"../types\";\n\nimport { useTypeface } from \"./Typeface\";\n\n/**\n * Returns a Skia Font object\n * */\nexport const useFont = (\n font: DataSource | null | undefined,\n size?: number,\n onError?: (err: Error) => void\n): SkFont | null => {\n const typeface = useTypeface(font, onError);\n return useMemo(() => {\n if (typeface === null) {\n return null;\n } else if (typeface && size) {\n return Skia.Font(typeface, size);\n } else if (typeface && !size) {\n return Skia.Font(typeface);\n } else {\n return Skia.Font();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [typeface]);\n};\n"]}
|