@shopify/react-native-skia 0.1.158 → 0.1.160
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +35 -11
- package/android/build.gradle +21 -25
- package/android/cpp/jni/JniLoad.cpp +2 -0
- package/android/cpp/jni/include/JniSkiaDomView.h +89 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +4 -3
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +4 -3
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +2 -1
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +45 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomViewManager.java +64 -0
- package/cpp/api/JsiSkHostObjects.h +6 -0
- package/cpp/api/JsiSkImageFilterFactory.h +1 -1
- package/cpp/api/JsiSkPaint.h +9 -2
- package/cpp/api/JsiSkPath.h +1 -0
- package/cpp/api/JsiSkRuntimeEffect.h +36 -36
- package/cpp/jsi/JsiHostObject.cpp +16 -28
- package/cpp/jsi/JsiHostObject.h +127 -7
- package/cpp/jsi/JsiValue.cpp +346 -0
- package/cpp/jsi/JsiValue.h +222 -0
- package/cpp/jsi/JsiValueWrapper.h +33 -5
- package/cpp/rnskia/RNSkDomView.cpp +222 -0
- package/cpp/rnskia/RNSkDomView.h +140 -0
- package/cpp/rnskia/RNSkJsView.cpp +0 -4
- package/cpp/rnskia/RNSkJsView.h +6 -4
- package/cpp/rnskia/RNSkManager.cpp +7 -0
- package/cpp/rnskia/RNSkPictureView.h +5 -8
- package/cpp/rnskia/RNSkView.h +113 -5
- package/cpp/rnskia/dom/JsiDomApi.h +167 -0
- package/cpp/rnskia/dom/base/BaseNodeProp.h +72 -0
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +187 -0
- package/cpp/rnskia/dom/base/DrawingContext.cpp +227 -0
- package/cpp/rnskia/dom/base/DrawingContext.h +136 -0
- package/cpp/rnskia/dom/base/JsiDependencyManager.h +293 -0
- package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +176 -0
- package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +50 -0
- package/cpp/rnskia/dom/base/JsiDomNode.h +384 -0
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +267 -0
- package/cpp/rnskia/dom/base/NodeProp.h +130 -0
- package/cpp/rnskia/dom/base/NodePropsContainer.h +119 -0
- package/cpp/rnskia/dom/nodes/JsiBackdropFilterNode.h +38 -0
- package/cpp/rnskia/dom/nodes/JsiBlendNode.h +112 -0
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +78 -0
- package/cpp/rnskia/dom/nodes/JsiBoxNode.h +104 -0
- package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +33 -0
- package/cpp/rnskia/dom/nodes/JsiCircleNode.h +38 -0
- package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +192 -0
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +123 -0
- package/cpp/rnskia/dom/nodes/JsiDiffRectNode.h +42 -0
- package/cpp/rnskia/dom/nodes/JsiFillNode.h +22 -0
- package/cpp/rnskia/dom/nodes/JsiGlyphsNode.h +56 -0
- package/cpp/rnskia/dom/nodes/JsiGroupNode.h +26 -0
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +415 -0
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +34 -0
- package/cpp/rnskia/dom/nodes/JsiImageSvgNode.h +44 -0
- package/cpp/rnskia/dom/nodes/JsiLayerNode.h +64 -0
- package/cpp/rnskia/dom/nodes/JsiLineNode.h +43 -0
- package/cpp/rnskia/dom/nodes/JsiOvalNode.h +34 -0
- package/cpp/rnskia/dom/nodes/JsiPaintNode.h +79 -0
- package/cpp/rnskia/dom/nodes/JsiPatchNode.h +54 -0
- package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +315 -0
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +181 -0
- package/cpp/rnskia/dom/nodes/JsiPictureNode.h +32 -0
- package/cpp/rnskia/dom/nodes/JsiPointsNode.h +51 -0
- package/cpp/rnskia/dom/nodes/JsiRRectNode.h +34 -0
- package/cpp/rnskia/dom/nodes/JsiRectNode.h +34 -0
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +517 -0
- package/cpp/rnskia/dom/nodes/JsiTextBlobNode.h +47 -0
- package/cpp/rnskia/dom/nodes/JsiTextNode.h +54 -0
- package/cpp/rnskia/dom/nodes/JsiTextPathNode.h +32 -0
- package/cpp/rnskia/dom/nodes/JsiVerticesNode.h +43 -0
- package/cpp/rnskia/dom/props/BezierProps.h +63 -0
- package/cpp/rnskia/dom/props/BlendModeProp.h +101 -0
- package/cpp/rnskia/dom/props/BoxShadowProps.h +62 -0
- package/cpp/rnskia/dom/props/CircleProp.h +46 -0
- package/cpp/rnskia/dom/props/ClipProp.h +62 -0
- package/cpp/rnskia/dom/props/ColorProp.h +80 -0
- package/cpp/rnskia/dom/props/DrawingProp.h +33 -0
- package/cpp/rnskia/dom/props/FontProp.h +34 -0
- package/cpp/rnskia/dom/props/GlyphsProp.h +53 -0
- package/cpp/rnskia/dom/props/ImageProps.h +173 -0
- package/cpp/rnskia/dom/props/LayerProp.h +50 -0
- package/cpp/rnskia/dom/props/MatrixProp.h +33 -0
- package/cpp/rnskia/dom/props/NumbersProp.h +63 -0
- package/cpp/rnskia/dom/props/PaintProps.h +171 -0
- package/cpp/rnskia/dom/props/PathProp.h +55 -0
- package/cpp/rnskia/dom/props/PictureProp.h +38 -0
- package/cpp/rnskia/dom/props/PointProp.h +72 -0
- package/cpp/rnskia/dom/props/PointsProp.h +83 -0
- package/cpp/rnskia/dom/props/RRectProp.h +134 -0
- package/cpp/rnskia/dom/props/RadiusProp.h +43 -0
- package/cpp/rnskia/dom/props/RectProp.h +118 -0
- package/cpp/rnskia/dom/props/StrokeProps.h +75 -0
- package/cpp/rnskia/dom/props/SvgProp.h +37 -0
- package/cpp/rnskia/dom/props/TextBlobProp.h +128 -0
- package/cpp/rnskia/dom/props/TileModeProp.h +50 -0
- package/cpp/rnskia/dom/props/TransformProp.h +80 -0
- package/cpp/rnskia/dom/props/TransformsProps.h +68 -0
- package/cpp/rnskia/dom/props/UniformsProp.h +194 -0
- package/cpp/rnskia/dom/props/VertexModeProp.h +47 -0
- package/cpp/rnskia/dom/props/VerticesProps.h +67 -0
- package/cpp/rnskia/values/RNSkReadonlyValue.h +13 -4
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +35 -1
- package/cpp/skia/include/codec/SkAndroidCodec.h +17 -1
- package/cpp/skia/include/codec/SkCodec.h +8 -5
- package/cpp/skia/include/core/SkAnnotation.h +2 -0
- package/cpp/skia/include/core/SkBitmap.h +52 -1
- package/cpp/skia/include/core/SkBlendMode.h +2 -0
- package/cpp/skia/include/core/SkCanvas.h +52 -31
- package/cpp/skia/include/core/SkCapabilities.h +44 -0
- package/cpp/skia/include/core/SkColor.h +7 -0
- package/cpp/skia/include/core/SkColorFilter.h +37 -0
- package/cpp/skia/include/core/SkColorSpace.h +1 -1
- package/cpp/skia/include/core/SkFont.h +4 -0
- package/cpp/skia/include/core/SkFontMgr.h +3 -0
- package/cpp/skia/include/core/SkGraphics.h +9 -0
- package/cpp/skia/include/core/SkImage.h +77 -17
- package/cpp/skia/include/core/SkImageEncoder.h +5 -3
- package/cpp/skia/include/core/SkImageGenerator.h +27 -17
- package/cpp/skia/include/core/SkM44.h +1 -0
- package/cpp/skia/include/core/SkMesh.h +120 -34
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +2 -1
- package/cpp/skia/include/core/SkPaint.h +15 -2
- package/cpp/skia/include/core/SkPath.h +4 -0
- package/cpp/skia/include/core/SkPathBuilder.h +1 -1
- package/cpp/skia/include/core/SkPicture.h +0 -3
- package/cpp/skia/include/core/SkPictureRecorder.h +0 -2
- package/cpp/skia/include/core/SkPixmap.h +19 -0
- package/cpp/skia/include/core/SkRasterHandleAllocator.h +3 -1
- package/cpp/skia/include/core/SkRect.h +11 -4
- package/cpp/skia/include/core/SkRefCnt.h +13 -1
- package/cpp/skia/include/core/SkRegion.h +6 -0
- package/cpp/skia/include/core/SkSamplingOptions.h +8 -6
- package/cpp/skia/include/core/SkScalar.h +6 -25
- package/cpp/skia/include/core/SkShader.h +20 -12
- package/cpp/skia/include/core/SkSpan.h +51 -19
- package/cpp/skia/include/core/SkStream.h +2 -2
- package/cpp/skia/include/core/SkString.h +11 -3
- package/cpp/skia/include/core/SkSurface.h +85 -8
- package/cpp/skia/include/core/SkTextBlob.h +5 -2
- package/cpp/skia/include/core/SkTypes.h +11 -10
- package/cpp/skia/include/docs/SkPDFDocument.h +0 -5
- package/cpp/skia/include/effects/Sk1DPathEffect.h +6 -1
- package/cpp/skia/include/effects/Sk2DPathEffect.h +4 -1
- package/cpp/skia/include/effects/SkColorMatrix.h +1 -0
- package/cpp/skia/include/effects/SkColorMatrixFilter.h +5 -8
- package/cpp/skia/include/effects/SkCornerPathEffect.h +5 -1
- package/cpp/skia/include/effects/SkDashPathEffect.h +5 -1
- package/cpp/skia/include/effects/SkGradientShader.h +68 -38
- package/cpp/skia/include/effects/SkHighContrastFilter.h +5 -1
- package/cpp/skia/include/effects/SkImageFilters.h +5 -4
- package/cpp/skia/include/effects/SkLumaColorFilter.h +4 -1
- package/cpp/skia/include/effects/SkOpPathEffect.h +6 -2
- package/cpp/skia/include/effects/SkOverdrawColorFilter.h +5 -2
- package/cpp/skia/include/effects/SkRuntimeEffect.h +54 -62
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +3 -1
- package/cpp/skia/include/effects/SkTableColorFilter.h +8 -21
- package/cpp/skia/include/effects/SkTableMaskFilter.h +5 -1
- package/cpp/skia/include/effects/SkTrimPathEffect.h +5 -1
- package/cpp/skia/include/encode/SkEncoder.h +17 -0
- package/cpp/skia/include/encode/SkWebpEncoder.h +17 -0
- package/cpp/skia/include/gpu/GpuTypes.h +18 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +38 -17
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +6 -71
- package/cpp/skia/include/gpu/GrContextOptions.h +1 -1
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +10 -9
- package/cpp/skia/include/gpu/GrDirectContext.h +42 -22
- package/cpp/skia/include/gpu/GrRecordingContext.h +6 -3
- package/cpp/skia/include/gpu/GrTypes.h +11 -11
- package/cpp/skia/include/gpu/MutableTextureState.h +122 -0
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +1 -0
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +7 -0
- package/cpp/skia/include/gpu/graphite/CombinationBuilder.h +195 -0
- package/cpp/skia/include/gpu/graphite/Context.h +47 -55
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +85 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +1 -17
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +61 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +87 -8
- package/cpp/skia/include/gpu/graphite/Recording.h +19 -9
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +40 -8
- package/cpp/skia/include/gpu/graphite/dawn/DawnBackendContext.h +25 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +3 -2
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +69 -0
- package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +39 -0
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +21 -19
- package/cpp/skia/include/gpu/vk/GrVkExtensions.h +2 -50
- package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +2 -127
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +5 -43
- package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +46 -0
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +67 -0
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +116 -0
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +59 -0
- package/cpp/skia/include/pathops/SkPathOps.h +1 -1
- package/cpp/skia/include/private/SkColorData.h +10 -40
- package/cpp/skia/include/private/SkEncodedInfo.h +9 -3
- package/cpp/skia/include/private/SkFloatingPoint.h +9 -6
- package/cpp/skia/include/private/SkHalf.h +5 -52
- package/cpp/skia/include/private/SkMacros.h +1 -1
- package/cpp/skia/include/private/SkMalloc.h +4 -0
- package/cpp/skia/include/private/SkPathRef.h +10 -10
- package/cpp/skia/include/private/SkSLModifiers.h +59 -23
- package/cpp/skia/include/private/SkSLProgramKind.h +1 -0
- package/cpp/skia/include/private/SkSLSymbol.h +7 -3
- package/cpp/skia/include/private/SkStringView.h +4 -0
- package/cpp/skia/include/private/SkTArray.h +21 -7
- package/cpp/skia/include/private/SkTDArray.h +173 -285
- package/cpp/skia/include/private/SkTHash.h +33 -32
- package/cpp/skia/include/private/SkTemplates.h +24 -26
- package/cpp/skia/include/private/SkVx.h +218 -135
- package/cpp/skia/include/private/chromium/GrSlug.h +3 -65
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +6 -3
- package/cpp/skia/include/private/chromium/Slug.h +76 -0
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +6 -1
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +5 -39
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +63 -0
- package/cpp/skia/include/{gpu/vk/GrVkVulkan.h → private/gpu/vk/SkiaVulkan.h} +2 -2
- package/cpp/skia/include/private/gpu/vk/VulkanTypesPriv.h +57 -0
- package/cpp/skia/include/sksl/DSL.h +0 -1
- package/cpp/skia/include/sksl/DSLBlock.h +4 -18
- package/cpp/skia/include/sksl/DSLCase.h +2 -8
- package/cpp/skia/include/sksl/DSLCore.h +8 -15
- package/cpp/skia/include/sksl/DSLExpression.h +51 -142
- package/cpp/skia/include/sksl/DSLFunction.h +7 -15
- package/cpp/skia/include/sksl/DSLModifiers.h +5 -2
- package/cpp/skia/include/sksl/DSLStatement.h +4 -39
- package/cpp/skia/include/sksl/DSLSymbols.h +1 -11
- package/cpp/skia/include/sksl/DSLType.h +20 -12
- package/cpp/skia/include/sksl/DSLVar.h +56 -146
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +2 -15
- package/cpp/skia/include/sksl/SkSLOperator.h +62 -59
- package/cpp/skia/include/sksl/SkSLPosition.h +2 -0
- package/cpp/skia/include/sksl/SkSLVersion.h +27 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +1 -0
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +1 -1
- package/cpp/skia/include/utils/SkBase64.h +2 -0
- package/cpp/skia/include/utils/SkCustomTypeface.h +24 -11
- package/cpp/skia/include/utils/SkEventTracer.h +12 -1
- package/cpp/skia/include/utils/SkNWayCanvas.h +11 -4
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +9 -4
- package/cpp/skia/include/utils/SkParse.h +3 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +2 -0
- package/cpp/skia/include/utils/SkTextUtils.h +2 -1
- package/cpp/skia/{include/third_party → modules}/skcms/skcms.h +10 -0
- package/cpp/skia/modules/skcms/skcms_internal.h +56 -0
- package/cpp/skia/modules/skcms/src/Transform_inl.h +1609 -0
- package/cpp/skia/modules/skparagraph/include/DartTypes.h +153 -0
- package/cpp/skia/modules/skparagraph/include/FontArguments.h +46 -0
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +84 -0
- package/cpp/skia/modules/skparagraph/include/Metrics.h +98 -0
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +111 -0
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +69 -0
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +77 -0
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +143 -0
- package/cpp/skia/modules/skparagraph/include/TextShadow.h +30 -0
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +352 -0
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +81 -0
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +3 -3
- package/cpp/skia/src/core/SkLRUCache.h +126 -0
- package/cpp/skia/src/core/SkTInternalLList.h +302 -0
- package/cpp/utils/RNSkTimingInfo.h +1 -0
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.h +15 -4
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +41 -55
- package/ios/RNSkia-iOS/SkiaDomViewManager.h +8 -0
- package/ios/RNSkia-iOS/SkiaDomViewManager.mm +51 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +56 -56
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.js +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +24 -66
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js +0 -5
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js +4 -18
- package/lib/commonjs/renderer/useCanvas.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +15 -0
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.js +152 -0
- package/lib/commonjs/views/SkiaDomView.js.map +1 -0
- package/lib/commonjs/views/SkiaDomView.web.js +55 -0
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -0
- package/lib/commonjs/views/SkiaPictureView.js +16 -2
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js +17 -2
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/index.js +13 -0
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +56 -56
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.js +1 -1
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/renderer/Canvas.js +25 -66
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js +0 -5
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/useCanvas.js +2 -13
- package/lib/module/renderer/useCanvas.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +15 -0
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.js +128 -0
- package/lib/module/views/SkiaDomView.js.map +1 -0
- package/lib/module/views/SkiaDomView.web.js +41 -0
- package/lib/module/views/SkiaDomView.web.js.map +1 -0
- package/lib/module/views/SkiaPictureView.js +14 -2
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaView.js +15 -2
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/index.js +1 -0
- package/lib/module/views/index.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +57 -64
- package/lib/typescript/src/renderer/Canvas.d.ts +5 -8
- package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -2
- package/lib/typescript/src/renderer/HostComponents.d.ts +66 -3
- package/lib/typescript/src/renderer/useCanvas.d.ts +0 -6
- package/lib/typescript/src/views/SkiaBaseWebView.d.ts +4 -0
- package/lib/typescript/src/views/SkiaDomView.d.ts +31 -0
- package/lib/typescript/src/views/SkiaDomView.web.d.ts +7 -0
- package/lib/typescript/src/views/index.d.ts +1 -0
- package/lib/typescript/src/views/types.d.ts +12 -2
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libskparagraph.a +0 -0
- package/libs/android/arm64-v8a/libsksg.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libskunicode.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/libskottie.a +0 -0
- package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
- package/libs/android/armeabi-v7a/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskottie.a +0 -0
- package/libs/android/x86/libskparagraph.a +0 -0
- package/libs/android/x86/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libskunicode.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/libskottie.a +0 -0
- package/libs/android/x86_64/libskparagraph.a +0 -0
- package/libs/android/x86_64/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libskunicode.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -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/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +42 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/Info.plist +5 -5
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -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/libskunicode.xcframework/Info.plist +42 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +5 -3
- package/react-native-skia.podspec +5 -2
- package/src/dom/nodes/JsiSkDOM.ts +170 -56
- package/src/dom/nodes/RenderNode.ts +1 -1
- package/src/renderer/Canvas.tsx +37 -57
- package/src/renderer/DependencyManager.tsx +0 -5
- package/src/renderer/HostComponents.ts +152 -1
- package/src/renderer/useCanvas.ts +1 -15
- package/src/views/SkiaBaseWebView.tsx +9 -0
- package/src/views/SkiaDomView.tsx +120 -0
- package/src/views/SkiaDomView.web.tsx +37 -0
- package/src/views/SkiaPictureView.tsx +10 -2
- package/src/views/SkiaView.tsx +11 -3
- package/src/views/index.ts +1 -0
- package/src/views/types.ts +19 -2
- package/cpp/jsi/JsiSimpleValueWrapper.h +0 -99
- package/cpp/skia/include/c/sk_canvas.h +0 -159
- package/cpp/skia/include/c/sk_colorspace.h +0 -25
- package/cpp/skia/include/c/sk_data.h +0 -65
- package/cpp/skia/include/c/sk_image.h +0 -71
- package/cpp/skia/include/c/sk_imageinfo.h +0 -62
- package/cpp/skia/include/c/sk_maskfilter.h +0 -47
- package/cpp/skia/include/c/sk_matrix.h +0 -49
- package/cpp/skia/include/c/sk_paint.h +0 -145
- package/cpp/skia/include/c/sk_path.h +0 -102
- package/cpp/skia/include/c/sk_picture.h +0 -70
- package/cpp/skia/include/c/sk_shader.h +0 -143
- package/cpp/skia/include/c/sk_surface.h +0 -73
- package/cpp/skia/include/c/sk_types.h +0 -278
- package/cpp/skia/include/gpu/graphite/SkStuff.h +0 -47
- package/cpp/skia/include/private/SkNx.h +0 -430
- package/cpp/skia/include/private/SkNx_neon.h +0 -713
- package/cpp/skia/include/private/SkNx_sse.h +0 -823
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +0 -32
- package/cpp/skia/include/sksl/DSLWrapper.h +0 -77
@@ -27,233 +27,233 @@ class JsiSkDOM {
|
|
27
27
|
}
|
28
28
|
|
29
29
|
Layer(props) {
|
30
|
-
return new _LayerNode.LayerNode(this.ctx, props ?? {});
|
30
|
+
return global.SkiaDomApi && global.SkiaDomApi.LayerNode ? global.SkiaDomApi.LayerNode(props ?? {}) : new _LayerNode.LayerNode(this.ctx, props ?? {});
|
31
31
|
}
|
32
32
|
|
33
33
|
Group(props) {
|
34
|
-
return new _GroupNode.GroupNode(this.ctx, props ?? {});
|
34
|
+
return global.SkiaDomApi && global.SkiaDomApi.GroupNode ? global.SkiaDomApi.GroupNode(props ?? {}) : new _GroupNode.GroupNode(this.ctx, props ?? {});
|
35
35
|
}
|
36
36
|
|
37
37
|
Paint(props) {
|
38
|
-
return new _PaintNode.PaintNode(this.ctx, props);
|
38
|
+
return global.SkiaDomApi && global.SkiaDomApi.PaintNode ? global.SkiaDomApi.PaintNode(props ?? {}) : new _PaintNode.PaintNode(this.ctx, props);
|
39
39
|
} // Drawings
|
40
40
|
|
41
41
|
|
42
42
|
Fill(props) {
|
43
|
-
return new _drawings.FillNode(this.ctx, props);
|
43
|
+
return global.SkiaDomApi && global.SkiaDomApi.FillNode ? global.SkiaDomApi.FillNode(props ?? {}) : new _drawings.FillNode(this.ctx, props);
|
44
44
|
}
|
45
45
|
|
46
46
|
Image(props) {
|
47
|
-
return new _drawings.ImageNode(this.ctx, props);
|
47
|
+
return global.SkiaDomApi && global.SkiaDomApi.ImageNode ? global.SkiaDomApi.ImageNode(props ?? {}) : new _drawings.ImageNode(this.ctx, props);
|
48
48
|
}
|
49
49
|
|
50
50
|
Circle(props) {
|
51
|
-
return new _drawings.CircleNode(this.ctx, props);
|
51
|
+
return global.SkiaDomApi && global.SkiaDomApi.CircleNode ? global.SkiaDomApi.CircleNode(props ?? {}) : new _drawings.CircleNode(this.ctx, props);
|
52
52
|
}
|
53
53
|
|
54
54
|
Path(props) {
|
55
|
-
return new _drawings.PathNode(this.ctx, props);
|
55
|
+
return global.SkiaDomApi && global.SkiaDomApi.PathNode ? global.SkiaDomApi.PathNode(props ?? {}) : new _drawings.PathNode(this.ctx, props);
|
56
56
|
}
|
57
57
|
|
58
58
|
CustomDrawing(props) {
|
59
|
-
return new _drawings.CustomDrawingNode(this.ctx, props);
|
59
|
+
return global.SkiaDomApi && global.SkiaDomApi.CustomDrawingNode ? global.SkiaDomApi.CustomDrawingNode(props ?? {}) : new _drawings.CustomDrawingNode(this.ctx, props);
|
60
60
|
}
|
61
61
|
|
62
62
|
Line(props) {
|
63
|
-
return new _drawings.LineNode(this.ctx, props);
|
63
|
+
return global.SkiaDomApi && global.SkiaDomApi.LineNode ? global.SkiaDomApi.LineNode(props ?? {}) : new _drawings.LineNode(this.ctx, props);
|
64
64
|
}
|
65
65
|
|
66
66
|
Oval(props) {
|
67
|
-
return new _drawings.OvalNode(this.ctx, props);
|
67
|
+
return global.SkiaDomApi && global.SkiaDomApi.OvalNode ? global.SkiaDomApi.OvalNode(props ?? {}) : new _drawings.OvalNode(this.ctx, props);
|
68
68
|
}
|
69
69
|
|
70
70
|
Patch(props) {
|
71
|
-
return new _drawings.PatchNode(this.ctx, props);
|
71
|
+
return global.SkiaDomApi && global.SkiaDomApi.PatchNode ? global.SkiaDomApi.PatchNode(props ?? {}) : new _drawings.PatchNode(this.ctx, props);
|
72
72
|
}
|
73
73
|
|
74
74
|
Points(props) {
|
75
|
-
return new _drawings.PointsNode(this.ctx, props);
|
75
|
+
return global.SkiaDomApi && global.SkiaDomApi.PointsNode ? global.SkiaDomApi.PointsNode(props ?? {}) : new _drawings.PointsNode(this.ctx, props);
|
76
76
|
}
|
77
77
|
|
78
78
|
Rect(props) {
|
79
|
-
return new _drawings.RectNode(this.ctx, props);
|
79
|
+
return global.SkiaDomApi && global.SkiaDomApi.RectNode ? global.SkiaDomApi.RectNode(props) : new _drawings.RectNode(this.ctx, props);
|
80
80
|
}
|
81
81
|
|
82
82
|
RRect(props) {
|
83
|
-
return new _drawings.RRectNode(this.ctx, props);
|
83
|
+
return global.SkiaDomApi && global.SkiaDomApi.RRectNode ? global.SkiaDomApi.RRectNode(props) : new _drawings.RRectNode(this.ctx, props);
|
84
84
|
}
|
85
85
|
|
86
86
|
Vertices(props) {
|
87
|
-
return new _drawings.VerticesNode(this.ctx, props);
|
87
|
+
return global.SkiaDomApi && global.SkiaDomApi.VerticesNode ? global.SkiaDomApi.VerticesNode(props) : new _drawings.VerticesNode(this.ctx, props);
|
88
88
|
}
|
89
89
|
|
90
90
|
Text(props) {
|
91
|
-
return new _drawings.TextNode(this.ctx, props);
|
91
|
+
return global.SkiaDomApi && global.SkiaDomApi.TextNode ? global.SkiaDomApi.TextNode(props) : new _drawings.TextNode(this.ctx, props);
|
92
92
|
}
|
93
93
|
|
94
94
|
TextPath(props) {
|
95
|
-
return new _drawings.TextPathNode(this.ctx, props);
|
95
|
+
return global.SkiaDomApi && global.SkiaDomApi.TextPathNode ? global.SkiaDomApi.TextPathNode(props) : new _drawings.TextPathNode(this.ctx, props);
|
96
96
|
}
|
97
97
|
|
98
98
|
TextBlob(props) {
|
99
|
-
return new _drawings.TextBlobNode(this.ctx, props);
|
99
|
+
return global.SkiaDomApi && global.SkiaDomApi.TextBlobNode ? global.SkiaDomApi.TextBlobNode(props) : new _drawings.TextBlobNode(this.ctx, props);
|
100
100
|
}
|
101
101
|
|
102
102
|
Glyphs(props) {
|
103
|
-
return new _drawings.GlyphsNode(this.ctx, props);
|
103
|
+
return global.SkiaDomApi && global.SkiaDomApi.GlyphsNode ? global.SkiaDomApi.GlyphsNode(props) : new _drawings.GlyphsNode(this.ctx, props);
|
104
104
|
}
|
105
105
|
|
106
106
|
DiffRect(props) {
|
107
|
-
return new _drawings.DiffRectNode(this.ctx, props);
|
107
|
+
return global.SkiaDomApi && global.SkiaDomApi.DiffRectNode ? global.SkiaDomApi.DiffRectNode(props) : new _drawings.DiffRectNode(this.ctx, props);
|
108
108
|
}
|
109
109
|
|
110
110
|
Picture(props) {
|
111
|
-
return new _drawings.PictureNode(this.ctx, props);
|
111
|
+
return global.SkiaDomApi && global.SkiaDomApi.PictureNode ? global.SkiaDomApi.PictureNode(props) : new _drawings.PictureNode(this.ctx, props);
|
112
112
|
}
|
113
113
|
|
114
114
|
ImageSVG(props) {
|
115
|
-
return new _drawings.ImageSVGNode(this.ctx, props);
|
115
|
+
return global.SkiaDomApi && global.SkiaDomApi.ImageSVGNode ? global.SkiaDomApi.ImageSVGNode(props) : new _drawings.ImageSVGNode(this.ctx, props);
|
116
116
|
} // BlurMaskFilters
|
117
117
|
|
118
118
|
|
119
119
|
BlurMaskFilter(props) {
|
120
|
-
return new _paint.BlurMaskFilterNode(this.ctx, props);
|
120
|
+
return global.SkiaDomApi && global.SkiaDomApi.BlurMaskFilterNode ? global.SkiaDomApi.BlurMaskFilterNode(props) : new _paint.BlurMaskFilterNode(this.ctx, props);
|
121
121
|
} // ImageFilters
|
122
122
|
|
123
123
|
|
124
124
|
BlendImageFilter(props) {
|
125
|
-
return new _paint.BlendImageFilterNode(this.ctx, props);
|
125
|
+
return global.SkiaDomApi && global.SkiaDomApi.BlendImageFilterNode ? global.SkiaDomApi.BlendImageFilterNode(props) : new _paint.BlendImageFilterNode(this.ctx, props);
|
126
126
|
}
|
127
127
|
|
128
128
|
DropShadowImageFilter(props) {
|
129
|
-
return new _paint.DropShadowImageFilterNode(this.ctx, props);
|
129
|
+
return global.SkiaDomApi && global.SkiaDomApi.DropShadowImageFilterNode ? global.SkiaDomApi.DropShadowImageFilterNode(props) : new _paint.DropShadowImageFilterNode(this.ctx, props);
|
130
130
|
}
|
131
131
|
|
132
132
|
DisplacementMapImageFilter(props) {
|
133
|
-
return new _paint.DisplacementMapImageFilterNode(this.ctx, props);
|
133
|
+
return global.SkiaDomApi && global.SkiaDomApi.DisplacementMapImageFilterNode ? global.SkiaDomApi.DisplacementMapImageFilterNode(props) : new _paint.DisplacementMapImageFilterNode(this.ctx, props);
|
134
134
|
}
|
135
135
|
|
136
136
|
BlurImageFilter(props) {
|
137
|
-
return new _paint.BlurImageFilterNode(this.ctx, props);
|
137
|
+
return global.SkiaDomApi && global.SkiaDomApi.BlurImageFilterNode ? global.SkiaDomApi.BlurImageFilterNode(props) : new _paint.BlurImageFilterNode(this.ctx, props);
|
138
138
|
}
|
139
139
|
|
140
140
|
OffsetImageFilter(props) {
|
141
|
-
return new _paint.OffsetImageFilterNode(this.ctx, props);
|
141
|
+
return global.SkiaDomApi && global.SkiaDomApi.OffsetImageFilterNode ? global.SkiaDomApi.OffsetImageFilterNode(props) : new _paint.OffsetImageFilterNode(this.ctx, props);
|
142
142
|
}
|
143
143
|
|
144
144
|
MorphologyImageFilter(props) {
|
145
|
-
return new _ImageFilters.MorphologyImageFilterNode(this.ctx, props);
|
145
|
+
return global.SkiaDomApi && global.SkiaDomApi.MorphologyImageFilterNode ? global.SkiaDomApi.MorphologyImageFilterNode(props) : new _ImageFilters.MorphologyImageFilterNode(this.ctx, props);
|
146
146
|
}
|
147
147
|
|
148
148
|
RuntimeShaderImageFilter(props) {
|
149
|
-
return new _paint.RuntimeShaderImageFilterNode(this.ctx, props);
|
149
|
+
return global.SkiaDomApi && global.SkiaDomApi.RuntimeShaderImageFilterNode ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props) : new _paint.RuntimeShaderImageFilterNode(this.ctx, props);
|
150
150
|
} // Color Filters
|
151
151
|
|
152
152
|
|
153
153
|
MatrixColorFilter(props) {
|
154
|
-
return new _ColorFilters.MatrixColorFilterNode(this.ctx, props);
|
154
|
+
return global.SkiaDomApi && global.SkiaDomApi.MatrixColorFilterNode ? global.SkiaDomApi.MatrixColorFilterNode(props) : new _ColorFilters.MatrixColorFilterNode(this.ctx, props);
|
155
155
|
}
|
156
156
|
|
157
157
|
BlendColorFilter(props) {
|
158
|
-
return new _ColorFilters.BlendColorFilterNode(this.ctx, props);
|
158
|
+
return global.SkiaDomApi && global.SkiaDomApi.BlendColorFilterNode ? global.SkiaDomApi.BlendColorFilterNode(props) : new _ColorFilters.BlendColorFilterNode(this.ctx, props);
|
159
159
|
}
|
160
160
|
|
161
161
|
LumaColorFilter() {
|
162
|
-
return new _ColorFilters.LumaColorFilterNode(this.ctx);
|
162
|
+
return global.SkiaDomApi && global.SkiaDomApi.LumaColorFilterNode ? global.SkiaDomApi.LumaColorFilterNode() : new _ColorFilters.LumaColorFilterNode(this.ctx);
|
163
163
|
}
|
164
164
|
|
165
165
|
LinearToSRGBGammaColorFilter() {
|
166
|
-
return new _ColorFilters.LinearToSRGBGammaColorFilterNode(this.ctx);
|
166
|
+
return global.SkiaDomApi && global.SkiaDomApi.LinearToSRGBGammaColorFilterNode ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode() : new _ColorFilters.LinearToSRGBGammaColorFilterNode(this.ctx);
|
167
167
|
}
|
168
168
|
|
169
169
|
SRGBToLinearGammaColorFilter() {
|
170
|
-
return new _ColorFilters.SRGBToLinearGammaColorFilterNode(this.ctx);
|
170
|
+
return global.SkiaDomApi && global.SkiaDomApi.SRGBToLinearGammaColorFilterNode ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode() : new _ColorFilters.SRGBToLinearGammaColorFilterNode(this.ctx);
|
171
171
|
}
|
172
172
|
|
173
173
|
LerpColorFilter(props) {
|
174
|
-
return new _ColorFilters.LerpColorFilterNode(this.ctx, props);
|
174
|
+
return global.SkiaDomApi && global.SkiaDomApi.LerpColorFilterNode ? global.SkiaDomApi.LerpColorFilterNode(props) : new _ColorFilters.LerpColorFilterNode(this.ctx, props);
|
175
175
|
} // Shaders
|
176
176
|
|
177
177
|
|
178
178
|
Shader(props) {
|
179
|
-
return new _Shaders.ShaderNode(this.ctx, props);
|
179
|
+
return global.SkiaDomApi && global.SkiaDomApi.ShaderNode ? global.SkiaDomApi.ShaderNode(props) : new _Shaders.ShaderNode(this.ctx, props);
|
180
180
|
}
|
181
181
|
|
182
182
|
ImageShader(props) {
|
183
|
-
return new _Shaders.ImageShaderNode(this.ctx, props);
|
183
|
+
return global.SkiaDomApi && global.SkiaDomApi.ImageShaderNode ? global.SkiaDomApi.ImageShaderNode(props) : new _Shaders.ImageShaderNode(this.ctx, props);
|
184
184
|
}
|
185
185
|
|
186
186
|
ColorShader(props) {
|
187
|
-
return new _Shaders.ColorNode(this.ctx, props);
|
187
|
+
return global.SkiaDomApi && global.SkiaDomApi.ColorShaderNode ? global.SkiaDomApi.ColorShaderNode(props) : new _Shaders.ColorNode(this.ctx, props);
|
188
188
|
}
|
189
189
|
|
190
190
|
SweepGradient(props) {
|
191
|
-
return new _Shaders.SweepGradientNode(this.ctx, props);
|
191
|
+
return global.SkiaDomApi && global.SkiaDomApi.SweepGradientNode ? global.SkiaDomApi.SweepGradientNode(props) : new _Shaders.SweepGradientNode(this.ctx, props);
|
192
192
|
}
|
193
193
|
|
194
194
|
Turbulence(props) {
|
195
|
-
return new _Shaders.TurbulenceNode(this.ctx, props);
|
195
|
+
return global.SkiaDomApi && global.SkiaDomApi.TurbulenceNode ? global.SkiaDomApi.TurbulenceNode(props) : new _Shaders.TurbulenceNode(this.ctx, props);
|
196
196
|
}
|
197
197
|
|
198
198
|
FractalNoise(props) {
|
199
|
-
return new _Shaders.FractalNoiseNode(this.ctx, props);
|
199
|
+
return global.SkiaDomApi && global.SkiaDomApi.FractalNoiseNode ? global.SkiaDomApi.FractalNoiseNode(props) : new _Shaders.FractalNoiseNode(this.ctx, props);
|
200
200
|
}
|
201
201
|
|
202
202
|
LinearGradient(props) {
|
203
|
-
return new _Shaders.LinearGradientNode(this.ctx, props);
|
203
|
+
return global.SkiaDomApi && global.SkiaDomApi.LinearGradientNode ? global.SkiaDomApi.LinearGradientNode(props) : new _Shaders.LinearGradientNode(this.ctx, props);
|
204
204
|
}
|
205
205
|
|
206
206
|
RadialGradient(props) {
|
207
|
-
return new _Shaders.RadialGradientNode(this.ctx, props);
|
207
|
+
return global.SkiaDomApi && global.SkiaDomApi.RadialGradientNode ? global.SkiaDomApi.RadialGradientNode(props) : new _Shaders.RadialGradientNode(this.ctx, props);
|
208
208
|
}
|
209
209
|
|
210
210
|
TwoPointConicalGradient(props) {
|
211
|
-
return new _Shaders.TwoPointConicalGradientNode(this.ctx, props);
|
211
|
+
return global.SkiaDomApi && global.SkiaDomApi.TwoPointConicalGradientNode ? global.SkiaDomApi.TwoPointConicalGradientNode(props) : new _Shaders.TwoPointConicalGradientNode(this.ctx, props);
|
212
212
|
} // Path Effects
|
213
213
|
|
214
214
|
|
215
215
|
CornerPathEffect(props) {
|
216
|
-
return new _paint.CornerPathEffectNode(this.ctx, props);
|
216
|
+
return global.SkiaDomApi && global.SkiaDomApi.CornerPathEffectNode ? global.SkiaDomApi.CornerPathEffectNode(props) : new _paint.CornerPathEffectNode(this.ctx, props);
|
217
217
|
}
|
218
218
|
|
219
219
|
DiscretePathEffect(props) {
|
220
|
-
return new _paint.DiscretePathEffectNode(this.ctx, props);
|
220
|
+
return global.SkiaDomApi && global.SkiaDomApi.DiscretePathEffectNode ? global.SkiaDomApi.DiscretePathEffectNode(props) : new _paint.DiscretePathEffectNode(this.ctx, props);
|
221
221
|
}
|
222
222
|
|
223
223
|
DashPathEffect(props) {
|
224
|
-
return new _paint.DashPathEffectNode(this.ctx, props);
|
224
|
+
return global.SkiaDomApi && global.SkiaDomApi.DashPathEffectNode ? global.SkiaDomApi.DashPathEffectNode(props) : new _paint.DashPathEffectNode(this.ctx, props);
|
225
225
|
}
|
226
226
|
|
227
227
|
Path1DPathEffect(props) {
|
228
|
-
return new _paint.Path1DPathEffectNode(this.ctx, props);
|
228
|
+
return global.SkiaDomApi && global.SkiaDomApi.Path1DPathEffectNode ? global.SkiaDomApi.Path1DPathEffectNode(props) : new _paint.Path1DPathEffectNode(this.ctx, props);
|
229
229
|
}
|
230
230
|
|
231
231
|
Path2DPathEffect(props) {
|
232
|
-
return new _paint.Path2DPathEffectNode(this.ctx, props);
|
232
|
+
return global.SkiaDomApi && global.SkiaDomApi.Path2DPathEffectNode ? global.SkiaDomApi.Path2DPathEffectNode(props) : new _paint.Path2DPathEffectNode(this.ctx, props);
|
233
233
|
}
|
234
234
|
|
235
235
|
SumPathEffect() {
|
236
|
-
return new _paint.SumPathEffectNode(this.ctx);
|
236
|
+
return global.SkiaDomApi && global.SkiaDomApi.SumPathEffectNode ? global.SkiaDomApi.SumPathEffectNode() : new _paint.SumPathEffectNode(this.ctx);
|
237
237
|
}
|
238
238
|
|
239
239
|
Line2DPathEffect(props) {
|
240
|
-
return new _paint.Line2DPathEffectNode(this.ctx, props);
|
240
|
+
return global.SkiaDomApi && global.SkiaDomApi.Line2DPathEffectNode ? global.SkiaDomApi.Line2DPathEffectNode(props) : new _paint.Line2DPathEffectNode(this.ctx, props);
|
241
241
|
}
|
242
242
|
|
243
243
|
Blend(props) {
|
244
|
-
return new _paint.BlendNode(this.ctx, props);
|
244
|
+
return global.SkiaDomApi && global.SkiaDomApi.BlendNode ? global.SkiaDomApi.BlendNode(props) : new _paint.BlendNode(this.ctx, props);
|
245
245
|
}
|
246
246
|
|
247
247
|
BackdropFilter(props) {
|
248
|
-
return new _drawings.BackdropFilterNode(this.ctx, props);
|
248
|
+
return global.SkiaDomApi && global.SkiaDomApi.BackdropFilterNode ? global.SkiaDomApi.BackdropFilterNode(props) : new _drawings.BackdropFilterNode(this.ctx, props);
|
249
249
|
}
|
250
250
|
|
251
251
|
Box(props) {
|
252
|
-
return new _drawings.BoxNode(this.ctx, props);
|
252
|
+
return global.SkiaDomApi && global.SkiaDomApi.BoxNode ? global.SkiaDomApi.BoxNode(props) : new _drawings.BoxNode(this.ctx, props);
|
253
253
|
}
|
254
254
|
|
255
255
|
BoxShadow(props) {
|
256
|
-
return new _drawings.BoxShadowNode(this.ctx, props);
|
256
|
+
return global.SkiaDomApi && global.SkiaDomApi.BoxShadowNode ? global.SkiaDomApi.BoxShadowNode(props) : new _drawings.BoxShadowNode(this.ctx, props);
|
257
257
|
}
|
258
258
|
|
259
259
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JsiSkDOM","constructor","ctx","Layer","props","LayerNode","Group","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","CustomDrawing","CustomDrawingNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Layer(props?: ChildrenProps) {\n return new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return new BoxShadowNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA2DA;;AAwBA;;AAiBA;;AAQA;;AAWA;;AACA;;AACA;;AAEA;;AAEO,MAAMA,QAAN,CAAgC;EACrCC,WAAW,CAASC,GAAT,EAA2B;IAAA,KAAlBA,GAAkB,GAAlBA,GAAkB;EAAE;;EAExCC,KAAK,CAACC,KAAD,EAAwB;IAC3B,OAAO,IAAIC,oBAAJ,CAAc,KAAKH,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAAP;EACD;;EAEDE,KAAK,CAACF,KAAD,EAAqB;IACxB,OAAO,IAAIG,oBAAJ,CAAc,KAAKL,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAAP;EACD;;EAEDI,KAAK,CAACJ,KAAD,EAAoB;IACvB,OAAO,IAAIK,oBAAJ,CAAc,KAAKP,GAAnB,EAAwBE,KAAxB,CAAP;EACD,CAboC,CAerC;;;EACAM,IAAI,CAACN,KAAD,EAA2B;IAC7B,OAAO,IAAIO,kBAAJ,CAAa,KAAKT,GAAlB,EAAuBE,KAAvB,CAAP;EACD;;EAEDQ,KAAK,CAACR,KAAD,EAAoB;IACvB,OAAO,IAAIS,mBAAJ,CAAc,KAAKX,GAAnB,EAAwBE,KAAxB,CAAP;EACD;;EAEDU,MAAM,CAACV,KAAD,EAAqB;IACzB,OAAO,IAAIW,oBAAJ,CAAe,KAAKb,GAApB,EAAyBE,KAAzB,CAAP;EACD;;EAEDY,IAAI,CA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kG,gBAAgB,CAAClG,KAAD,EAA+B;IAC7C,OAAO,IAAImG,2BAAJ,CAAyB,KAAKrG,GAA9B,EAAmCE,KAAnC,CAAP;EACD;;EAEDoG,aAAa,GAAG;IACd,OAAO,IAAIC,wBAAJ,CAAsB,KAAKvG,GAA3B,CAAP;EACD;;EAEDwG,gBAAgB,CAACtG,KAAD,EAA+B;IAC7C,OAAO,IAAIuG,2BAAJ,CAAyB,KAAKzG,GAA9B,EAAmCE,KAAnC,CAAP;EACD;;EAEDwG,KAAK,CAACxG,KAAD,EAAoB;IACvB,OAAO,IAAIyG,gBAAJ,CAAc,KAAK3G,GAAnB,EAAwBE,KAAxB,CAAP;EACD;;EAED0G,cAAc,CAAC1G,KAAD,EAAuB;IACnC,OAAO,IAAI2G,4BAAJ,CAAuB,KAAK7G,GAA5B,EAAiCE,KAAjC,CAAP;EACD;;EAED4G,GAAG,CAAC5G,KAAD,EAAkB;IACnB,OAAO,IAAI6G,iBAAJ,CAAY,KAAK/G,GAAjB,EAAsBE,KAAtB,CAAP;EACD;;EAED8G,SAAS,CAAC9G,KAAD,EAAwB;IAC/B,OAAO,IAAI+G,uBAAJ,CAAkB,KAAKjH,GAAvB,EAA4BE,KAA5B,CAAP;EACD;;AAvOoC"}
|
1
|
+
{"version":3,"names":["JsiSkDOM","constructor","ctx","Layer","props","global","SkiaDomApi","LayerNode","Group","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","CustomDrawing","CustomDrawingNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorShaderNode","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Layer(props?: ChildrenProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LayerNode\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return global.SkiaDomApi && global.SkiaDomApi.GroupNode\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PaintNode\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return global.SkiaDomApi && global.SkiaDomApi.FillNode\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageNode\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CircleNode\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PathNode\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CustomDrawingNode\n ? global.SkiaDomApi.CustomDrawingNode(props ?? {})\n : new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LineNode\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return global.SkiaDomApi && global.SkiaDomApi.OvalNode\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PatchNode\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PointsNode\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RectNode\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RRectNode\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return global.SkiaDomApi && global.SkiaDomApi.VerticesNode\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextNode\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextPathNode\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextBlobNode\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return global.SkiaDomApi && global.SkiaDomApi.GlyphsNode\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DiffRectNode\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PictureNode\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageSVGNode\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlurMaskFilterNode\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendImageFilterNode\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DropShadowImageFilterNode\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DisplacementMapImageFilterNode\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlurImageFilterNode\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.OffsetImageFilterNode\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.MorphologyImageFilterNode\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RuntimeShaderImageFilterNode\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.MatrixColorFilterNode\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendColorFilterNode\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return global.SkiaDomApi && global.SkiaDomApi.LumaColorFilterNode\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LerpColorFilterNode\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ShaderNode\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageShaderNode\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ColorShaderNode\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.SweepGradientNode\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TurbulenceNode\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return global.SkiaDomApi && global.SkiaDomApi.FractalNoiseNode\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LinearGradientNode\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RadialGradientNode\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TwoPointConicalGradientNode\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CornerPathEffectNode\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DiscretePathEffectNode\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DashPathEffectNode\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Path1DPathEffectNode\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Path2DPathEffectNode\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return global.SkiaDomApi && global.SkiaDomApi.SumPathEffectNode\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Line2DPathEffectNode\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendNode\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BackdropFilterNode\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BoxNode\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BoxShadowNode\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA2DA;;AAwBA;;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MAAM,CAACC,UAAP,CAAkB4G,kBAAlB,CAAqC9G,KAArC,CADG,GAEH,IAAI8G,4BAAJ,CAAuB,KAAKhH,GAA5B,EAAiCE,KAAjC,CAFJ;EAGD;;EAED+G,GAAG,CAAC/G,KAAD,EAAkB;IACnB,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkB8G,OAAvC,GACH/G,MAAM,CAACC,UAAP,CAAkB8G,OAAlB,CAA0BhH,KAA1B,CADG,GAEH,IAAIgH,iBAAJ,CAAY,KAAKlH,GAAjB,EAAsBE,KAAtB,CAFJ;EAGD;;EAEDiH,SAAS,CAACjH,KAAD,EAAwB;IAC/B,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkBgH,aAAvC,GACHjH,MAAM,CAACC,UAAP,CAAkBgH,aAAlB,CAAgClH,KAAhC,CADG,GAEH,IAAIkH,uBAAJ,CAAkB,KAAKpH,GAAvB,EAA4BE,KAA5B,CAFJ;EAGD;;AAzVoC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["paintProps","JsiRenderNode","JsiNode","constructor","ctx","type","props","matrix","Skia","Matrix","onPropChange","setProps","paintCache","setProp","key","value","hasChanged","includes","identity","clipPath","undefined","clipRect","clipRRect","computeMatrix","computeClip","addChild","child","JsiDeclarationNode","setInvalidate","insertChildBefore","before","clip","isPathDef","processPath","isRRect","processTransformProps","getPaintCtx","color","strokeWidth","blendMode","style","strokeJoin","strokeCap","strokeMiter","opacity","antiAlias","Color","BlendMode","enumKey","PaintStyle","StrokeJoin","StrokeCap","_children","forEach","isColorFilter","cf","materialize","colorFilter","ColorFilter","MakeCompose","isShader","shader","isPathEffect","pe","pathEffect","PathEffect","isImageFilter","filter","imageFilter","ImageFilter","isMaskFilter","maskFilter","render","parentCtx","invertClip","layer","transform","canvas","parent","paint","paintCtx","concatPaint","hasTransform","hasClip","shouldSave","op","ClipOp","Difference","Intersect","saveLayer","save","concat","renderNode","restore","alpha","copy","setShader","setColor","cl","getColor","setStrokeWidth","setAntiAlias","setBlendMode","setColorFilter","setImageFilter","setMaskFilter","setPathEffect","setAlphaf","setStrokeCap","setStrokeJoin","setStrokeMiter","setStyle"],"sources":["RenderNode.ts"],"sourcesContent":["import type {\n SkMatrix,\n SkRect,\n SkRRect,\n SkPath,\n SkPaint,\n} from \"../../skia/types\";\nimport {\n StrokeCap,\n StrokeJoin,\n PaintStyle,\n BlendMode,\n ClipOp,\n isRRect,\n} from \"../../skia/types\";\nimport type {\n RenderNode,\n GroupProps,\n DrawingContext,\n NodeType,\n Node,\n} from \"../types\";\n\nimport { isPathDef, processPath, processTransformProps } from \"./datatypes\";\nimport type { NodeContext } from \"./Node\";\nimport { JsiNode, JsiDeclarationNode } from \"./Node\";\nimport type { PaintContext } from \"./PaintContext\";\nimport { enumKey } from \"./datatypes/Enum\";\n\nconst paintProps = [\n \"color\",\n \"strokeWidth\",\n \"blendMode\",\n \"strokeCap\",\n \"strokeJoin\",\n \"strokeMiter\",\n \"style\",\n \"antiAlias\",\n \"opacity\",\n];\n\ninterface PaintCache {\n parent: SkPaint;\n child: SkPaint;\n}\n\nexport abstract class JsiRenderNode<P extends GroupProps>\n extends JsiNode<P>\n implements RenderNode<P>\n{\n paintCache: PaintCache | null = null;\n matrix: SkMatrix;\n clipRect?: SkRect;\n clipRRect?: SkRRect;\n clipPath?: SkPath;\n\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, type, props);\n this.matrix = this.Skia.Matrix();\n this.onPropChange();\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.onPropChange();\n this.paintCache = null;\n }\n\n setProp<K extends keyof P>(key: K, value: P[K]) {\n const hasChanged = super.setProp(key, value);\n if (hasChanged) {\n this.onPropChange();\n if (paintProps.includes(key as string)) {\n this.paintCache = null;\n }\n }\n return hasChanged;\n }\n\n protected onPropChange() {\n this.matrix.identity();\n this.clipPath = undefined;\n this.clipRect = undefined;\n this.clipRRect = undefined;\n this.computeMatrix();\n this.computeClip();\n }\n\n addChild(child: Node<unknown>) {\n if (child instanceof JsiDeclarationNode) {\n child.setInvalidate(() => (this.paintCache = null));\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>) {\n if (child instanceof JsiDeclarationNode) {\n child.setInvalidate(() => (this.paintCache = null));\n }\n super.insertChildBefore(child, before);\n }\n\n private computeClip() {\n const { clip } = this.props;\n if (clip) {\n if (isPathDef(clip)) {\n this.clipPath = processPath(this.Skia, clip);\n } else if (isRRect(clip)) {\n this.clipRRect = clip;\n } else {\n this.clipRect = clip;\n }\n }\n }\n\n private computeMatrix() {\n processTransformProps(this.matrix, this.props);\n }\n\n private getPaintCtx() {\n let ctx: PaintContext | undefined;\n const {\n color,\n strokeWidth,\n blendMode,\n style,\n strokeJoin,\n strokeCap,\n strokeMiter,\n opacity,\n antiAlias,\n } = this.props;\n if (\n color !== undefined ||\n strokeWidth !== undefined ||\n blendMode !== undefined ||\n style !== undefined ||\n strokeJoin !== undefined ||\n strokeCap !== undefined ||\n strokeMiter !== undefined ||\n opacity !== undefined ||\n antiAlias !== undefined\n ) {\n ctx = {};\n if (color !== undefined) {\n ctx.color = this.Skia.Color(color);\n }\n if (strokeWidth !== undefined) {\n ctx.strokeWidth = strokeWidth;\n }\n if (blendMode !== undefined) {\n ctx.blendMode = BlendMode[enumKey(blendMode)];\n }\n if (style !== undefined) {\n ctx.style = PaintStyle[enumKey(style)];\n }\n if (strokeJoin !== undefined) {\n ctx.strokeJoin = StrokeJoin[enumKey(strokeJoin)];\n }\n if (strokeCap !== undefined) {\n ctx.strokeCap = StrokeCap[enumKey(strokeCap)];\n }\n if (strokeMiter !== undefined) {\n ctx.strokeMiter = strokeMiter;\n }\n if (opacity !== undefined) {\n ctx.opacity = opacity;\n }\n if (antiAlias !== undefined) {\n ctx.antiAlias = antiAlias;\n }\n }\n this._children.forEach((child) => {\n if (child instanceof JsiDeclarationNode) {\n if (child.isColorFilter()) {\n ctx = ctx || {};\n const cf = child.materialize();\n ctx.colorFilter = ctx.colorFilter\n ? this.Skia.ColorFilter.MakeCompose(cf, ctx.colorFilter)\n : cf;\n } else if (child.isShader()) {\n ctx = ctx || {};\n const shader = child.materialize();\n ctx.shader = shader;\n } else if (child.isPathEffect()) {\n ctx = ctx || {};\n const pe = child.materialize();\n ctx.pathEffect = ctx.pathEffect\n ? this.Skia.PathEffect.MakeCompose(pe, ctx.pathEffect)\n : pe;\n } else if (child.isImageFilter()) {\n ctx = ctx || {};\n const filter = child.materialize();\n ctx.imageFilter = ctx.imageFilter\n ? this.Skia.ImageFilter.MakeCompose(filter, ctx.imageFilter)\n : filter;\n } else if (child.isMaskFilter()) {\n ctx = ctx || {};\n const filter = child.materialize();\n ctx.maskFilter = filter;\n }\n }\n });\n return ctx;\n }\n\n render(parentCtx: DrawingContext) {\n const { invertClip, layer, matrix, transform } = this.props;\n const { canvas } = parentCtx;\n\n const opacity =\n this.props.opacity !== undefined\n ? parentCtx.opacity * this.props.opacity\n : parentCtx.opacity;\n\n if (\n this.paintCache === null ||\n this.paintCache.parent !== parentCtx.paint\n ) {\n const paintCtx = this.getPaintCtx();\n const child = paintCtx\n ? concatPaint(parentCtx.paint, paintCtx, parentCtx.opacity)\n : parentCtx.paint;\n this.paintCache = { parent: parentCtx.paint, child };\n }\n const paint = this.paintCache.child;\n // TODO: can we only recreate a new context here if needed?\n const ctx = { ...parentCtx, opacity, paint };\n const hasTransform = matrix !== undefined || transform !== undefined;\n const hasClip =\n this.clipRect !== undefined ||\n this.clipPath !== undefined ||\n this.clipRRect !== undefined;\n const shouldSave = hasTransform || hasClip || !!layer;\n const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;\n if (shouldSave) {\n if (layer) {\n if (typeof layer === \"boolean\") {\n canvas.saveLayer();\n } else {\n canvas.saveLayer(layer);\n }\n } else {\n canvas.save();\n }\n }\n\n if (this.matrix) {\n canvas.concat(this.matrix);\n }\n if (this.clipRect) {\n canvas.clipRect(this.clipRect, op, true);\n } else if (this.clipRRect) {\n canvas.clipRRect(this.clipRRect, op, true);\n } else if (this.clipPath) {\n canvas.clipPath(this.clipPath, op, true);\n }\n\n this.renderNode(ctx);\n\n if (shouldSave) {\n canvas.restore();\n }\n }\n\n abstract renderNode(ctx: DrawingContext): void;\n}\n\nconst concatPaint = (\n parent: SkPaint,\n {\n color,\n strokeWidth,\n shader,\n antiAlias,\n blendMode,\n colorFilter,\n imageFilter,\n maskFilter,\n pathEffect,\n opacity: alpha,\n strokeCap,\n strokeJoin,\n strokeMiter,\n style,\n }: PaintContext,\n opacity: number\n) => {\n const paint = parent.copy();\n if (color !== undefined) {\n paint.setShader(null);\n color[3] *= opacity;\n paint.setColor(color);\n } else {\n const cl = paint.getColor();\n cl[3] *= opacity;\n paint.setColor(cl);\n }\n if (strokeWidth !== undefined) {\n paint.setStrokeWidth(strokeWidth);\n }\n if (shader !== undefined) {\n paint.setShader(shader);\n }\n if (antiAlias !== undefined) {\n paint.setAntiAlias(antiAlias);\n }\n if (blendMode !== undefined) {\n paint.setBlendMode(blendMode);\n }\n if (colorFilter !== undefined) {\n paint.setColorFilter(colorFilter);\n }\n if (imageFilter !== undefined) {\n paint.setImageFilter(imageFilter);\n }\n if (maskFilter !== undefined) {\n paint.setMaskFilter(maskFilter);\n }\n if (pathEffect !== undefined) {\n paint.setPathEffect(pathEffect);\n }\n if (alpha !== undefined) {\n paint.setAlphaf(alpha * opacity);\n }\n if (strokeCap !== undefined) {\n paint.setStrokeCap(strokeCap);\n }\n if (strokeJoin !== undefined) {\n paint.setStrokeJoin(strokeJoin);\n }\n if (strokeMiter !== undefined) {\n paint.setStrokeMiter(strokeMiter);\n }\n if (style !== undefined) {\n paint.setStyle(style);\n }\n return paint;\n};\n"],"mappings":";;;;;;;AAOA;;AAgBA;;AAEA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG,CACjB,OADiB,EAEjB,aAFiB,EAGjB,WAHiB,EAIjB,WAJiB,EAKjB,YALiB,EAM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AAoBpE,UAApB;EACD;;EACD,IAAIE,WAAW,KAAKvB,SAApB,EAA+B;IAC7B2D,KAAK,CAAC+B,cAAN,CAAqBnE,WAArB;EACD;;EACD,IAAIH,KAAK,KAAKpB,SAAd,EAAyB;IACvB2D,KAAK,CAACgC,QAAN,CAAevE,KAAf;EACD;;EACD,OAAOuC,KAAP;AACD,CAtED"}
|
1
|
+
{"version":3,"names":["paintProps","JsiRenderNode","JsiNode","constructor","ctx","type","props","matrix","Skia","Matrix","onPropChange","setProps","paintCache","setProp","key","value","hasChanged","includes","identity","clipPath","undefined","clipRect","clipRRect","computeMatrix","computeClip","addChild","child","JsiDeclarationNode","setInvalidate","insertChildBefore","before","clip","isPathDef","processPath","isRRect","processTransformProps","getPaintCtx","color","strokeWidth","blendMode","style","strokeJoin","strokeCap","strokeMiter","opacity","antiAlias","Color","BlendMode","enumKey","PaintStyle","StrokeJoin","StrokeCap","_children","forEach","isColorFilter","cf","materialize","colorFilter","ColorFilter","MakeCompose","isShader","shader","isPathEffect","pe","pathEffect","PathEffect","isImageFilter","filter","imageFilter","ImageFilter","isMaskFilter","maskFilter","render","parentCtx","invertClip","layer","transform","canvas","parent","paint","paintCtx","concatPaint","hasTransform","hasClip","shouldSave","op","ClipOp","Difference","Intersect","saveLayer","save","concat","renderNode","restore","alpha","copy","setShader","setColor","cl","getColor","setStrokeWidth","setAntiAlias","setBlendMode","setColorFilter","setImageFilter","setMaskFilter","setPathEffect","setAlphaf","setStrokeCap","setStrokeJoin","setStrokeMiter","setStyle"],"sources":["RenderNode.ts"],"sourcesContent":["import type {\n SkMatrix,\n SkRect,\n SkRRect,\n SkPath,\n SkPaint,\n} from \"../../skia/types\";\nimport {\n StrokeCap,\n StrokeJoin,\n PaintStyle,\n BlendMode,\n ClipOp,\n isRRect,\n} from \"../../skia/types\";\nimport type {\n RenderNode,\n GroupProps,\n DrawingContext,\n NodeType,\n Node,\n} from \"../types\";\n\nimport { isPathDef, processPath, processTransformProps } from \"./datatypes\";\nimport type { NodeContext } from \"./Node\";\nimport { JsiNode, JsiDeclarationNode } from \"./Node\";\nimport type { PaintContext } from \"./PaintContext\";\nimport { enumKey } from \"./datatypes/Enum\";\n\nconst paintProps = [\n \"color\",\n \"strokeWidth\",\n \"blendMode\",\n \"strokeCap\",\n \"strokeJoin\",\n \"strokeMiter\",\n \"style\",\n \"antiAlias\",\n \"opacity\",\n];\n\ninterface PaintCache {\n parent: SkPaint;\n child: SkPaint;\n}\n\nexport abstract class JsiRenderNode<P extends GroupProps>\n extends JsiNode<P>\n implements RenderNode<P>\n{\n paintCache: PaintCache | null = null;\n matrix: SkMatrix;\n clipRect?: SkRect;\n clipRRect?: SkRRect;\n clipPath?: SkPath;\n\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, type, props);\n this.matrix = this.Skia.Matrix();\n this.onPropChange();\n }\n\n setProps(props: P) {\n super.setProps(props);\n this.onPropChange();\n this.paintCache = null;\n }\n\n setProp<K extends keyof P>(key: K, value: P[K]) {\n const hasChanged = super.setProp(key, value);\n if (hasChanged) {\n this.onPropChange();\n if (paintProps.includes(key as string)) {\n this.paintCache = null;\n }\n }\n return hasChanged;\n }\n\n protected onPropChange() {\n this.matrix.identity();\n this.clipPath = undefined;\n this.clipRect = undefined;\n this.clipRRect = undefined;\n this.computeMatrix();\n this.computeClip();\n }\n\n addChild(child: Node<unknown>) {\n if (child instanceof JsiDeclarationNode) {\n child.setInvalidate(() => (this.paintCache = null));\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>) {\n if (child instanceof JsiDeclarationNode) {\n child.setInvalidate(() => (this.paintCache = null));\n }\n super.insertChildBefore(child, before);\n }\n\n private computeClip() {\n const { clip } = this.props;\n if (clip) {\n if (isPathDef(clip)) {\n this.clipPath = processPath(this.Skia, clip);\n } else if (isRRect(clip)) {\n this.clipRRect = clip;\n } else {\n this.clipRect = clip;\n }\n }\n }\n\n private computeMatrix() {\n processTransformProps(this.matrix, this.props);\n }\n\n private getPaintCtx() {\n let ctx: PaintContext | undefined;\n const {\n color,\n strokeWidth,\n blendMode,\n style,\n strokeJoin,\n strokeCap,\n strokeMiter,\n opacity,\n antiAlias,\n } = this.props;\n if (\n color !== undefined ||\n strokeWidth !== undefined ||\n blendMode !== undefined ||\n style !== undefined ||\n strokeJoin !== undefined ||\n strokeCap !== undefined ||\n strokeMiter !== undefined ||\n opacity !== undefined ||\n antiAlias !== undefined\n ) {\n ctx = {};\n if (color !== undefined) {\n ctx.color = this.Skia.Color(color);\n }\n if (strokeWidth !== undefined) {\n ctx.strokeWidth = strokeWidth;\n }\n if (blendMode !== undefined) {\n ctx.blendMode = BlendMode[enumKey(blendMode)];\n }\n if (style !== undefined) {\n ctx.style = PaintStyle[enumKey(style)];\n }\n if (strokeJoin !== undefined) {\n ctx.strokeJoin = StrokeJoin[enumKey(strokeJoin)];\n }\n if (strokeCap !== undefined) {\n ctx.strokeCap = StrokeCap[enumKey(strokeCap)];\n }\n if (strokeMiter !== undefined) {\n ctx.strokeMiter = strokeMiter;\n }\n if (opacity !== undefined) {\n ctx.opacity = opacity;\n }\n if (antiAlias !== undefined) {\n ctx.antiAlias = antiAlias;\n }\n }\n this._children.forEach((child) => {\n if (child instanceof JsiDeclarationNode) {\n if (child.isColorFilter()) {\n ctx = ctx || {};\n const cf = child.materialize();\n ctx.colorFilter = ctx.colorFilter\n ? this.Skia.ColorFilter.MakeCompose(cf, ctx.colorFilter)\n : cf;\n } else if (child.isShader()) {\n ctx = ctx || {};\n const shader = child.materialize();\n ctx.shader = shader;\n } else if (child.isPathEffect()) {\n ctx = ctx || {};\n const pe = child.materialize();\n ctx.pathEffect = ctx.pathEffect\n ? this.Skia.PathEffect.MakeCompose(pe, ctx.pathEffect)\n : pe;\n } else if (child.isImageFilter()) {\n ctx = ctx || {};\n const filter = child.materialize();\n ctx.imageFilter = ctx.imageFilter\n ? this.Skia.ImageFilter.MakeCompose(filter, ctx.imageFilter)\n : filter;\n } else if (child.isMaskFilter()) {\n ctx = ctx || {};\n const filter = child.materialize();\n ctx.maskFilter = filter;\n }\n }\n });\n return ctx;\n }\n\n render(parentCtx: DrawingContext) {\n const { invertClip, layer, matrix, transform } = this.props;\n const { canvas } = parentCtx;\n\n const opacity =\n this.props.opacity !== undefined\n ? parentCtx.opacity * this.props.opacity\n : parentCtx.opacity;\n\n if (\n this.paintCache === null ||\n this.paintCache.parent !== parentCtx.paint\n ) {\n const paintCtx = this.getPaintCtx();\n const child = paintCtx\n ? concatPaint(parentCtx.paint, paintCtx, parentCtx.opacity)\n : parentCtx.paint;\n this.paintCache = { parent: parentCtx.paint, child };\n }\n const paint = this.paintCache.child;\n // TODO: can we only recreate a new context here if needed?\n const ctx = { ...parentCtx, opacity, paint };\n const hasTransform = matrix !== undefined || transform !== undefined;\n const hasClip =\n this.clipRect !== undefined ||\n this.clipPath !== undefined ||\n this.clipRRect !== undefined;\n const shouldSave = hasTransform || hasClip || !!layer;\n const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;\n if (shouldSave) {\n if (layer) {\n if (typeof layer === \"boolean\") {\n canvas.saveLayer();\n } else {\n canvas.saveLayer(layer);\n }\n } else {\n canvas.save();\n }\n }\n\n if (this.matrix) {\n canvas.concat(this.matrix);\n }\n if (this.clipRect) {\n canvas.clipRect(this.clipRect, op, true);\n } else if (this.clipRRect) {\n canvas.clipRRect(this.clipRRect, op, true);\n } else if (this.clipPath) {\n canvas.clipPath(this.clipPath, op, true);\n }\n\n this.renderNode(ctx);\n\n if (shouldSave) {\n canvas.restore();\n }\n }\n\n abstract renderNode(ctx: DrawingContext): void;\n}\n\nconst concatPaint = (\n parent: SkPaint,\n {\n color,\n strokeWidth,\n shader,\n antiAlias,\n blendMode,\n colorFilter,\n imageFilter,\n maskFilter,\n pathEffect,\n opacity: alpha,\n strokeCap,\n strokeJoin,\n strokeMiter,\n style,\n }: PaintContext,\n opacity: number\n) => {\n const paint = parent.copy();\n if (color !== undefined) {\n paint.setShader(null);\n color[3] *= opacity;\n paint.setColor(color);\n } else {\n const cl = paint.getColor();\n cl[3] = opacity;\n paint.setColor(cl);\n }\n if (strokeWidth !== undefined) {\n paint.setStrokeWidth(strokeWidth);\n }\n if (shader !== undefined) {\n paint.setShader(shader);\n }\n if (antiAlias !== undefined) {\n paint.setAntiAlias(antiAlias);\n }\n if (blendMode !== undefined) {\n paint.setBlendMode(blendMode);\n }\n if (colorFilter !== undefined) {\n paint.setColorFilter(colorFilter);\n }\n if (imageFilter !== undefined) {\n paint.setImageFilter(imageFilter);\n }\n if (maskFilter !== undefined) {\n paint.setMaskFilter(maskFilter);\n }\n if (pathEffect !== undefined) {\n paint.setPathEffect(pathEffect);\n }\n if (alpha !== undefined) {\n paint.setAlphaf(alpha * opacity);\n }\n if (strokeCap !== undefined) {\n paint.setStrokeCap(strokeCap);\n }\n if (strokeJoin !== undefined) {\n paint.setStrokeJoin(strokeJoin);\n }\n if (strokeMiter !== undefined) {\n paint.setStrokeMiter(strokeMiter);\n }\n if (style !== undefined) {\n paint.setStyle(style);\n }\n return paint;\n};\n"],"mappings":";;;;;;;AAOA;;AAgBA;;AAEA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG,CACjB,OADiB,EAEjB,aAFiB,EAGjB,WAHiB,EAIjB,WAJiB,EAKjB,YALiB,EAMjB,aANiB,EAOjB,OAPiB,EAQjB,WARiB,EASjB,SATiB,CAAnB;;AAiBO,MAAeC,aAAf,SACGC,aADH,CAGP;EAOEC,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWC,IAAX,EAAiBC,KAAjB;;IADsD,oCANxB,IAMwB;;IAAA;;IAAA;;IAAA;;IAAA;;IAEtD,KAAKC,MAAL,GAAc,KAAKC,IAAL,CAAUC,MAAV,EAAd;IACA,KAAKC,YAAL;EACD;;EAEDC,QAAQ,CAACL,KAAD,EAAW;IACjB,MAAMK,QAAN,CAAeL,KAAf;IACA,KAAKI,YAAL;IACA,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