@shopify/react-native-skia 0.1.149 → 0.1.151
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/animation/decay/decay.js.map +1 -1
- package/lib/commonjs/animation/decay/index.js.map +1 -1
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
- package/lib/commonjs/animation/decay/types.js.map +1 -1
- package/lib/commonjs/animation/functions/index.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolate.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -1
- package/lib/commonjs/animation/index.js.map +1 -1
- package/lib/commonjs/animation/spring/Spring.js.map +1 -1
- package/lib/commonjs/animation/spring/functions/index.js.map +1 -1
- package/lib/commonjs/animation/spring/functions/spring.js.map +1 -1
- package/lib/commonjs/animation/spring/index.js.map +1 -1
- package/lib/commonjs/animation/spring/runSpring.js +1 -1
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/types.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.js +1 -1
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/Easing.js.map +1 -1
- package/lib/commonjs/animation/timing/createTiming.js +2 -6
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/bezier.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +6 -10
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/index.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/timing.js.map +1 -1
- package/lib/commonjs/animation/timing/functions/types.js.map +1 -1
- package/lib/commonjs/animation/timing/index.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useLoop.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.js +1 -3
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/animation/types.js.map +1 -1
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/GroupNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Color.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js +2 -2
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/FillNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/LineNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/OvalNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PictureNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PointsNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/RectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Text.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.js +2 -4
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/index.js.map +1 -1
- package/lib/commonjs/dom/types/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/types/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/types/Shaders.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/external/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.js +7 -10
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +0 -2
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +1 -1
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/image/index.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/index.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/components/text/index.js.map +1 -1
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Math.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
- package/lib/commonjs/renderer/typeddash.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js.map +1 -1
- package/lib/commonjs/renderer/useContextBridge.js.map +1 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/Skia.web.js.map +1 -1
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/core/Font.js.map +1 -1
- package/lib/commonjs/skia/core/Image.js.map +1 -1
- package/lib/commonjs/skia/core/Matrix.js.map +1 -1
- package/lib/commonjs/skia/core/Picture.js +20 -2
- package/lib/commonjs/skia/core/Picture.js.map +1 -1
- package/lib/commonjs/skia/core/RRect.js.map +1 -1
- package/lib/commonjs/skia/core/Rect.js.map +1 -1
- package/lib/commonjs/skia/core/SVG.js.map +1 -1
- package/lib/commonjs/skia/core/Typeface.js.map +1 -1
- package/lib/commonjs/skia/core/Vector.js +1 -1
- package/lib/commonjs/skia/core/Vector.js.map +1 -1
- package/lib/commonjs/skia/core/index.js.map +1 -1
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/skia/types/Canvas.js.map +1 -1
- package/lib/commonjs/skia/types/Color.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -1
- package/lib/commonjs/skia/types/ContourMeasure.js.map +1 -1
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Data/DataFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Data/index.js.map +1 -1
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
- package/lib/commonjs/skia/types/Font/index.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Image/index.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -1
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/Path/PathFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Path/index.js.map +1 -1
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/Picture.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/PictureFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/index.js.map +1 -1
- package/lib/commonjs/skia/types/Point.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/types/RSXform.js.map +1 -1
- package/lib/commonjs/skia/types/Rect.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVGFactory.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/index.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/index.js.map +1 -1
- package/lib/commonjs/skia/types/TextBlob.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -1
- package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -1
- package/lib/commonjs/skia/types/Vertices/index.js.map +1 -1
- package/lib/commonjs/skia/types/index.js.map +1 -1
- package/lib/commonjs/skia/web/Host.js +1 -1
- package/lib/commonjs/skia/web/Host.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/commonjs/skia/web/index.js.map +1 -1
- package/lib/commonjs/values/api.js.map +1 -1
- package/lib/commonjs/values/api.web.js.map +1 -1
- package/lib/commonjs/values/hooks/index.js.map +1 -1
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/index.js.map +1 -1
- package/lib/commonjs/values/selector.js.map +1 -1
- package/lib/commonjs/values/types.js.map +1 -1
- package/lib/commonjs/values/web/RNSkAnimation.js +2 -2
- package/lib/commonjs/values/web/RNSkAnimation.js.map +1 -1
- package/lib/commonjs/values/web/RNSkClockValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkValue.js.map +1 -1
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/values/web/index.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js +1 -1
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +2 -4
- package/lib/commonjs/views/SkiaView.web.js.map +1 -1
- package/lib/commonjs/views/api.js.map +1 -1
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/views/useDrawCallback.js.map +1 -1
- package/lib/commonjs/views/useTouchHandler.js +6 -6
- package/lib/commonjs/views/useTouchHandler.js.map +1 -1
- package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
- package/lib/commonjs/web/WithSkiaWeb.js +1 -1
- package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/module/animation/decay/decay.js.map +1 -1
- package/lib/module/animation/decay/index.js.map +1 -1
- package/lib/module/animation/decay/runDecay.js.map +1 -1
- package/lib/module/animation/decay/types.js.map +1 -1
- package/lib/module/animation/functions/index.js.map +1 -1
- package/lib/module/animation/functions/interpolate.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/module/animation/functions/interpolateVector.js.map +1 -1
- package/lib/module/animation/index.js.map +1 -1
- package/lib/module/animation/spring/Spring.js.map +1 -1
- package/lib/module/animation/spring/functions/index.js.map +1 -1
- package/lib/module/animation/spring/functions/spring.js.map +1 -1
- package/lib/module/animation/spring/index.js.map +1 -1
- package/lib/module/animation/spring/runSpring.js +1 -1
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/types.js.map +1 -1
- package/lib/module/animation/spring/useSpring.js +1 -1
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/Easing.js.map +1 -1
- package/lib/module/animation/timing/createTiming.js +2 -6
- package/lib/module/animation/timing/createTiming.js.map +1 -1
- package/lib/module/animation/timing/functions/bezier.js.map +1 -1
- package/lib/module/animation/timing/functions/getResolvedParams.js +6 -10
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +1 -1
- package/lib/module/animation/timing/functions/index.js.map +1 -1
- package/lib/module/animation/timing/functions/timing.js.map +1 -1
- package/lib/module/animation/timing/functions/types.js.map +1 -1
- package/lib/module/animation/timing/index.js.map +1 -1
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useLoop.js.map +1 -1
- package/lib/module/animation/timing/useTiming.js +1 -3
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/animation/types.js.map +1 -1
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/GroupNode.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/PaintContext.js.map +1 -1
- package/lib/module/dom/nodes/PaintNode.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Color.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +2 -2
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/DiffRectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/FillNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -1
- package/lib/module/dom/nodes/drawings/LineNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/OvalNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PictureNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PointsNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/RectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Text.js.map +1 -1
- package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/index.js.map +1 -1
- package/lib/module/dom/nodes/index.js.map +1 -1
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.js +2 -4
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/nodes/paint/index.js.map +1 -1
- package/lib/module/dom/types/ColorFilters.js.map +1 -1
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/ImageFilters.js.map +1 -1
- package/lib/module/dom/types/MaskFilters.js.map +1 -1
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/PathEffects.js.map +1 -1
- package/lib/module/dom/types/Shaders.js.map +1 -1
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/external/index.js.map +1 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.js +7 -10
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +0 -2
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Drawing.js.map +1 -1
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +1 -1
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropBlur.js +1 -1
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/backdrop/index.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/index.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/image/index.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/index.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/index.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/index.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Fill.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Line.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/shapes/index.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/components/text/index.js.map +1 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Animations/index.js.map +1 -1
- package/lib/module/renderer/processors/index.js.map +1 -1
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/module/renderer/processors/math/Math.js.map +1 -1
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/module/renderer/processors/math/index.js.map +1 -1
- package/lib/module/renderer/typeddash.js.map +1 -1
- package/lib/module/renderer/useCanvas.js.map +1 -1
- package/lib/module/renderer/useContextBridge.js.map +1 -1
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/Skia.web.js.map +1 -1
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/core/Font.js.map +1 -1
- package/lib/module/skia/core/Image.js.map +1 -1
- package/lib/module/skia/core/Matrix.js.map +1 -1
- package/lib/module/skia/core/Picture.js +15 -1
- package/lib/module/skia/core/Picture.js.map +1 -1
- package/lib/module/skia/core/RRect.js.map +1 -1
- package/lib/module/skia/core/Rect.js.map +1 -1
- package/lib/module/skia/core/SVG.js.map +1 -1
- package/lib/module/skia/core/Typeface.js.map +1 -1
- package/lib/module/skia/core/Vector.js +1 -1
- package/lib/module/skia/core/Vector.js.map +1 -1
- package/lib/module/skia/core/index.js.map +1 -1
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/skia/types/Canvas.js.map +1 -1
- package/lib/module/skia/types/Color.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
- package/lib/module/skia/types/ColorFilter/index.js.map +1 -1
- package/lib/module/skia/types/ContourMeasure.js.map +1 -1
- package/lib/module/skia/types/Data/Data.js.map +1 -1
- package/lib/module/skia/types/Data/DataFactory.js.map +1 -1
- package/lib/module/skia/types/Data/index.js.map +1 -1
- package/lib/module/skia/types/Font/Font.js.map +1 -1
- package/lib/module/skia/types/Font/index.js.map +1 -1
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/module/skia/types/Image/index.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/index.js.map +1 -1
- package/lib/module/skia/types/JsiInstance.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/module/skia/types/Paint/Paint.js.map +1 -1
- package/lib/module/skia/types/Paint/index.js.map +1 -1
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/Path/PathFactory.js.map +1 -1
- package/lib/module/skia/types/Path/index.js.map +1 -1
- package/lib/module/skia/types/PathEffect.js.map +1 -1
- package/lib/module/skia/types/Picture/Picture.js.map +1 -1
- package/lib/module/skia/types/Picture/PictureFactory.js.map +1 -1
- package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/module/skia/types/Picture/index.js.map +1 -1
- package/lib/module/skia/types/Point.js.map +1 -1
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/types/RSXform.js.map +1 -1
- package/lib/module/skia/types/Rect.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -1
- package/lib/module/skia/types/SVG/SVG.js.map +1 -1
- package/lib/module/skia/types/SVG/SVGFactory.js.map +1 -1
- package/lib/module/skia/types/SVG/index.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/types/Shader/ShaderFactory.js.map +1 -1
- package/lib/module/skia/types/Shader/index.js.map +1 -1
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/types/Surface/Surface.js.map +1 -1
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/module/skia/types/Surface/index.js.map +1 -1
- package/lib/module/skia/types/TextBlob.js.map +1 -1
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -1
- package/lib/module/skia/types/Typeface/index.js.map +1 -1
- package/lib/module/skia/types/Vertices/Vertices.js.map +1 -1
- package/lib/module/skia/types/Vertices/index.js.map +1 -1
- package/lib/module/skia/types/index.js.map +1 -1
- package/lib/module/skia/web/Host.js +1 -1
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColor.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkShader.js.map +1 -1
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/skia/web/index.js.map +1 -1
- package/lib/module/values/api.js.map +1 -1
- package/lib/module/values/api.web.js.map +1 -1
- package/lib/module/values/hooks/index.js.map +1 -1
- package/lib/module/values/hooks/useClockValue.js.map +1 -1
- package/lib/module/values/hooks/useComputedValue.js.map +1 -1
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/index.js.map +1 -1
- package/lib/module/values/selector.js.map +1 -1
- package/lib/module/values/types.js.map +1 -1
- package/lib/module/values/web/RNSkAnimation.js +2 -2
- package/lib/module/values/web/RNSkAnimation.js.map +1 -1
- package/lib/module/values/web/RNSkClockValue.js.map +1 -1
- package/lib/module/values/web/RNSkComputedValue.js +1 -1
- package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/values/web/RNSkValue.js.map +1 -1
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/values/web/index.js.map +1 -1
- package/lib/module/views/SkiaView.js +1 -1
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +2 -4
- package/lib/module/views/SkiaView.web.js.map +1 -1
- package/lib/module/views/api.js.map +1 -1
- package/lib/module/views/index.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/module/views/useDrawCallback.js.map +1 -1
- package/lib/module/views/useTouchHandler.js +6 -6
- package/lib/module/views/useTouchHandler.js.map +1 -1
- package/lib/module/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.js +1 -1
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/module/web/index.js.map +1 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +1 -1
- package/lib/typescript/src/animation/spring/runSpring.d.ts +1 -1
- package/lib/typescript/src/animation/spring/useSpring.d.ts +1 -1
- package/lib/typescript/src/animation/timing/createTiming.d.ts +1 -1
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +1 -1
- package/lib/typescript/src/animation/timing/runTiming.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useTiming.d.ts +1 -1
- package/lib/typescript/src/mock/index.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
- package/lib/typescript/src/renderer/HostConfig.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +4 -4
- package/lib/typescript/src/renderer/typeddash.d.ts +2 -2
- package/lib/typescript/src/skia/core/Font.d.ts +1 -1
- package/lib/typescript/src/skia/core/Picture.d.ts +9 -2
- package/lib/typescript/src/skia/core/Vector.d.ts +2 -2
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +2 -2
- package/lib/typescript/src/web/LoadSkiaWeb.d.ts +2 -2
- package/package.json +6 -6
- package/src/mock/index.ts +1 -0
- package/src/renderer/HostConfig.ts +3 -4
- package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
- package/src/renderer/processors/Animations/Animations.ts +11 -4
- package/src/renderer/typeddash.ts +3 -2
- package/src/skia/core/Picture.ts +17 -3
- package/src/values/web/RNSkComputedValue.ts +6 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["PatchNode","JsiDrawingNode","constructor","ctx","props","NodeType","Patch","deriveProps","colors","blendMode","patch","defaultBlendMode","BlendMode","DstOver","SrcOver","mode","enumKey","points","pos","c2","c1","map","c","processColor","Skia","undefined","draw","canvas","paint","opacity","derived","Error","texture","drawPatch","ALPHA"],"sources":["PatchNode.ts"],"sourcesContent":["import type { SkColor, SkPoint } from \"../../../skia/types\";\nimport { BlendMode } from \"../../../skia/types\";\nimport type { DrawingContext, PatchProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { ALPHA, enumKey, processColor } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class PatchNode extends JsiDrawingNode<\n PatchProps,\n { points: SkPoint[]; colors: SkColor[] | undefined; mode: BlendMode }\n> {\n constructor(ctx: NodeContext, props: PatchProps) {\n super(ctx, NodeType.Patch, props);\n }\n\n deriveProps() {\n const { colors, blendMode, patch } = this.props;\n const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const mode = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n // Patch requires a path with the following constraints:\n // M tl\n // C c1 c2 br\n // C c1 c2 bl\n // C c1 c2 tl (the redundant point in the last command is removed)\n return {\n mode,\n points: [\n patch[0].pos,\n patch[0].c2,\n patch[1].c1,\n patch[1].pos,\n patch[1].c2,\n patch[2].c1,\n patch[2].pos,\n patch[2].c2,\n patch[3].c1,\n patch[3].pos,\n patch[3].c2,\n patch[0].c1,\n ],\n colors: colors\n ? colors.map((c) => processColor(this.Skia, c, 1))\n : undefined,\n };\n }\n\n draw({ canvas, paint, opacity }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"PatchNode: derived props not set\");\n }\n const { texture } = this.props;\n const { colors, points, mode } = this.derived;\n canvas.drawPatch(\n points,\n opacity === 1\n ? colors\n : colors &&\n colors.map((c) => {\n c[ALPHA] = c[ALPHA] * opacity;\n return c;\n }),\n texture,\n mode,\n paint\n );\n }\n}\n"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AACA;;AAGO,MAAMA,SAAN,SAAwBC,2BAAxB,CAGL;EACAC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWE,gBAAA,CAASC,KAApB,EAA2BF,KAA3B;EACD;;EAEDG,WAAW,GAAG;IACZ,MAAM;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,IAA+B,KAAKN,KAA1C;IACA,MAAMO,gBAAgB,GAAGH,MAAM,GAAGI,gBAAA,CAAUC,OAAb,GAAuBD,gBAAA,CAAUE,OAAhE;IACA,MAAMC,IAAI,GAAGN,SAAS,GAAGG,gBAAA,CAAU,IAAAI,kBAAA,EAAQP,SAA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ChBA,CAAC,CAACY,gBAAD,CAAD,GAAWZ,CAAC,CAACY,gBAAD,CAAD,GAAWL,OAAtB;MACA,OAAOP,CAAP;IACD,CAHD,CALR,EASEU,OATF,EAUEjB,IAVF,EAWEa,KAXF;EAaD;;AAvDD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["PathNode","JsiDrawingNode","constructor","ctx","props","NodeType","Path","deriveProps","start","end","fillType","stroke","pathProps","hasStartOffset","hasEndOffset","hasStrokeOptions","undefined","hasFillType","willMutatePath","pristinePath","processPath","Skia","path","copy","setFillType","FillType","enumKey","trim","draw","canvas","paint","derived","Error","drawPath"],"sources":["PathNode.ts"],"sourcesContent":["import { FillType } from \"../../../skia/types\";\nimport type { SkPath } from \"../../../skia/types\";\nimport type { DrawingContext, PathProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { enumKey, processPath } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class PathNode extends JsiDrawingNode<PathProps, SkPath> {\n constructor(ctx: NodeContext, props: PathProps) {\n super(ctx, NodeType.Path, props);\n }\n\n protected deriveProps() {\n const { start, end, fillType, stroke, ...pathProps } = this.props;\n const hasStartOffset = start !== 0;\n const hasEndOffset = end !== 1;\n const hasStrokeOptions = stroke !== undefined;\n const hasFillType = !!fillType;\n const willMutatePath =\n hasStartOffset || hasEndOffset || hasStrokeOptions || hasFillType;\n const pristinePath = processPath(this.Skia, pathProps.path);\n const path = willMutatePath ? pristinePath.copy() : pristinePath;\n if (hasFillType) {\n path.setFillType(FillType[enumKey(fillType)]);\n }\n if (hasStrokeOptions) {\n path.stroke(stroke);\n }\n if (hasStartOffset || hasEndOffset) {\n path.trim(start, end, false);\n }\n return path;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"Path not initialized\");\n }\n canvas.drawPath(this.derived, paint);\n }\n}\n"],"mappings":";;;;;;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N;IACD;;IACDH,MAAM,CAACI,QAAP,CAAgB,KAAKF,OAArB,EAA8BD,KAA9B;EACD;;AAhC6D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["PictureNode","JsiDrawingNode","constructor","ctx","props","NodeType","Picture","deriveProps","draw","canvas","picture","drawPicture"],"sources":["PictureNode.ts"],"sourcesContent":["import type { DrawingContext, PictureProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class PictureNode extends JsiDrawingNode<PictureProps, null> {\n constructor(ctx: NodeContext, props: PictureProps) {\n super(ctx, NodeType.Picture, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas }: DrawingContext) {\n const { picture } = this.props;\n canvas.drawPicture(picture);\n }\n}\n"],"mappings":";;;;;;;AACA;;AACA;;AAGO,MAAMA,WAAN,SAA0BC,2BAA1B,CAA6D;EAClEC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAwC;IACjD,MAAMD,GAAN,EAAWE,eAAA,CAASC,OAApB,EAA6BF,KAA7B;EACD;;EAEDG,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAA6B;IAAA,IAA5B;MAAEC;IAAF,CAA4B;IAC/B,MAAM;MAAEC;IAAF,IAAc,KAAKN,KAAzB;IACAK,MAAM,CAACE,WAAP,CAAmBD,OAAnB;EACD;;AAZiE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["PointsNode","JsiDrawingNode","constructor","ctx","props","NodeType","Points","deriveProps","draw","canvas","paint","points","mode","drawPoints","PointMode","enumKey"],"sources":["PointsNode.ts"],"sourcesContent":["import { PointMode } from \"../../../skia/types\";\nimport type { DrawingContext, PointsProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class PointsNode extends JsiDrawingNode<PointsProps, null> {\n constructor(ctx: NodeContext, props: PointsProps) {\n super(ctx, NodeType.Points, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { points, mode } = this.props;\n canvas.drawPoints(PointMode[enumKey(mode)], points, paint);\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAGO,MAAMA,UAAN,SAAyBC,2BAAzB,CAA2D;EAChEC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;IAChD,MAAMD,GAAN,EAAWE,gBAAA,CAASC,MAApB,EAA4BF,KAA5B;EACD;;EAEDG,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,MAAF;MAAUC;IAAV,IAAmB,KAAKR,KAA9B;IACAK,MAAM,CAACI,UAAP,CAAkBC,gBAAA,CAAU,IAAAC,kBAAA,EAAQH,IAAR,CAAV,CAAlB,EAA4CD,MAA5C,EAAoDD,KAApD;EACD;;AAZ+D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["RRectNode","JsiDrawingNode","constructor","ctx","props","NodeType","RRect","deriveProps","processRRect","Skia","draw","canvas","paint","derived","undefined","Error","drawRRect"],"sources":["RRectNode.ts"],"sourcesContent":["import type { SkRRect } from \"../../../skia/types\";\nimport type { DrawingContext, RoundedRectProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class RRectNode extends JsiDrawingNode<RoundedRectProps, SkRRect> {\n rect?: SkRRect;\n\n constructor(ctx: NodeContext, props: RoundedRectProps) {\n super(ctx, NodeType.RRect, props);\n }\n\n protected deriveProps() {\n return processRRect(this.Skia, this.props);\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (this.derived === undefined) {\n throw new Error(\"RRectNode: rect is undefined\");\n }\n canvas.drawRRect(this.derived, paint);\n }\n}\n"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;;;AAGO,MAAMA,SAAN,SAAwBC,2BAAxB,CAAkE;EAGvEC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA4C;IACrD,MAAMD,GAAN,EAAWE,eAAA,CAASC,KAApB,EAA2BF,KAA3B;;IADqD;EAEtD;;EAESG,WAAW,GAAG;IACtB,OAAO,IAAAC,uBAAA,EAAa,KAAKC,IAAlB,EAAwB,KAAKL,KAA7B,CAAP;EACD;;EAEDM,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,KAAKC,OAAL,KAAiBC,SAArB,EAAgC;MAC9B,MAAM,IAAIC,KAAJ,CAAU,8BAAV,CAAN;IACD;;IACDJ,MAAM,CAACK,SAAP,CAAiB,KAAKH,OAAtB,EAA+BD,KAA/B;EACD;;AAhBsE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["RectNode","JsiDrawingNode","constructor","ctx","props","NodeType","Rect","deriveProps","processRect","Skia","draw","canvas","paint","derived","undefined","Error","drawRect"],"sources":["RectNode.ts"],"sourcesContent":["import type { SkRect } from \"../../../skia/types/Rect\";\nimport type { DrawingContext, RectProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class RectNode extends JsiDrawingNode<RectProps, SkRect> {\n constructor(ctx: NodeContext, props: RectProps) {\n super(ctx, NodeType.Rect, props);\n }\n\n deriveProps() {\n return processRect(this.Skia, this.props);\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (this.derived === undefined) {\n throw new Error(\"RectNode: rect is undefined\");\n }\n canvas.drawRect(this.derived, paint);\n }\n}\n"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAGO,MAAMA,QAAN,SAAuBC,2BAAvB,CAAyD;EAC9DC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWE,eAAA,CAASC,IAApB,EAA0BF,KAA1B;EACD;;EAEDG,WAAW,GAAG;IACZ,OAAO,IAAAC,sBAAA,EAAY,KAAKC,IAAjB,EAAuB,KAAKL,KAA5B,CAAP;EACD;;EAEDM,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,KAAKC,OAAL,KAAiBC,SAArB,EAAgC;MAC9B,MAAM,IAAIC,KAAJ,CAAU,6BAAV,CAAN;IACD;;IACDJ,MAAM,CAACK,QAAP,CAAgB,KAAKH,OAArB,EAA8BD,KAA9B;EACD;;AAd6D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["TextNode","JsiDrawingNode","constructor","ctx","props","NodeType","Text","deriveProps","draw","canvas","paint","text","x","y","font","drawText","TextPathNode","TextPath","path","processPath","Skia","initialOffset","ids","getGlyphIDs","widths","getGlyphWidths","rsx","meas","ContourMeasureIter","cont","next","dist","i","length","width","substring","px","py","tx","ty","getPosTan","adjustedX","adjustedY","push","RSXform","TextBlob","MakeFromRSXform","derived","Error","drawTextBlob","TextBlobNode","blob","GlyphsNode","Glyphs","glyphs","reduce","acc","glyph","id","pos","positions","drawGlyphs"],"sources":["Text.ts"],"sourcesContent":["import type { SkRSXform, SkTextBlob, SkPoint } from \"../../../skia/types\";\nimport type {\n DrawingContext,\n TextBlobProps,\n TextPathProps,\n TextProps,\n} from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processPath } from \"../datatypes\";\nimport type { GlyphsProps } from \"../../types/Drawings\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class TextNode extends JsiDrawingNode<TextProps, null> {\n constructor(ctx: NodeContext, props: TextProps) {\n super(ctx, NodeType.Text, props);\n }\n\n protected deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { text, x, y, font } = this.props;\n canvas.drawText(text, x, y, paint, font);\n }\n}\n\nexport class TextPathNode extends JsiDrawingNode<TextPathProps, SkTextBlob> {\n constructor(ctx: NodeContext, props: TextPathProps) {\n super(ctx, NodeType.TextPath, props);\n }\n\n deriveProps() {\n const path = processPath(this.Skia, this.props.path);\n const { font, initialOffset } = this.props;\n let { text } = this.props;\n const ids = font.getGlyphIDs(text);\n const widths = font.getGlyphWidths(ids);\n const rsx: SkRSXform[] = [];\n const meas = this.Skia.ContourMeasureIter(path, false, 1);\n let cont = meas.next();\n let dist = initialOffset;\n for (let i = 0; i < text.length && cont; i++) {\n const width = widths[i];\n dist += width / 2;\n if (dist > cont.length()) {\n // jump to next contour\n cont = meas.next();\n if (!cont) {\n // We have come to the end of the path - terminate the string\n // right here.\n text = text.substring(0, i);\n break;\n }\n dist = width / 2;\n }\n // Gives us the (x, y) coordinates as well as the cos/sin of the tangent\n // line at that position.\n const { px, py, tx, ty } = cont.getPosTan(dist);\n const adjustedX = px - (width / 2) * tx;\n const adjustedY = py - (width / 2) * ty;\n rsx.push(this.Skia.RSXform(tx, ty, adjustedX, adjustedY));\n dist += width / 2;\n }\n return this.Skia.TextBlob.MakeFromRSXform(text, rsx, font);\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"TextPathNode: blob is null\");\n }\n canvas.drawTextBlob(this.derived, 0, 0, paint);\n }\n}\n\nexport class TextBlobNode extends JsiDrawingNode<TextBlobProps, null> {\n constructor(ctx: NodeContext, props: TextBlobProps) {\n super(ctx, NodeType.TextBlob, props);\n }\n\n protected deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { blob, x, y } = this.props;\n canvas.drawTextBlob(blob, x, y, paint);\n }\n}\n\ninterface ProcessedGlyphs {\n glyphs: number[];\n positions: SkPoint[];\n}\n\nexport class GlyphsNode extends JsiDrawingNode<GlyphsProps, ProcessedGlyphs> {\n constructor(ctx: NodeContext, props: GlyphsProps) {\n super(ctx, NodeType.Glyphs, props);\n }\n\n deriveProps() {\n return this.props.glyphs.reduce<ProcessedGlyphs>(\n (acc, glyph) => {\n const { id, pos } = glyph;\n acc.glyphs.push(id);\n acc.positions.push(pos);\n return acc;\n },\n { glyphs: [], positions: [] }\n );\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"GlyphsNode: processedGlyphs is null\");\n }\n const { glyphs, positions } = this.derived;\n const { x, y, font } = this.props;\n canvas.drawGlyphs(glyphs, positions, x, y, font, paint);\n }\n}\n"],"mappings":";;;;;;;AAOA;;AACA;;AAEA;;AAGO,MAAMA,QAAN,SAAuBC,2BAAvB,CAAuD;EAC5DC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWE,eAAA,CAASC,IAApB,EAA0BF,KAA1B;EACD;;EAESG,WAAW,GAAG;IACtB,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,IAAF;MAAQC,CAAR;MAAWC,CAAX;MAAcC;IAAd,IAAuB,KAAKV,KAAlC;IACAK,MAAM,CAACM,QAAP,CAAgBJ,IAAhB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BH,KAA5B,EAAmCI,IAAnC;EACD;;AAZ2D;;;;AAevD,MAAME,YAAN,SAA2Bf,2BAA3B,CAAqE;EAC1EC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWE,eAAA,CAASY,QAApB,EAA8Bb,KAA9B;EACD;;EAEDG,WAAW,GAAG;IACZ,MAAMW,IAAI,GAAG,IAAAC,sBAAA,EAAY,K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AAG;IACZ,OAAO,KAAKH,KAAL,CAAWkD,MAAX,CAAkBC,MAAlB,CACL,CAACC,GAAD,EAAMC,KAAN,KAAgB;MACd,MAAM;QAAEC,EAAF;QAAMC;MAAN,IAAcF,KAApB;MACAD,GAAG,CAACF,MAAJ,CAAWX,IAAX,CAAgBe,EAAhB;MACAF,GAAG,CAACI,SAAJ,CAAcjB,IAAd,CAAmBgB,GAAnB;MACA,OAAOH,GAAP;IACD,CANI,EAOL;MAAEF,MAAM,EAAE,EAAV;MAAcM,SAAS,EAAE;IAAzB,CAPK,CAAP;EASD;;EAEDpD,IAAI,QAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,CAAC,KAAKqC,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,qCAAV,CAAN;IACD;;IACD,MAAM;MAAEM,MAAF;MAAUM;IAAV,IAAwB,KAAKb,OAAnC;IACA,MAAM;MAAEnC,CAAF;MAAKC,CAAL;MAAQC;IAAR,IAAiB,KAAKV,KAA5B;IACAK,MAAM,CAACoD,UAAP,CAAkBP,MAAlB,EAA0BM,SAA1B,EAAqChD,CAArC,EAAwCC,CAAxC,EAA2CC,IAA3C,EAAiDJ,KAAjD;EACD;;AAxB0E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["VerticesNode","JsiDrawingNode","constructor","ctx","props","NodeType","Vertices","deriveProps","mode","vertices","textures","colors","indices","vertexMode","VertexMode","enumKey","Triangles","Skia","MakeVertices","map","c","processColor","undefined","draw","canvas","paint","blendMode","defaultBlendMode","BlendMode","DstOver","SrcOver","blend","derived","Error","drawVertices"],"sources":["VerticesNode.ts"],"sourcesContent":["import type { SkVertices } from \"../../../skia/types\";\nimport { VertexMode, BlendMode } from \"../../../skia/types\";\nimport type { DrawingContext, VerticesProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { enumKey, processColor } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class VerticesNode extends JsiDrawingNode<VerticesProps, SkVertices> {\n constructor(ctx: NodeContext, props: VerticesProps) {\n super(ctx, NodeType.Vertices, props);\n }\n\n protected deriveProps() {\n const { mode, vertices, textures, colors, indices } = this.props;\n const vertexMode = mode ? VertexMode[enumKey(mode)] : VertexMode.Triangles;\n return this.Skia.MakeVertices(\n vertexMode,\n vertices,\n textures,\n colors ? colors.map((c) => processColor(this.Skia, c, 1)) : undefined,\n indices\n );\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { colors, blendMode } = this.props;\n const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const blend = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n if (this.derived === undefined) {\n throw new Error(\"VerticesNode: vertices is undefined\");\n }\n canvas.drawVertices(this.derived, blend, paint);\n }\n}\n"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AACA;;AAGO,MAAMA,YAAN,SAA2BC,2BAA3B,CAAqE;EAC1EC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWE,gBAAA,CAASC,QAApB,EAA8BF,KAA9B;EACD;;EAESG,WAAW,GAAG;IACtB,MAAM;MAAEC,IAAF;MAAQC,QAAR;MAAkBC,QAAlB;MAA4BC,MAA5B;MAAoCC;IAApC,IAAgD,KAAKR,KAA3D;IACA,MAAMS,UAAU,GAAGL,IAAI,GAAGM,iBAAA,CAAW,IAAAC,kBAAA,EAAQP,IAAR,CAAX,CAAH,GAA+BM,iBAAA,CAAWE,SAAjE;IACA,OAAO,KAAKC,IAAL,CAAUC,YAAV,CACLL,UADK,EAELJ,QAFK,EAGLC,QAHK,EAILC,MAAM,GAAGA,MAAM,CAACQ,GAAP,CAAYC,CAAD,IAAO,IAAAC,uBAAA,EAAa,KAAKJ,IAAlB,EAAwBG,CAAxB,EAA2B,CAA3B,CAAlB,CAAH,GAAsDE,SAJvD,EAKLV,OALK,CAAP;EAOD;;EAEDW,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEd,MAAF;MAAUe;IAAV,IAAwB,KAAKtB,KAAnC;IACA,MAAMuB,gBAAgB,GAAGhB,MAAM,GAAGiB,gBAAA,CAAUC,OAAb,GAAuBD,gBAAA,CAAUE,OAAhE;IACA,MAAMC,KAAK,GAAGL,SAAS,GAAGE,gBAAA,CAAU,IAAAb,kBAAA,EAAQW,SAAR,CAAV,CAAH,GAAmCC,gBAA1D;;IACA,IAAI,KAAKK,OAAL,KAAiBV,SAArB,EAAgC;MAC9B,MAAM,IAAIW,KAAJ,CAAU,qCAAV,CAAN;IACD;;IACDT,MAAM,CAACU,YAAP,CAAoB,KAAKF,OAAzB,EAAkCD,KAAlC,EAAyCN,KAAzC;EACD;;AAzByE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CircleNode\";\nexport * from \"./FillNode\";\nexport * from \"./ImageNode\";\nexport * from \"./PointsNode\";\nexport * from \"./PathNode\";\nexport * from \"./RectNode\";\nexport * from \"./RRectNode\";\nexport * from \"./OvalNode\";\nexport * from \"./LineNode\";\nexport * from \"./PatchNode\";\nexport * from \"./VerticesNode\";\nexport * from \"./CustomDrawingNode\";\nexport * from \"./Text\";\nexport * from \"./PictureNode\";\nexport * from \"./DiffRectNode\";\nexport * from \"./ImageSVG\";\nexport * from \"./BackdropFilterNode\";\nexport * from \"./Box\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"../types\";\nexport * from \"./JsiSkDOM\";\nexport * from \"./datatypes\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["BlendNode","JsiDeclarationNode","constructor","ctx","props","DeclarationType","ImageFilter","NodeType","Blend","checkChild","child","_children","length","declarationType","Shader","addChild","Error","type","insertChildBefore","before","ImageFilterDeclaration","ShaderDeclaration","materialize","Skia","blend","BlendMode","enumKey","mode","reverse","reduce","inner","outer","MakeBlend"],"sources":["BlendNode.ts"],"sourcesContent":["import type { BlendProps } from \"../../types/ImageFilters\";\nimport type { SkShader, SkImageFilter } from \"../../../skia/types\";\nimport { BlendMode } from \"../../../skia/types\";\nimport { DeclarationType, NodeType } from \"../../types/NodeType\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type { Node } from \"../../types\";\nimport { enumKey } from \"../datatypes\";\n\nimport { ImageFilterDeclaration } from \"./ImageFilters\";\nimport { ShaderDeclaration } from \"./Shaders\";\n\nexport class BlendNode extends JsiDeclarationNode<\n BlendProps,\n SkShader | SkImageFilter\n> {\n constructor(ctx: NodeContext, props: BlendProps) {\n super(ctx, DeclarationType.ImageFilter, NodeType.Blend, props);\n }\n\n private checkChild(\n child: ImageFilterDeclaration<unknown> | ShaderDeclaration<unknown>\n ) {\n if (this._children.length > 0) {\n if (child.declarationType === DeclarationType.ImageFilter) {\n this.declarationType = DeclarationType.ImageFilter;\n } else {\n this.declarationType = DeclarationType.Shader;\n }\n }\n }\n\n addChild(child: Node<unknown>) {\n if (\n !(child instanceof JsiDeclarationNode) ||\n (child.declarationType !== DeclarationType.Shader &&\n child.declarationType !== DeclarationType.ImageFilter)\n ) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n this.checkChild(child);\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (\n !(child instanceof ImageFilterDeclaration) ||\n !(child instanceof ShaderDeclaration)\n ) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n this.checkChild(child);\n super.insertChildBefore(child, before);\n }\n\n materialize() {\n const { Skia } = this;\n const blend = BlendMode[enumKey(this.props.mode)];\n if (this.declarationType === DeclarationType.ImageFilter) {\n return (this._children as ImageFilterDeclaration<unknown>[])\n .reverse()\n .reduce<SkImageFilter | null>((inner, outer) => {\n if (inner === null) {\n return outer.materialize();\n }\n return Skia.ImageFilter.MakeBlend(blend, outer.materialize(), inner);\n }, null) as SkImageFilter;\n } else {\n return (this._children as ShaderDeclaration<unknown>[])\n .reverse()\n .reduce<SkShader | null>((inner, outer) => {\n if (inner === null) {\n return outer.materialize();\n }\n return Skia.Shader.MakeBlend(blend, outer.materialize(), inner);\n }, null) as SkShader;\n }\n }\n}\n"],"mappings":";;;;;;;AAEA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAEO,MAAMA,SAAN,SAAwBC,wBAAxB,CAGL;EACAC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWE,yBAAA,CAAgBC,WAA3B,EAAwCC,kBAAA,CAASC,KAAjD,EAAwDJ,KAAxD;EACD;;EAEOK,UAAU,CAChBC,KADgB,EAEhB;IACA,IAAI,KAAKC,SAAL,CAAeC,MAAf,GAAwB,CAA5B,EAA+B;MAC7B,IAAIF,KAAK,CAACG,eAAN,KAA0BR,yBAAA,CAAgBC,WAA9C,EAA2D;QACzD,KAAKO,eAAL,GAAuBR,yBAAA,CAAgBC,WAAvC;MACD,CAFD,MAEO;QACL,KAAKO,eAAL,GAAuBR,yBAAA,CAAgBS,MAAvC;MACD;IACF;EACF;;EAEDC,QAAQ,CAACL,KAAD,EAAuB;IAC7B,IACE,EAAEA,KAAK,YAAYT,wBAAnB,KACCS,KAAK,CAACG,eAAN,KAA0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AkB;QACzC,IAAID,KAAK,KAAK,IAAd,EAAoB;UAClB,OAAOC,KAAK,CAACT,WAAN,EAAP;QACD;;QACD,OAAOC,IAAI,CAACT,MAAL,CAAYkB,SAAZ,CAAsBR,KAAtB,EAA6BO,KAAK,CAACT,WAAN,EAA7B,EAAkDQ,KAAlD,CAAP;MACD,CAPI,EAOF,IAPE,CAAP;IAQD;EACF;;AA9DD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["ColorFilterDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","ColorFilter","addChild","child","Error","insertChildBefore","before","compose","filter","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","MatrixColorFilterNode","NodeType","MatrixColorFilter","matrix","cf","MakeMatrix","BlendColorFilterNode","BlendColorFilter","mode","color","processColor","MakeBlend","BlendMode","enumKey","LinearToSRGBGammaColorFilterNode","LinearToSRGBGammaColorFilter","MakeLinearToSRGBGamma","SRGBToLinearGammaColorFilterNode","SRGBToLinearGammaColorFilter","MakeSRGBToLinearGamma","LumaColorFilterNode","LumaColorFilter","MakeLumaColorFilter","LerpColorFilterNode","LerpColorFilter","t","first","second","MakeLerp"],"sources":["ColorFilters.ts"],"sourcesContent":["import { BlendMode } from \"../../../skia/types\";\nimport type { SkColorFilter } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n BlendColorFilterProps,\n MatrixColorFilterProps,\n Node,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processColor } from \"../datatypes\";\nimport { enumKey } from \"../datatypes/Enum\";\nimport type { LerpColorFilterProps } from \"../../types/ColorFilters\";\n\nexport abstract class ColorFilterDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkColorFilter, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.ColorFilter, type, props);\n }\n\n addChild(child: Node<unknown>) {\n if (!(child instanceof ColorFilterDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof ColorFilterDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n }\n\n compose(filter: SkColorFilter) {\n const children = this._children as ColorFilterDeclaration<unknown>[];\n if (this._children.length === 0) {\n return filter;\n } else {\n return this.Skia.ColorFilter.MakeCompose(\n filter,\n children.reduce<SkColorFilter | null>((acc, child) => {\n if (acc === null) {\n return child.materialize();\n }\n return this.Skia.ColorFilter.MakeCompose(acc, child.materialize());\n }, null) as SkColorFilter\n );\n }\n }\n}\n\nexport class MatrixColorFilterNode extends ColorFilterDeclaration<MatrixColorFilterProps> {\n constructor(ctx: NodeContext, props: MatrixColorFilterProps) {\n super(ctx, NodeType.MatrixColorFilter, props);\n }\n\n materialize() {\n const { matrix } = this.props;\n const cf = this.Skia.ColorFilter.MakeMatrix(matrix);\n return this.compose(cf);\n }\n}\n\nexport class BlendColorFilterNode extends ColorFilterDeclaration<BlendColorFilterProps> {\n constructor(ctx: NodeContext, props: BlendColorFilterProps) {\n super(ctx, NodeType.BlendColorFilter, props);\n }\n\n materialize() {\n const { mode } = this.props;\n const color = processColor(this.Skia, this.props.color, 1);\n const cf = this.Skia.ColorFilter.MakeBlend(color, BlendMode[enumKey(mode)]);\n return this.compose(cf);\n }\n}\n\nexport class LinearToSRGBGammaColorFilterNode extends ColorFilterDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.LinearToSRGBGammaColorFilter, null);\n }\n\n materialize() {\n const cf = this.Skia.ColorFilter.MakeLinearToSRGBGamma();\n return this.compose(cf);\n }\n}\n\nexport class SRGBToLinearGammaColorFilterNode extends ColorFilterDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.SRGBToLinearGammaColorFilter, null);\n }\n\n materialize() {\n const cf = this.Skia.ColorFilter.MakeSRGBToLinearGamma();\n return this.compose(cf);\n }\n}\n\nexport class LumaColorFilterNode extends ColorFilterDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.LumaColorFilter, null);\n }\n\n materialize() {\n const cf = this.Skia.ColorFilter.MakeLumaColorFilter();\n return this.compose(cf);\n }\n}\n\nexport class LerpColorFilterNode extends ColorFilterDeclaration<LerpColorFilterProps> {\n constructor(ctx: NodeContext, props: LerpColorFilterProps) {\n super(ctx, NodeType.LerpColorFilter, props);\n }\n\n materialize() {\n const { t } = this.props;\n const [first, second] = this.children() as JsiDeclarationNode<\n unknown,\n SkColorFilter\n >[];\n return this.Skia.ColorFilter.MakeLerp(\n t,\n first.materialize(),\n second.materialize()\n );\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AAMA;;AACA;;AACA;;AAGO,MAAeA,sBAAf,SAGGC,wBAHH,CAGkD;EACvDC,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWG,uBAAA,CAAgBC,WAA3B,EAAwCH,IAAxC,EAA8CC,KAA9C;EACD;;EAEDG,QAAQ,CAACC,KAAD,EAAuB;IAC7B,IAAI,EAAEA,KAAK,YAAYT,sBAAnB,CAAJ,EAAgD;MAC9C,MAAM,IAAIU,KAAJ,CAAW,4BAA2BD,KAAK,CAACL,IAAK,OAAM,KAAKA,IAAK,EAAjE,CAAN;IACD;;IACD,MAAMI,QAAN,CAAeC,KAAf;EACD;;EAEDE,iBAAiB,CAACF,KAAD,EAAuBG,MAAvB,EAAoD;IACnE,IAAI,EAAEH,KAAK,YAAYT,sBAAnB,CAAJ,EAAgD;MAC9C,MAAM,IAAIU,KAAJ,CAAW,4BAA2BD,KAAK,CAACL,IAAK,OAAM,KAAKA,IAAK,EAAjE,CAAN;IACD;;IACD,MAAMO,iBAAN,CAAwBF,KAAxB,EAA+BG,MAA/B;EAC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WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAgD;IACzD,MAAMF,GAAN,EAAWqB,gBAAA,CAASuB,eAApB,EAAqC1C,KAArC;EACD;;EAEDiB,WAAW,GAAG;IACZ,MAAM;MAAE0B;IAAF,IAAQ,KAAK3C,KAAnB;IACA,MAAM,CAAC4C,KAAD,EAAQC,MAAR,IAAkB,KAAKnC,QAAL,EAAxB;IAIA,OAAO,KAAKG,IAAL,CAAUX,WAAV,CAAsB4C,QAAtB,CACLH,CADK,EAELC,KAAK,CAAC3B,WAAN,EAFK,EAGL4B,MAAM,CAAC5B,WAAP,EAHK,CAAP;EAKD;;AAhBmF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["ImageFilters.ts"],"names":["Black","Float32Array","of","MakeInnerShadow","Skia","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver","ImageFilterDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","getOptionalChildInstance","index","child","_children","getMandatoryChildInstance","isImageFilter","materialize","isShader","MakeShader","declarationType","Error","OffsetImageFilterNode","NodeType","OffsetImageFilter","x","y","DisplacementMapImageFilterNode","DisplacementMapImageFilter","channelX","channelY","scale","MakeDisplacementMap","ColorChannel","BlurImageFilterNode","BlurImageFilter","mode","blur","sigma","DropShadowImageFilterNode","cl","inner","factory","bind","MakeDropShadowOnly","MakeDropShadow","MorphologyOperator","MorphologyImageFilterNode","MorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","BlendImageFilterNode","BlendImageFilter","a","b","RuntimeShaderImageFilterNode","RuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","MakeRuntimeShader"],"mappings":";;;;;;;AACA;;AAeA;;AACA;;AAEA;;AAEA,MAAMA,KAAK,GAAG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BE,KAAnB,EAAiD;AAC1D,UAAMF,GAAN,EAAWgB,iBAASiC,gBAApB,EAAsC/C,KAAtC;AACD;;AAEDQ,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEmB,MAAAA;AAAF,QAAW,KAAK3B,KAAtB;AACA,UAAMgD,CAAC,GAAG,KAAK1C,yBAAL,CAA+B,CAA/B,CAAV;AACA,UAAM2C,CAAC,GAAG,KAAK3C,yBAAL,CAA+B,CAA/B,CAAV;AACA,WAAO,KAAKvC,IAAL,CAAUS,WAAV,CAAsBG,SAAtB,CAAgCgD,IAAhC,EAAsCqB,CAAtC,EAAyCC,CAAzC,CAAP;AACD;;AAVqF;;;;AAajF,MAAMC,4BAAN,SAA2CvD,sBAA3C,CAAiG;AACtGE,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAyD;AAClE,UAAMF,GAAN,EAAWgB,iBAASqC,wBAApB,EAA8CnD,KAA9C;AACD;;AAEDQ,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAE4C,MAAAA,MAAF;AAAUC,MAAAA;AAAV,QAAuB,KAAKrD,KAAlC;AACA,UAAMsD,GAAG,GAAG,KAAKvF,IAAL,CAAUwF,oBAAV,CAA+BH,MAA/B,CAAZ;;AACA,QAAIC,QAAJ,EAAc;AACZ,kCAAgBD,MAAhB,EAAwBC,QAAxB,EAAkCC,GAAlC;AACD;;AACD,UAAMhF,KAAK,GAAG,KAAK4B,wBAAL,CAA8B,CAA9B,CAAd;AACA,WAAO,KAAKnC,IAAL,CAAUS,WAAV,CAAsBgF,iBAAtB,CAAwCF,GAAxC,EAA6C,IAA7C,EAAmDhF,KAAnD,CAAP;AACD;;AAbqG","sourcesContent":["import type { SkImageFilter, SkColor, Skia } from \"../../../skia/types\";\nimport {\n BlendMode,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processRadius, enumKey, processColor } from \"../datatypes\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nconst Black = Float32Array.of(0, 0, 0, 1);\n\nconst MakeInnerShadow = (\n Skia: Skia,\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n\nexport abstract class ImageFilterDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkImageFilter, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.ImageFilter, type, props);\n }\n\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isImageFilter()) {\n return child.materialize();\n } else if (child.isShader()) {\n return this.Skia.ImageFilter.MakeShader(child.materialize(), null);\n } else if (child.declarationType === DeclarationType.ColorFilter) {\n return this.Skia.ImageFilter.MakeColorFilter(child.materialize(), null);\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class OffsetImageFilterNode extends ImageFilterDeclaration<OffsetImageFilterProps> {\n constructor(ctx: NodeContext, props: OffsetImageFilterProps) {\n super(ctx, NodeType.OffsetImageFilter, props);\n }\n\n materialize() {\n const { x, y } = this.props;\n return this.Skia.ImageFilter.MakeOffset(\n x,\n y,\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DisplacementMapImageFilterNode extends ImageFilterDeclaration<DisplacementMapImageFilterProps> {\n constructor(ctx: NodeContext, props: DisplacementMapImageFilterProps) {\n super(ctx, NodeType.DisplacementMapImageFilter, props);\n }\n\n materialize() {\n const { channelX, channelY, scale } = this.props;\n return this.Skia.ImageFilter.MakeDisplacementMap(\n ColorChannel[enumKey(channelX)],\n ColorChannel[enumKey(channelY)],\n scale,\n this.getMandatoryChildInstance(0),\n this.getOptionalChildInstance(1)\n );\n }\n}\n\nexport class BlurImageFilterNode extends ImageFilterDeclaration<BlurImageFilterProps> {\n constructor(ctx: NodeContext, props: BlurImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { mode, blur } = this.props;\n const sigma = processRadius(this.Skia, blur);\n return this.Skia.ImageFilter.MakeBlur(\n sigma.x,\n sigma.y,\n TileMode[enumKey(mode)],\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadowImageFilterProps> {\n constructor(ctx: NodeContext, props: DropShadowImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { dx, dy, blur, shadowOnly, color: cl, inner } = this.props;\n const color = processColor(this.Skia, cl, 1);\n const input = this.getOptionalChildInstance(0);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, this.Skia, shadowOnly);\n } else {\n factory = shadowOnly\n ? this.Skia.ImageFilter.MakeDropShadowOnly.bind(this.Skia.ImageFilter)\n : this.Skia.ImageFilter.MakeDropShadow.bind(this.Skia.ImageFilter);\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n}\n\nexport enum MorphologyOperator {\n Erode,\n Dilate,\n}\n\nexport class MorphologyImageFilterNode extends ImageFilterDeclaration<MorphologyImageFilterProps> {\n constructor(ctx: NodeContext, props: MorphologyImageFilterProps) {\n super(ctx, NodeType.MorphologyImageFilter, props);\n }\n\n materialize() {\n const { operator } = this.props;\n const r = processRadius(this.Skia, this.props.radius);\n const input = this.getOptionalChildInstance(0);\n if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {\n return this.Skia.ImageFilter.MakeErode(r.x, r.y, input);\n }\n return this.Skia.ImageFilter.MakeDilate(r.x, r.y, input);\n }\n}\n\nexport class BlendImageFilterNode extends ImageFilterDeclaration<BlendImageFilterProps> {\n constructor(ctx: NodeContext, props: BlendImageFilterProps) {\n super(ctx, NodeType.BlendImageFilter, props);\n }\n\n materialize() {\n const { mode } = this.props;\n const a = this.getMandatoryChildInstance(0);\n const b = this.getMandatoryChildInstance(1);\n return this.Skia.ImageFilter.MakeBlend(mode, a, b);\n }\n}\n\nexport class RuntimeShaderImageFilterNode extends ImageFilterDeclaration<RuntimeShaderImageFilterProps> {\n constructor(ctx: NodeContext, props: RuntimeShaderImageFilterProps) {\n super(ctx, NodeType.RuntimeShaderImageFilter, props);\n }\n\n materialize() {\n const { source, uniforms } = this.props;\n const rtb = this.Skia.RuntimeShaderBuilder(source);\n if (uniforms) {\n processUniforms(source, uniforms, rtb);\n }\n const input = this.getOptionalChildInstance(0);\n return this.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input);\n }\n}\n"]}
|
1
|
+
{"version":3,"names":["Black","Float32Array","of","MakeInnerShadow","Skia","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver","ImageFilterDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","getOptionalChildInstance","index","child","_children","getMandatoryChildInstance","isImageFilter","materialize","isShader","MakeShader","declarationType","Error","OffsetImageFilterNode","NodeType","OffsetImageFilter","x","y","DisplacementMapImageFilterNode","DisplacementMapImageFilter","channelX","channelY","scale","MakeDisplacementMap","ColorChannel","enumKey","BlurImageFilterNode","BlurImageFilter","mode","blur","sigma","processRadius","DropShadowImageFilterNode","cl","inner","processColor","factory","bind","MakeDropShadowOnly","MakeDropShadow","MorphologyOperator","MorphologyImageFilterNode","MorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","BlendImageFilterNode","BlendImageFilter","a","b","RuntimeShaderImageFilterNode","RuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","processUniforms","MakeRuntimeShader"],"sources":["ImageFilters.ts"],"sourcesContent":["import type { SkImageFilter, SkColor, Skia } from \"../../../skia/types\";\nimport {\n BlendMode,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processRadius, enumKey, processColor } from \"../datatypes\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nconst Black = Float32Array.of(0, 0, 0, 1);\n\nconst MakeInnerShadow = (\n Skia: Skia,\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n\nexport abstract class ImageFilterDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkImageFilter, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.ImageFilter, type, props);\n }\n\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isImageFilter()) {\n return child.materialize();\n } else if (child.isShader()) {\n return this.Skia.ImageFilter.MakeShader(child.materialize(), null);\n } else if (child.declarationType === DeclarationType.ColorFilter) {\n return this.Skia.ImageFilter.MakeColorFilter(child.materialize(), null);\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class OffsetImageFilterNode extends ImageFilterDeclaration<OffsetImageFilterProps> {\n constructor(ctx: NodeContext, props: OffsetImageFilterProps) {\n super(ctx, NodeType.OffsetImageFilter, props);\n }\n\n materialize() {\n const { x, y } = this.props;\n return this.Skia.ImageFilter.MakeOffset(\n x,\n y,\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DisplacementMapImageFilterNode extends ImageFilterDeclaration<DisplacementMapImageFilterProps> {\n constructor(ctx: NodeContext, props: DisplacementMapImageFilterProps) {\n super(ctx, NodeType.DisplacementMapImageFilter, props);\n }\n\n materialize() {\n const { channelX, channelY, scale } = this.props;\n return this.Skia.ImageFilter.MakeDisplacementMap(\n ColorChannel[enumKey(channelX)],\n ColorChannel[enumKey(channelY)],\n scale,\n this.getMandatoryChildInstance(0),\n this.getOptionalChildInstance(1)\n );\n }\n}\n\nexport class BlurImageFilterNode extends ImageFilterDeclaration<BlurImageFilterProps> {\n constructor(ctx: NodeContext, props: BlurImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { mode, blur } = this.props;\n const sigma = processRadius(this.Skia, blur);\n return this.Skia.ImageFilter.MakeBlur(\n sigma.x,\n sigma.y,\n TileMode[enumKey(mode)],\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadowImageFilterProps> {\n constructor(ctx: NodeContext, props: DropShadowImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { dx, dy, blur, shadowOnly, color: cl, inner } = this.props;\n const color = processColor(this.Skia, cl, 1);\n const input = this.getOptionalChildInstance(0);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, this.Skia, shadowOnly);\n } else {\n factory = shadowOnly\n ? this.Skia.ImageFilter.MakeDropShadowOnly.bind(this.Skia.ImageFilter)\n : this.Skia.ImageFilter.MakeDropShadow.bind(this.Skia.ImageFilter);\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n}\n\nexport enum MorphologyOperator {\n Erode,\n Dilate,\n}\n\nexport class MorphologyImageFilterNode extends ImageFilterDeclaration<MorphologyImageFilterProps> {\n constructor(ctx: NodeContext, props: MorphologyImageFilterProps) {\n super(ctx, NodeType.MorphologyImageFilter, props);\n }\n\n materialize() {\n const { operator } = this.props;\n const r = processRadius(this.Skia, this.props.radius);\n const input = this.getOptionalChildInstance(0);\n if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {\n return this.Skia.ImageFilter.MakeErode(r.x, r.y, input);\n }\n return this.Skia.ImageFilter.MakeDilate(r.x, r.y, input);\n }\n}\n\nexport class BlendImageFilterNode extends ImageFilterDeclaration<BlendImageFilterProps> {\n constructor(ctx: NodeContext, props: BlendImageFilterProps) {\n super(ctx, NodeType.BlendImageFilter, props);\n }\n\n materialize() {\n const { mode } = this.props;\n const a = this.getMandatoryChildInstance(0);\n const b = this.getMandatoryChildInstance(1);\n return this.Skia.ImageFilter.MakeBlend(mode, a, b);\n }\n}\n\nexport class RuntimeShaderImageFilterNode extends ImageFilterDeclaration<RuntimeShaderImageFilterProps> {\n constructor(ctx: NodeContext, props: RuntimeShaderImageFilterProps) {\n super(ctx, NodeType.RuntimeShaderImageFilter, props);\n }\n\n materialize() {\n const { source, uniforms } = this.props;\n const rtb = this.Skia.RuntimeShaderBuilder(source);\n if (uniforms) {\n processUniforms(source, uniforms, rtb);\n }\n const input = this.getOptionalChildInstance(0);\n return this.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input);\n }\n}\n"],"mappings":";;;;;;;AACA;;AAeA;;AACA;;AAEA;;AAEA,MAAMA,KAAK,GAAGC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CAAd;;AAEA,MAAMC,eAAe,GAAG,CACtBC,IADsB,EAEtBC,UAFsB,EAGtBC,EAHsB,EAItBC,EAJsB,EAKtBC,MALsB,EAMtBC,MANsB,EAOtBC,KAPsB,EAQtBC,KARsB,KASnB;EACH,MAAMC,aAAa,GAAGR,IAAI,CAACS,WAAL,CAAiBC,eAAjB,CACpBV,IAAI,CAACW,WAAL,CAAiBC,SAAjB,CAA2BhB,KAA3B,EAAkCiB,gBAAA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qF;;;;AAajF,MAAMC,4BAAN,SAA2C1D,sBAA3C,CAAiG;EACtGE,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAyD;IAClE,MAAMF,GAAN,EAAWgB,gBAAA,CAASwC,wBAApB,EAA8CtD,KAA9C;EACD;;EAEDQ,WAAW,GAAG;IACZ,MAAM;MAAE+C,MAAF;MAAUC;IAAV,IAAuB,KAAKxD,KAAlC;IACA,MAAMyD,GAAG,GAAG,KAAK1F,IAAL,CAAU2F,oBAAV,CAA+BH,MAA/B,CAAZ;;IACA,IAAIC,QAAJ,EAAc;MACZ,IAAAG,sBAAA,EAAgBJ,MAAhB,EAAwBC,QAAxB,EAAkCC,GAAlC;IACD;;IACD,MAAMnF,KAAK,GAAG,KAAK4B,wBAAL,CAA8B,CAA9B,CAAd;IACA,OAAO,KAAKnC,IAAL,CAAUS,WAAV,CAAsBoF,iBAAtB,CAAwCH,GAAxC,EAA6C,IAA7C,EAAmDnF,KAAnD,CAAP;EACD;;AAbqG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["BlurMaskFilterNode","JsiDeclarationNode","constructor","ctx","props","DeclarationType","MaskFilter","NodeType","BlurMaskFilter","materialize","style","blur","respectCTM","Skia","MakeBlur","BlurStyle","enumKey"],"sources":["MaskFilters.ts"],"sourcesContent":["import type { SkMaskFilter } from \"../../../skia/types\";\nimport { BlurStyle } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type { BlurMaskFilterProps } from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes\";\n\nexport class BlurMaskFilterNode extends JsiDeclarationNode<\n BlurMaskFilterProps,\n SkMaskFilter\n> {\n constructor(ctx: NodeContext, props: BlurMaskFilterProps) {\n super(ctx, DeclarationType.MaskFilter, NodeType.BlurMaskFilter, props);\n }\n\n materialize() {\n const { style, blur, respectCTM } = this.props;\n return this.Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n}\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AACA;;AAEO,MAAMA,kBAAN,SAAiCC,wBAAjC,CAGL;EACAC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA+C;IACxD,MAAMD,GAAN,EAAWE,uBAAA,CAAgBC,UAA3B,EAAuCC,gBAAA,CAASC,cAAhD,EAAgEJ,KAAhE;EACD;;EAEDK,WAAW,GAAG;IACZ,MAAM;MAAEC,KAAF;MAASC,IAAT;MAAeC;IAAf,IAA8B,KAAKR,KAAzC;IACA,OAAO,KAAKS,IAAL,CAAUP,UAAV,CAAqBQ,QAArB,CACLC,gBAAA,CAAU,IAAAC,kBAAA,EAAQN,KAAR,CAAV,CADK,EAELC,IAFK,EAGLC,UAHK,CAAP;EAKD;;AAZD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["PathEffects.ts"],"names":["PathEffectDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","PathEffect","addChild","child","Error","insertChildBefore","before","compose","pe","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","getOptionalChildInstance","index","getMandatoryChildInstance","isPathEffect","DiscretePathEffectNode","NodeType","DiscretePathEffect","deviation","seed","MakeDiscrete","Path2DPathEffectNode","Path2DPathEffect","matrix","path","MakePath2D","DashPathEffectNode","DashPathEffect","intervals","phase","MakeDash","CornerPathEffectNode","CornerPathEffect","r","MakeCorner","SumPathEffectNode","SumPathEffect","MakeSum","Line2DPathEffectNode","Line2DPathEffect","width","MakeLine2D","Path1DPathEffectNode","Path1DPathEffect","advance","style","MakePath1D","Path1DEffectStyle"],"mappings":";;;;;;;AAAA;;AAGA;;AAUA;;AACA;;AACA;;AAEA,MAAeA,qBAAf,SAGUC,wBAHV,CAGwD;AACtDC,EAAAA,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;AACtD,UAAMF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AW+B,IAAlC,CAAb;AACA,UAAMtB,EAAE,GAAG,KAAKI,IAAL,CAAUX,UAAV,CAAqBmD,UAArB,CACTtB,IADS,EAEToB,OAFS,EAGTf,KAHS,EAITkB,yBAAkB,mBAAQF,KAAR,CAAlB,CAJS,CAAX;;AAMA,QAAI3C,EAAE,KAAK,IAAX,EAAiB;AACf,aAAO,IAAP;AACD;;AACD,WAAO,KAAKD,OAAL,CAAaC,EAAb,CAAP;AACD;;AAlBD","sourcesContent":["import { Path1DEffectStyle } from \"../../../skia/types\";\nimport type { SkPathEffect } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Node,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes/Enum\";\nimport { processPath } from \"../datatypes\";\n\nabstract class PathEffectDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkPathEffect, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.PathEffect, type, props);\n }\n\n addChild(child: Node<unknown>) {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n }\n\n compose(pe: SkPathEffect) {\n const children = this._children as PathEffectDeclaration<unknown>[];\n if (this._children.length === 0) {\n return pe;\n } else {\n return this.Skia.PathEffect.MakeCompose(\n pe,\n children.reduce<SkPathEffect | null>((acc, child) => {\n if (acc === null) {\n return child.materialize();\n }\n return this.Skia.PathEffect.MakeCompose(acc, child.materialize());\n }, null) as SkPathEffect\n );\n }\n }\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isPathEffect()) {\n return child.materialize();\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class DiscretePathEffectNode extends PathEffectDeclaration<DiscretePathEffectProps> {\n constructor(ctx: NodeContext, props: DiscretePathEffectProps) {\n super(ctx, NodeType.DiscretePathEffect, props);\n }\n\n materialize() {\n const { length, deviation, seed } = this.props;\n const pe = this.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n return this.compose(pe);\n }\n}\n\nexport class Path2DPathEffectNode extends PathEffectDeclaration<\n Path2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path2DPathEffectProps) {\n super(ctx, NodeType.Path2DPathEffect, props);\n }\n\n materialize() {\n const { matrix } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath2D(matrix, path);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class DashPathEffectNode extends PathEffectDeclaration<DashPathEffectProps> {\n constructor(ctx: NodeContext, props: DashPathEffectProps) {\n super(ctx, NodeType.DashPathEffect, props);\n }\n\n materialize() {\n const { intervals, phase } = this.props;\n const pe = this.Skia.PathEffect.MakeDash(intervals, phase);\n return this.compose(pe);\n }\n}\n\nexport class CornerPathEffectNode extends PathEffectDeclaration<\n CornerPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: CornerPathEffectProps) {\n super(ctx, NodeType.CornerPathEffect, props);\n }\n\n materialize() {\n const { r } = this.props;\n const pe = this.Skia.PathEffect.MakeCorner(r);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class SumPathEffectNode extends PathEffectDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.SumPathEffect, null);\n }\n\n materialize() {\n return this.Skia.PathEffect.MakeSum(\n this.getMandatoryChildInstance(0),\n this.getMandatoryChildInstance(1)\n );\n }\n}\n\nexport class Line2DPathEffectNode extends PathEffectDeclaration<\n Line2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Line2DPathEffectProps) {\n super(ctx, NodeType.Line2DPathEffect, props);\n }\n\n materialize() {\n const { width, matrix } = this.props;\n const pe = this.Skia.PathEffect.MakeLine2D(width, matrix);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class Path1DPathEffectNode extends PathEffectDeclaration<\n Path1DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path1DPathEffectProps) {\n super(ctx, NodeType.Path1DPathEffect, props);\n }\n\n materialize() {\n const { advance, phase, style } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath1D(\n path,\n advance,\n phase,\n Path1DEffectStyle[enumKey(style)]\n );\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n"]}
|
1
|
+
{"version":3,"names":["PathEffectDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","PathEffect","addChild","child","Error","insertChildBefore","before","compose","pe","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","getOptionalChildInstance","index","getMandatoryChildInstance","isPathEffect","DiscretePathEffectNode","NodeType","DiscretePathEffect","deviation","seed","MakeDiscrete","Path2DPathEffectNode","Path2DPathEffect","matrix","path","processPath","MakePath2D","DashPathEffectNode","DashPathEffect","intervals","phase","MakeDash","CornerPathEffectNode","CornerPathEffect","r","MakeCorner","SumPathEffectNode","SumPathEffect","MakeSum","Line2DPathEffectNode","Line2DPathEffect","width","MakeLine2D","Path1DPathEffectNode","Path1DPathEffect","advance","style","MakePath1D","Path1DEffectStyle","enumKey"],"sources":["PathEffects.ts"],"sourcesContent":["import { Path1DEffectStyle } from \"../../../skia/types\";\nimport type { SkPathEffect } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Node,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes/Enum\";\nimport { processPath } from \"../datatypes\";\n\nabstract class PathEffectDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkPathEffect, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.PathEffect, type, props);\n }\n\n addChild(child: Node<unknown>) {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n }\n\n compose(pe: SkPathEffect) {\n const children = this._children as PathEffectDeclaration<unknown>[];\n if (this._children.length === 0) {\n return pe;\n } else {\n return this.Skia.PathEffect.MakeCompose(\n pe,\n children.reduce<SkPathEffect | null>((acc, child) => {\n if (acc === null) {\n return child.materialize();\n }\n return this.Skia.PathEffect.MakeCompose(acc, child.materialize());\n }, null) as SkPathEffect\n );\n }\n }\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isPathEffect()) {\n return child.materialize();\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class DiscretePathEffectNode extends PathEffectDeclaration<DiscretePathEffectProps> {\n constructor(ctx: NodeContext, props: DiscretePathEffectProps) {\n super(ctx, NodeType.DiscretePathEffect, props);\n }\n\n materialize() {\n const { length, deviation, seed } = this.props;\n const pe = this.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n return this.compose(pe);\n }\n}\n\nexport class Path2DPathEffectNode extends PathEffectDeclaration<\n Path2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path2DPathEffectProps) {\n super(ctx, NodeType.Path2DPathEffect, props);\n }\n\n materialize() {\n const { matrix } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath2D(matrix, path);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class DashPathEffectNode extends PathEffectDeclaration<DashPathEffectProps> {\n constructor(ctx: NodeContext, props: DashPathEffectProps) {\n super(ctx, NodeType.DashPathEffect, props);\n }\n\n materialize() {\n const { intervals, phase } = this.props;\n const pe = this.Skia.PathEffect.MakeDash(intervals, phase);\n return this.compose(pe);\n }\n}\n\nexport class CornerPathEffectNode extends PathEffectDeclaration<\n CornerPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: CornerPathEffectProps) {\n super(ctx, NodeType.CornerPathEffect, props);\n }\n\n materialize() {\n const { r } = this.props;\n const pe = this.Skia.PathEffect.MakeCorner(r);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class SumPathEffectNode extends PathEffectDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.SumPathEffect, null);\n }\n\n materialize() {\n return this.Skia.PathEffect.MakeSum(\n this.getMandatoryChildInstance(0),\n this.getMandatoryChildInstance(1)\n );\n }\n}\n\nexport class Line2DPathEffectNode extends PathEffectDeclaration<\n Line2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Line2DPathEffectProps) {\n super(ctx, NodeType.Line2DPathEffect, props);\n }\n\n materialize() {\n const { width, matrix } = this.props;\n const pe = this.Skia.PathEffect.MakeLine2D(width, matrix);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class Path1DPathEffectNode extends PathEffectDeclaration<\n Path1DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path1DPathEffectProps) {\n super(ctx, NodeType.Path1DPathEffect, props);\n }\n\n materialize() {\n const { advance, phase, style } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath1D(\n path,\n advance,\n phase,\n Path1DEffectStyle[enumKey(style)]\n );\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AAUA;;AACA;;AACA;;AAEA,MAAeA,qBAAf,SAGUC,wBAHV,CAGwD;EACtDC,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWG,uBAAA,CAAgBC,UAA3B,EAAuCH,IAAvC,EAA6CC,KAA7C;EACD;;EAEDG,QAAQ,CAACC,KAAD,EAAuB;IAC7B,IAAI,EAAEA,KAAK,YAAYT,qBAAnB,CAAJ,EAA+C;MAC7C,MAAM,IAAIU,KAAJ,CAAW,4BAA2BD,KAAK,CAACL,IAAK,OAAM,KAAKA,IAAK,EAAjE,CAAN;IACD;;IACD,MAAMI,QAAN,CAAeC,KAAf;EACD;;EAEDE,iBAAiB,CAACF,KAAD,EAAuBG,MAAvB,EAAoD;IACnE,IAAI,EAAEH,KAAK,YAAYT,qBAAnB,CAAJ,EAA+C;MAC7C,MAAM,IAAIU,KAAJ,CAAW,4BAA2BD,KAAK,CAACL,IAAK,OAAM,KAAKA,IAAK,EAAjE,CAAN;IACD;;IACD,MAAMO,iBAAN,CAAwBF,KAAxB,EAA+BG,MAA/B;EACD;;EAEDC,OAAO,CAACC,EAAD,EAAmB;IACxB,MAAMC,QAAQ,GAAG,KAAKC,SAAtB;;IACA,IAAI,KAAKA,S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O,IAAP;IACD;;IACD,OAAO,KAAKD,OAAL,CAAaC,EAAb,CAAP;EACD;;AAZD;;;;AAeK,MAAMyC,oBAAN,SAAmCvD,qBAAnC,CAGL;EACAE,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAiD;IAC1D,MAAMF,GAAN,EAAWyB,gBAAA,CAAS4B,gBAApB,EAAsCnD,KAAtC;EACD;;EAEDiB,WAAW,GAAG;IACZ,MAAM;MAAEmC,OAAF;MAAWf,KAAX;MAAkBgB;IAAlB,IAA4B,KAAKrD,KAAvC;IACA,MAAM+B,IAAI,GAAG,IAAAC,sBAAA,EAAY,KAAKnB,IAAjB,EAAuB,KAAKb,KAAL,CAAW+B,IAAlC,CAAb;IACA,MAAMtB,EAAE,GAAG,KAAKI,IAAL,CAAUX,UAAV,CAAqBoD,UAArB,CACTvB,IADS,EAETqB,OAFS,EAGTf,KAHS,EAITkB,wBAAA,CAAkB,IAAAC,aAAA,EAAQH,KAAR,CAAlB,CAJS,CAAX;;IAMA,IAAI5C,EAAE,KAAK,IAAX,EAAiB;MACf,OAAO,IAAP;IACD;;IACD,OAAO,KAAKD,OAAL,CAAaC,EAAb,CAAP;EACD;;AAlBD"}
|
@@ -62,8 +62,6 @@ class ImageShaderNode extends ShaderDeclaration {
|
|
62
62
|
const rct = (0, _datatypes.getRect)(this.Skia, imageShaderProps);
|
63
63
|
|
64
64
|
if (rct) {
|
65
|
-
var _imageShaderProps$tra;
|
66
|
-
|
67
65
|
const rects = (0, _datatypes.fitRects)(fit, {
|
68
66
|
x: 0,
|
69
67
|
y: 0,
|
@@ -71,7 +69,7 @@ class ImageShaderNode extends ShaderDeclaration {
|
|
71
69
|
height: image.height()
|
72
70
|
}, rct);
|
73
71
|
const m3 = (0, _datatypes.rect2rect)(rects.src, rects.dst);
|
74
|
-
imageShaderProps.transform = [...(
|
72
|
+
imageShaderProps.transform = [...(imageShaderProps.transform ?? []), ...m3];
|
75
73
|
}
|
76
74
|
|
77
75
|
const lm = this.Skia.Matrix();
|
@@ -158,7 +156,7 @@ class LinearGradientNode extends ShaderDeclaration {
|
|
158
156
|
localMatrix,
|
159
157
|
flags
|
160
158
|
} = (0, _datatypes.processGradientProps)(this.Skia, this.props);
|
161
|
-
return this.Skia.Shader.MakeLinearGradient(start, end, colors, positions
|
159
|
+
return this.Skia.Shader.MakeLinearGradient(start, end, colors, positions ?? null, mode, localMatrix, flags);
|
162
160
|
}
|
163
161
|
|
164
162
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Shaders.ts"],"names":["ShaderDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","Shader","ShaderNode","NodeType","materialize","source","uniforms","transform","m3","Skia","Matrix","makeShaderWithChildren","children","filter","child","isShader","map","ImageShaderNode","ImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","rects","x","y","width","height","src","dst","lm","makeShaderOptions","TileMode","FilterMode","MipmapMode","ColorNode","ColorShader","color","MakeColor","TurbulenceNode","Turbulence","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeTurbulence","FractalNoiseNode","FractalNoise","MakeFractalNoise","LinearGradientNode","LinearGradient","start","end","colors","positions","mode","localMatrix","flags","MakeLinearGradient","RadialGradientNode","RadialGradient","c","r","MakeRadialGradient","SweepGradientNode","SweepGradient","MakeSweepGradient","TwoPointConicalGradientNode","TwoPointConicalGradient","startR","endR","MakeTwoPointConicalGradient"],"mappings":";;;;;;;AAAA;;AAQA;;AAYA;;AACA;;AACA;;AASO,MAAeA,iBAAf,SAA4CC,wBAA5C,CAGL;AACAC,EAAAA,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;AACtD,UAAMF,GAAN,EAAWG,wBAAgBC,MAA3B,EAAmCH,IAAnC,EAAyCC,KAAzC;AACD;;AAHD;;;;AAMK,MAAMG,UAAN,SAAyBR,iBAAzB,CAAwD;AAC7DE,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAuC;AAChD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,KAAKtD,IAA1B,EAAgC,KAAKV,KAArC,CADF;AAEA,WAAO,KAAKU,IAAL,CAAUR,MAAV,CAAiBuE,iBAAjB,CACLL,CAAC,CAACvC,CADG,EAELuC,CAAC,CAACtC,CAFG,EAGL8B,MAHK,EAILC,SAJK,EAKLC,IALK,EAMLC,WANK,EAOLC,KAPK,EAQLN,KARK,EASLC,GATK,CAAP;AAWD;;AApB0E;;;;AAuBtE,MAAMe,2BAAN,SAA0C/E,iBAA1C,CAA0F;AAC/FE,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAwD;AACjE,UAAMF,GAAN,EAAWM,iBAASuE,uBAApB,EAA6C3E,KAA7C;AACD;;AAEDK,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEuE,MAAAA,MAAF;AAAUC,MAAAA,IAAV;AAAgBnB,MAAAA,KAAhB;AAAuBC,MAAAA;AAAvB,QAA+B,KAAK3D,KAA1C;AACA,UAAM;AAAE4D,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA,IAArB;AAA2BC,MAAAA,WAA3B;AAAwCC,MAAAA;AAAxC,QACJ,qCAAqB,KAAKtD,IAA1B,EAAgC,KAAKV,KAArC,CADF;AAEA,WAAO,KAAKU,IAAL,CAAUR,MAAV,CAAiB4E,2BAAjB,CACLpB,KADK,EAELkB,MAFK,EAGLjB,GAHK,EAILkB,IAJK,EAKLjB,MALK,EAMLC,SANK,EAOLC,IAPK,EAQLC,WARK,EASLC,KATK,CAAP;AAWD;;AApB8F","sourcesContent":["import {\n processUniforms,\n FilterMode,\n MipmapMode,\n TileMode,\n} from \"../../../skia/types\";\nimport type { SkShader } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processColor } from \"../datatypes/Color\";\nimport {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../datatypes\";\n\nexport abstract class ShaderDeclaration<P> extends JsiDeclarationNode<\n P,\n SkShader\n> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.Shader, type, props);\n }\n}\n\nexport class ShaderNode extends ShaderDeclaration<ShaderProps> {\n constructor(ctx: NodeContext, props: ShaderProps) {\n super(ctx, NodeType.Shader, props);\n }\n\n materialize() {\n const { source, uniforms, ...transform } = this.props;\n const m3 = this.Skia.Matrix();\n processTransformProps(m3, transform);\n return source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n this.children()\n .filter(\n (child): child is JsiDeclarationNode<unknown, SkShader> =>\n child instanceof JsiDeclarationNode && child.isShader()\n )\n .map((child) => child.materialize()),\n m3\n );\n }\n}\n\nexport class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {\n constructor(ctx: NodeContext, props: ImageShaderProps) {\n super(ctx, NodeType.ImageShader, props);\n }\n\n materialize() {\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = this.props;\n const rct = getRect(this.Skia, imageShaderProps);\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const m3 = rect2rect(rects.src, rects.dst);\n imageShaderProps.transform = [\n ...(imageShaderProps.transform ?? []),\n ...m3,\n ];\n }\n const lm = this.Skia.Matrix();\n processTransformProps(lm, imageShaderProps);\n return image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n }\n}\n\nexport class ColorNode extends ShaderDeclaration<ColorProps> {\n constructor(ctx: NodeContext, props: ColorProps) {\n super(ctx, NodeType.ColorShader, props);\n }\n\n materialize() {\n const { color } = this.props;\n return this.Skia.Shader.MakeColor(processColor(this.Skia, color, 1));\n }\n}\n\nexport class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {\n constructor(ctx: NodeContext, props: TurbulenceProps) {\n super(ctx, NodeType.Turbulence, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {\n constructor(ctx: NodeContext, props: FractalNoiseProps) {\n super(ctx, NodeType.FractalNoise, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {\n constructor(ctx: NodeContext, props: LinearGradientProps) {\n super(ctx, NodeType.LinearGradient, props);\n }\n\n materialize() {\n const { start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {\n constructor(ctx: NodeContext, props: RadialGradientProps) {\n super(ctx, NodeType.RadialGradient, props);\n }\n\n materialize() {\n const { c, r } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {\n constructor(ctx: NodeContext, props: SweepGradientProps) {\n super(ctx, NodeType.SweepGradient, props);\n }\n\n materialize() {\n const { c, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n }\n}\n\nexport class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConicalGradientProps> {\n constructor(ctx: NodeContext, props: TwoPointConicalGradientProps) {\n super(ctx, NodeType.TwoPointConicalGradient, props);\n }\n\n materialize() {\n const { startR, endR, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"names":["ShaderDeclaration","JsiDeclarationNode","constructor","ctx","type","props","DeclarationType","Shader","ShaderNode","NodeType","materialize","source","uniforms","transform","m3","Skia","Matrix","processTransformProps","makeShaderWithChildren","processUniforms","children","filter","child","isShader","map","ImageShaderNode","ImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","getRect","rects","fitRects","x","y","width","height","rect2rect","src","dst","lm","makeShaderOptions","TileMode","enumKey","FilterMode","MipmapMode","ColorNode","ColorShader","color","MakeColor","processColor","TurbulenceNode","Turbulence","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeTurbulence","FractalNoiseNode","FractalNoise","MakeFractalNoise","LinearGradientNode","LinearGradient","start","end","colors","positions","mode","localMatrix","flags","processGradientProps","MakeLinearGradient","RadialGradientNode","RadialGradient","c","r","MakeRadialGradient","SweepGradientNode","SweepGradient","MakeSweepGradient","TwoPointConicalGradientNode","TwoPointConicalGradient","startR","endR","MakeTwoPointConicalGradient"],"sources":["Shaders.ts"],"sourcesContent":["import {\n processUniforms,\n FilterMode,\n MipmapMode,\n TileMode,\n} from \"../../../skia/types\";\nimport type { SkShader } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processColor } from \"../datatypes/Color\";\nimport {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../datatypes\";\n\nexport abstract class ShaderDeclaration<P> extends JsiDeclarationNode<\n P,\n SkShader\n> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.Shader, type, props);\n }\n}\n\nexport class ShaderNode extends ShaderDeclaration<ShaderProps> {\n constructor(ctx: NodeContext, props: ShaderProps) {\n super(ctx, NodeType.Shader, props);\n }\n\n materialize() {\n const { source, uniforms, ...transform } = this.props;\n const m3 = this.Skia.Matrix();\n processTransformProps(m3, transform);\n return source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n this.children()\n .filter(\n (child): child is JsiDeclarationNode<unknown, SkShader> =>\n child instanceof JsiDeclarationNode && child.isShader()\n )\n .map((child) => child.materialize()),\n m3\n );\n }\n}\n\nexport class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {\n constructor(ctx: NodeContext, props: ImageShaderProps) {\n super(ctx, NodeType.ImageShader, props);\n }\n\n materialize() {\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = this.props;\n const rct = getRect(this.Skia, imageShaderProps);\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const m3 = rect2rect(rects.src, rects.dst);\n imageShaderProps.transform = [\n ...(imageShaderProps.transform ?? []),\n ...m3,\n ];\n }\n const lm = this.Skia.Matrix();\n processTransformProps(lm, imageShaderProps);\n return image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n }\n}\n\nexport class ColorNode extends ShaderDeclaration<ColorProps> {\n constructor(ctx: NodeContext, props: ColorProps) {\n super(ctx, NodeType.ColorShader, props);\n }\n\n materialize() {\n const { color } = this.props;\n return this.Skia.Shader.MakeColor(processColor(this.Skia, color, 1));\n }\n}\n\nexport class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {\n constructor(ctx: NodeContext, props: TurbulenceProps) {\n super(ctx, NodeType.Turbulence, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {\n constructor(ctx: NodeContext, props: FractalNoiseProps) {\n super(ctx, NodeType.FractalNoise, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {\n constructor(ctx: NodeContext, props: LinearGradientProps) {\n super(ctx, NodeType.LinearGradient, props);\n }\n\n materialize() {\n const { start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {\n constructor(ctx: NodeContext, props: RadialGradientProps) {\n super(ctx, NodeType.RadialGradient, props);\n }\n\n materialize() {\n const { c, r } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {\n constructor(ctx: NodeContext, props: SweepGradientProps) {\n super(ctx, NodeType.SweepGradient, props);\n }\n\n materialize() {\n const { c, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n }\n}\n\nexport class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConicalGradientProps> {\n constructor(ctx: NodeContext, props: TwoPointConicalGradientProps) {\n super(ctx, NodeType.TwoPointConicalGradient, props);\n }\n\n materialize() {\n const { startR, endR, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAQA;;AAYA;;AACA;;AACA;;AASO,MAAeA,iBAAf,SAA4CC,wBAA5C,CAGL;EACAC,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWG,uBAAA,CAAgBC,MAA3B,EAAmCH,IAAnC,EAAyCC,KAAzC;EACD;;AAHD;;;;AAMK,MAAMG,UAAN,SAAyBR,iBAAzB,CAAwD;EAC7DE,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAuC;IAChD,MAAMF,GAAN,EAAWM,gBAAA,CAASF,MAApB,EAA4BF,KAA5B;EACD;;EAEDK,WAAW,GAAG;IACZ,MAAM;MAAEC,MAAF;MAAUC,QAAV;MAAoB,GAAGC;IAAvB,IAAqC,KAAKR,KAAhD;IACA,MAAMS,EAAE,GAAG,KAAKC,IAAL,CAAUC,MAAV,EAAX;IACA,IAAAC,gCAAA,EAAsBH,EAAtB,EAA0BD,SAA1B;IACA,OAAOF,MAAM,CAACO,sBAAP,CACL,IAAAC,sBAAA,EAAgBR,MAA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1C;IACA,MAAM;MAAEmE,MAAF;MAAUC,SAAV;MAAqBC,IAArB;MAA2BC,WAA3B;MAAwCC;IAAxC,IACJ,IAAAC,+BAAA,EAAqB,KAAK9D,IAA1B,EAAgC,KAAKV,KAArC,CADF;IAEA,OAAO,KAAKU,IAAL,CAAUR,MAAV,CAAiBoF,2BAAjB,CACLrB,KADK,EAELmB,MAFK,EAGLlB,GAHK,EAILmB,IAJK,EAKLlB,MALK,EAMLC,SANK,EAOLC,IAPK,EAQLC,WARK,EASLC,KATK,CAAP;EAWD;;AApB8F"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Shaders\";\nexport * from \"./MaskFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./ImageFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./BlendNode\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["ColorFilters.ts"],"sourcesContent":["import type { BlendMode, Color } from \"../../skia/types\";\n\nimport type { ChildrenProps, SkEnum } from \"./Common\";\n\nexport interface MatrixColorFilterProps extends ChildrenProps {\n matrix: number[];\n}\n\nexport interface BlendColorFilterProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n color: Color;\n}\n\nexport interface LerpColorFilterProps extends ChildrenProps {\n t: number;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["Common.ts"],"sourcesContent":["import type { ReactNode, RefObject } from \"react\";\n\nimport type {\n BlendMode,\n Color,\n PaintStyle,\n SkMatrix,\n SkPaint,\n SkPath,\n SkRect,\n SkRRect,\n StrokeCap,\n StrokeJoin,\n Transforms2d,\n Vector,\n} from \"../../skia/types\";\n\nimport type { DeclarationNode } from \"./Node\";\n\nexport type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;\n\nexport type PathDef = string | SkPath;\n\nexport type ClipDef = SkRRect | SkRect | PathDef;\n\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport type Radius = number | Vector;\n\nexport interface ChildrenProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport interface RectCtor {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface RRectCtor extends RectCtor {\n r: Radius;\n}\n\nexport type RectDef = RectCtor | { rect: SkRect };\nexport type RRectDef = RRectCtor | { rect: SkRRect };\n\nexport interface PointCircleDef {\n c: Vector;\n r: number;\n}\n\nexport interface ScalarCircleDef {\n cx: number;\n cy: number;\n r: number;\n}\n\nexport type CircleDef = PointCircleDef | ScalarCircleDef;\n\nexport interface TransformProps {\n transform?: Transforms2d;\n origin?: Vector;\n matrix?: SkMatrix;\n}\n\nexport interface PaintProps extends ChildrenProps {\n color?: Color;\n strokeWidth?: number;\n blendMode?: SkEnum<typeof BlendMode>;\n style?: SkEnum<typeof PaintStyle>;\n strokeJoin?: SkEnum<typeof StrokeJoin>;\n strokeCap?: SkEnum<typeof StrokeCap>;\n strokeMiter?: number;\n opacity?: number;\n antiAlias?: boolean;\n}\n\nexport interface GroupProps extends PaintProps, TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: RefObject<DeclarationNode<unknown, SkPaint>> | SkPaint | boolean;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["DrawingContext.ts"],"sourcesContent":["import type { SkCanvas, SkPaint } from \"../../skia/types\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n opacity: number;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type { RefObject } from \"react\";\n\nimport type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\nimport type { DrawingContext } from \"./DrawingContext\";\nimport type { DeclarationNode } from \"./Node\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint | RefObject<DeclarationNode<unknown, SkPaint>>;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit: Fit;\n image: SkImage;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface CustomDrawingNodeProps extends DrawingNodeProps {\n drawing: (ctx: DrawingContext) => void;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport type ImageSVGProps = RectDef & {\n svg: SkSVG;\n} & DrawingNodeProps;\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["ImageFilters.ts"],"sourcesContent":["import type {\n BlendMode,\n Color,\n ColorChannel,\n SkRuntimeEffect,\n TileMode,\n Uniforms,\n} from \"../../skia/types\";\n\nimport type { Radius, SkEnum, ChildrenProps } from \"./Common\";\n\nexport interface BlurImageFilterProps extends ChildrenProps {\n blur: Radius;\n mode: SkEnum<typeof TileMode>;\n}\n\nexport interface OffsetImageFilterProps extends ChildrenProps {\n x: number;\n y: number;\n}\n\nexport interface RuntimeShaderImageFilterProps extends ChildrenProps {\n source: SkRuntimeEffect;\n uniforms?: Uniforms;\n}\n\nexport interface BlendImageFilterProps extends ChildrenProps {\n mode: BlendMode;\n}\n\nexport interface MorphologyImageFilterProps extends ChildrenProps {\n operator: \"erode\" | \"dilate\";\n radius: Radius;\n}\n\nexport interface DropShadowImageFilterProps extends ChildrenProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nexport interface DisplacementMapImageFilterProps extends ChildrenProps {\n channelX: SkEnum<typeof ColorChannel>;\n channelY: SkEnum<typeof ColorChannel>;\n scale: number;\n}\n\nexport interface BlendProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["MaskFilters.ts"],"sourcesContent":["import type { BlurStyle } from \"../../skia/types\";\n\nimport type { SkEnum } from \"./Common\";\n\nexport interface BlurMaskFilterProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type {\n SkColorFilter,\n SkImageFilter,\n SkMaskFilter,\n SkPaint,\n SkPathEffect,\n SkShader,\n} from \"../../skia/types\";\n\nimport type { GroupProps } from \"./Common\";\nimport type { DrawingContext } from \"./DrawingContext\";\nimport type { DeclarationType, NodeType } from \"./NodeType\";\n\nexport interface Node<P> {\n type: NodeType;\n\n setProps(props: P): void;\n setProp<K extends keyof P>(name: K, v: P[K]): boolean;\n getProps(): P;\n\n children(): Node<unknown>[];\n addChild(child: Node<unknown>): void;\n removeChild(child: Node<unknown>): void;\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;\n}\n\nexport type Invalidate = () => void;\n\nexport interface DeclarationNode<P, T, Nullable extends null | never = never>\n extends Node<P> {\n declarationType: DeclarationType;\n materialize(): T | Nullable;\n\n setInvalidate(invalidate: Invalidate): void;\n\n isPaint(): this is DeclarationNode<unknown, SkPaint>;\n isImageFilter(): this is DeclarationNode<unknown, SkImageFilter>;\n isColorFilter(): this is DeclarationNode<unknown, SkColorFilter>;\n isShader(): this is DeclarationNode<unknown, SkShader>;\n isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter>;\n isPathEffect(): this is DeclarationNode<unknown, SkPathEffect>;\n}\n\nexport interface RenderNode<P extends GroupProps> extends Node<P> {\n render(ctx: DrawingContext): void;\n}\n"],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["NodeType","DeclarationType"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Drawing = \"skDrawing\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n}\n\nexport const enum DeclarationType {\n Paint,\n Shader,\n ImageFilter,\n ColorFilter,\n PathEffect,\n MaskFilter,\n Unknown,\n}\n"],"mappings":";;;;;;IAAkBA,Q;;;WAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;GAAAA,Q,wBAAAA,Q;;IAuEAC,e;;;WAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;GAAAA,e,+BAAAA,e"}
|