@shopify/react-native-skia 0.0.135
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +7 -0
- package/README.md +52 -0
- package/android/CMakeLists.txt +151 -0
- package/android/README.md +14 -0
- package/android/build.gradle +258 -0
- package/android/cpp/jni/JniLoad.cpp +13 -0
- package/android/cpp/jni/JniPlatformContext.cpp +142 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +113 -0
- package/android/cpp/jni/JniSkiaManager.cpp +57 -0
- package/android/cpp/jni/include/JniPlatformContext.h +75 -0
- package/android/cpp/jni/include/JniSkiaDrawView.h +78 -0
- package/android/cpp/jni/include/JniSkiaManager.h +81 -0
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.cpp +73 -0
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.h +48 -0
- package/android/cpp/rnskia-android/RNSkPlatformContextImpl.h +54 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +325 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +131 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/shopify/reactnative/skia/PlatformContext.java +181 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +88 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +24 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaViewManager.java +72 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +131 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaManager.java +66 -0
- package/cpp/api/JsiSkApi.h +105 -0
- package/cpp/api/JsiSkCanvas.h +540 -0
- package/cpp/api/JsiSkColor.h +83 -0
- package/cpp/api/JsiSkColorFilter.h +43 -0
- package/cpp/api/JsiSkColorFilterFactory.h +99 -0
- package/cpp/api/JsiSkContourMeasure.h +102 -0
- package/cpp/api/JsiSkContourMeasureIter.h +90 -0
- package/cpp/api/JsiSkData.h +46 -0
- package/cpp/api/JsiSkDataFactory.h +92 -0
- package/cpp/api/JsiSkFont.h +354 -0
- package/cpp/api/JsiSkFontMgr.h +84 -0
- package/cpp/api/JsiSkFontMgrFactory.h +48 -0
- package/cpp/api/JsiSkHostObjects.h +83 -0
- package/cpp/api/JsiSkImage.h +124 -0
- package/cpp/api/JsiSkImageFactory.h +50 -0
- package/cpp/api/JsiSkImageFilter.h +45 -0
- package/cpp/api/JsiSkImageFilterFactory.h +237 -0
- package/cpp/api/JsiSkImageInfo.h +57 -0
- package/cpp/api/JsiSkMaskFilter.h +45 -0
- package/cpp/api/JsiSkMaskFilterFactory.h +42 -0
- package/cpp/api/JsiSkMatrix.h +119 -0
- package/cpp/api/JsiSkPaint.h +199 -0
- package/cpp/api/JsiSkPath.h +592 -0
- package/cpp/api/JsiSkPathEffect.h +45 -0
- package/cpp/api/JsiSkPathEffectFactory.h +123 -0
- package/cpp/api/JsiSkPathFactory.h +172 -0
- package/cpp/api/JsiSkPicture.h +71 -0
- package/cpp/api/JsiSkPictureFactory.h +50 -0
- package/cpp/api/JsiSkPictureRecorder.h +53 -0
- package/cpp/api/JsiSkPoint.h +81 -0
- package/cpp/api/JsiSkRRect.h +93 -0
- package/cpp/api/JsiSkRSXform.h +105 -0
- package/cpp/api/JsiSkRect.h +119 -0
- package/cpp/api/JsiSkRuntimeEffect.h +222 -0
- package/cpp/api/JsiSkRuntimeEffectFactory.h +42 -0
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +88 -0
- package/cpp/api/JsiSkSVG.h +43 -0
- package/cpp/api/JsiSkSVGFactory.h +48 -0
- package/cpp/api/JsiSkShader.h +45 -0
- package/cpp/api/JsiSkShaderFactory.h +214 -0
- package/cpp/api/JsiSkSurface.h +67 -0
- package/cpp/api/JsiSkSurfaceFactory.h +44 -0
- package/cpp/api/JsiSkTextBlob.h +50 -0
- package/cpp/api/JsiSkTextBlobFactory.h +109 -0
- package/cpp/api/JsiSkTypeface.h +85 -0
- package/cpp/api/JsiSkTypefaceFactory.h +34 -0
- package/cpp/api/JsiSkVertices.h +145 -0
- package/cpp/api/third_party/CSSColorParser.cpp +194 -0
- package/cpp/api/third_party/CSSColorParser.h +134 -0
- package/cpp/jsi/JsiHostObject.cpp +154 -0
- package/cpp/jsi/JsiHostObject.h +241 -0
- package/cpp/jsi/JsiSimpleValueWrapper.h +108 -0
- package/cpp/rnskia/RNSkAnimation.h +68 -0
- package/cpp/rnskia/RNSkDispatchQueue.cpp +84 -0
- package/cpp/rnskia/RNSkDispatchQueue.h +47 -0
- package/cpp/rnskia/RNSkDrawView.cpp +291 -0
- package/cpp/rnskia/RNSkDrawView.h +212 -0
- package/cpp/rnskia/RNSkInfoParameter.h +102 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +308 -0
- package/cpp/rnskia/RNSkManager.cpp +81 -0
- package/cpp/rnskia/RNSkManager.h +81 -0
- package/cpp/rnskia/RNSkPlatformContext.h +196 -0
- package/cpp/rnskia/RNSkValueApi.h +73 -0
- package/cpp/rnskia/values/RNSkClockValue.h +141 -0
- package/cpp/rnskia/values/RNSkComputedValue.h +99 -0
- package/cpp/rnskia/values/RNSkReadonlyValue.h +142 -0
- package/cpp/rnskia/values/RNSkValue.h +117 -0
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +61 -0
- package/cpp/skia/include/android/SkAnimatedImage.h +179 -0
- package/cpp/skia/include/c/sk_canvas.h +159 -0
- package/cpp/skia/include/c/sk_colorspace.h +25 -0
- package/cpp/skia/include/c/sk_data.h +65 -0
- package/cpp/skia/include/c/sk_image.h +71 -0
- package/cpp/skia/include/c/sk_imageinfo.h +62 -0
- package/cpp/skia/include/c/sk_maskfilter.h +47 -0
- package/cpp/skia/include/c/sk_matrix.h +49 -0
- package/cpp/skia/include/c/sk_paint.h +145 -0
- package/cpp/skia/include/c/sk_path.h +102 -0
- package/cpp/skia/include/c/sk_picture.h +70 -0
- package/cpp/skia/include/c/sk_shader.h +143 -0
- package/cpp/skia/include/c/sk_surface.h +73 -0
- package/cpp/skia/include/c/sk_types.h +278 -0
- package/cpp/skia/include/codec/SkAndroidCodec.h +263 -0
- package/cpp/skia/include/codec/SkCodec.h +998 -0
- package/cpp/skia/include/codec/SkCodecAnimation.h +61 -0
- package/cpp/skia/include/codec/SkEncodedOrigin.h +54 -0
- package/cpp/skia/include/config/SkUserConfig.h +89 -0
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkAnnotation.h +50 -0
- package/cpp/skia/include/core/SkBBHFactory.h +63 -0
- package/cpp/skia/include/core/SkBitmap.h +1214 -0
- package/cpp/skia/include/core/SkBlendMode.h +110 -0
- package/cpp/skia/include/core/SkBlender.h +33 -0
- package/cpp/skia/include/core/SkBlurTypes.h +22 -0
- package/cpp/skia/include/core/SkCanvas.h +2594 -0
- package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +61 -0
- package/cpp/skia/include/core/SkClipOp.h +19 -0
- package/cpp/skia/include/core/SkColor.h +438 -0
- package/cpp/skia/include/core/SkColorFilter.h +91 -0
- package/cpp/skia/include/core/SkColorPriv.h +152 -0
- package/cpp/skia/include/core/SkColorSpace.h +245 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkContourMeasure.h +131 -0
- package/cpp/skia/include/core/SkCoverageMode.h +30 -0
- package/cpp/skia/include/core/SkCubicMap.h +45 -0
- package/cpp/skia/include/core/SkData.h +188 -0
- package/cpp/skia/include/core/SkDataTable.h +118 -0
- package/cpp/skia/include/core/SkDeferredDisplayList.h +110 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +97 -0
- package/cpp/skia/include/core/SkDocument.h +91 -0
- package/cpp/skia/include/core/SkDrawLooper.h +135 -0
- package/cpp/skia/include/core/SkDrawable.h +167 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +36 -0
- package/cpp/skia/include/core/SkExecutor.h +41 -0
- package/cpp/skia/include/core/SkFlattenable.h +113 -0
- package/cpp/skia/include/core/SkFont.h +535 -0
- package/cpp/skia/include/core/SkFontArguments.h +94 -0
- package/cpp/skia/include/core/SkFontMetrics.h +138 -0
- package/cpp/skia/include/core/SkFontMgr.h +157 -0
- package/cpp/skia/include/core/SkFontParameters.h +42 -0
- package/cpp/skia/include/core/SkFontStyle.h +81 -0
- package/cpp/skia/include/core/SkFontTypes.h +25 -0
- package/cpp/skia/include/core/SkGraphics.h +166 -0
- package/cpp/skia/include/core/SkICC.h +19 -0
- package/cpp/skia/include/core/SkImage.h +1347 -0
- package/cpp/skia/include/core/SkImageEncoder.h +69 -0
- package/cpp/skia/include/core/SkImageFilter.h +114 -0
- package/cpp/skia/include/core/SkImageGenerator.h +216 -0
- package/cpp/skia/include/core/SkImageInfo.h +614 -0
- package/cpp/skia/include/core/SkM44.h +426 -0
- package/cpp/skia/include/core/SkMallocPixelRef.h +42 -0
- package/cpp/skia/include/core/SkMaskFilter.h +50 -0
- package/cpp/skia/include/core/SkMath.h +54 -0
- package/cpp/skia/include/core/SkMatrix.h +1986 -0
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +9 -0
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkOverdrawCanvas.h +68 -0
- package/cpp/skia/include/core/SkPaint.h +705 -0
- package/cpp/skia/include/core/SkPath.h +1878 -0
- package/cpp/skia/include/core/SkPathBuilder.h +263 -0
- package/cpp/skia/include/core/SkPathEffect.h +106 -0
- package/cpp/skia/include/core/SkPathMeasure.h +88 -0
- package/cpp/skia/include/core/SkPathTypes.h +59 -0
- package/cpp/skia/include/core/SkPicture.h +280 -0
- package/cpp/skia/include/core/SkPictureRecorder.h +115 -0
- package/cpp/skia/include/core/SkPixelRef.h +123 -0
- package/cpp/skia/include/core/SkPixmap.h +721 -0
- package/cpp/skia/include/core/SkPngChunkReader.h +45 -0
- package/cpp/skia/include/core/SkPoint.h +566 -0
- package/cpp/skia/include/core/SkPoint3.h +157 -0
- package/cpp/skia/include/core/SkPromiseImageTexture.h +46 -0
- package/cpp/skia/include/core/SkRRect.h +512 -0
- package/cpp/skia/include/core/SkRSXform.h +69 -0
- package/cpp/skia/include/core/SkRasterHandleAllocator.h +92 -0
- package/cpp/skia/include/core/SkRect.h +1378 -0
- package/cpp/skia/include/core/SkRefCnt.h +382 -0
- package/cpp/skia/include/core/SkRegion.h +672 -0
- package/cpp/skia/include/core/SkSamplingOptions.h +103 -0
- package/cpp/skia/include/core/SkScalar.h +194 -0
- package/cpp/skia/include/core/SkSerialProcs.h +73 -0
- package/cpp/skia/include/core/SkShader.h +148 -0
- package/cpp/skia/include/core/SkSize.h +90 -0
- package/cpp/skia/include/core/SkSpan.h +89 -0
- package/cpp/skia/include/core/SkStream.h +524 -0
- package/cpp/skia/include/core/SkString.h +299 -0
- package/cpp/skia/include/core/SkStrokeRec.h +154 -0
- package/cpp/skia/include/core/SkSurface.h +1100 -0
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +263 -0
- package/cpp/skia/include/core/SkSurfaceProps.h +92 -0
- package/cpp/skia/include/core/SkSwizzle.h +19 -0
- package/cpp/skia/include/core/SkTextBlob.h +503 -0
- package/cpp/skia/include/core/SkTileMode.h +41 -0
- package/cpp/skia/include/core/SkTime.h +63 -0
- package/cpp/skia/include/core/SkTraceMemoryDump.h +99 -0
- package/cpp/skia/include/core/SkTypeface.h +470 -0
- package/cpp/skia/include/core/SkTypes.h +625 -0
- package/cpp/skia/include/core/SkUnPreMultiply.h +56 -0
- package/cpp/skia/include/core/SkVertices.h +132 -0
- package/cpp/skia/include/core/SkYUVAInfo.h +304 -0
- package/cpp/skia/include/core/SkYUVAPixmaps.h +336 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +196 -0
- package/cpp/skia/include/docs/SkXPSDocument.h +27 -0
- package/cpp/skia/include/effects/Sk1DPathEffect.h +35 -0
- package/cpp/skia/include/effects/Sk2DPathEffect.h +30 -0
- package/cpp/skia/include/effects/SkBlenders.h +27 -0
- package/cpp/skia/include/effects/SkBlurDrawLooper.h +26 -0
- package/cpp/skia/include/effects/SkBlurMaskFilter.h +35 -0
- package/cpp/skia/include/effects/SkColorMatrix.h +55 -0
- package/cpp/skia/include/effects/SkColorMatrixFilter.h +25 -0
- package/cpp/skia/include/effects/SkCornerPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkDashPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkDiscretePathEffect.h +37 -0
- package/cpp/skia/include/effects/SkGradientShader.h +255 -0
- package/cpp/skia/include/effects/SkHighContrastFilter.h +80 -0
- package/cpp/skia/include/effects/SkImageFilters.h +551 -0
- package/cpp/skia/include/effects/SkLayerDrawLooper.h +161 -0
- package/cpp/skia/include/effects/SkLumaColorFilter.h +34 -0
- package/cpp/skia/include/effects/SkOpPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkOverdrawColorFilter.h +29 -0
- package/cpp/skia/include/effects/SkPerlinNoiseShader.h +54 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +522 -0
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +24 -0
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkTableColorFilter.h +42 -0
- package/cpp/skia/include/effects/SkTableMaskFilter.h +37 -0
- package/cpp/skia/include/effects/SkTrimPathEffect.h +41 -0
- package/cpp/skia/include/encode/SkEncoder.h +42 -0
- package/cpp/skia/include/encode/SkJpegEncoder.h +97 -0
- package/cpp/skia/include/encode/SkPngEncoder.h +99 -0
- package/cpp/skia/include/encode/SkWebpEncoder.h +48 -0
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendDrawableInfo.h +44 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +140 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +644 -0
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +91 -0
- package/cpp/skia/include/gpu/GrConfig.h +53 -0
- package/cpp/skia/include/gpu/GrContextOptions.h +355 -0
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +166 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +885 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +52 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +43 -0
- package/cpp/skia/include/gpu/GrRecordingContext.h +282 -0
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +166 -0
- package/cpp/skia/include/gpu/GrTypes.h +244 -0
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +124 -0
- package/cpp/skia/include/gpu/ShaderErrorHandler.h +36 -0
- package/cpp/skia/include/gpu/d3d/GrD3DBackendContext.h +35 -0
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +248 -0
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +95 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h +11 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleInterface.h +39 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig.h +79 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig_chrome.h +14 -0
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +78 -0
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +306 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +342 -0
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +207 -0
- package/cpp/skia/include/gpu/gl/egl/GrGLMakeEGLInterface.h +14 -0
- package/cpp/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h +14 -0
- 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 +143 -0
- package/cpp/skia/include/gpu/mtl/GrMtlBackendContext.h +21 -0
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +76 -0
- package/cpp/skia/include/gpu/vk/GrVkExtensions.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +140 -0
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +187 -0
- package/cpp/skia/include/gpu/vk/GrVkVulkan.h +32 -0
- package/cpp/skia/include/pathops/SkPathOps.h +113 -0
- package/cpp/skia/include/ports/SkCFObject.h +180 -0
- package/cpp/skia/include/ports/SkFontConfigInterface.h +115 -0
- package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +20 -0
- package/cpp/skia/include/ports/SkFontMgr_android.h +45 -0
- package/cpp/skia/include/ports/SkFontMgr_directory.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_empty.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_fontconfig.h +22 -0
- package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +19 -0
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +102 -0
- package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +27 -0
- package/cpp/skia/include/ports/SkImageGeneratorCG.h +20 -0
- package/cpp/skia/include/ports/SkImageGeneratorNDK.h +40 -0
- package/cpp/skia/include/ports/SkImageGeneratorWIC.h +35 -0
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +139 -0
- package/cpp/skia/include/ports/SkTypeface_mac.h +44 -0
- package/cpp/skia/include/ports/SkTypeface_win.h +79 -0
- package/cpp/skia/include/private/SingleOwner.h +72 -0
- package/cpp/skia/include/private/SkBitmaskEnum.h +59 -0
- package/cpp/skia/include/private/SkChecksum.h +77 -0
- package/cpp/skia/include/private/SkColorData.h +441 -0
- package/cpp/skia/include/private/SkDeque.h +141 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +266 -0
- package/cpp/skia/include/private/SkFixed.h +141 -0
- package/cpp/skia/include/private/SkFloatBits.h +91 -0
- package/cpp/skia/include/private/SkFloatingPoint.h +219 -0
- package/cpp/skia/include/private/SkHalf.h +85 -0
- package/cpp/skia/include/private/SkIDChangeListener.h +75 -0
- package/cpp/skia/include/private/SkImageInfoPriv.h +199 -0
- package/cpp/skia/include/private/SkMacros.h +79 -0
- package/cpp/skia/include/private/SkMalloc.h +143 -0
- package/cpp/skia/include/private/SkMutex.h +64 -0
- package/cpp/skia/include/private/SkNoncopyable.h +30 -0
- package/cpp/skia/include/private/SkNx.h +430 -0
- package/cpp/skia/include/private/SkNx_neon.h +713 -0
- package/cpp/skia/include/private/SkNx_sse.h +823 -0
- package/cpp/skia/include/private/SkOnce.h +53 -0
- package/cpp/skia/include/private/SkOpts_spi.h +21 -0
- package/cpp/skia/include/private/SkPathRef.h +522 -0
- package/cpp/skia/include/private/SkSLDefines.h +64 -0
- package/cpp/skia/include/private/SkSLIRNode.h +64 -0
- package/cpp/skia/include/private/SkSLLayout.h +144 -0
- package/cpp/skia/include/private/SkSLModifiers.h +142 -0
- package/cpp/skia/include/private/SkSLProgramElement.h +77 -0
- package/cpp/skia/include/private/SkSLProgramKind.h +34 -0
- package/cpp/skia/include/private/SkSLSampleUsage.h +89 -0
- package/cpp/skia/include/private/SkSLStatement.h +86 -0
- package/cpp/skia/include/private/SkSLString.h +41 -0
- package/cpp/skia/include/private/SkSLSymbol.h +90 -0
- package/cpp/skia/include/private/SkSafe32.h +34 -0
- package/cpp/skia/include/private/SkSafe_math.h +52 -0
- package/cpp/skia/include/private/SkSemaphore.h +83 -0
- package/cpp/skia/include/private/SkShadowFlags.h +27 -0
- package/cpp/skia/include/private/SkSpinlock.h +57 -0
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +641 -0
- package/cpp/skia/include/private/SkTDArray.h +385 -0
- package/cpp/skia/include/private/SkTFitsIn.h +99 -0
- package/cpp/skia/include/private/SkTHash.h +590 -0
- package/cpp/skia/include/private/SkTLogic.h +56 -0
- package/cpp/skia/include/private/SkTPin.h +23 -0
- package/cpp/skia/include/private/SkTemplates.h +453 -0
- package/cpp/skia/include/private/SkThreadAnnotations.h +91 -0
- package/cpp/skia/include/private/SkThreadID.h +20 -0
- package/cpp/skia/include/private/SkTo.h +28 -0
- package/cpp/skia/include/private/SkUniquePaintParamsID.h +35 -0
- package/cpp/skia/include/private/SkVx.h +943 -0
- package/cpp/skia/include/private/SkWeakRefCnt.h +170 -0
- package/cpp/skia/include/private/chromium/GrSlug.h +78 -0
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +149 -0
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +99 -0
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +74 -0
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +26 -0
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +108 -0
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +55 -0
- package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +31 -0
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +75 -0
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1012 -0
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +107 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +38 -0
- package/cpp/skia/include/sksl/DSLBlock.h +72 -0
- package/cpp/skia/include/sksl/DSLCase.h +68 -0
- package/cpp/skia/include/sksl/DSLCore.h +499 -0
- package/cpp/skia/include/sksl/DSLExpression.h +332 -0
- package/cpp/skia/include/sksl/DSLFunction.h +121 -0
- package/cpp/skia/include/sksl/DSLLayout.h +92 -0
- package/cpp/skia/include/sksl/DSLModifiers.h +66 -0
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +32 -0
- package/cpp/skia/include/sksl/DSLStatement.h +117 -0
- package/cpp/skia/include/sksl/DSLSymbols.h +71 -0
- package/cpp/skia/include/sksl/DSLType.h +263 -0
- package/cpp/skia/include/sksl/DSLVar.h +321 -0
- package/cpp/skia/include/sksl/DSLWrapper.h +77 -0
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +28 -0
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +78 -0
- 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 +41 -0
- package/cpp/skia/include/third_party/skcms/LICENSE +29 -0
- package/cpp/skia/include/third_party/skcms/skcms.h +394 -0
- package/cpp/skia/include/third_party/vulkan/LICENSE +29 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +84 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +93 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +112 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +12620 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +315 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +55 -0
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +67 -0
- package/cpp/skia/include/utils/SkBase64.h +51 -0
- package/cpp/skia/include/utils/SkCamera.h +109 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +81 -0
- package/cpp/skia/include/utils/SkCustomTypeface.h +50 -0
- package/cpp/skia/include/utils/SkEventTracer.h +79 -0
- package/cpp/skia/include/utils/SkNWayCanvas.h +126 -0
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +80 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +22 -0
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +65 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +136 -0
- package/cpp/skia/include/utils/SkParse.h +34 -0
- package/cpp/skia/include/utils/SkParsePath.h +25 -0
- package/cpp/skia/include/utils/SkRandom.h +169 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +86 -0
- package/cpp/skia/include/utils/SkTextUtils.h +42 -0
- package/cpp/skia/include/utils/SkTraceEventPhase.h +19 -0
- package/cpp/skia/include/utils/mac/SkCGUtils.h +78 -0
- package/cpp/skia/modules/skresources/include/SkResources.h +254 -0
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +113 -0
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +160 -0
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGClipPath.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +100 -0
- package/cpp/skia/modules/svg/include/SkSVGDefs.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGEllipse.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFe.h +85 -0
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +89 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +121 -0
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +47 -0
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +40 -0
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +39 -0
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +69 -0
- package/cpp/skia/modules/svg/include/SkSVGG.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +48 -0
- package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +19 -0
- package/cpp/skia/modules/svg/include/SkSVGImage.h +58 -0
- package/cpp/skia/modules/svg/include/SkSVGLine.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +37 -0
- package/cpp/skia/modules/svg/include/SkSVGMask.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGNode.h +223 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGPath.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +55 -0
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +38 -0
- package/cpp/skia/modules/svg/include/SkSVGRect.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +188 -0
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +54 -0
- package/cpp/skia/modules/svg/include/SkSVGShape.h +33 -0
- package/cpp/skia/modules/svg/include/SkSVGStop.h +34 -0
- package/cpp/skia/modules/svg/include/SkSVGText.h +122 -0
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +730 -0
- package/cpp/skia/modules/svg/include/SkSVGUse.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGValue.h +85 -0
- package/cpp/skia/readme.txt +1 -0
- package/cpp/utils/RNSkLog.h +80 -0
- package/cpp/utils/RNSkMeasureTime.h +32 -0
- package/cpp/utils/RNSkTimingInfo.h +103 -0
- package/ios/RNSkia-iOS/DisplayLink.h +17 -0
- package/ios/RNSkia-iOS/DisplayLink.mm +36 -0
- package/ios/RNSkia-iOS/PlatformContext.h +76 -0
- package/ios/RNSkia-iOS/PlatformContext.mm +52 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.h +52 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +112 -0
- package/ios/RNSkia-iOS/SkiaDrawView.h +23 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +169 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.h +7 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +42 -0
- package/ios/RNSkia-iOS/SkiaManager.h +17 -0
- package/ios/RNSkia-iOS/SkiaManager.mm +50 -0
- package/ios/RNSkiaModule.h +11 -0
- package/ios/RNSkiaModule.mm +42 -0
- package/ios/Rnskia.xcodeproj/project.pbxproj +281 -0
- package/ios/Rnskia.xcworkspace/contents.xcworkspacedata +7 -0
- package/jestSetup.js +5 -0
- package/lib/commonjs/animation/decay/decay.js +42 -0
- package/lib/commonjs/animation/decay/decay.js.map +1 -0
- package/lib/commonjs/animation/decay/index.js +14 -0
- package/lib/commonjs/animation/decay/index.js.map +1 -0
- package/lib/commonjs/animation/decay/runDecay.js +48 -0
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -0
- package/lib/commonjs/animation/decay/types.js +6 -0
- package/lib/commonjs/animation/decay/types.js.map +1 -0
- package/lib/commonjs/animation/functions/index.js +58 -0
- package/lib/commonjs/animation/functions/index.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolate.js +142 -0
- package/lib/commonjs/animation/functions/interpolate.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateColors.js +39 -0
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js +79 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
- package/lib/commonjs/animation/index.js +58 -0
- package/lib/commonjs/animation/index.js.map +1 -0
- package/lib/commonjs/animation/spring/Spring.js +77 -0
- package/lib/commonjs/animation/spring/Spring.js.map +1 -0
- package/lib/commonjs/animation/spring/functions/index.js +14 -0
- package/lib/commonjs/animation/spring/functions/index.js.map +1 -0
- package/lib/commonjs/animation/spring/functions/spring.js +94 -0
- package/lib/commonjs/animation/spring/functions/spring.js.map +1 -0
- package/lib/commonjs/animation/spring/index.js +30 -0
- package/lib/commonjs/animation/spring/index.js.map +1 -0
- package/lib/commonjs/animation/spring/runSpring.js +32 -0
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -0
- package/lib/commonjs/animation/spring/types.js +2 -0
- package/lib/commonjs/animation/spring/types.js.map +1 -0
- package/lib/commonjs/animation/spring/useSpring.js +24 -0
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -0
- package/lib/commonjs/animation/timing/Easing.js +108 -0
- package/lib/commonjs/animation/timing/Easing.js.map +1 -0
- package/lib/commonjs/animation/timing/createTiming.js +59 -0
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/bezier.js +147 -0
- package/lib/commonjs/animation/timing/functions/bezier.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +56 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/index.js +54 -0
- package/lib/commonjs/animation/timing/functions/index.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/timing.js +50 -0
- package/lib/commonjs/animation/timing/functions/timing.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/types.js +2 -0
- package/lib/commonjs/animation/timing/functions/types.js.map +1 -0
- package/lib/commonjs/animation/timing/index.js +38 -0
- package/lib/commonjs/animation/timing/index.js.map +1 -0
- package/lib/commonjs/animation/timing/runTiming.js +33 -0
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -0
- package/lib/commonjs/animation/timing/useLoop.js +22 -0
- package/lib/commonjs/animation/timing/useLoop.js.map +1 -0
- package/lib/commonjs/animation/timing/useTiming.js +66 -0
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -0
- package/lib/commonjs/animation/types.js +2 -0
- package/lib/commonjs/animation/types.js.map +1 -0
- package/lib/commonjs/external/index.js +19 -0
- package/lib/commonjs/external/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/index.js +19 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +86 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/commonjs/index.js +99 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/mock/index.js +134 -0
- package/lib/commonjs/mock/index.js.map +1 -0
- package/lib/commonjs/renderer/Canvas.js +163 -0
- package/lib/commonjs/renderer/Canvas.js.map +1 -0
- package/lib/commonjs/renderer/DependencyManager.js +70 -0
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -0
- package/lib/commonjs/renderer/DrawingContext.js +6 -0
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -0
- package/lib/commonjs/renderer/HostConfig.js +250 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -0
- package/lib/commonjs/renderer/components/Blend.js +47 -0
- package/lib/commonjs/renderer/components/Blend.js.map +1 -0
- package/lib/commonjs/renderer/components/Compose.js +40 -0
- package/lib/commonjs/renderer/components/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/Drawing.js +31 -0
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/components/Group.js +85 -0
- package/lib/commonjs/renderer/components/Group.js.map +1 -0
- package/lib/commonjs/renderer/components/Mask.js +61 -0
- package/lib/commonjs/renderer/components/Mask.js.map +1 -0
- package/lib/commonjs/renderer/components/Paint.js +37 -0
- package/lib/commonjs/renderer/components/Paint.js.map +1 -0
- package/lib/commonjs/renderer/components/Picture.js +35 -0
- package/lib/commonjs/renderer/components/Picture.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +33 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +54 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/index.js +32 -0
- package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +41 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +24 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +39 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +40 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js +160 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/commonjs/renderer/components/image/Image.js +56 -0
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js +46 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js +85 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/commonjs/renderer/components/image/index.js +58 -0
- package/lib/commonjs/renderer/components/image/index.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +46 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +54 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +28 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +44 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +40 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +44 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +55 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +33 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/index.js +227 -0
- package/lib/commonjs/renderer/components/index.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +43 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js +19 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +46 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +43 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +53 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +49 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +33 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js +97 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Color.js +35 -0
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +43 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js +32 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +44 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +44 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js +42 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js +52 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +45 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +43 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +46 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/index.js +123 -0
- package/lib/commonjs/renderer/components/shaders/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Box.js +123 -0
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js +44 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js +35 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js +31 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js +42 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Line.js +35 -0
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js +39 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js +53 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Path.js +67 -0
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Points.js +45 -0
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js +35 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +38 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js +55 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/index.js +175 -0
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js +61 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Text.js +46 -0
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js +40 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextPath.js +91 -0
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -0
- package/lib/commonjs/renderer/components/text/index.js +58 -0
- package/lib/commonjs/renderer/components/text/index.js.map +1 -0
- package/lib/commonjs/renderer/index.js +71 -0
- package/lib/commonjs/renderer/index.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Container.js +28 -0
- package/lib/commonjs/renderer/nodes/Container.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Declaration.js +58 -0
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Drawing.js +60 -0
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Node.js +71 -0
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -0
- package/lib/commonjs/renderer/nodes/index.js +58 -0
- package/lib/commonjs/renderer/nodes/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js +52 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/index.js +19 -0
- package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Circles.js +24 -0
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -0
- package/lib/commonjs/renderer/processors/Clips.js +24 -0
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -0
- package/lib/commonjs/renderer/processors/Color.js +27 -0
- package/lib/commonjs/renderer/processors/Color.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +39 -0
- package/lib/commonjs/renderer/processors/Font.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paint.js +98 -0
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paths.js +26 -0
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -0
- package/lib/commonjs/renderer/processors/Radius.js +17 -0
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -0
- package/lib/commonjs/renderer/processors/Rects.js +41 -0
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -0
- package/lib/commonjs/renderer/processors/Transform.js +65 -0
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -0
- package/lib/commonjs/renderer/processors/index.js +149 -0
- package/lib/commonjs/renderer/processors/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js +43 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Math.js +29 -0
- package/lib/commonjs/renderer/processors/math/Math.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js +22 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/index.js +45 -0
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -0
- package/lib/commonjs/renderer/typeddash.js +41 -0
- package/lib/commonjs/renderer/typeddash.js.map +1 -0
- package/lib/commonjs/renderer/useCanvas.js +30 -0
- package/lib/commonjs/renderer/useCanvas.js.map +1 -0
- package/lib/commonjs/renderer/useContextBridge.js +35 -0
- package/lib/commonjs/renderer/useContextBridge.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +19 -0
- package/lib/commonjs/skia/NativeSetup.js.map +1 -0
- package/lib/commonjs/skia/Skia.js +15 -0
- package/lib/commonjs/skia/Skia.js.map +1 -0
- package/lib/commonjs/skia/Skia.web.js +12 -0
- package/lib/commonjs/skia/Skia.web.js.map +1 -0
- package/lib/commonjs/skia/core/Data.js +69 -0
- package/lib/commonjs/skia/core/Data.js.map +1 -0
- package/lib/commonjs/skia/core/Font.js +34 -0
- package/lib/commonjs/skia/core/Font.js.map +1 -0
- package/lib/commonjs/skia/core/Image.js +18 -0
- package/lib/commonjs/skia/core/Image.js.map +1 -0
- package/lib/commonjs/skia/core/Matrix.js +15 -0
- package/lib/commonjs/skia/core/Matrix.js.map +1 -0
- package/lib/commonjs/skia/core/Paint.js +28 -0
- package/lib/commonjs/skia/core/Paint.js.map +1 -0
- package/lib/commonjs/skia/core/Path.js +72 -0
- package/lib/commonjs/skia/core/Path.js.map +1 -0
- package/lib/commonjs/skia/core/Picture.js +30 -0
- package/lib/commonjs/skia/core/Picture.js.map +1 -0
- package/lib/commonjs/skia/core/RRect.js +13 -0
- package/lib/commonjs/skia/core/RRect.js.map +1 -0
- package/lib/commonjs/skia/core/Rect.js +47 -0
- package/lib/commonjs/skia/core/Rect.js.map +1 -0
- package/lib/commonjs/skia/core/SVG.js +15 -0
- package/lib/commonjs/skia/core/SVG.js.map +1 -0
- package/lib/commonjs/skia/core/Typeface.js +18 -0
- package/lib/commonjs/skia/core/Typeface.js.map +1 -0
- package/lib/commonjs/skia/core/Vector.js +49 -0
- package/lib/commonjs/skia/core/Vector.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +162 -0
- package/lib/commonjs/skia/core/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +45 -0
- package/lib/commonjs/skia/index.js.map +1 -0
- package/lib/commonjs/skia/types/Canvas.js +22 -0
- package/lib/commonjs/skia/types/Canvas.js.map +1 -0
- package/lib/commonjs/skia/types/Color.js +2 -0
- package/lib/commonjs/skia/types/Color.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js +11 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js +6 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/index.js +32 -0
- package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -0
- package/lib/commonjs/skia/types/ContourMeasure.js +6 -0
- package/lib/commonjs/skia/types/ContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/types/Data/Data.js +6 -0
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -0
- package/lib/commonjs/skia/types/Data/DataFactory.js +6 -0
- package/lib/commonjs/skia/types/Data/DataFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Data/index.js +32 -0
- package/lib/commonjs/skia/types/Data/index.js.map +1 -0
- package/lib/commonjs/skia/types/Font/Font.js +81 -0
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/types/Font/index.js +19 -0
- package/lib/commonjs/skia/types/Font/index.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgr.js +6 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgr.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgrFactory.js +6 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/index.js +32 -0
- package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/types/Image/Image.js +32 -0
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.js +46 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Image/index.js +32 -0
- package/lib/commonjs/skia/types/Image/index.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js +20 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js +16 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/index.js +32 -0
- package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -0
- package/lib/commonjs/skia/types/JsiInstance.js +2 -0
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -0
- package/lib/commonjs/skia/types/MaskFilter.js +20 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/types/Matrix.js +78 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.js +69 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/Paint.js +36 -0
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/index.js +32 -0
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/types/Path/Path.js +47 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -0
- package/lib/commonjs/skia/types/Path/PathFactory.js +6 -0
- package/lib/commonjs/skia/types/Path/PathFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Path/index.js +32 -0
- package/lib/commonjs/skia/types/Path/index.js.map +1 -0
- package/lib/commonjs/skia/types/PathEffect.js +19 -0
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/Picture.js +6 -0
- package/lib/commonjs/skia/types/Picture/Picture.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.js +6 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js +6 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/index.js +45 -0
- package/lib/commonjs/skia/types/Picture/index.js.map +1 -0
- package/lib/commonjs/skia/types/Point.js +15 -0
- package/lib/commonjs/skia/types/Point.js.map +1 -0
- package/lib/commonjs/skia/types/RRect.js +13 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -0
- package/lib/commonjs/skia/types/RSXform.js +6 -0
- package/lib/commonjs/skia/types/RSXform.js.map +1 -0
- package/lib/commonjs/skia/types/Rect.js +2 -0
- package/lib/commonjs/skia/types/Rect.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.js +32 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/SVG.js +6 -0
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.js +6 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/index.js +32 -0
- package/lib/commonjs/skia/types/SVG/index.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/Shader.js +55 -0
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js +6 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/index.js +32 -0
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.js +6 -0
- package/lib/commonjs/skia/types/Skia.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/Surface.js +6 -0
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js +6 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/index.js +32 -0
- package/lib/commonjs/skia/types/Surface/index.js.map +1 -0
- package/lib/commonjs/skia/types/TextBlob.js +6 -0
- package/lib/commonjs/skia/types/TextBlob.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.js +6 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js +6 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/index.js +32 -0
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.js +15 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -0
- package/lib/commonjs/skia/types/Vertices/index.js +19 -0
- package/lib/commonjs/skia/types/Vertices/index.js.map +1 -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/Host.js +75 -0
- package/lib/commonjs/skia/web/Host.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js +184 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColor.js +339 -0
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +18 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +119 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js +33 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImage.js +60 -0
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js +101 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +337 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRect.js +42 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +31 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +49 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +97 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +19 -0
- package/lib/commonjs/skia/web/index.js.map +1 -0
- package/lib/commonjs/values/api.js +12 -0
- package/lib/commonjs/values/api.js.map +1 -0
- package/lib/commonjs/values/api.web.js +18 -0
- package/lib/commonjs/values/api.web.js.map +1 -0
- package/lib/commonjs/values/hooks/index.js +58 -0
- package/lib/commonjs/values/hooks/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useClockValue.js +27 -0
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useComputedValue.js +32 -0
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js +23 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValueEffect.js +22 -0
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -0
- package/lib/commonjs/values/index.js +45 -0
- package/lib/commonjs/values/index.js.map +1 -0
- package/lib/commonjs/values/types.js +2 -0
- package/lib/commonjs/values/types.js.map +1 -0
- package/lib/commonjs/values/web/RNSkAnimation.js +46 -0
- package/lib/commonjs/values/web/RNSkAnimation.js.map +1 -0
- package/lib/commonjs/values/web/RNSkClockValue.js +75 -0
- package/lib/commonjs/values/web/RNSkClockValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkComputedValue.js +51 -0
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.js +45 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkValue.js +73 -0
- package/lib/commonjs/values/web/RNSkValue.js.map +1 -0
- package/lib/commonjs/values/web/api.js +31 -0
- package/lib/commonjs/values/web/api.js.map +1 -0
- package/lib/commonjs/values/web/index.js +19 -0
- package/lib/commonjs/values/web/index.js.map +1 -0
- package/lib/commonjs/views/SkiaView.js +128 -0
- package/lib/commonjs/views/SkiaView.js.map +1 -0
- package/lib/commonjs/views/SkiaView.web.js +216 -0
- package/lib/commonjs/views/SkiaView.web.js.map +1 -0
- package/lib/commonjs/views/api.js +11 -0
- package/lib/commonjs/views/api.js.map +1 -0
- package/lib/commonjs/views/index.js +58 -0
- package/lib/commonjs/views/index.js.map +1 -0
- package/lib/commonjs/views/types.js +16 -0
- package/lib/commonjs/views/types.js.map +1 -0
- package/lib/commonjs/views/useDrawCallback.js +23 -0
- package/lib/commonjs/views/useDrawCallback.js.map +1 -0
- package/lib/commonjs/views/useTouchHandler.js +99 -0
- package/lib/commonjs/views/useTouchHandler.js.map +1 -0
- package/lib/commonjs/web/index.js +22 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/module/animation/decay/decay.js +33 -0
- package/lib/module/animation/decay/decay.js.map +1 -0
- package/lib/module/animation/decay/index.js +2 -0
- package/lib/module/animation/decay/index.js.map +1 -0
- package/lib/module/animation/decay/runDecay.js +38 -0
- package/lib/module/animation/decay/runDecay.js.map +1 -0
- package/lib/module/animation/decay/types.js +2 -0
- package/lib/module/animation/decay/types.js.map +1 -0
- package/lib/module/animation/functions/index.js +5 -0
- package/lib/module/animation/functions/index.js.map +1 -0
- package/lib/module/animation/functions/interpolate.js +132 -0
- package/lib/module/animation/functions/interpolate.js.map +1 -0
- package/lib/module/animation/functions/interpolateColors.js +23 -0
- package/lib/module/animation/functions/interpolateColors.js.map +1 -0
- package/lib/module/animation/functions/interpolatePaths.js +69 -0
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/module/animation/functions/interpolateVector.js +7 -0
- package/lib/module/animation/functions/interpolateVector.js.map +1 -0
- package/lib/module/animation/index.js +5 -0
- package/lib/module/animation/index.js.map +1 -0
- package/lib/module/animation/spring/Spring.js +69 -0
- package/lib/module/animation/spring/Spring.js.map +1 -0
- package/lib/module/animation/spring/functions/index.js +2 -0
- package/lib/module/animation/spring/functions/index.js.map +1 -0
- package/lib/module/animation/spring/functions/spring.js +85 -0
- package/lib/module/animation/spring/functions/spring.js.map +1 -0
- package/lib/module/animation/spring/index.js +4 -0
- package/lib/module/animation/spring/index.js.map +1 -0
- package/lib/module/animation/spring/runSpring.js +21 -0
- package/lib/module/animation/spring/runSpring.js.map +1 -0
- package/lib/module/animation/spring/types.js +2 -0
- package/lib/module/animation/spring/types.js.map +1 -0
- package/lib/module/animation/spring/useSpring.js +13 -0
- package/lib/module/animation/spring/useSpring.js.map +1 -0
- package/lib/module/animation/timing/Easing.js +98 -0
- package/lib/module/animation/timing/Easing.js.map +1 -0
- package/lib/module/animation/timing/createTiming.js +49 -0
- package/lib/module/animation/timing/createTiming.js.map +1 -0
- package/lib/module/animation/timing/functions/bezier.js +141 -0
- package/lib/module/animation/timing/functions/bezier.js.map +1 -0
- package/lib/module/animation/timing/functions/getResolvedParams.js +48 -0
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/module/animation/timing/functions/index.js +5 -0
- package/lib/module/animation/timing/functions/index.js.map +1 -0
- package/lib/module/animation/timing/functions/timing.js +41 -0
- package/lib/module/animation/timing/functions/timing.js.map +1 -0
- package/lib/module/animation/timing/functions/types.js +2 -0
- package/lib/module/animation/timing/functions/types.js.map +1 -0
- package/lib/module/animation/timing/index.js +5 -0
- package/lib/module/animation/timing/index.js.map +1 -0
- package/lib/module/animation/timing/runTiming.js +23 -0
- package/lib/module/animation/timing/runTiming.js.map +1 -0
- package/lib/module/animation/timing/useLoop.js +13 -0
- package/lib/module/animation/timing/useLoop.js.map +1 -0
- package/lib/module/animation/timing/useTiming.js +54 -0
- package/lib/module/animation/timing/useTiming.js.map +1 -0
- package/lib/module/animation/types.js +2 -0
- package/lib/module/animation/types.js.map +1 -0
- package/lib/module/external/index.js +2 -0
- package/lib/module/external/index.js.map +1 -0
- package/lib/module/external/reanimated/index.js +2 -0
- package/lib/module/external/reanimated/index.js.map +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js +81 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/module/index.js +9 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/mock/index.js +108 -0
- package/lib/module/mock/index.js.map +1 -0
- package/lib/module/renderer/Canvas.js +131 -0
- package/lib/module/renderer/Canvas.js.map +1 -0
- package/lib/module/renderer/DependencyManager.js +60 -0
- package/lib/module/renderer/DependencyManager.js.map +1 -0
- package/lib/module/renderer/DrawingContext.js +2 -0
- package/lib/module/renderer/DrawingContext.js.map +1 -0
- package/lib/module/renderer/HostConfig.js +237 -0
- package/lib/module/renderer/HostConfig.js.map +1 -0
- package/lib/module/renderer/components/Blend.js +30 -0
- package/lib/module/renderer/components/Blend.js.map +1 -0
- package/lib/module/renderer/components/Compose.js +25 -0
- package/lib/module/renderer/components/Compose.js.map +1 -0
- package/lib/module/renderer/components/Drawing.js +17 -0
- package/lib/module/renderer/components/Drawing.js.map +1 -0
- package/lib/module/renderer/components/Group.js +69 -0
- package/lib/module/renderer/components/Group.js.map +1 -0
- package/lib/module/renderer/components/Mask.js +44 -0
- package/lib/module/renderer/components/Mask.js.map +1 -0
- package/lib/module/renderer/components/Paint.js +19 -0
- package/lib/module/renderer/components/Paint.js.map +1 -0
- package/lib/module/renderer/components/Picture.js +21 -0
- package/lib/module/renderer/components/Picture.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js +19 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +39 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/module/renderer/components/backdrop/index.js +3 -0
- package/lib/module/renderer/components/backdrop/index.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js +24 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Compose.js +14 -0
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js +23 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +19 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +19 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js +22 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +19 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/index.js +7 -0
- package/lib/module/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/module/renderer/components/image/BoxFit.js +144 -0
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/module/renderer/components/image/Image.js +40 -0
- package/lib/module/renderer/components/image/Image.js.map +1 -0
- package/lib/module/renderer/components/image/ImageSVG.js +31 -0
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/module/renderer/components/image/ImageShader.js +69 -0
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/module/renderer/components/image/index.js +5 -0
- package/lib/module/renderer/components/image/index.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Blur.js +28 -0
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +34 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +17 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js +28 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Offset.js +25 -0
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +28 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Shadow.js +38 -0
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/getInput.js +23 -0
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/index.js +7 -0
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/module/renderer/components/index.js +18 -0
- package/lib/module/renderer/components/index.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/Blur.js +27 -0
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/index.js +2 -0
- package/lib/module/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Corner.js +31 -0
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Dash.js +28 -0
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js +32 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js +32 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js +36 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js +33 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Sum.js +18 -0
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/index.js +8 -0
- package/lib/module/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/module/renderer/components/shaders/Color.js +20 -0
- package/lib/module/renderer/components/shaders/Color.js.map +1 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js +29 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/module/renderer/components/shaders/Gradient.js +20 -0
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js +29 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js +29 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Shader.js +26 -0
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js +45 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js +30 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Turbulence.js +29 -0
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +31 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/index.js +10 -0
- package/lib/module/renderer/components/shaders/index.js.map +1 -0
- package/lib/module/renderer/components/shapes/Box.js +103 -0
- package/lib/module/renderer/components/shapes/Box.js.map +1 -0
- package/lib/module/renderer/components/shapes/Circle.js +29 -0
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/module/renderer/components/shapes/DiffRect.js +21 -0
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Fill.js +17 -0
- package/lib/module/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/module/renderer/components/shapes/FitBox.js +23 -0
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/module/renderer/components/shapes/Line.js +21 -0
- package/lib/module/renderer/components/shapes/Line.js.map +1 -0
- package/lib/module/renderer/components/shapes/Oval.js +24 -0
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/module/renderer/components/shapes/Patch.js +36 -0
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/module/renderer/components/shapes/Path.js +51 -0
- package/lib/module/renderer/components/shapes/Path.js.map +1 -0
- package/lib/module/renderer/components/shapes/Points.js +27 -0
- package/lib/module/renderer/components/shapes/Points.js.map +1 -0
- package/lib/module/renderer/components/shapes/Rect.js +20 -0
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js +23 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Vertices.js +38 -0
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/module/renderer/components/shapes/index.js +14 -0
- package/lib/module/renderer/components/shapes/index.js.map +1 -0
- package/lib/module/renderer/components/text/Glyphs.js +46 -0
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/module/renderer/components/text/Text.js +31 -0
- package/lib/module/renderer/components/text/Text.js.map +1 -0
- package/lib/module/renderer/components/text/TextBlob.js +26 -0
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/module/renderer/components/text/TextPath.js +76 -0
- package/lib/module/renderer/components/text/TextPath.js.map +1 -0
- package/lib/module/renderer/components/text/index.js +5 -0
- package/lib/module/renderer/components/text/index.js.map +1 -0
- package/lib/module/renderer/index.js +6 -0
- package/lib/module/renderer/index.js.map +1 -0
- package/lib/module/renderer/nodes/Container.js +18 -0
- package/lib/module/renderer/nodes/Container.js.map +1 -0
- package/lib/module/renderer/nodes/Declaration.js +37 -0
- package/lib/module/renderer/nodes/Declaration.js.map +1 -0
- package/lib/module/renderer/nodes/Drawing.js +40 -0
- package/lib/module/renderer/nodes/Drawing.js.map +1 -0
- package/lib/module/renderer/nodes/Node.js +61 -0
- package/lib/module/renderer/nodes/Node.js.map +1 -0
- package/lib/module/renderer/nodes/index.js +5 -0
- package/lib/module/renderer/nodes/index.js.map +1 -0
- package/lib/module/renderer/processors/Animations/Animations.js +36 -0
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/module/renderer/processors/Animations/index.js +2 -0
- package/lib/module/renderer/processors/Animations/index.js.map +1 -0
- package/lib/module/renderer/processors/Circles.js +15 -0
- package/lib/module/renderer/processors/Circles.js.map +1 -0
- package/lib/module/renderer/processors/Clips.js +13 -0
- package/lib/module/renderer/processors/Clips.js.map +1 -0
- package/lib/module/renderer/processors/Color.js +11 -0
- package/lib/module/renderer/processors/Color.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +27 -0
- package/lib/module/renderer/processors/Font.js.map +1 -0
- package/lib/module/renderer/processors/Paint.js +84 -0
- package/lib/module/renderer/processors/Paint.js.map +1 -0
- package/lib/module/renderer/processors/Paths.js +13 -0
- package/lib/module/renderer/processors/Paths.js.map +1 -0
- package/lib/module/renderer/processors/Radius.js +8 -0
- package/lib/module/renderer/processors/Radius.js.map +1 -0
- package/lib/module/renderer/processors/Rects.js +25 -0
- package/lib/module/renderer/processors/Rects.js.map +1 -0
- package/lib/module/renderer/processors/Transform.js +49 -0
- package/lib/module/renderer/processors/Transform.js.map +1 -0
- package/lib/module/renderer/processors/index.js +12 -0
- package/lib/module/renderer/processors/index.js.map +1 -0
- package/lib/module/renderer/processors/math/Coordinates.js +19 -0
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/module/renderer/processors/math/Math.js +17 -0
- package/lib/module/renderer/processors/math/Math.js.map +1 -0
- package/lib/module/renderer/processors/math/Transforms.js +12 -0
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/module/renderer/processors/math/index.js +4 -0
- package/lib/module/renderer/processors/math/index.js.map +1 -0
- package/lib/module/renderer/typeddash.js +26 -0
- package/lib/module/renderer/typeddash.js.map +1 -0
- package/lib/module/renderer/useCanvas.js +13 -0
- package/lib/module/renderer/useCanvas.js.map +1 -0
- package/lib/module/renderer/useContextBridge.js +21 -0
- package/lib/module/renderer/useContextBridge.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +17 -0
- package/lib/module/skia/NativeSetup.js.map +1 -0
- package/lib/module/skia/Skia.js +7 -0
- package/lib/module/skia/Skia.js.map +1 -0
- package/lib/module/skia/Skia.web.js +3 -0
- package/lib/module/skia/Skia.web.js.map +1 -0
- package/lib/module/skia/core/Data.js +53 -0
- package/lib/module/skia/core/Data.js.map +1 -0
- package/lib/module/skia/core/Font.js +22 -0
- 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/core/Matrix.js +4 -0
- package/lib/module/skia/core/Matrix.js.map +1 -0
- package/lib/module/skia/core/Paint.js +17 -0
- package/lib/module/skia/core/Paint.js.map +1 -0
- package/lib/module/skia/core/Path.js +53 -0
- package/lib/module/skia/core/Path.js.map +1 -0
- package/lib/module/skia/core/Picture.js +19 -0
- package/lib/module/skia/core/Picture.js.map +1 -0
- package/lib/module/skia/core/RRect.js +3 -0
- package/lib/module/skia/core/RRect.js.map +1 -0
- package/lib/module/skia/core/Rect.js +17 -0
- package/lib/module/skia/core/Rect.js.map +1 -0
- package/lib/module/skia/core/SVG.js +4 -0
- package/lib/module/skia/core/SVG.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/Vector.js +23 -0
- package/lib/module/skia/core/Vector.js.map +1 -0
- package/lib/module/skia/core/index.js +13 -0
- package/lib/module/skia/core/index.js.map +1 -0
- package/lib/module/skia/index.js +4 -0
- package/lib/module/skia/index.js.map +1 -0
- package/lib/module/skia/types/Canvas.js +14 -0
- package/lib/module/skia/types/Canvas.js.map +1 -0
- package/lib/module/skia/types/Color.js +2 -0
- package/lib/module/skia/types/Color.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.js +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/index.js +3 -0
- package/lib/module/skia/types/ColorFilter/index.js.map +1 -0
- package/lib/module/skia/types/ContourMeasure.js +2 -0
- package/lib/module/skia/types/ContourMeasure.js.map +1 -0
- package/lib/module/skia/types/Data/Data.js +2 -0
- package/lib/module/skia/types/Data/Data.js.map +1 -0
- package/lib/module/skia/types/Data/DataFactory.js +2 -0
- package/lib/module/skia/types/Data/DataFactory.js.map +1 -0
- package/lib/module/skia/types/Data/index.js +3 -0
- package/lib/module/skia/types/Data/index.js.map +1 -0
- package/lib/module/skia/types/Font/Font.js +68 -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/types/FontMgr/FontMgr.js +2 -0
- package/lib/module/skia/types/FontMgr/FontMgr.js.map +1 -0
- package/lib/module/skia/types/FontMgr/FontMgrFactory.js +2 -0
- package/lib/module/skia/types/FontMgr/FontMgrFactory.js.map +1 -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/types/Image/Image.js +23 -0
- package/lib/module/skia/types/Image/Image.js.map +1 -0
- package/lib/module/skia/types/Image/ImageFactory.js +37 -0
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -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/types/ImageFilter/ImageFilter.js +11 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js +9 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/types/ImageFilter/index.js +3 -0
- package/lib/module/skia/types/ImageFilter/index.js.map +1 -0
- package/lib/module/skia/types/JsiInstance.js +2 -0
- package/lib/module/skia/types/JsiInstance.js.map +1 -0
- package/lib/module/skia/types/MaskFilter.js +11 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -0
- package/lib/module/skia/types/Matrix.js +69 -0
- package/lib/module/skia/types/Matrix.js.map +1 -0
- package/lib/module/skia/types/Paint/BlendMode.js +61 -0
- package/lib/module/skia/types/Paint/BlendMode.js.map +1 -0
- package/lib/module/skia/types/Paint/Paint.js +25 -0
- 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/types/Path/Path.js +35 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -0
- package/lib/module/skia/types/Path/PathFactory.js +2 -0
- package/lib/module/skia/types/Path/PathFactory.js.map +1 -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/types/PathEffect.js +9 -0
- package/lib/module/skia/types/PathEffect.js.map +1 -0
- package/lib/module/skia/types/Picture/Picture.js +2 -0
- package/lib/module/skia/types/Picture/Picture.js.map +1 -0
- package/lib/module/skia/types/Picture/PictureFactory.js +2 -0
- package/lib/module/skia/types/Picture/PictureFactory.js.map +1 -0
- package/lib/module/skia/types/Picture/PictureRecorder.js +2 -0
- package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -0
- package/lib/module/skia/types/Picture/index.js +4 -0
- package/lib/module/skia/types/Picture/index.js.map +1 -0
- package/lib/module/skia/types/Point.js +8 -0
- package/lib/module/skia/types/Point.js.map +1 -0
- package/lib/module/skia/types/RRect.js +4 -0
- package/lib/module/skia/types/RRect.js.map +1 -0
- package/lib/module/skia/types/RSXform.js +2 -0
- package/lib/module/skia/types/RSXform.js.map +1 -0
- package/lib/module/skia/types/Rect.js +2 -0
- package/lib/module/skia/types/Rect.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js +2 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js +2 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/index.js +3 -0
- package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -0
- package/lib/module/skia/types/SVG/SVG.js +2 -0
- package/lib/module/skia/types/SVG/SVG.js.map +1 -0
- package/lib/module/skia/types/SVG/SVGFactory.js +2 -0
- package/lib/module/skia/types/SVG/SVGFactory.js.map +1 -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/types/Shader/Shader.js +44 -0
- package/lib/module/skia/types/Shader/Shader.js.map +1 -0
- package/lib/module/skia/types/Shader/ShaderFactory.js +2 -0
- package/lib/module/skia/types/Shader/ShaderFactory.js.map +1 -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/types/Surface/Surface.js +2 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js +2 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/types/Surface/index.js +3 -0
- package/lib/module/skia/types/Surface/index.js.map +1 -0
- package/lib/module/skia/types/TextBlob.js +2 -0
- package/lib/module/skia/types/TextBlob.js.map +1 -0
- package/lib/module/skia/types/Typeface/Typeface.js +2 -0
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js +2 -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/types/Vertices/Vertices.js +8 -0
- package/lib/module/skia/types/Vertices/Vertices.js.map +1 -0
- package/lib/module/skia/types/Vertices/index.js +2 -0
- package/lib/module/skia/types/Vertices/index.js.map +1 -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/Host.js +42 -0
- package/lib/module/skia/web/Host.js.map +1 -0
- package/lib/module/skia/web/JsiSkCanvas.js +173 -0
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/JsiSkColor.js +330 -0
- package/lib/module/skia/web/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilter.js +8 -0
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/module/skia/web/JsiSkData.js +8 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -0
- package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkFont.js +107 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgr.js +23 -0
- package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImage.js +49 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +28 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/module/skia/web/JsiSkPaint.js +91 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/JsiSkPath.js +324 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +18 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +16 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +21 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +8 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/module/skia/web/JsiSkRect.js +32 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkShader.js +8 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurface.js +19 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +18 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +17 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js +39 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +61 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -0
- package/lib/module/skia/web/index.js +2 -0
- package/lib/module/skia/web/index.js.map +1 -0
- package/lib/module/values/api.js +5 -0
- package/lib/module/values/api.js.map +1 -0
- package/lib/module/values/api.web.js +7 -0
- package/lib/module/values/api.web.js.map +1 -0
- package/lib/module/values/hooks/index.js +5 -0
- package/lib/module/values/hooks/index.js.map +1 -0
- package/lib/module/values/hooks/useClockValue.js +17 -0
- package/lib/module/values/hooks/useClockValue.js.map +1 -0
- package/lib/module/values/hooks/useComputedValue.js +18 -0
- package/lib/module/values/hooks/useComputedValue.js.map +1 -0
- package/lib/module/values/hooks/useValue.js +13 -0
- package/lib/module/values/hooks/useValue.js.map +1 -0
- package/lib/module/values/hooks/useValueEffect.js +13 -0
- package/lib/module/values/hooks/useValueEffect.js.map +1 -0
- package/lib/module/values/index.js +4 -0
- package/lib/module/values/index.js.map +1 -0
- package/lib/module/values/types.js +2 -0
- package/lib/module/values/types.js.map +1 -0
- package/lib/module/values/web/RNSkAnimation.js +36 -0
- package/lib/module/values/web/RNSkAnimation.js.map +1 -0
- package/lib/module/values/web/RNSkClockValue.js +65 -0
- package/lib/module/values/web/RNSkClockValue.js.map +1 -0
- package/lib/module/values/web/RNSkComputedValue.js +41 -0
- package/lib/module/values/web/RNSkComputedValue.js.map +1 -0
- package/lib/module/values/web/RNSkReadonlyValue.js +36 -0
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -0
- package/lib/module/values/web/RNSkValue.js +63 -0
- package/lib/module/values/web/RNSkValue.js.map +1 -0
- package/lib/module/values/web/api.js +19 -0
- package/lib/module/values/web/api.js.map +1 -0
- package/lib/module/values/web/index.js +2 -0
- package/lib/module/values/web/index.js.map +1 -0
- package/lib/module/views/SkiaView.js +109 -0
- package/lib/module/views/SkiaView.js.map +1 -0
- package/lib/module/views/SkiaView.web.js +202 -0
- package/lib/module/views/SkiaView.web.js.map +1 -0
- package/lib/module/views/api.js +4 -0
- package/lib/module/views/api.js.map +1 -0
- package/lib/module/views/index.js +5 -0
- package/lib/module/views/index.js.map +1 -0
- package/lib/module/views/types.js +9 -0
- package/lib/module/views/types.js.map +1 -0
- package/lib/module/views/useDrawCallback.js +14 -0
- package/lib/module/views/useDrawCallback.js.map +1 -0
- package/lib/module/views/useTouchHandler.js +85 -0
- package/lib/module/views/useTouchHandler.js.map +1 -0
- package/lib/module/web/index.js +10 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/jestSetup.d.ts +1 -0
- package/lib/typescript/src/animation/decay/decay.d.ts +2 -0
- package/lib/typescript/src/animation/decay/index.d.ts +1 -0
- package/lib/typescript/src/animation/decay/runDecay.d.ts +10 -0
- package/lib/typescript/src/animation/decay/types.d.ts +21 -0
- package/lib/typescript/src/animation/functions/index.d.ts +4 -0
- package/lib/typescript/src/animation/functions/interpolate.d.ts +17 -0
- package/lib/typescript/src/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/typescript/src/animation/index.d.ts +4 -0
- package/lib/typescript/src/animation/spring/Spring.d.ts +65 -0
- package/lib/typescript/src/animation/spring/functions/index.d.ts +1 -0
- package/lib/typescript/src/animation/spring/functions/spring.d.ts +10 -0
- package/lib/typescript/src/animation/spring/index.d.ts +3 -0
- package/lib/typescript/src/animation/spring/runSpring.d.ts +16 -0
- package/lib/typescript/src/animation/spring/types.d.ts +6 -0
- package/lib/typescript/src/animation/spring/useSpring.d.ts +10 -0
- package/lib/typescript/src/animation/timing/Easing.d.ts +19 -0
- package/lib/typescript/src/animation/timing/createTiming.d.ts +17 -0
- package/lib/typescript/src/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/typescript/src/animation/timing/functions/index.d.ts +4 -0
- package/lib/typescript/src/animation/timing/functions/timing.d.ts +17 -0
- package/lib/typescript/src/animation/timing/functions/types.d.ts +7 -0
- package/lib/typescript/src/animation/timing/index.d.ts +4 -0
- package/lib/typescript/src/animation/timing/runTiming.d.ts +16 -0
- package/lib/typescript/src/animation/timing/useLoop.d.ts +8 -0
- package/lib/typescript/src/animation/timing/useTiming.d.ts +10 -0
- package/lib/typescript/src/animation/types.d.ts +18 -0
- package/lib/typescript/src/external/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/mock/index.d.ts +16 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +16 -0
- package/lib/typescript/src/renderer/DependencyManager.d.ts +21 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +12 -0
- package/lib/typescript/src/renderer/HostConfig.d.ts +27 -0
- package/lib/typescript/src/renderer/components/Blend.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Compose.d.ts +6 -0
- package/lib/typescript/src/renderer/components/Drawing.d.ts +7 -0
- package/lib/typescript/src/renderer/components/Group.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Mask.d.ts +15 -0
- package/lib/typescript/src/renderer/components/Paint.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Picture.d.ts +6 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +8 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/typescript/src/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +10 -0
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +3 -0
- package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +7 -0
- package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +9 -0
- package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +33 -0
- package/lib/typescript/src/renderer/components/image/Image.d.ts +19 -0
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +7 -0
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +26 -0
- package/lib/typescript/src/renderer/components/image/index.d.ts +4 -0
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +15 -0
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +10 -0
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -0
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +13 -0
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +14 -0
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +8 -0
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +12 -0
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +3 -0
- package/lib/typescript/src/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/index.d.ts +17 -0
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +16 -0
- package/lib/typescript/src/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +7 -0
- package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +8 -0
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +14 -0
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +9 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +13 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +10 -0
- package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +6 -0
- package/lib/typescript/src/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +17 -0
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +14 -0
- package/lib/typescript/src/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +11 -0
- package/lib/typescript/src/renderer/components/shaders/index.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +22 -0
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +12 -0
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +5 -0
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +25 -0
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +8 -0
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +21 -0
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +23 -0
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +15 -0
- package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shapes/index.d.ts +13 -0
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +20 -0
- package/lib/typescript/src/renderer/components/text/Text.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/index.d.ts +4 -0
- package/lib/typescript/src/renderer/index.d.ts +5 -0
- package/lib/typescript/src/renderer/nodes/Container.d.ts +8 -0
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +22 -0
- package/lib/typescript/src/renderer/nodes/Drawing.d.ts +21 -0
- package/lib/typescript/src/renderer/nodes/Node.d.ts +23 -0
- package/lib/typescript/src/renderer/nodes/index.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +7 -0
- package/lib/typescript/src/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/Circles.d.ts +13 -0
- package/lib/typescript/src/renderer/processors/Clips.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/processors/Font.d.ts +11 -0
- package/lib/typescript/src/renderer/processors/Paint.d.ts +22 -0
- package/lib/typescript/src/renderer/processors/Paths.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Radius.d.ts +3 -0
- package/lib/typescript/src/renderer/processors/Rects.d.ts +20 -0
- package/lib/typescript/src/renderer/processors/Transform.d.ts +90 -0
- package/lib/typescript/src/renderer/processors/index.d.ts +11 -0
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/typescript/src/renderer/processors/math/Math.d.ts +15 -0
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/typescript/src/renderer/processors/math/index.d.ts +3 -0
- package/lib/typescript/src/renderer/typeddash.d.ts +3 -0
- package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
- package/lib/typescript/src/renderer/useContextBridge.d.ts +5 -0
- package/lib/typescript/src/skia/NativeSetup.d.ts +1 -0
- package/lib/typescript/src/skia/Skia.d.ts +8 -0
- package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
- 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/core/Matrix.d.ts +2 -0
- package/lib/typescript/src/skia/core/Paint.d.ts +6 -0
- package/lib/typescript/src/skia/core/Path.d.ts +21 -0
- package/lib/typescript/src/skia/core/Picture.d.ts +9 -0
- package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
- package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
- package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
- package/lib/typescript/src/skia/core/index.d.ts +12 -0
- package/lib/typescript/src/skia/index.d.ts +3 -0
- package/lib/typescript/src/skia/types/Canvas.d.ts +381 -0
- package/lib/typescript/src/skia/types/Color.d.ts +2 -0
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/typescript/src/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/ContourMeasure.d.ts +40 -0
- package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
- package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/typescript/src/skia/types/Data/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Font/Font.d.ts +192 -0
- package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +18 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +4 -0
- package/lib/typescript/src/skia/types/FontMgr/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Image/Image.d.ts +75 -0
- package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/typescript/src/skia/types/Image/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/typescript/src/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/JsiInstance.d.ts +3 -0
- package/lib/typescript/src/skia/types/MaskFilter.d.ts +21 -0
- package/lib/typescript/src/skia/types/Matrix.d.ts +29 -0
- package/lib/typescript/src/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/typescript/src/skia/types/Paint/Paint.d.ts +127 -0
- package/lib/typescript/src/skia/types/Paint/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +461 -0
- package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/typescript/src/skia/types/Path/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/PathEffect.d.ts +75 -0
- package/lib/typescript/src/skia/types/Picture/Picture.d.ts +26 -0
- package/lib/typescript/src/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/typescript/src/skia/types/Picture/index.d.ts +3 -0
- package/lib/typescript/src/skia/types/Point.d.ts +10 -0
- package/lib/typescript/src/skia/types/RRect.d.ts +7 -0
- package/lib/typescript/src/skia/types/RSXform.d.ts +2 -0
- package/lib/typescript/src/skia/types/Rect.d.ts +6 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +48 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/typescript/src/skia/types/SVG/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +11 -0
- package/lib/typescript/src/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/typescript/src/skia/types/Shader/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +68 -0
- package/lib/typescript/src/skia/types/Surface/Surface.d.ts +25 -0
- package/lib/typescript/src/skia/types/Surface/SurfaceFactory.d.ts +11 -0
- package/lib/typescript/src/skia/types/Surface/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/TextBlob.d.ts +44 -0
- package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/typescript/src/skia/types/Typeface/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/typescript/src/skia/types/Vertices/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/index.d.ts +28 -0
- package/lib/typescript/src/skia/web/Host.d.ts +21 -0
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +34 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +26 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -0
- package/lib/typescript/src/values/api.d.ts +5 -0
- package/lib/typescript/src/values/api.web.d.ts +2 -0
- package/lib/typescript/src/values/hooks/index.d.ts +4 -0
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +6 -0
- package/lib/typescript/src/values/hooks/useComputedValue.d.ts +9 -0
- package/lib/typescript/src/values/hooks/useValue.d.ts +7 -0
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/typescript/src/values/index.d.ts +3 -0
- package/lib/typescript/src/values/types.d.ts +59 -0
- package/lib/typescript/src/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/typescript/src/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +9 -0
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +11 -0
- package/lib/typescript/src/values/web/RNSkValue.d.ts +14 -0
- package/lib/typescript/src/values/web/api.d.ts +2 -0
- package/lib/typescript/src/values/web/index.d.ts +1 -0
- package/lib/typescript/src/views/SkiaView.d.ts +37 -0
- package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
- package/lib/typescript/src/views/api.d.ts +5 -0
- package/lib/typescript/src/views/index.d.ts +4 -0
- package/lib/typescript/src/views/types.d.ts +76 -0
- package/lib/typescript/src/views/useDrawCallback.d.ts +8 -0
- package/lib/typescript/src/views/useTouchHandler.d.ts +22 -0
- package/lib/typescript/src/web/index.d.ts +5 -0
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.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/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskshaper.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/libskshaper.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +42 -0
- 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 +42 -0
- 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/Info.plist +42 -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 +102 -0
- package/react-native-skia.podspec +71 -0
- package/scripts/install-npm.js +23 -0
- package/src/animation/decay/decay.ts +35 -0
- package/src/animation/decay/index.ts +1 -0
- package/src/animation/decay/runDecay.ts +40 -0
- package/src/animation/decay/types.ts +24 -0
- package/src/animation/functions/index.ts +4 -0
- package/src/animation/functions/interpolate.ts +184 -0
- package/src/animation/functions/interpolateColors.ts +57 -0
- package/src/animation/functions/interpolatePaths.ts +87 -0
- package/src/animation/functions/interpolateVector.ts +26 -0
- package/src/animation/index.ts +4 -0
- package/src/animation/spring/Spring.ts +61 -0
- package/src/animation/spring/functions/index.ts +1 -0
- package/src/animation/spring/functions/spring.ts +86 -0
- package/src/animation/spring/index.ts +3 -0
- package/src/animation/spring/runSpring.ts +37 -0
- package/src/animation/spring/types.ts +6 -0
- package/src/animation/spring/useSpring.ts +28 -0
- package/src/animation/timing/Easing.ts +102 -0
- package/src/animation/timing/createTiming.ts +62 -0
- package/src/animation/timing/functions/bezier.ts +165 -0
- package/src/animation/timing/functions/getResolvedParams.ts +50 -0
- package/src/animation/timing/functions/index.ts +4 -0
- package/src/animation/timing/functions/timing.ts +44 -0
- package/src/animation/timing/functions/types.ts +8 -0
- package/src/animation/timing/index.ts +4 -0
- package/src/animation/timing/runTiming.ts +33 -0
- package/src/animation/timing/useLoop.ts +18 -0
- package/src/animation/timing/useTiming.ts +68 -0
- package/src/animation/types.ts +23 -0
- package/src/external/index.ts +1 -0
- package/src/external/reanimated/index.ts +1 -0
- package/src/external/reanimated/useSharedValueEffect.ts +81 -0
- package/src/index.ts +8 -0
- package/src/mock/index.ts +110 -0
- package/src/renderer/Canvas.tsx +158 -0
- package/src/renderer/DependencyManager.tsx +59 -0
- package/src/renderer/DrawingContext.ts +14 -0
- package/src/renderer/HostConfig.ts +303 -0
- package/src/renderer/components/Blend.tsx +29 -0
- package/src/renderer/components/Compose.tsx +26 -0
- package/src/renderer/components/Drawing.tsx +16 -0
- package/src/renderer/components/Group.tsx +83 -0
- package/src/renderer/components/Mask.tsx +45 -0
- package/src/renderer/components/Paint.tsx +30 -0
- package/src/renderer/components/Picture.tsx +17 -0
- package/src/renderer/components/backdrop/BackdropBlur.tsx +23 -0
- package/src/renderer/components/backdrop/BackdropFilter.tsx +47 -0
- package/src/renderer/components/backdrop/index.ts +2 -0
- package/src/renderer/components/colorFilters/BlendColor.tsx +30 -0
- package/src/renderer/components/colorFilters/Compose.ts +18 -0
- package/src/renderer/components/colorFilters/Lerp.tsx +27 -0
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +20 -0
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +18 -0
- package/src/renderer/components/colorFilters/Matrix.tsx +46 -0
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +20 -0
- package/src/renderer/components/colorFilters/index.ts +6 -0
- package/src/renderer/components/image/BoxFit.ts +125 -0
- package/src/renderer/components/image/Image.tsx +50 -0
- package/src/renderer/components/image/ImageSVG.tsx +24 -0
- package/src/renderer/components/image/ImageShader.tsx +82 -0
- package/src/renderer/components/image/index.ts +4 -0
- package/src/renderer/components/imageFilters/Blur.tsx +37 -0
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +34 -0
- package/src/renderer/components/imageFilters/InnerShadow.tsx +38 -0
- package/src/renderer/components/imageFilters/Morphology.tsx +33 -0
- package/src/renderer/components/imageFilters/Offset.tsx +28 -0
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +31 -0
- package/src/renderer/components/imageFilters/Shadow.tsx +42 -0
- package/src/renderer/components/imageFilters/getInput.ts +20 -0
- package/src/renderer/components/imageFilters/index.ts +6 -0
- package/src/renderer/components/index.ts +18 -0
- package/src/renderer/components/maskFilters/Blur.tsx +32 -0
- package/src/renderer/components/maskFilters/index.ts +1 -0
- package/src/renderer/components/pathEffects/Corner.tsx +31 -0
- package/src/renderer/components/pathEffects/Dash.tsx +27 -0
- package/src/renderer/components/pathEffects/Discrete.tsx +34 -0
- package/src/renderer/components/pathEffects/Line2D.tsx +33 -0
- package/src/renderer/components/pathEffects/Path1D.tsx +43 -0
- package/src/renderer/components/pathEffects/Path2D.tsx +35 -0
- package/src/renderer/components/pathEffects/Sum.tsx +21 -0
- package/src/renderer/components/pathEffects/index.ts +7 -0
- package/src/renderer/components/shaders/Color.tsx +20 -0
- package/src/renderer/components/shaders/FractalNoise.tsx +36 -0
- package/src/renderer/components/shaders/Gradient.ts +24 -0
- package/src/renderer/components/shaders/LinearGradient.tsx +33 -0
- package/src/renderer/components/shaders/RadialGradient.tsx +33 -0
- package/src/renderer/components/shaders/Shader.tsx +32 -0
- package/src/renderer/components/shaders/ShaderLib.ts +46 -0
- package/src/renderer/components/shaders/SweepGradient.tsx +36 -0
- package/src/renderer/components/shaders/Turbulence.tsx +36 -0
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +39 -0
- package/src/renderer/components/shaders/index.ts +9 -0
- package/src/renderer/components/shapes/Box.tsx +115 -0
- package/src/renderer/components/shapes/Circle.tsx +24 -0
- package/src/renderer/components/shapes/DiffRect.tsx +21 -0
- package/src/renderer/components/shapes/Fill.tsx +15 -0
- package/src/renderer/components/shapes/FitBox.tsx +28 -0
- package/src/renderer/components/shapes/Line.tsx +17 -0
- package/src/renderer/components/shapes/Oval.tsx +27 -0
- package/src/renderer/components/shapes/Patch.tsx +63 -0
- package/src/renderer/components/shapes/Path.tsx +57 -0
- package/src/renderer/components/shapes/Points.tsx +28 -0
- package/src/renderer/components/shapes/Rect.tsx +22 -0
- package/src/renderer/components/shapes/RoundedRect.tsx +25 -0
- package/src/renderer/components/shapes/Vertices.tsx +45 -0
- package/src/renderer/components/shapes/index.ts +13 -0
- package/src/renderer/components/text/Glyphs.tsx +52 -0
- package/src/renderer/components/text/Text.tsx +32 -0
- package/src/renderer/components/text/TextBlob.tsx +26 -0
- package/src/renderer/components/text/TextPath.tsx +68 -0
- package/src/renderer/components/text/index.ts +4 -0
- package/src/renderer/index.ts +5 -0
- package/src/renderer/nodes/Container.tsx +17 -0
- package/src/renderer/nodes/Declaration.tsx +67 -0
- package/src/renderer/nodes/Drawing.tsx +67 -0
- package/src/renderer/nodes/Node.ts +57 -0
- package/src/renderer/nodes/index.ts +4 -0
- package/src/renderer/processors/Animations/Animations.ts +42 -0
- package/src/renderer/processors/Animations/index.ts +1 -0
- package/src/renderer/processors/Circles.ts +26 -0
- package/src/renderer/processors/Clips.ts +23 -0
- package/src/renderer/processors/Color.ts +15 -0
- package/src/renderer/processors/Font.ts +31 -0
- package/src/renderer/processors/Paint.ts +118 -0
- package/src/renderer/processors/Paths.ts +19 -0
- package/src/renderer/processors/Radius.ts +10 -0
- package/src/renderer/processors/Rects.ts +50 -0
- package/src/renderer/processors/Transform.ts +53 -0
- package/src/renderer/processors/index.ts +11 -0
- package/src/renderer/processors/math/Coordinates.ts +32 -0
- package/src/renderer/processors/math/Math.ts +18 -0
- package/src/renderer/processors/math/Transforms.ts +8 -0
- package/src/renderer/processors/math/index.ts +3 -0
- package/src/renderer/typeddash.ts +23 -0
- package/src/renderer/useCanvas.ts +21 -0
- package/src/renderer/useContextBridge.tsx +21 -0
- package/src/skia/NativeSetup.ts +18 -0
- package/src/skia/Skia.ts +11 -0
- package/src/skia/Skia.web.ts +3 -0
- package/src/skia/core/Data.ts +98 -0
- package/src/skia/core/Font.ts +28 -0
- package/src/skia/core/Image.ts +12 -0
- package/src/skia/core/Matrix.ts +6 -0
- package/src/skia/core/Paint.ts +22 -0
- package/src/skia/core/Path.ts +60 -0
- package/src/skia/core/Picture.ts +25 -0
- package/src/skia/core/RRect.tsx +5 -0
- package/src/skia/core/Rect.ts +33 -0
- package/src/skia/core/SVG.ts +9 -0
- package/src/skia/core/Typeface.ts +16 -0
- package/src/skia/core/Vector.ts +11 -0
- package/src/skia/core/index.ts +12 -0
- package/src/skia/index.ts +3 -0
- package/src/skia/types/Canvas.ts +495 -0
- package/src/skia/types/Color.ts +4 -0
- package/src/skia/types/ColorFilter/ColorFilter.ts +7 -0
- package/src/skia/types/ColorFilter/ColorFilterFactory.ts +52 -0
- package/src/skia/types/ColorFilter/index.ts +2 -0
- package/src/skia/types/ContourMeasure.tsx +47 -0
- package/src/skia/types/Data/Data.ts +5 -0
- package/src/skia/types/Data/DataFactory.ts +19 -0
- package/src/skia/types/Data/index.ts +2 -0
- package/src/skia/types/Font/Font.ts +232 -0
- package/src/skia/types/Font/index.ts +1 -0
- package/src/skia/types/FontMgr/FontMgr.ts +24 -0
- package/src/skia/types/FontMgr/FontMgrFactory.ts +12 -0
- package/src/skia/types/FontMgr/index.ts +2 -0
- package/src/skia/types/Image/Image.ts +96 -0
- package/src/skia/types/Image/ImageFactory.ts +78 -0
- package/src/skia/types/Image/index.ts +2 -0
- package/src/skia/types/ImageFilter/ImageFilter.ts +31 -0
- package/src/skia/types/ImageFilter/ImageFilterFactory.ts +192 -0
- package/src/skia/types/ImageFilter/index.ts +2 -0
- package/src/skia/types/JsiInstance.ts +3 -0
- package/src/skia/types/MaskFilter.ts +27 -0
- package/src/skia/types/Matrix.ts +95 -0
- package/src/skia/types/Paint/BlendMode.ts +61 -0
- package/src/skia/types/Paint/Paint.ts +153 -0
- package/src/skia/types/Paint/index.ts +2 -0
- package/src/skia/types/Path/Path.ts +564 -0
- package/src/skia/types/Path/PathFactory.ts +34 -0
- package/src/skia/types/Path/index.ts +2 -0
- package/src/skia/types/PathEffect.ts +97 -0
- package/src/skia/types/Picture/Picture.ts +34 -0
- package/src/skia/types/Picture/PictureFactory.ts +9 -0
- package/src/skia/types/Picture/PictureRecorder.ts +18 -0
- package/src/skia/types/Picture/index.ts +3 -0
- package/src/skia/types/Point.ts +12 -0
- package/src/skia/types/RRect.ts +12 -0
- package/src/skia/types/RSXform.ts +3 -0
- package/src/skia/types/Rect.ts +6 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +61 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffectFactory.ts +12 -0
- package/src/skia/types/RuntimeEffect/index.ts +2 -0
- package/src/skia/types/SVG/SVG.ts +3 -0
- package/src/skia/types/SVG/SVGFactory.ts +8 -0
- package/src/skia/types/SVG/index.ts +2 -0
- package/src/skia/types/Shader/Shader.ts +65 -0
- package/src/skia/types/Shader/ShaderFactory.ts +169 -0
- package/src/skia/types/Shader/index.ts +2 -0
- package/src/skia/types/Skia.ts +84 -0
- package/src/skia/types/Surface/Surface.ts +27 -0
- package/src/skia/types/Surface/SurfaceFactory.ts +12 -0
- package/src/skia/types/Surface/index.ts +2 -0
- package/src/skia/types/TextBlob.ts +52 -0
- package/src/skia/types/Typeface/Typeface.ts +6 -0
- package/src/skia/types/Typeface/TypefaceFactory.ts +7 -0
- package/src/skia/types/Typeface/index.ts +2 -0
- package/src/skia/types/Vertices/Vertices.tsx +20 -0
- package/src/skia/types/Vertices/index.ts +1 -0
- package/src/skia/types/index.ts +28 -0
- package/src/skia/web/Host.ts +56 -0
- package/src/skia/web/JsiSkCanvas.ts +330 -0
- package/src/skia/web/JsiSkColor.ts +327 -0
- package/src/skia/web/JsiSkColorFilter.ts +14 -0
- package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
- package/src/skia/web/JsiSkContourMeasure.ts +35 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
- package/src/skia/web/JsiSkData.ts +13 -0
- package/src/skia/web/JsiSkDataFactory.ts +35 -0
- package/src/skia/web/JsiSkFont.ts +134 -0
- package/src/skia/web/JsiSkFontMgr.ts +38 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/JsiSkImage.ts +87 -0
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkImageFilterFactory.ts +144 -0
- package/src/skia/web/JsiSkMaskFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
- package/src/skia/web/JsiSkMatrix.ts +54 -0
- package/src/skia/web/JsiSkPaint.ts +104 -0
- package/src/skia/web/JsiSkPath.ts +386 -0
- package/src/skia/web/JsiSkPathEffect.ts +14 -0
- package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
- package/src/skia/web/JsiSkPathFactory.ts +54 -0
- package/src/skia/web/JsiSkPicture.ts +45 -0
- package/src/skia/web/JsiSkPictureFactory.ts +20 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
- package/src/skia/web/JsiSkPoint.ts +19 -0
- package/src/skia/web/JsiSkRRect.ts +27 -0
- package/src/skia/web/JsiSkRSXform.ts +16 -0
- package/src/skia/web/JsiSkRect.ts +37 -0
- package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
- package/src/skia/web/JsiSkSVGFactory.ts +20 -0
- package/src/skia/web/JsiSkShader.ts +14 -0
- package/src/skia/web/JsiSkShaderFactory.ts +181 -0
- package/src/skia/web/JsiSkSurface.ts +25 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +20 -0
- package/src/skia/web/JsiSkTextBlob.ts +14 -0
- package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
- package/src/skia/web/JsiSkTypeface.ts +28 -0
- package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
- package/src/skia/web/JsiSkVertices.ts +23 -0
- package/src/skia/web/JsiSkVerticesFactory.ts +41 -0
- package/src/skia/web/JsiSkia.ts +98 -0
- package/src/skia/web/index.ts +1 -0
- package/src/values/api.ts +8 -0
- package/src/values/api.web.ts +5 -0
- package/src/values/hooks/index.ts +4 -0
- package/src/values/hooks/useClockValue.ts +18 -0
- package/src/values/hooks/useComputedValue.ts +23 -0
- package/src/values/hooks/useValue.ts +14 -0
- package/src/values/hooks/useValueEffect.ts +15 -0
- package/src/values/index.ts +3 -0
- package/src/values/types.ts +69 -0
- package/src/values/web/RNSkAnimation.ts +33 -0
- package/src/values/web/RNSkClockValue.ts +58 -0
- package/src/values/web/RNSkComputedValue.ts +38 -0
- package/src/values/web/RNSkReadonlyValue.ts +32 -0
- package/src/values/web/RNSkValue.ts +57 -0
- package/src/values/web/api.ts +33 -0
- package/src/values/web/index.ts +1 -0
- package/src/views/SkiaView.tsx +105 -0
- package/src/views/SkiaView.web.tsx +193 -0
- package/src/views/api.ts +7 -0
- package/src/views/index.ts +4 -0
- package/src/views/types.ts +96 -0
- package/src/views/useDrawCallback.ts +19 -0
- package/src/views/useTouchHandler.ts +111 -0
- package/src/web/index.ts +15 -0
@@ -0,0 +1,108 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
|
+
import * as Values from "../values/web";
|
3
|
+
import * as ValuesHooks from "../values/hooks";
|
4
|
+
import * as BaseSkia from "../skia/types";
|
5
|
+
import { useSharedValueEffect } from "../external/reanimated/useSharedValueEffect";
|
6
|
+
import * as timingFunctions from "../animation/timing";
|
7
|
+
import * as springFunctions from "../animation/spring";
|
8
|
+
import * as decayFunctions from "../animation/decay";
|
9
|
+
import * as interpolateFn from "../animation/functions/interpolate";
|
10
|
+
import * as interpolatePathFn from "../animation/functions/interpolatePaths";
|
11
|
+
import * as interpolateVectorFn from "../animation/functions/interpolateVector";
|
12
|
+
import { ShaderLib } from "../renderer/components/shaders/ShaderLib";
|
13
|
+
|
14
|
+
class Stub {
|
15
|
+
constructor() {
|
16
|
+
return new Proxy(() => {}, {
|
17
|
+
get: () => new Stub(),
|
18
|
+
apply: () => new Stub(),
|
19
|
+
set: () => true
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
}
|
24
|
+
|
25
|
+
const Noop = () => {};
|
26
|
+
|
27
|
+
export const Skia = new Stub();
|
28
|
+
export const vec = (x, y) => {
|
29
|
+
var _ref;
|
30
|
+
|
31
|
+
return {
|
32
|
+
x: x !== null && x !== void 0 ? x : 0,
|
33
|
+
y: (_ref = y !== null && y !== void 0 ? y : x) !== null && _ref !== void 0 ? _ref : 0
|
34
|
+
};
|
35
|
+
};
|
36
|
+
export const Mock = {
|
37
|
+
// SkiaExports
|
38
|
+
// 1. Skia API. BaseSkia contains the enums, and functions like isPaint etc
|
39
|
+
Skia,
|
40
|
+
...BaseSkia,
|
41
|
+
// 2. Hooks
|
42
|
+
useDataCollection: Noop,
|
43
|
+
useRawData: Noop,
|
44
|
+
useData: Noop,
|
45
|
+
useFont: Noop,
|
46
|
+
useTypeface: Noop,
|
47
|
+
useImage: Noop,
|
48
|
+
usePath: Noop,
|
49
|
+
useSVG: Noop,
|
50
|
+
useTextPath: Noop,
|
51
|
+
usePaint: Noop,
|
52
|
+
usePicture: Noop,
|
53
|
+
useSvgPath: Noop,
|
54
|
+
// 3. Point/Rect/Transform utilities
|
55
|
+
vec,
|
56
|
+
rect: (x, y, width, height) => ({
|
57
|
+
x,
|
58
|
+
y,
|
59
|
+
width,
|
60
|
+
height
|
61
|
+
}),
|
62
|
+
rrect: (r, rx, ry) => ({
|
63
|
+
rect: r,
|
64
|
+
rx,
|
65
|
+
ry
|
66
|
+
}),
|
67
|
+
point: vec,
|
68
|
+
add: (a, b) => vec(a.x + b.x, a.y + b.y),
|
69
|
+
sub: (a, b) => vec(a.x - b.x, a.y - b.y),
|
70
|
+
neg: a => vec(-a.x, -a.y),
|
71
|
+
dist: (a, b) => Math.hypot(a.x - b.x, a.y - b.y),
|
72
|
+
translate: _ref2 => {
|
73
|
+
let {
|
74
|
+
x,
|
75
|
+
y
|
76
|
+
} = _ref2;
|
77
|
+
return [{
|
78
|
+
translateX: x
|
79
|
+
}, {
|
80
|
+
translateY: y
|
81
|
+
}];
|
82
|
+
},
|
83
|
+
bounds: Noop,
|
84
|
+
topLeft: Noop,
|
85
|
+
topRight: Noop,
|
86
|
+
bottomLeft: Noop,
|
87
|
+
bottomRight: Noop,
|
88
|
+
center: Noop,
|
89
|
+
processTransform2d: Noop,
|
90
|
+
// ExternalExports
|
91
|
+
useSharedValueEffect,
|
92
|
+
// ValueExports
|
93
|
+
...Values,
|
94
|
+
...ValuesHooks,
|
95
|
+
// Animations
|
96
|
+
...timingFunctions,
|
97
|
+
...springFunctions,
|
98
|
+
...decayFunctions,
|
99
|
+
...interpolateFn,
|
100
|
+
...interpolatePathFn,
|
101
|
+
...interpolateVectorFn,
|
102
|
+
interpolateColors: (_value, _inputRange, _outputRange) => Float32Array.of(0, 0, 0, 0),
|
103
|
+
mixColors: (_v, _x, _y) => Float32Array.of(0, 0, 0, 0),
|
104
|
+
ShaderLib,
|
105
|
+
createDrawing: Noop,
|
106
|
+
createDeclaration: Noop
|
107
|
+
};
|
108
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["Values","ValuesHooks","BaseSkia","useSharedValueEffect","timingFunctions","springFunctions","decayFunctions","interpolateFn","interpolatePathFn","interpolateVectorFn","ShaderLib","Stub","constructor","Proxy","get","apply","set","Noop","Skia","vec","x","y","Mock","useDataCollection","useRawData","useData","useFont","useTypeface","useImage","usePath","useSVG","useTextPath","usePaint","usePicture","useSvgPath","rect","width","height","rrect","r","rx","ry","point","add","a","b","sub","neg","dist","Math","hypot","translate","translateX","translateY","bounds","topLeft","topRight","bottomLeft","bottomRight","center","processTransform2d","interpolateColors","_value","_inputRange","_outputRange","Float32Array","of","mixColors","_v","_x","_y","createDrawing","createDeclaration"],"mappings":"AAAA;AAGA,OAAO,KAAKA,MAAZ,MAAwB,eAAxB;AACA,OAAO,KAAKC,WAAZ,MAA6B,iBAA7B;AACA,OAAO,KAAKC,QAAZ,MAA0B,eAA1B;AAKA,SAASC,oBAAT,QAAqC,6CAArC;AACA,OAAO,KAAKC,eAAZ,MAAiC,qBAAjC;AACA,OAA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typescript-eslint/no-explicit-any */\n\nimport type { Color, Skia as SkiaApi, SkRect, Vector } from \"../skia/types\";\nimport * as Values from \"../values/web\";\nimport * as ValuesHooks from \"../values/hooks\";\nimport * as BaseSkia from \"../skia/types\";\nimport type * as SkiaExports from \"../skia\";\nimport type * as ExternalExports from \"../external\";\nimport type * as ValueExports from \"../values\";\nimport type * as AnimationExports from \"../animation\";\nimport { useSharedValueEffect } from \"../external/reanimated/useSharedValueEffect\";\nimport * as timingFunctions from \"../animation/timing\";\nimport * as springFunctions from \"../animation/spring\";\nimport * as decayFunctions from \"../animation/decay\";\nimport * as interpolateFn from \"../animation/functions/interpolate\";\nimport * as interpolatePathFn from \"../animation/functions/interpolatePaths\";\nimport * as interpolateVectorFn from \"../animation/functions/interpolateVector\";\nimport { ShaderLib } from \"../renderer/components/shaders/ShaderLib\";\n\nclass Stub {\n constructor() {\n return new Proxy(() => {}, {\n get: () => new Stub(),\n apply: () => new Stub(),\n set: () => true,\n });\n }\n}\n\nconst Noop: () => any = () => {};\n\nexport const Skia: SkiaApi = new Stub() as any;\n\nexport const vec = (x?: number, y?: number) => ({ x: x ?? 0, y: y ?? x ?? 0 });\n\nexport const Mock: typeof SkiaExports &\n typeof ExternalExports &\n typeof ValueExports &\n typeof AnimationExports & {\n createDrawing: () => any;\n createDeclaration: () => any;\n ShaderLib: typeof ShaderLib;\n } = {\n // SkiaExports\n // 1. Skia API. BaseSkia contains the enums, and functions like isPaint etc\n Skia,\n ...BaseSkia,\n // 2. Hooks\n useDataCollection: Noop,\n useRawData: Noop,\n useData: Noop,\n useFont: Noop,\n useTypeface: Noop,\n useImage: Noop,\n usePath: Noop,\n useSVG: Noop,\n useTextPath: Noop,\n usePaint: Noop,\n usePicture: Noop,\n useSvgPath: Noop,\n // 3. Point/Rect/Transform utilities\n vec,\n rect: (x: number, y: number, width: number, height: number) => ({\n x,\n y,\n width,\n height,\n }),\n rrect: (r: SkRect, rx: number, ry: number) => ({\n rect: r,\n rx,\n ry,\n }),\n point: vec,\n add: (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y),\n sub: (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y),\n neg: (a: Vector) => vec(-a.x, -a.y),\n dist: (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y),\n translate: ({ x, y }: Vector) =>\n [{ translateX: x }, { translateY: y }] as const,\n\n bounds: Noop,\n topLeft: Noop,\n topRight: Noop,\n bottomLeft: Noop,\n bottomRight: Noop,\n center: Noop,\n processTransform2d: Noop,\n // ExternalExports\n useSharedValueEffect,\n // ValueExports\n ...Values,\n ...ValuesHooks,\n // Animations\n ...timingFunctions,\n ...springFunctions,\n ...decayFunctions,\n ...interpolateFn,\n ...interpolatePathFn,\n ...interpolateVectorFn,\n interpolateColors: (\n _value: number,\n _inputRange: number[],\n _outputRange: Color[]\n ) => Float32Array.of(0, 0, 0, 0),\n mixColors: (_v: number, _x: Color, _y: Color) => Float32Array.of(0, 0, 0, 0),\n ShaderLib,\n createDrawing: Noop,\n createDeclaration: Noop,\n};\n"]}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import React, { useEffect, useState, useCallback, useMemo, forwardRef, useRef } from "react";
|
2
|
+
import ReactReconciler from "react-reconciler";
|
3
|
+
import { SkiaView, useDrawCallback } from "../views";
|
4
|
+
import { useValue } from "../values/hooks/useValue";
|
5
|
+
import { Skia } from "../skia/Skia";
|
6
|
+
import { debug as hostDebug, skHostConfig } from "./HostConfig"; // import { debugTree } from "./nodes";
|
7
|
+
|
8
|
+
import { Container } from "./nodes";
|
9
|
+
import { DependencyManager } from "./DependencyManager";
|
10
|
+
import { CanvasProvider } from "./useCanvas";
|
11
|
+
export const skiaReconciler = ReactReconciler(skHostConfig);
|
12
|
+
skiaReconciler.injectIntoDevTools({
|
13
|
+
bundleType: 1,
|
14
|
+
version: "0.0.1",
|
15
|
+
rendererPackageName: "react-native-skia"
|
16
|
+
});
|
17
|
+
|
18
|
+
const render = (element, root, container) => {
|
19
|
+
skiaReconciler.updateContainer(element, root, null, () => {
|
20
|
+
hostDebug("updateContainer");
|
21
|
+
container.depMgr.subscribe();
|
22
|
+
});
|
23
|
+
};
|
24
|
+
|
25
|
+
export const useCanvasRef = () => useRef(null);
|
26
|
+
const defaultFontMgr = Skia.FontMgr.RefDefault();
|
27
|
+
export const Canvas = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
|
28
|
+
let {
|
29
|
+
children,
|
30
|
+
style,
|
31
|
+
debug,
|
32
|
+
mode,
|
33
|
+
onTouch,
|
34
|
+
fontMgr
|
35
|
+
} = _ref;
|
36
|
+
const size = useValue({
|
37
|
+
width: 0,
|
38
|
+
height: 0
|
39
|
+
});
|
40
|
+
const canvasCtx = useMemo(() => ({
|
41
|
+
Skia,
|
42
|
+
size
|
43
|
+
}), [size]);
|
44
|
+
const innerRef = useCanvasRef();
|
45
|
+
const ref = useCombinedRefs(forwardedRef, innerRef);
|
46
|
+
const [tick, setTick] = useState(0);
|
47
|
+
const redraw = useCallback(() => setTick(t => t + 1), []);
|
48
|
+
const container = useMemo(() => new Container(new DependencyManager(ref), redraw), [redraw, ref]);
|
49
|
+
const root = useMemo(() => skiaReconciler.createContainer(container, 0, false, null), [container]); // Render effect
|
50
|
+
|
51
|
+
useEffect(() => {
|
52
|
+
render( /*#__PURE__*/React.createElement(CanvasProvider, {
|
53
|
+
value: canvasCtx
|
54
|
+
}, children), root, container);
|
55
|
+
}, [children, root, redraw, container, canvasCtx]); // Draw callback
|
56
|
+
|
57
|
+
const onDraw = useDrawCallback((canvas, info) => {
|
58
|
+
// TODO: if tree is empty (count === 1) maybe we should not render?
|
59
|
+
const {
|
60
|
+
width,
|
61
|
+
height,
|
62
|
+
timestamp
|
63
|
+
} = info;
|
64
|
+
|
65
|
+
if (onTouch) {
|
66
|
+
onTouch(info.touches);
|
67
|
+
}
|
68
|
+
|
69
|
+
if (width !== canvasCtx.size.current.width || height !== canvasCtx.size.current.height) {
|
70
|
+
canvasCtx.size.current = {
|
71
|
+
width,
|
72
|
+
height
|
73
|
+
};
|
74
|
+
}
|
75
|
+
|
76
|
+
const paint = Skia.Paint();
|
77
|
+
const ctx = {
|
78
|
+
width,
|
79
|
+
height,
|
80
|
+
timestamp,
|
81
|
+
canvas,
|
82
|
+
paint,
|
83
|
+
opacity: 1,
|
84
|
+
ref,
|
85
|
+
center: Skia.Point(width / 2, height / 2),
|
86
|
+
fontMgr: fontMgr !== null && fontMgr !== void 0 ? fontMgr : defaultFontMgr,
|
87
|
+
Skia
|
88
|
+
};
|
89
|
+
container.draw(ctx);
|
90
|
+
}, [tick, onTouch]);
|
91
|
+
useEffect(() => {
|
92
|
+
return () => {
|
93
|
+
container.depMgr.unsubscribe();
|
94
|
+
};
|
95
|
+
}, [container]);
|
96
|
+
return /*#__PURE__*/React.createElement(SkiaView, {
|
97
|
+
ref: ref,
|
98
|
+
style: style,
|
99
|
+
onDraw: onDraw,
|
100
|
+
mode: mode,
|
101
|
+
debug: debug
|
102
|
+
});
|
103
|
+
});
|
104
|
+
/**
|
105
|
+
* Combines a list of refs into a single ref. This can be used to provide
|
106
|
+
* both a forwarded ref and an internal ref keeping the same functionality
|
107
|
+
* on both of the refs.
|
108
|
+
* @param refs Array of refs to combine
|
109
|
+
* @returns A single ref that can be used in a ref prop.
|
110
|
+
*/
|
111
|
+
|
112
|
+
const useCombinedRefs = function () {
|
113
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
114
|
+
refs[_key] = arguments[_key];
|
115
|
+
}
|
116
|
+
|
117
|
+
const targetRef = React.useRef(null);
|
118
|
+
React.useEffect(() => {
|
119
|
+
refs.forEach(ref => {
|
120
|
+
if (ref) {
|
121
|
+
if (typeof ref === "function") {
|
122
|
+
ref(targetRef.current);
|
123
|
+
} else {
|
124
|
+
ref.current = targetRef.current;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
});
|
128
|
+
}, [refs]);
|
129
|
+
return targetRef;
|
130
|
+
};
|
131
|
+
//# sourceMappingURL=Canvas.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Canvas.tsx"],"names":["React","useEffect","useState","useCallback","useMemo","forwardRef","useRef","ReactReconciler","SkiaView","useDrawCallback","useValue","Skia","debug","hostDebug","skHostConfig","Container","DependencyManager","CanvasProvider","skiaReconciler","injectIntoDevTools","bundleType","version","rendererPackageName","render","element","root","container","updateContainer","depMgr","subscribe","useCanvasRef","defaultFontMgr","FontMgr","RefDefault","Canvas","forwardedRef","children","style","mode","onTouch","fontMgr","size","width","height","canvasCtx","innerRef","ref","useCombinedRefs","tick","setTick","redraw","t","createContainer","onDraw","canvas","info","timestamp","touches","current","paint","Paint","ctx","opacity","center","Point","draw","unsubscribe","refs","targetRef","forEach"],"mappings":"AAAA,OAAOA,KAAP,IACEC,SADF,EAEEC,QAFF,EAGEC,WAHF,EAIEC,OAJF,EAKEC,UALF,EAMEC,MANF,QAOO,OAPP;AAgBA,OAAOC,eAAP,MAA4B,kBAA5B;AAEA,SAASC,QAAT,EAAmBC,eAAnB,QAA0C,UAA1C;AAGA,SAASC,QAAT,QAAyB,0BAAzB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,KAAK,IAAIC,SAAlB,EAA6BC,YAA7B,QAAiD,cAAjD,C,CACA;;AACA,SAASC,SAAT,QAA0B,SAA1B;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,cAAT,QAA+B,aAA/B;AAEA,OAAO,MAAMC,cAAc,GAAGX,eAAe,CAACO,YAAD,CAAtC;AAEPI,cAAc,CAACC,kBAAf,CAAkC;AAChCC,EAAAA,UAAU,EAAE,CADoB;AAEhCC,EAAAA,OAAO,EAAE,OAFuB;AAGhCC,EAAAA,mBAAmB,EAAE;AAHW,CAAlC;;AAMA,MAAMC,MAAM,GAAG,CAACC,OAAD,EAAqBC,IAArB,EAAuCC,SAAvC,KAAgE;AAC7ER,EAAAA,cAAc,CAACS,eAAf,CAA+BH,OAA/B,EAAwCC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\n useState,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n ComponentProps,\n MutableRefObject,\n ForwardedRef,\n} from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport { SkiaView, useDrawCallback } from \"../views\";\nimport type { TouchHandler } from \"../views\";\nimport type { SkFontMgr } from \"../skia/types\";\nimport { useValue } from \"../values/hooks/useValue\";\nimport { Skia } from \"../skia/Skia\";\n\nimport { debug as hostDebug, skHostConfig } from \"./HostConfig\";\n// import { debugTree } from \"./nodes\";\nimport { Container } from \"./nodes\";\nimport { DependencyManager } from \"./DependencyManager\";\nimport { CanvasProvider } from \"./useCanvas\";\n\nexport const skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nconst render = (element: ReactNode, root: OpaqueRoot, container: Container) => {\n skiaReconciler.updateContainer(element, root, null, () => {\n hostDebug(\"updateContainer\");\n\n container.depMgr.subscribe();\n });\n};\n\nexport const useCanvasRef = () => useRef<SkiaView>(null);\n\nexport interface CanvasProps extends ComponentProps<typeof SkiaView> {\n ref?: RefObject<SkiaView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n fontMgr?: SkFontMgr;\n}\n\nconst defaultFontMgr = Skia.FontMgr.RefDefault();\n\nexport const Canvas = forwardRef<SkiaView, CanvasProps>(\n ({ children, style, debug, mode, onTouch, fontMgr }, forwardedRef) => {\n const size = useValue({ width: 0, height: 0 });\n const canvasCtx = useMemo(() => ({ Skia, size }), [size]);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const [tick, setTick] = useState(0);\n const redraw = useCallback(() => setTick((t) => t + 1), []);\n\n const container = useMemo(\n () => new Container(new DependencyManager(ref), redraw),\n [redraw, ref]\n );\n\n const root = useMemo(\n () => skiaReconciler.createContainer(container, 0, false, null),\n [container]\n );\n // Render effect\n useEffect(() => {\n render(\n <CanvasProvider value={canvasCtx}>{children}</CanvasProvider>,\n root,\n container\n );\n }, [children, root, redraw, container, canvasCtx]);\n\n // Draw callback\n const onDraw = useDrawCallback(\n (canvas, info) => {\n // TODO: if tree is empty (count === 1) maybe we should not render?\n const { width, height, timestamp } = info;\n if (onTouch) {\n onTouch(info.touches);\n }\n if (\n width !== canvasCtx.size.current.width ||\n height !== canvasCtx.size.current.height\n ) {\n canvasCtx.size.current = { width, height };\n }\n const paint = Skia.Paint();\n const ctx = {\n width,\n height,\n timestamp,\n canvas,\n paint,\n opacity: 1,\n ref,\n center: Skia.Point(width / 2, height / 2),\n fontMgr: fontMgr ?? defaultFontMgr,\n Skia,\n };\n container.draw(ctx);\n },\n [tick, onTouch]\n );\n\n useEffect(() => {\n return () => {\n container.depMgr.unsubscribe();\n };\n }, [container]);\n\n return (\n <SkiaView\n ref={ref}\n style={style}\n onDraw={onDraw}\n mode={mode}\n debug={debug}\n />\n );\n }\n);\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"]}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
+
|
3
|
+
import { isValue } from "./processors";
|
4
|
+
export class DependencyManager {
|
5
|
+
constructor(ref) {
|
6
|
+
_defineProperty(this, "ref", void 0);
|
7
|
+
|
8
|
+
_defineProperty(this, "subscriptions", new Map());
|
9
|
+
|
10
|
+
this.ref = ref;
|
11
|
+
}
|
12
|
+
|
13
|
+
unSubscribeNode(node) {
|
14
|
+
const subscription = this.subscriptions.get(node);
|
15
|
+
|
16
|
+
if (subscription && subscription.unsubscribe) {
|
17
|
+
subscription.unsubscribe();
|
18
|
+
}
|
19
|
+
|
20
|
+
this.subscriptions.delete(node);
|
21
|
+
}
|
22
|
+
|
23
|
+
subscribeNode(node, props) {
|
24
|
+
const values = Object.values(props).filter(isValue);
|
25
|
+
|
26
|
+
if (values.length > 0) {
|
27
|
+
this.subscriptions.set(node, {
|
28
|
+
values,
|
29
|
+
unsubscribe: null
|
30
|
+
});
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
subscribe() {
|
35
|
+
if (this.ref.current === null) {
|
36
|
+
throw new Error("Canvas ref is not set");
|
37
|
+
}
|
38
|
+
|
39
|
+
this.subscriptions.forEach(subscription => {
|
40
|
+
if (subscription.unsubscribe === null) {
|
41
|
+
subscription.unsubscribe = this.ref.current.registerValues(subscription.values);
|
42
|
+
}
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
unsubscribe() {
|
47
|
+
this.subscriptions.forEach(_ref => {
|
48
|
+
let {
|
49
|
+
unsubscribe
|
50
|
+
} = _ref;
|
51
|
+
|
52
|
+
if (unsubscribe) {
|
53
|
+
unsubscribe();
|
54
|
+
}
|
55
|
+
});
|
56
|
+
this.subscriptions.clear();
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
//# sourceMappingURL=DependencyManager.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["DependencyManager.tsx"],"names":["isValue","DependencyManager","constructor","ref","Map","unSubscribeNode","node","subscription","subscriptions","get","unsubscribe","delete","subscribeNode","props","values","Object","filter","length","set","subscribe","current","Error","forEach","registerValues","clear"],"mappings":";;AAKA,SAASA,OAAT,QAAwB,cAAxB;AAMA,O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QAAAA;AAAF,OAAoB;;AAC9C,UAAIA,WAAJ,EAAiB;AACfA,QAAAA,WAAW;AACZ;AACF,KAJD;AAKA,SAAKF,aAAL,CAAmBgB,KAAnB;AACD;;AA9C4B","sourcesContent":["import type { RefObject } from \"react\";\n\nimport type { SkiaView } from \"../views\";\nimport type { SkiaValue } from \"../values\";\n\nimport { isValue } from \"./processors\";\nimport type { Node } from \"./nodes\";\n\ntype Unsubscribe = () => void;\ntype Props = { [key: string]: unknown };\n\nexport class DependencyManager {\n ref: RefObject<SkiaView>;\n subscriptions: Map<\n Node,\n { values: SkiaValue<unknown>[]; unsubscribe: null | Unsubscribe }\n > = new Map();\n\n constructor(ref: RefObject<SkiaView>) {\n this.ref = ref;\n }\n\n unSubscribeNode(node: Node) {\n const subscription = this.subscriptions.get(node);\n if (subscription && subscription.unsubscribe) {\n subscription.unsubscribe();\n }\n this.subscriptions.delete(node);\n }\n\n subscribeNode(node: Node, props: Props) {\n const values = Object.values(props).filter(isValue);\n if (values.length > 0) {\n this.subscriptions.set(node, { values, unsubscribe: null });\n }\n }\n\n subscribe() {\n if (this.ref.current === null) {\n throw new Error(\"Canvas ref is not set\");\n }\n this.subscriptions.forEach((subscription) => {\n if (subscription.unsubscribe === null) {\n subscription.unsubscribe = this.ref.current!.registerValues(\n subscription.values\n );\n }\n });\n }\n\n unsubscribe() {\n this.subscriptions.forEach(({ unsubscribe }) => {\n if (unsubscribe) {\n unsubscribe();\n }\n });\n this.subscriptions.clear();\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
@@ -0,0 +1,237 @@
|
|
1
|
+
/*global NodeJS*/
|
2
|
+
import { DeclarationNode, DrawingNode, NodeType } from "./nodes";
|
3
|
+
import { exhaustiveCheck, shallowEq } from "./typeddash";
|
4
|
+
const DEBUG = false;
|
5
|
+
export const debug = function () {
|
6
|
+
if (DEBUG) {
|
7
|
+
console.log(...arguments);
|
8
|
+
}
|
9
|
+
};
|
10
|
+
|
11
|
+
const allChildrenAreMemoized = node => {
|
12
|
+
if (!node.memoizable) {
|
13
|
+
return false;
|
14
|
+
}
|
15
|
+
|
16
|
+
for (const child of node.children) {
|
17
|
+
if (!child.memoized) {
|
18
|
+
return false;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
return true;
|
23
|
+
};
|
24
|
+
|
25
|
+
const bustBranchMemoization = parent => {
|
26
|
+
if (parent.memoizable) {
|
27
|
+
let ancestor = parent;
|
28
|
+
|
29
|
+
while (ancestor) {
|
30
|
+
ancestor.memoized = null;
|
31
|
+
ancestor = ancestor.parent;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|
35
|
+
|
36
|
+
const bustBranchMemoizable = parent => {
|
37
|
+
if (parent.memoizable) {
|
38
|
+
let ancestor = parent;
|
39
|
+
|
40
|
+
while (ancestor) {
|
41
|
+
ancestor.memoizable = false;
|
42
|
+
ancestor = ancestor.parent;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
const appendNode = (parent, child) => {
|
48
|
+
child.parent = parent;
|
49
|
+
bustBranchMemoization(parent);
|
50
|
+
|
51
|
+
if (!child.memoizable) {
|
52
|
+
bustBranchMemoizable(parent);
|
53
|
+
}
|
54
|
+
|
55
|
+
if (!parent.memoizable) {
|
56
|
+
child.memoizable = false;
|
57
|
+
}
|
58
|
+
|
59
|
+
parent.children.push(child);
|
60
|
+
};
|
61
|
+
|
62
|
+
const removeNode = (parent, child) => {
|
63
|
+
bustBranchMemoization(parent);
|
64
|
+
const index = parent.children.indexOf(child);
|
65
|
+
parent.children.splice(index, 1);
|
66
|
+
child.depMgr.unSubscribeNode(child); // unsubscribe to all children as well
|
67
|
+
|
68
|
+
for (const c of child.children) {
|
69
|
+
removeNode(child, c);
|
70
|
+
}
|
71
|
+
};
|
72
|
+
|
73
|
+
const insertBefore = (parent, child, before) => {
|
74
|
+
bustBranchMemoization(parent);
|
75
|
+
const index = parent.children.indexOf(child);
|
76
|
+
|
77
|
+
if (index !== -1) {
|
78
|
+
parent.children.splice(index, 1);
|
79
|
+
}
|
80
|
+
|
81
|
+
const beforeIndex = parent.children.indexOf(before);
|
82
|
+
parent.children.splice(beforeIndex, 0, child);
|
83
|
+
};
|
84
|
+
|
85
|
+
const createNode = (container, type, props) => {
|
86
|
+
switch (type) {
|
87
|
+
case NodeType.Drawing:
|
88
|
+
const {
|
89
|
+
onDraw,
|
90
|
+
skipProcessing,
|
91
|
+
...p1
|
92
|
+
} = props;
|
93
|
+
return new DrawingNode(container.depMgr, onDraw, skipProcessing, p1);
|
94
|
+
|
95
|
+
case NodeType.Declaration:
|
96
|
+
const {
|
97
|
+
onDeclare,
|
98
|
+
...p2
|
99
|
+
} = props;
|
100
|
+
return new DeclarationNode(container.depMgr, onDeclare, p2);
|
101
|
+
|
102
|
+
default:
|
103
|
+
// TODO: here we need to throw a nice error message
|
104
|
+
// This is the error that will show up when the user uses nodes not supported by Skia (View, Audio, etc)
|
105
|
+
return exhaustiveCheck(type);
|
106
|
+
}
|
107
|
+
};
|
108
|
+
|
109
|
+
export const skHostConfig = {
|
110
|
+
/**
|
111
|
+
* This function is used by the reconciler in order to calculate current time for prioritising work.
|
112
|
+
*/
|
113
|
+
now: Date.now,
|
114
|
+
supportsMutation: true,
|
115
|
+
isPrimaryRenderer: false,
|
116
|
+
supportsPersistence: false,
|
117
|
+
supportsHydration: false,
|
118
|
+
//supportsMicrotask: true,
|
119
|
+
scheduleTimeout: setTimeout,
|
120
|
+
cancelTimeout: clearTimeout,
|
121
|
+
noTimeout: -1,
|
122
|
+
|
123
|
+
appendChildToContainer(container, child) {
|
124
|
+
debug("appendChildToContainer", container, child);
|
125
|
+
appendNode(container, child);
|
126
|
+
},
|
127
|
+
|
128
|
+
appendChild(parent, child) {
|
129
|
+
debug("appendChild", parent, child);
|
130
|
+
appendNode(parent, child);
|
131
|
+
},
|
132
|
+
|
133
|
+
getRootHostContext: _rootContainerInstance => {
|
134
|
+
debug("getRootHostContext");
|
135
|
+
return null;
|
136
|
+
},
|
137
|
+
|
138
|
+
getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
|
139
|
+
debug("getChildHostContext");
|
140
|
+
return null;
|
141
|
+
},
|
142
|
+
|
143
|
+
shouldSetTextContent(_type, _props) {
|
144
|
+
return false;
|
145
|
+
},
|
146
|
+
|
147
|
+
createTextInstance(_text, _rootContainerInstance, _hostContext, _internalInstanceHandle) {
|
148
|
+
debug("createTextInstance"); // return SpanNode({}, text) as SkNode;
|
149
|
+
|
150
|
+
throw new Error("Text nodes are not supported yet");
|
151
|
+
},
|
152
|
+
|
153
|
+
createInstance(type, props, container, _hostContext, _internalInstanceHandle) {
|
154
|
+
debug("createInstance", type);
|
155
|
+
return createNode(container, type, props);
|
156
|
+
},
|
157
|
+
|
158
|
+
appendInitialChild(parentInstance, child) {
|
159
|
+
debug("appendInitialChild");
|
160
|
+
appendNode(parentInstance, child);
|
161
|
+
},
|
162
|
+
|
163
|
+
finalizeInitialChildren(parentInstance, _type, _props, _rootContainerInstance, _hostContext) {
|
164
|
+
debug("finalizeInitialChildren", parentInstance);
|
165
|
+
return false;
|
166
|
+
},
|
167
|
+
|
168
|
+
commitMount() {
|
169
|
+
// if finalizeInitialChildren = true
|
170
|
+
debug("commitMount");
|
171
|
+
},
|
172
|
+
|
173
|
+
prepareForCommit(_containerInfo) {
|
174
|
+
debug("prepareForCommit");
|
175
|
+
return null;
|
176
|
+
},
|
177
|
+
|
178
|
+
finalizeContainerChildren: () => {
|
179
|
+
debug("finalizeContainerChildren");
|
180
|
+
},
|
181
|
+
|
182
|
+
resetAfterCommit(container) {
|
183
|
+
debug("resetAfterCommit");
|
184
|
+
container.redraw();
|
185
|
+
},
|
186
|
+
|
187
|
+
getPublicInstance(node) {
|
188
|
+
debug("getPublicInstance");
|
189
|
+
return node;
|
190
|
+
},
|
191
|
+
|
192
|
+
prepareUpdate: (instance, type, oldProps, newProps, _rootContainerInstance, _hostContext) => {
|
193
|
+
debug("prepareUpdate");
|
194
|
+
const propsAreEqual = shallowEq(oldProps, newProps);
|
195
|
+
|
196
|
+
if (propsAreEqual && !instance.memoizable) {
|
197
|
+
return null;
|
198
|
+
}
|
199
|
+
|
200
|
+
debug("update ", type);
|
201
|
+
return true;
|
202
|
+
},
|
203
|
+
|
204
|
+
commitUpdate(instance, _updatePayload, type, prevProps, nextProps, _internalHandle) {
|
205
|
+
debug("commitUpdate: ", type);
|
206
|
+
|
207
|
+
if (shallowEq(prevProps, nextProps) && allChildrenAreMemoized(instance)) {
|
208
|
+
return;
|
209
|
+
}
|
210
|
+
|
211
|
+
bustBranchMemoization(instance);
|
212
|
+
instance.props = nextProps;
|
213
|
+
},
|
214
|
+
|
215
|
+
commitTextUpdate: (_textInstance, _oldText, _newText) => {// textInstance.instance = newText;
|
216
|
+
},
|
217
|
+
clearContainer: container => {
|
218
|
+
debug("clearContainer");
|
219
|
+
container.children.splice(0);
|
220
|
+
},
|
221
|
+
preparePortalMount: () => {
|
222
|
+
debug("preparePortalMount");
|
223
|
+
},
|
224
|
+
removeChild: (parent, child) => {
|
225
|
+
removeNode(parent, child);
|
226
|
+
},
|
227
|
+
removeChildFromContainer: (parent, child) => {
|
228
|
+
removeNode(parent, child);
|
229
|
+
},
|
230
|
+
insertInContainerBefore: (parent, child, before) => {
|
231
|
+
insertBefore(parent, child, before);
|
232
|
+
},
|
233
|
+
insertBefore: (parent, child, before) => {
|
234
|
+
insertBefore(parent, child, before);
|
235
|
+
}
|
236
|
+
};
|
237
|
+
//# sourceMappingURL=HostConfig.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["HostConfig.ts"],"names":["DeclarationNode","DrawingNode","NodeType","exhaustiveCheck","shallowEq","DEBUG","debug","console","log","allChildrenAreMemoized","node","memoizable","child","children","memoized","bustBranchMemoization","parent","ancestor","bustBranchMemoizable","appendNode","push","removeNode","index","indexOf","splice","depMgr","unSubscribeNode","c","insertBefore","before","beforeIndex","createNode","container","type","props","Drawing","onDraw","skipProcessing","p1","Declaration","onDeclare","p2","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","finalizeContainerChildren","resetAfterCommit","redraw","getPublicInstance","prepareUpdate","instance","oldProps","newProps","propsAreEqual","commitUpdate","_updatePayload","prevProps","nextProps","_internalHandle","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","preparePortalMount","removeChild","removeChildFromContainer","insertInContainerBefore"],"mappings":"AAAA;AAIA,SAASA,eAAT,EAA0BC,WAA1B,EAAuCC,QAAvC,QAAuD,SAAvD;AACA,SAASC,eAAT,EAA0BC,SAA1B,QAA2C,aAA3C;AAEA,MAAMC,KAAK,GAAG,KAAd;AACA,OAAO,MAAMC,KAAK,GAAG,YAA6C;AAChE,MAAID,KAAJ,EAAW;AACTE,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACD;AACF,CAJM;;AA+CP,MAAMC,sBAAsB,GAAIC,IAAD,IAAoB;AACjD,MAAI,CAACA,IAAI,CAACC,UAAV,EAAsB;AACpB,WAAO,KAAP;AACD;;AACD,OAAK,MAAMC,KAAX,IAAoBF,IAAI,CAACG,QAAzB,EAAmC;AACjC,QAAI,CAACD,KAAK,CAACE,QAAX,EAAqB;AACnB,aAAO,KAAP;AACD;AACF;;AACD,SAAO,IAAP;AACD,CAVD;;AAYA,MAAMC,qBAAqB,GAAIC,MAAD,IAAkB;AAC9C,MAAIA,MAAM,CAACL,UAAX,EAAuB;AACrB,QAAIM,QAA0B,GAAGD,MAAjC;;AACA,WAAOC,QAAP,EAAiB;AACfA,MAAAA,QAAQ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AAA,UAAU,CAACL,MAAD,EAASJ,KAAT,CAAV;AACD,GA9JyC;AAgK1CqF,EAAAA,uBAAuB,EAAE,CAACjF,MAAD,EAASJ,KAAT,EAAgBiB,MAAhB,KAA2B;AAClDD,IAAAA,YAAY,CAACZ,MAAD,EAASJ,KAAT,EAAgBiB,MAAhB,CAAZ;AACD,GAlKyC;AAoK1CD,EAAAA,YAAY,EAAE,CAACZ,MAAD,EAASJ,KAAT,EAAgBiB,MAAhB,KAA2B;AACvCD,IAAAA,YAAY,CAACZ,MAAD,EAASJ,KAAT,EAAgBiB,MAAhB,CAAZ;AACD;AAtKyC,CAArC","sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\n\nimport type { Node, Container, DeclarationProps, DrawingProps } from \"./nodes\";\nimport { DeclarationNode, DrawingNode, NodeType } from \"./nodes\";\nimport { exhaustiveCheck, shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skDeclaration: DeclarationProps<any>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skDrawing: DrawingProps<any>;\n }\n }\n}\n\ntype Instance = Node;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Props = any;\ntype TextInstance = Node;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = true;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst allChildrenAreMemoized = (node: Instance) => {\n if (!node.memoizable) {\n return false;\n }\n for (const child of node.children) {\n if (!child.memoized) {\n return false;\n }\n }\n return true;\n};\n\nconst bustBranchMemoization = (parent: Node) => {\n if (parent.memoizable) {\n let ancestor: Node | undefined = parent;\n while (ancestor) {\n ancestor.memoized = null;\n ancestor = ancestor.parent;\n }\n }\n};\n\nconst bustBranchMemoizable = (parent: Node) => {\n if (parent.memoizable) {\n let ancestor: Node | undefined = parent;\n while (ancestor) {\n ancestor.memoizable = false;\n ancestor = ancestor.parent;\n }\n }\n};\n\nconst appendNode = (parent: Node, child: Node) => {\n child.parent = parent;\n bustBranchMemoization(parent);\n if (!child.memoizable) {\n bustBranchMemoizable(parent);\n }\n if (!parent.memoizable) {\n child.memoizable = false;\n }\n parent.children.push(child);\n};\n\nconst removeNode = (parent: Node, child: Node) => {\n bustBranchMemoization(parent);\n const index = parent.children.indexOf(child);\n parent.children.splice(index, 1);\n child.depMgr.unSubscribeNode(child);\n // unsubscribe to all children as well\n for (const c of child.children) {\n removeNode(child, c);\n }\n};\n\nconst insertBefore = (parent: Node, child: Node, before: Node) => {\n bustBranchMemoization(parent);\n const index = parent.children.indexOf(child);\n if (index !== -1) {\n parent.children.splice(index, 1);\n }\n const beforeIndex = parent.children.indexOf(before);\n parent.children.splice(beforeIndex, 0, child);\n};\n\nconst createNode = (container: Container, type: NodeType, props: Props) => {\n switch (type) {\n case NodeType.Drawing:\n const { onDraw, skipProcessing, ...p1 } = props;\n return new DrawingNode(container.depMgr, onDraw, skipProcessing, p1);\n case NodeType.Declaration:\n const { onDeclare, ...p2 } = props;\n return new DeclarationNode(container.depMgr, onDeclare, p2);\n default:\n // TODO: here we need to throw a nice error message\n // This is the error that will show up when the user uses nodes not supported by Skia (View, Audio, etc)\n return exhaustiveCheck(type);\n }\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Node) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n props,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n return createNode(container, type, props) as Node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n finalizeContainerChildren: () => {\n debug(\"finalizeContainerChildren\");\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n instance,\n type,\n oldProps,\n newProps,\n _rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual && !instance.memoizable) {\n return null;\n }\n debug(\"update \", type);\n return true;\n },\n\n commitUpdate(\n instance,\n _updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps) && allChildrenAreMemoized(instance)) {\n return;\n }\n bustBranchMemoization(instance);\n instance.props = nextProps;\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.children.splice(0);\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (parent, child) => {\n removeNode(parent, child);\n },\n\n insertInContainerBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n};\n"]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
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); }
|
2
|
+
|
3
|
+
import React from "react";
|
4
|
+
import { isImageFilter, BlendMode, isShader } from "../../skia/types";
|
5
|
+
import { createDeclaration } from "../nodes";
|
6
|
+
import { enumKey } from "../processors/Paint";
|
7
|
+
const onDeclare = createDeclaration((_ref, children, _ref2) => {
|
8
|
+
let {
|
9
|
+
mode
|
10
|
+
} = _ref;
|
11
|
+
let {
|
12
|
+
Skia
|
13
|
+
} = _ref2;
|
14
|
+
const [inner, outer] = children;
|
15
|
+
const blend = BlendMode[enumKey(mode)];
|
16
|
+
|
17
|
+
if (isImageFilter(outer) && isImageFilter(inner)) {
|
18
|
+
return Skia.ImageFilter.MakeBlend(blend, outer, inner);
|
19
|
+
} else if (isShader(outer) && isShader(inner)) {
|
20
|
+
return Skia.Shader.MakeBlend(blend, outer, inner);
|
21
|
+
}
|
22
|
+
|
23
|
+
throw new Error("<Blend /> can only blend Shaders or ImageFilters");
|
24
|
+
});
|
25
|
+
export const Blend = props => {
|
26
|
+
return /*#__PURE__*/React.createElement("skDeclaration", _extends({
|
27
|
+
onDeclare: onDeclare
|
28
|
+
}, props));
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=Blend.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["Blend.tsx"],"names":["React","isImageFilter","BlendMode","isShader","createDeclaration","enumKey","onDeclare","children","mode","Skia","inner","outer","blend","ImageFilter","MakeBlend","Shader","Error","Blend","props"],"mappings":";;AACA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,aAAT,EAAwBC,SAAxB,EAAmCC,QAAnC,QAAmD,kBAAnD;AACA,SAASC,iBAAT,QAAkC,UAAlC;AAEA,SAASC,OAAT,QAAwB,qBAAxB;AAOA,MAAMC,SAAS,GAAGF,iBAAiB,CACjC,OAAWG,QAAX,YAAkC;AAAA,MAAjC;AAAEC,IAAAA;AAAF,GAAiC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAChC,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBJ,QAAvB;AACA,QAAMK,KAAK,GAAGV,SAAS,CAACG,OAAO,CAACG,IAAD,CAAR,CAAvB;;AACA,MAAIP,aAAa,CAACU,KAAD,CAAb,IAAwBV,aAAa,CAACS,KAAD,CAAzC,EAAkD;AAChD,WAAOD,IAAI,CAACI,WAAL,CAAiBC,SAAjB,CAA2BF,KAA3B,EAAkCD,KAAlC,EAAyCD,KAAzC,CAAP;AACD,GAFD,MAEO,IAAIP,QAAQ,CAACQ,KAAD,CAAR,IAAmBR,QAAQ,CAACO,KAAD,CAA/B,EAAwC;AAC7C,WAAOD,IAAI,CAACM,MAAL,CAAYD,SAAZ,CAAsBF,KAAtB,EAA6BD,KAA7B,EAAoCD,KAApC,CAAP;AACD;;AACD,QAAM,IAAIM,KAAJ,CAAU,kDAAV,CAAN;AACD,CAVgC,CAAnC;AAaA,OAAO,MAAMC,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAe,IAAA,SAAS,EAAEZ;AAA1B,KAAyCY,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport { isImageFilter, BlendMode, isShader } from \"../../skia/types\";\nimport { createDeclaration } from \"../nodes\";\nimport type { AnimatedProps, SkEnum } from \"../processors\";\nimport { enumKey } from \"../processors/Paint\";\n\ninterface BlendProps {\n mode: SkEnum<typeof BlendMode>;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<BlendProps>(\n ({ mode }, children, { Skia }) => {\n const [inner, outer] = children;\n const blend = BlendMode[enumKey(mode)];\n if (isImageFilter(outer) && isImageFilter(inner)) {\n return Skia.ImageFilter.MakeBlend(blend, outer, inner);\n } else if (isShader(outer) && isShader(inner)) {\n return Skia.Shader.MakeBlend(blend, outer, inner);\n }\n throw new Error(\"<Blend /> can only blend Shaders or ImageFilters\");\n }\n);\n\nexport const Blend = (props: AnimatedProps<BlendProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
|