@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.
Files changed (703) hide show
  1. package/lib/commonjs/animation/decay/decay.js.map +1 -1
  2. package/lib/commonjs/animation/decay/index.js.map +1 -1
  3. package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
  4. package/lib/commonjs/animation/decay/types.js.map +1 -1
  5. package/lib/commonjs/animation/functions/index.js.map +1 -1
  6. package/lib/commonjs/animation/functions/interpolate.js.map +1 -1
  7. package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
  8. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
  9. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -1
  10. package/lib/commonjs/animation/index.js.map +1 -1
  11. package/lib/commonjs/animation/spring/Spring.js.map +1 -1
  12. package/lib/commonjs/animation/spring/functions/index.js.map +1 -1
  13. package/lib/commonjs/animation/spring/functions/spring.js.map +1 -1
  14. package/lib/commonjs/animation/spring/index.js.map +1 -1
  15. package/lib/commonjs/animation/spring/runSpring.js +1 -1
  16. package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
  17. package/lib/commonjs/animation/spring/types.js.map +1 -1
  18. package/lib/commonjs/animation/spring/useSpring.js +1 -1
  19. package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
  20. package/lib/commonjs/animation/timing/Easing.js.map +1 -1
  21. package/lib/commonjs/animation/timing/createTiming.js +2 -6
  22. package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
  23. package/lib/commonjs/animation/timing/functions/bezier.js.map +1 -1
  24. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +6 -10
  25. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +1 -1
  26. package/lib/commonjs/animation/timing/functions/index.js.map +1 -1
  27. package/lib/commonjs/animation/timing/functions/timing.js.map +1 -1
  28. package/lib/commonjs/animation/timing/functions/types.js.map +1 -1
  29. package/lib/commonjs/animation/timing/index.js.map +1 -1
  30. package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
  31. package/lib/commonjs/animation/timing/useLoop.js.map +1 -1
  32. package/lib/commonjs/animation/timing/useTiming.js +1 -3
  33. package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
  34. package/lib/commonjs/animation/types.js.map +1 -1
  35. package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
  36. package/lib/commonjs/dom/nodes/GroupNode.js.map +1 -1
  37. package/lib/commonjs/dom/nodes/JsiSkDOM.js +1 -1
  38. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  39. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  40. package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
  41. package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
  42. package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
  43. package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
  44. package/lib/commonjs/dom/nodes/datatypes/Color.js.map +1 -1
  45. package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -1
  46. package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
  47. package/lib/commonjs/dom/nodes/datatypes/Gradient.js +2 -2
  48. package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
  49. package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -1
  50. package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -1
  51. package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
  52. package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -1
  53. package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
  54. package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
  55. package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
  56. package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -1
  57. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
  58. package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js.map +1 -1
  59. package/lib/commonjs/dom/nodes/drawings/FillNode.js.map +1 -1
  60. package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
  61. package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -1
  62. package/lib/commonjs/dom/nodes/drawings/LineNode.js.map +1 -1
  63. package/lib/commonjs/dom/nodes/drawings/OvalNode.js.map +1 -1
  64. package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
  65. package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -1
  66. package/lib/commonjs/dom/nodes/drawings/PictureNode.js.map +1 -1
  67. package/lib/commonjs/dom/nodes/drawings/PointsNode.js.map +1 -1
  68. package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
  69. package/lib/commonjs/dom/nodes/drawings/RectNode.js.map +1 -1
  70. package/lib/commonjs/dom/nodes/drawings/Text.js.map +1 -1
  71. package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
  72. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  73. package/lib/commonjs/dom/nodes/index.js.map +1 -1
  74. package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
  75. package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
  76. package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
  77. package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
  78. package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
  79. package/lib/commonjs/dom/nodes/paint/Shaders.js +2 -4
  80. package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
  81. package/lib/commonjs/dom/nodes/paint/index.js.map +1 -1
  82. package/lib/commonjs/dom/types/ColorFilters.js.map +1 -1
  83. package/lib/commonjs/dom/types/Common.js.map +1 -1
  84. package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
  85. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  86. package/lib/commonjs/dom/types/ImageFilters.js.map +1 -1
  87. package/lib/commonjs/dom/types/MaskFilters.js.map +1 -1
  88. package/lib/commonjs/dom/types/Node.js.map +1 -1
  89. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  90. package/lib/commonjs/dom/types/PathEffects.js.map +1 -1
  91. package/lib/commonjs/dom/types/Shaders.js.map +1 -1
  92. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  93. package/lib/commonjs/dom/types/index.js.map +1 -1
  94. package/lib/commonjs/external/index.js.map +1 -1
  95. package/lib/commonjs/external/reanimated/index.js.map +1 -1
  96. package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -1
  97. package/lib/commonjs/index.js.map +1 -1
  98. package/lib/commonjs/mock/index.js +7 -10
  99. package/lib/commonjs/mock/index.js.map +1 -1
  100. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  101. package/lib/commonjs/renderer/Container.js.map +1 -1
  102. package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
  103. package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
  104. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  105. package/lib/commonjs/renderer/HostConfig.js +0 -2
  106. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  107. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  108. package/lib/commonjs/renderer/components/Drawing.js.map +1 -1
  109. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  110. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  111. package/lib/commonjs/renderer/components/Paint.js +1 -1
  112. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  113. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  114. package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +1 -1
  115. package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -1
  116. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  117. package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -1
  118. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  119. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  120. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  121. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  122. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  123. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  124. package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -1
  125. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  126. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  127. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  128. package/lib/commonjs/renderer/components/image/index.js.map +1 -1
  129. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  130. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  131. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  132. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  133. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  134. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  135. package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -1
  136. package/lib/commonjs/renderer/components/index.js.map +1 -1
  137. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  138. package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -1
  139. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  140. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  141. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  142. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  143. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  144. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  145. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  146. package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -1
  147. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  148. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  149. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  150. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  151. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  152. package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -1
  153. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  154. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  155. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  156. package/lib/commonjs/renderer/components/shaders/index.js.map +1 -1
  157. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  158. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  159. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  160. package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -1
  161. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  162. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  163. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  164. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  165. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  166. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  167. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  168. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  169. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  170. package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
  171. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  172. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  173. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  174. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  175. package/lib/commonjs/renderer/components/text/index.js.map +1 -1
  176. package/lib/commonjs/renderer/index.js.map +1 -1
  177. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  178. package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -1
  179. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  180. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  181. package/lib/commonjs/renderer/processors/math/Math.js.map +1 -1
  182. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  183. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  184. package/lib/commonjs/renderer/typeddash.js.map +1 -1
  185. package/lib/commonjs/renderer/useCanvas.js.map +1 -1
  186. package/lib/commonjs/renderer/useContextBridge.js.map +1 -1
  187. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  188. package/lib/commonjs/skia/Skia.js.map +1 -1
  189. package/lib/commonjs/skia/Skia.web.js.map +1 -1
  190. package/lib/commonjs/skia/core/Data.js.map +1 -1
  191. package/lib/commonjs/skia/core/Font.js.map +1 -1
  192. package/lib/commonjs/skia/core/Image.js.map +1 -1
  193. package/lib/commonjs/skia/core/Matrix.js.map +1 -1
  194. package/lib/commonjs/skia/core/Picture.js +20 -2
  195. package/lib/commonjs/skia/core/Picture.js.map +1 -1
  196. package/lib/commonjs/skia/core/RRect.js.map +1 -1
  197. package/lib/commonjs/skia/core/Rect.js.map +1 -1
  198. package/lib/commonjs/skia/core/SVG.js.map +1 -1
  199. package/lib/commonjs/skia/core/Typeface.js.map +1 -1
  200. package/lib/commonjs/skia/core/Vector.js +1 -1
  201. package/lib/commonjs/skia/core/Vector.js.map +1 -1
  202. package/lib/commonjs/skia/core/index.js.map +1 -1
  203. package/lib/commonjs/skia/index.js.map +1 -1
  204. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  205. package/lib/commonjs/skia/types/Color.js.map +1 -1
  206. package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -1
  207. package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
  208. package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -1
  209. package/lib/commonjs/skia/types/ContourMeasure.js.map +1 -1
  210. package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
  211. package/lib/commonjs/skia/types/Data/DataFactory.js.map +1 -1
  212. package/lib/commonjs/skia/types/Data/index.js.map +1 -1
  213. package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
  214. package/lib/commonjs/skia/types/Font/index.js.map +1 -1
  215. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  216. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  217. package/lib/commonjs/skia/types/Image/index.js.map +1 -1
  218. package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -1
  219. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  220. package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -1
  221. package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
  222. package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
  223. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  224. package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -1
  225. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  226. package/lib/commonjs/skia/types/Paint/index.js.map +1 -1
  227. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  228. package/lib/commonjs/skia/types/Path/PathFactory.js.map +1 -1
  229. package/lib/commonjs/skia/types/Path/index.js.map +1 -1
  230. package/lib/commonjs/skia/types/PathEffect.js.map +1 -1
  231. package/lib/commonjs/skia/types/Picture/Picture.js.map +1 -1
  232. package/lib/commonjs/skia/types/Picture/PictureFactory.js.map +1 -1
  233. package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -1
  234. package/lib/commonjs/skia/types/Picture/index.js.map +1 -1
  235. package/lib/commonjs/skia/types/Point.js.map +1 -1
  236. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  237. package/lib/commonjs/skia/types/RSXform.js.map +1 -1
  238. package/lib/commonjs/skia/types/Rect.js.map +1 -1
  239. package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  240. package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
  241. package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -1
  242. package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
  243. package/lib/commonjs/skia/types/SVG/SVGFactory.js.map +1 -1
  244. package/lib/commonjs/skia/types/SVG/index.js.map +1 -1
  245. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  246. package/lib/commonjs/skia/types/Shader/ShaderFactory.js.map +1 -1
  247. package/lib/commonjs/skia/types/Shader/index.js.map +1 -1
  248. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  249. package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
  250. package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
  251. package/lib/commonjs/skia/types/Surface/index.js.map +1 -1
  252. package/lib/commonjs/skia/types/TextBlob.js.map +1 -1
  253. package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
  254. package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js.map +1 -1
  255. package/lib/commonjs/skia/types/Typeface/index.js.map +1 -1
  256. package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -1
  257. package/lib/commonjs/skia/types/Vertices/index.js.map +1 -1
  258. package/lib/commonjs/skia/types/index.js.map +1 -1
  259. package/lib/commonjs/skia/web/Host.js +1 -1
  260. package/lib/commonjs/skia/web/Host.js.map +1 -1
  261. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  262. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -1
  263. package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
  264. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
  265. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
  266. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  267. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
  268. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -1
  269. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
  270. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
  271. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
  272. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
  273. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  274. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
  275. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
  276. package/lib/commonjs/skia/web/JsiSkMatrix.js +1 -1
  277. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  278. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  279. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  280. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
  281. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
  282. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
  283. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
  284. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -1
  285. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
  286. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
  287. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  288. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
  289. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
  290. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  291. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  292. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -1
  293. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
  294. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
  295. package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
  296. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  297. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
  298. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  299. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
  300. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -1
  301. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
  302. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
  303. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  304. package/lib/commonjs/skia/web/index.js.map +1 -1
  305. package/lib/commonjs/values/api.js.map +1 -1
  306. package/lib/commonjs/values/api.web.js.map +1 -1
  307. package/lib/commonjs/values/hooks/index.js.map +1 -1
  308. package/lib/commonjs/values/hooks/useClockValue.js.map +1 -1
  309. package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
  310. package/lib/commonjs/values/hooks/useValue.js.map +1 -1
  311. package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
  312. package/lib/commonjs/values/index.js.map +1 -1
  313. package/lib/commonjs/values/selector.js.map +1 -1
  314. package/lib/commonjs/values/types.js.map +1 -1
  315. package/lib/commonjs/values/web/RNSkAnimation.js +2 -2
  316. package/lib/commonjs/values/web/RNSkAnimation.js.map +1 -1
  317. package/lib/commonjs/values/web/RNSkClockValue.js.map +1 -1
  318. package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
  319. package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
  320. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
  321. package/lib/commonjs/values/web/RNSkValue.js.map +1 -1
  322. package/lib/commonjs/values/web/api.js.map +1 -1
  323. package/lib/commonjs/values/web/index.js.map +1 -1
  324. package/lib/commonjs/views/SkiaView.js +1 -1
  325. package/lib/commonjs/views/SkiaView.js.map +1 -1
  326. package/lib/commonjs/views/SkiaView.web.js +2 -4
  327. package/lib/commonjs/views/SkiaView.web.js.map +1 -1
  328. package/lib/commonjs/views/api.js.map +1 -1
  329. package/lib/commonjs/views/index.js.map +1 -1
  330. package/lib/commonjs/views/types.js.map +1 -1
  331. package/lib/commonjs/views/useDrawCallback.js.map +1 -1
  332. package/lib/commonjs/views/useTouchHandler.js +6 -6
  333. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  334. package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
  335. package/lib/commonjs/web/WithSkiaWeb.js +1 -1
  336. package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
  337. package/lib/commonjs/web/index.js.map +1 -1
  338. package/lib/module/animation/decay/decay.js.map +1 -1
  339. package/lib/module/animation/decay/index.js.map +1 -1
  340. package/lib/module/animation/decay/runDecay.js.map +1 -1
  341. package/lib/module/animation/decay/types.js.map +1 -1
  342. package/lib/module/animation/functions/index.js.map +1 -1
  343. package/lib/module/animation/functions/interpolate.js.map +1 -1
  344. package/lib/module/animation/functions/interpolateColors.js.map +1 -1
  345. package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
  346. package/lib/module/animation/functions/interpolateVector.js.map +1 -1
  347. package/lib/module/animation/index.js.map +1 -1
  348. package/lib/module/animation/spring/Spring.js.map +1 -1
  349. package/lib/module/animation/spring/functions/index.js.map +1 -1
  350. package/lib/module/animation/spring/functions/spring.js.map +1 -1
  351. package/lib/module/animation/spring/index.js.map +1 -1
  352. package/lib/module/animation/spring/runSpring.js +1 -1
  353. package/lib/module/animation/spring/runSpring.js.map +1 -1
  354. package/lib/module/animation/spring/types.js.map +1 -1
  355. package/lib/module/animation/spring/useSpring.js +1 -1
  356. package/lib/module/animation/spring/useSpring.js.map +1 -1
  357. package/lib/module/animation/timing/Easing.js.map +1 -1
  358. package/lib/module/animation/timing/createTiming.js +2 -6
  359. package/lib/module/animation/timing/createTiming.js.map +1 -1
  360. package/lib/module/animation/timing/functions/bezier.js.map +1 -1
  361. package/lib/module/animation/timing/functions/getResolvedParams.js +6 -10
  362. package/lib/module/animation/timing/functions/getResolvedParams.js.map +1 -1
  363. package/lib/module/animation/timing/functions/index.js.map +1 -1
  364. package/lib/module/animation/timing/functions/timing.js.map +1 -1
  365. package/lib/module/animation/timing/functions/types.js.map +1 -1
  366. package/lib/module/animation/timing/index.js.map +1 -1
  367. package/lib/module/animation/timing/runTiming.js.map +1 -1
  368. package/lib/module/animation/timing/useLoop.js.map +1 -1
  369. package/lib/module/animation/timing/useTiming.js +1 -3
  370. package/lib/module/animation/timing/useTiming.js.map +1 -1
  371. package/lib/module/animation/types.js.map +1 -1
  372. package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
  373. package/lib/module/dom/nodes/GroupNode.js.map +1 -1
  374. package/lib/module/dom/nodes/JsiSkDOM.js +1 -1
  375. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  376. package/lib/module/dom/nodes/Node.js.map +1 -1
  377. package/lib/module/dom/nodes/PaintContext.js.map +1 -1
  378. package/lib/module/dom/nodes/PaintNode.js.map +1 -1
  379. package/lib/module/dom/nodes/RenderNode.js.map +1 -1
  380. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  381. package/lib/module/dom/nodes/datatypes/Color.js.map +1 -1
  382. package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -1
  383. package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
  384. package/lib/module/dom/nodes/datatypes/Gradient.js +2 -2
  385. package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
  386. package/lib/module/dom/nodes/datatypes/Path.js.map +1 -1
  387. package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -1
  388. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  389. package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -1
  390. package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
  391. package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
  392. package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
  393. package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -1
  394. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +1 -1
  395. package/lib/module/dom/nodes/drawings/DiffRectNode.js.map +1 -1
  396. package/lib/module/dom/nodes/drawings/FillNode.js.map +1 -1
  397. package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
  398. package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -1
  399. package/lib/module/dom/nodes/drawings/LineNode.js.map +1 -1
  400. package/lib/module/dom/nodes/drawings/OvalNode.js.map +1 -1
  401. package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
  402. package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -1
  403. package/lib/module/dom/nodes/drawings/PictureNode.js.map +1 -1
  404. package/lib/module/dom/nodes/drawings/PointsNode.js.map +1 -1
  405. package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
  406. package/lib/module/dom/nodes/drawings/RectNode.js.map +1 -1
  407. package/lib/module/dom/nodes/drawings/Text.js.map +1 -1
  408. package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
  409. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  410. package/lib/module/dom/nodes/index.js.map +1 -1
  411. package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
  412. package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
  413. package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
  414. package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
  415. package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
  416. package/lib/module/dom/nodes/paint/Shaders.js +2 -4
  417. package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
  418. package/lib/module/dom/nodes/paint/index.js.map +1 -1
  419. package/lib/module/dom/types/ColorFilters.js.map +1 -1
  420. package/lib/module/dom/types/Common.js.map +1 -1
  421. package/lib/module/dom/types/DrawingContext.js.map +1 -1
  422. package/lib/module/dom/types/Drawings.js.map +1 -1
  423. package/lib/module/dom/types/ImageFilters.js.map +1 -1
  424. package/lib/module/dom/types/MaskFilters.js.map +1 -1
  425. package/lib/module/dom/types/Node.js.map +1 -1
  426. package/lib/module/dom/types/NodeType.js.map +1 -1
  427. package/lib/module/dom/types/PathEffects.js.map +1 -1
  428. package/lib/module/dom/types/Shaders.js.map +1 -1
  429. package/lib/module/dom/types/SkDOM.js.map +1 -1
  430. package/lib/module/dom/types/index.js.map +1 -1
  431. package/lib/module/external/index.js.map +1 -1
  432. package/lib/module/external/reanimated/index.js.map +1 -1
  433. package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -1
  434. package/lib/module/index.js.map +1 -1
  435. package/lib/module/mock/index.js +7 -10
  436. package/lib/module/mock/index.js.map +1 -1
  437. package/lib/module/renderer/Canvas.js.map +1 -1
  438. package/lib/module/renderer/Container.js.map +1 -1
  439. package/lib/module/renderer/DependencyManager.js.map +1 -1
  440. package/lib/module/renderer/DrawingContext.js.map +1 -1
  441. package/lib/module/renderer/HostComponents.js.map +1 -1
  442. package/lib/module/renderer/HostConfig.js +0 -2
  443. package/lib/module/renderer/HostConfig.js.map +1 -1
  444. package/lib/module/renderer/components/Blend.js.map +1 -1
  445. package/lib/module/renderer/components/Drawing.js.map +1 -1
  446. package/lib/module/renderer/components/Group.js.map +1 -1
  447. package/lib/module/renderer/components/Mask.js.map +1 -1
  448. package/lib/module/renderer/components/Paint.js +1 -1
  449. package/lib/module/renderer/components/Paint.js.map +1 -1
  450. package/lib/module/renderer/components/Picture.js.map +1 -1
  451. package/lib/module/renderer/components/backdrop/BackdropBlur.js +1 -1
  452. package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -1
  453. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  454. package/lib/module/renderer/components/backdrop/index.js.map +1 -1
  455. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  456. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  457. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  458. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  459. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  460. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  461. package/lib/module/renderer/components/colorFilters/index.js.map +1 -1
  462. package/lib/module/renderer/components/image/Image.js.map +1 -1
  463. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  464. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  465. package/lib/module/renderer/components/image/index.js.map +1 -1
  466. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  467. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  468. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  469. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  470. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  471. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  472. package/lib/module/renderer/components/imageFilters/index.js.map +1 -1
  473. package/lib/module/renderer/components/index.js.map +1 -1
  474. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  475. package/lib/module/renderer/components/maskFilters/index.js.map +1 -1
  476. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  477. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  478. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  479. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  480. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  481. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  482. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  483. package/lib/module/renderer/components/pathEffects/index.js.map +1 -1
  484. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  485. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  486. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  487. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  488. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  489. package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -1
  490. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  491. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  492. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  493. package/lib/module/renderer/components/shaders/index.js.map +1 -1
  494. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  495. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  496. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  497. package/lib/module/renderer/components/shapes/Fill.js.map +1 -1
  498. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  499. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  500. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  501. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  502. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  503. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  504. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  505. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  506. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  507. package/lib/module/renderer/components/shapes/index.js.map +1 -1
  508. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  509. package/lib/module/renderer/components/text/Text.js.map +1 -1
  510. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  511. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  512. package/lib/module/renderer/components/text/index.js.map +1 -1
  513. package/lib/module/renderer/index.js.map +1 -1
  514. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  515. package/lib/module/renderer/processors/Animations/index.js.map +1 -1
  516. package/lib/module/renderer/processors/index.js.map +1 -1
  517. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  518. package/lib/module/renderer/processors/math/Math.js.map +1 -1
  519. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  520. package/lib/module/renderer/processors/math/index.js.map +1 -1
  521. package/lib/module/renderer/typeddash.js.map +1 -1
  522. package/lib/module/renderer/useCanvas.js.map +1 -1
  523. package/lib/module/renderer/useContextBridge.js.map +1 -1
  524. package/lib/module/skia/NativeSetup.js.map +1 -1
  525. package/lib/module/skia/Skia.js.map +1 -1
  526. package/lib/module/skia/Skia.web.js.map +1 -1
  527. package/lib/module/skia/core/Data.js.map +1 -1
  528. package/lib/module/skia/core/Font.js.map +1 -1
  529. package/lib/module/skia/core/Image.js.map +1 -1
  530. package/lib/module/skia/core/Matrix.js.map +1 -1
  531. package/lib/module/skia/core/Picture.js +15 -1
  532. package/lib/module/skia/core/Picture.js.map +1 -1
  533. package/lib/module/skia/core/RRect.js.map +1 -1
  534. package/lib/module/skia/core/Rect.js.map +1 -1
  535. package/lib/module/skia/core/SVG.js.map +1 -1
  536. package/lib/module/skia/core/Typeface.js.map +1 -1
  537. package/lib/module/skia/core/Vector.js +1 -1
  538. package/lib/module/skia/core/Vector.js.map +1 -1
  539. package/lib/module/skia/core/index.js.map +1 -1
  540. package/lib/module/skia/index.js.map +1 -1
  541. package/lib/module/skia/types/Canvas.js.map +1 -1
  542. package/lib/module/skia/types/Color.js.map +1 -1
  543. package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -1
  544. package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -1
  545. package/lib/module/skia/types/ColorFilter/index.js.map +1 -1
  546. package/lib/module/skia/types/ContourMeasure.js.map +1 -1
  547. package/lib/module/skia/types/Data/Data.js.map +1 -1
  548. package/lib/module/skia/types/Data/DataFactory.js.map +1 -1
  549. package/lib/module/skia/types/Data/index.js.map +1 -1
  550. package/lib/module/skia/types/Font/Font.js.map +1 -1
  551. package/lib/module/skia/types/Font/index.js.map +1 -1
  552. package/lib/module/skia/types/Image/Image.js.map +1 -1
  553. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  554. package/lib/module/skia/types/Image/index.js.map +1 -1
  555. package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -1
  556. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  557. package/lib/module/skia/types/ImageFilter/index.js.map +1 -1
  558. package/lib/module/skia/types/JsiInstance.js.map +1 -1
  559. package/lib/module/skia/types/MaskFilter.js.map +1 -1
  560. package/lib/module/skia/types/Matrix.js.map +1 -1
  561. package/lib/module/skia/types/Paint/BlendMode.js.map +1 -1
  562. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  563. package/lib/module/skia/types/Paint/index.js.map +1 -1
  564. package/lib/module/skia/types/Path/Path.js.map +1 -1
  565. package/lib/module/skia/types/Path/PathFactory.js.map +1 -1
  566. package/lib/module/skia/types/Path/index.js.map +1 -1
  567. package/lib/module/skia/types/PathEffect.js.map +1 -1
  568. package/lib/module/skia/types/Picture/Picture.js.map +1 -1
  569. package/lib/module/skia/types/Picture/PictureFactory.js.map +1 -1
  570. package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -1
  571. package/lib/module/skia/types/Picture/index.js.map +1 -1
  572. package/lib/module/skia/types/Point.js.map +1 -1
  573. package/lib/module/skia/types/RRect.js.map +1 -1
  574. package/lib/module/skia/types/RSXform.js.map +1 -1
  575. package/lib/module/skia/types/Rect.js.map +1 -1
  576. package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  577. package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -1
  578. package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -1
  579. package/lib/module/skia/types/SVG/SVG.js.map +1 -1
  580. package/lib/module/skia/types/SVG/SVGFactory.js.map +1 -1
  581. package/lib/module/skia/types/SVG/index.js.map +1 -1
  582. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  583. package/lib/module/skia/types/Shader/ShaderFactory.js.map +1 -1
  584. package/lib/module/skia/types/Shader/index.js.map +1 -1
  585. package/lib/module/skia/types/Skia.js.map +1 -1
  586. package/lib/module/skia/types/Surface/Surface.js.map +1 -1
  587. package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
  588. package/lib/module/skia/types/Surface/index.js.map +1 -1
  589. package/lib/module/skia/types/TextBlob.js.map +1 -1
  590. package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
  591. package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -1
  592. package/lib/module/skia/types/Typeface/index.js.map +1 -1
  593. package/lib/module/skia/types/Vertices/Vertices.js.map +1 -1
  594. package/lib/module/skia/types/Vertices/index.js.map +1 -1
  595. package/lib/module/skia/types/index.js.map +1 -1
  596. package/lib/module/skia/web/Host.js +1 -1
  597. package/lib/module/skia/web/Host.js.map +1 -1
  598. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  599. package/lib/module/skia/web/JsiSkColor.js.map +1 -1
  600. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  601. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
  602. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  603. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  604. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  605. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -1
  606. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  607. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  608. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
  609. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  610. package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  611. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  612. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
  613. package/lib/module/skia/web/JsiSkMatrix.js +1 -1
  614. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  615. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  616. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  617. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  618. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
  619. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
  620. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  621. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -1
  622. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  623. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  624. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  625. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  626. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  627. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  628. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  629. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -1
  630. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  631. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
  632. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  633. package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  634. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  635. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  636. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  637. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -1
  638. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  639. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
  640. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  641. package/lib/module/skia/web/index.js.map +1 -1
  642. package/lib/module/values/api.js.map +1 -1
  643. package/lib/module/values/api.web.js.map +1 -1
  644. package/lib/module/values/hooks/index.js.map +1 -1
  645. package/lib/module/values/hooks/useClockValue.js.map +1 -1
  646. package/lib/module/values/hooks/useComputedValue.js.map +1 -1
  647. package/lib/module/values/hooks/useValue.js.map +1 -1
  648. package/lib/module/values/hooks/useValueEffect.js.map +1 -1
  649. package/lib/module/values/index.js.map +1 -1
  650. package/lib/module/values/selector.js.map +1 -1
  651. package/lib/module/values/types.js.map +1 -1
  652. package/lib/module/values/web/RNSkAnimation.js +2 -2
  653. package/lib/module/values/web/RNSkAnimation.js.map +1 -1
  654. package/lib/module/values/web/RNSkClockValue.js.map +1 -1
  655. package/lib/module/values/web/RNSkComputedValue.js +1 -1
  656. package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
  657. package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
  658. package/lib/module/values/web/RNSkValue.js.map +1 -1
  659. package/lib/module/values/web/api.js.map +1 -1
  660. package/lib/module/values/web/index.js.map +1 -1
  661. package/lib/module/views/SkiaView.js +1 -1
  662. package/lib/module/views/SkiaView.js.map +1 -1
  663. package/lib/module/views/SkiaView.web.js +2 -4
  664. package/lib/module/views/SkiaView.web.js.map +1 -1
  665. package/lib/module/views/api.js.map +1 -1
  666. package/lib/module/views/index.js.map +1 -1
  667. package/lib/module/views/types.js.map +1 -1
  668. package/lib/module/views/useDrawCallback.js.map +1 -1
  669. package/lib/module/views/useTouchHandler.js +6 -6
  670. package/lib/module/views/useTouchHandler.js.map +1 -1
  671. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  672. package/lib/module/web/WithSkiaWeb.js +1 -1
  673. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  674. package/lib/module/web/index.js.map +1 -1
  675. package/lib/typescript/src/animation/decay/runDecay.d.ts +1 -1
  676. package/lib/typescript/src/animation/spring/runSpring.d.ts +1 -1
  677. package/lib/typescript/src/animation/spring/useSpring.d.ts +1 -1
  678. package/lib/typescript/src/animation/timing/createTiming.d.ts +1 -1
  679. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +1 -1
  680. package/lib/typescript/src/animation/timing/runTiming.d.ts +1 -1
  681. package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
  682. package/lib/typescript/src/animation/timing/useTiming.d.ts +1 -1
  683. package/lib/typescript/src/mock/index.d.ts +1 -1
  684. package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
  685. package/lib/typescript/src/renderer/HostConfig.d.ts +1 -1
  686. package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
  687. package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +1 -1
  688. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +4 -4
  689. package/lib/typescript/src/renderer/typeddash.d.ts +2 -2
  690. package/lib/typescript/src/skia/core/Font.d.ts +1 -1
  691. package/lib/typescript/src/skia/core/Picture.d.ts +9 -2
  692. package/lib/typescript/src/skia/core/Vector.d.ts +2 -2
  693. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
  694. package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +2 -2
  695. package/lib/typescript/src/web/LoadSkiaWeb.d.ts +2 -2
  696. package/package.json +6 -6
  697. package/src/mock/index.ts +1 -0
  698. package/src/renderer/HostConfig.ts +3 -4
  699. package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
  700. package/src/renderer/processors/Animations/Animations.ts +11 -4
  701. package/src/renderer/typeddash.ts +3 -2
  702. package/src/skia/core/Picture.ts +17 -3
  703. package/src/values/web/RNSkComputedValue.ts +6 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["Circle.ts"],"names":["isCircleScalarDef","def","cx","undefined","processCircle","Skia","c","Point","cy","r"],"mappings":"AAGA,OAAO,MAAMA,iBAAiB,GAAIC,GAAD,IAC/B;AACA;AACCA,GAAD,CAAaC,EAAb,KAAoBC,SAHf;AAKP,OAAO,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAaJ,GAAb,KAAgC;AAC3D,MAAID,iBAAiB,CAACC,GAAD,CAArB,EAA4B;AAC1B,WAAO;AAAEK,MAAAA,CAAC,EAAED,IAAI,CAACE,KAAL,CAAWN,GAAG,CAACC,EAAf,EAAmBD,GAAG,CAACO,EAAvB,CAAL;AAAiCC,MAAAA,CAAC,EAAER,GAAG,CAACQ;AAAxC,KAAP;AACD;;AACD,SAAOR,GAAP;AACD,CALM","sourcesContent":["import type { Skia } from \"../../../skia/types\";\nimport type { CircleDef, ScalarCircleDef } from \"../../types\";\n\nexport const isCircleScalarDef = (def: CircleDef): def is ScalarCircleDef =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (def as any).cx !== undefined;\n\nexport const processCircle = (Skia: Skia, def: CircleDef) => {\n if (isCircleScalarDef(def)) {\n return { c: Skia.Point(def.cx, def.cy), r: def.r };\n }\n return def;\n};\n"]}
1
+ {"version":3,"names":["isCircleScalarDef","def","cx","undefined","processCircle","Skia","c","Point","cy","r"],"sources":["Circle.ts"],"sourcesContent":["import type { Skia } from \"../../../skia/types\";\nimport type { CircleDef, ScalarCircleDef } from \"../../types\";\n\nexport const isCircleScalarDef = (def: CircleDef): def is ScalarCircleDef =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (def as any).cx !== undefined;\n\nexport const processCircle = (Skia: Skia, def: CircleDef) => {\n if (isCircleScalarDef(def)) {\n return { c: Skia.Point(def.cx, def.cy), r: def.r };\n }\n return def;\n};\n"],"mappings":"AAGA,OAAO,MAAMA,iBAAiB,GAAIC,GAAD,IAC/B;AACA;AACCA,GAAD,CAAaC,EAAb,KAAoBC,SAHf;AAKP,OAAO,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAaJ,GAAb,KAAgC;EAC3D,IAAID,iBAAiB,CAACC,GAAD,CAArB,EAA4B;IAC1B,OAAO;MAAEK,CAAC,EAAED,IAAI,CAACE,KAAL,CAAWN,GAAG,CAACC,EAAf,EAAmBD,GAAG,CAACO,EAAvB,CAAL;MAAiCC,CAAC,EAAER,GAAG,CAACQ;IAAxC,CAAP;EACD;;EACD,OAAOR,GAAP;AACD,CALM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Color.ts"],"names":["RED","GREEN","BLUE","ALPHA","rgbaColor","r","g","b","a","Float32Array","processColor","Skia","cl","currentOpacity","color","Color"],"mappings":"AAEA,OAAO,MAAMA,GAAG,GAAG,CAAZ;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AACP,OAAO,MAAMC,IAAI,GAAG,CAAb;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AAEP,OAAO,MAAMC,SAAS,GAAG,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,CAAvB,EAAkCC,CAAlC,KACvB,IAAIC,YAAJ,CAAiB,CAACJ,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CADK;AAGP,OAAO,MAAME,YAAY,GAAG,CAACC,IAAD,EAAaC,EAAb,EAAwBC,cAAxB,KAAmD;AAC7E,QAAMC,KAAK,GAAGH,IAAI,CAACI,KAAL,CAAWH,EAAX,CAAd;AACAE,EAAAA,KAAK,CAACX,KAAD,CAAL,IAAgBU,cAAhB;AACA,SAAOC,KAAP;AACD,CAJM","sourcesContent":["import type { Color, Skia } from \"../../../skia/types\";\n\nexport const RED = 0;\nexport const GREEN = 1;\nexport const BLUE = 2;\nexport const ALPHA = 3;\n\nexport const rgbaColor = (r: number, g: number, b: number, a: number) =>\n new Float32Array([r, g, b, a]);\n\nexport const processColor = (Skia: Skia, cl: Color, currentOpacity: number) => {\n const color = Skia.Color(cl);\n color[ALPHA] *= currentOpacity;\n return color;\n};\n"]}
1
+ {"version":3,"names":["RED","GREEN","BLUE","ALPHA","rgbaColor","r","g","b","a","Float32Array","processColor","Skia","cl","currentOpacity","color","Color"],"sources":["Color.ts"],"sourcesContent":["import type { Color, Skia } from \"../../../skia/types\";\n\nexport const RED = 0;\nexport const GREEN = 1;\nexport const BLUE = 2;\nexport const ALPHA = 3;\n\nexport const rgbaColor = (r: number, g: number, b: number, a: number) =>\n new Float32Array([r, g, b, a]);\n\nexport const processColor = (Skia: Skia, cl: Color, currentOpacity: number) => {\n const color = Skia.Color(cl);\n color[ALPHA] *= currentOpacity;\n return color;\n};\n"],"mappings":"AAEA,OAAO,MAAMA,GAAG,GAAG,CAAZ;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AACP,OAAO,MAAMC,IAAI,GAAG,CAAb;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AAEP,OAAO,MAAMC,SAAS,GAAG,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,CAAvB,EAAkCC,CAAlC,KACvB,IAAIC,YAAJ,CAAiB,CAACJ,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CADK;AAGP,OAAO,MAAME,YAAY,GAAG,CAACC,IAAD,EAAaC,EAAb,EAAwBC,cAAxB,KAAmD;EAC7E,MAAMC,KAAK,GAAGH,IAAI,CAACI,KAAL,CAAWH,EAAX,CAAd;EACAE,KAAK,CAACX,KAAD,CAAL,IAAgBU,cAAhB;EACA,OAAOC,KAAP;AACD,CAJM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Enum.ts"],"names":["enumKey","k","charAt","toUpperCase","slice"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAsBC,CAAnB,IACpBA,CAAC,CAACC,MAAF,CAAS,CAAT,EAAYC,WAAZ,KAA4BF,CAAC,CAACG,KAAF,CAAQ,CAAR,CADxB","sourcesContent":["export const enumKey = <K extends string>(k: K) =>\n (k.charAt(0).toUpperCase() + k.slice(1)) as Capitalize<K>;\n"]}
1
+ {"version":3,"names":["enumKey","k","charAt","toUpperCase","slice"],"sources":["Enum.ts"],"sourcesContent":["export const enumKey = <K extends string>(k: K) =>\n (k.charAt(0).toUpperCase() + k.slice(1)) as Capitalize<K>;\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAsBC,CAAnB,IACpBA,CAAC,CAACC,MAAF,CAAS,CAAT,EAAYC,WAAZ,KAA4BF,CAAC,CAACG,KAAF,CAAQ,CAAR,CADxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Fitting.ts"],"names":["exhaustiveCheck","size","width","height","rect2rect","src","dst","scaleX","scaleY","translateX","x","translateY","y","fitRects","fit","rect","sizes","applyBoxFit","inscribe","halfWidthDelta","halfHeightDelta","input","output","Math","min","aspectRatio"],"mappings":"AAAA,SAASA,eAAT,QAAgC,6BAAhC;AASA,OAAO,MAAMC,IAAI,GAAG;AAAA,MAACC,KAAD,uEAAS,CAAT;AAAA,MAAYC,MAAZ,uEAAqB,CAArB;AAAA,SAA4B;AAAED,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAA5B;AAAA,CAAb;AAEP,OAAO,MAAMC,SAAS,GAAG,CAACC,GAAD,EAAcC,GAAd,KAA8B;AACrD,QAAMC,MAAM,GAAGD,GAAG,CAACJ,KAAJ,GAAYG,GAAG,CAACH,KAA/B;AACA,QAAMM,MAAM,GAAGF,GAAG,CAACH,MAAJ,GAAaE,GAAG,CAACF,MAAhC;AACA,QAAMM,UAAU,GAAGH,GAAG,CAACI,CAAJ,GAAQL,GAAG,CAACK,CAAJ,GAAQH,MAAnC;AACA,QAAMI,UAAU,GAAGL,GAAG,CAACM,CAAJ,GAAQP,GAAG,CAACO,CAAJ,GAAQJ,MAAnC;AACA,SAAO,CAAC;AAAEC,IAAAA;AAAF,GAAD,EAAiB;AAAEE,IAAAA;AAAF,GAAjB,EAAiC;AAAEJ,IAAAA;AAAF,GAAjC,EAA6C;AAAEC,IAAAA;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,YAAMI,WAAW,GAAGJ,KAAK,CAACnB,KAAN,GAAcmB,KAAK,CAAClB,MAAxC;;AACA,UAAIG,GAAG,CAACH,MAAJ,GAAamB,MAAM,CAACnB,MAAxB,EAAgC;AAC9BG,QAAAA,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACnB,MAAP,GAAgBsB,WAAjB,EAA8BH,MAAM,CAACnB,MAArC,CAAV;AACD;;AACD,UAAIG,GAAG,CAACJ,KAAJ,GAAYoB,MAAM,CAACpB,KAAvB,EAA8B;AAC5BI,QAAAA,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACpB,KAAR,EAAeoB,MAAM,CAACpB,KAAP,GAAeuB,WAA9B,CAAV;AACD;;AACD;;AACF;AACEzB,MAAAA,eAAe,CAACc,GAAD,CAAf;AAhDJ;;AAkDA,SAAO;AAAET,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAAP;AACD,CA9DD","sourcesContent":["import { exhaustiveCheck } from \"../../../renderer/typeddash\";\nimport type { SkRect } from \"../../../skia/types\";\nimport type { Fit } from \"../../types\";\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport const size = (width = 0, height = 0) => ({ width, height });\n\nexport const rect2rect = (src: SkRect, dst: SkRect) => {\n const scaleX = dst.width / src.width;\n const scaleY = dst.height / src.height;\n const translateX = dst.x - src.x * scaleX;\n const translateY = dst.y - src.y * scaleY;\n return [{ translateX }, { translateY }, { scaleX }, { scaleY }] as const;\n};\n\nexport const fitRects = (\n fit: Fit,\n rect: SkRect,\n { x, y, width, height }: SkRect\n) => {\n const sizes = applyBoxFit(\n fit,\n { width: rect.width, height: rect.height },\n { width, height }\n );\n const src = inscribe(sizes.src, rect);\n const dst = inscribe(sizes.dst, {\n x,\n y,\n width,\n height,\n });\n return { src, dst };\n};\n\nconst inscribe = (\n { width, height }: Size,\n rect: { x: number; y: number; width: number; height: number }\n) => {\n const halfWidthDelta = (rect.width - width) / 2.0;\n const halfHeightDelta = (rect.height - height) / 2.0;\n return {\n x: rect.x + halfWidthDelta,\n y: rect.y + halfHeightDelta,\n width,\n height,\n };\n};\n\nconst applyBoxFit = (fit: Fit, input: Size, output: Size) => {\n let src = size(),\n dst = size();\n if (\n input.height <= 0.0 ||\n input.width <= 0.0 ||\n output.height <= 0.0 ||\n output.width <= 0.0\n ) {\n return { src, dst };\n }\n switch (fit) {\n case \"fill\":\n src = input;\n dst = output;\n break;\n case \"contain\":\n src = input;\n if (output.width / output.height > src.width / src.height) {\n dst = size((src.width * output.height) / src.height, output.height);\n } else {\n dst = size(output.width, (src.height * output.width) / src.width);\n }\n break;\n case \"cover\":\n if (output.width / output.height > input.width / input.height) {\n src = size(input.width, (input.width * output.height) / output.width);\n } else {\n src = size((input.height * output.width) / output.height, input.height);\n }\n dst = output;\n break;\n case \"fitWidth\":\n src = size(input.width, (input.width * output.height) / output.width);\n dst = size(output.width, (src.height * output.width) / src.width);\n break;\n case \"fitHeight\":\n src = size((input.height * output.width) / output.height, input.height);\n dst = size((src.width * output.height) / src.height, output.height);\n break;\n case \"none\":\n src = size(\n Math.min(input.width, output.width),\n Math.min(input.height, output.height)\n );\n dst = src;\n break;\n case \"scaleDown\":\n src = input;\n dst = input;\n const aspectRatio = input.width / input.height;\n if (dst.height > output.height) {\n dst = size(output.height * aspectRatio, output.height);\n }\n if (dst.width > output.width) {\n dst = size(output.width, output.width / aspectRatio);\n }\n break;\n default:\n exhaustiveCheck(fit);\n }\n return { src, dst };\n};\n"]}
1
+ {"version":3,"names":["exhaustiveCheck","size","width","height","rect2rect","src","dst","scaleX","scaleY","translateX","x","translateY","y","fitRects","fit","rect","sizes","applyBoxFit","inscribe","halfWidthDelta","halfHeightDelta","input","output","Math","min","aspectRatio"],"sources":["Fitting.ts"],"sourcesContent":["import { exhaustiveCheck } from \"../../../renderer/typeddash\";\nimport type { SkRect } from \"../../../skia/types\";\nimport type { Fit } from \"../../types\";\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport const size = (width = 0, height = 0) => ({ width, height });\n\nexport const rect2rect = (src: SkRect, dst: SkRect) => {\n const scaleX = dst.width / src.width;\n const scaleY = dst.height / src.height;\n const translateX = dst.x - src.x * scaleX;\n const translateY = dst.y - src.y * scaleY;\n return [{ translateX }, { translateY }, { scaleX }, { scaleY }] as const;\n};\n\nexport const fitRects = (\n fit: Fit,\n rect: SkRect,\n { x, y, width, height }: SkRect\n) => {\n const sizes = applyBoxFit(\n fit,\n { width: rect.width, height: rect.height },\n { width, height }\n );\n const src = inscribe(sizes.src, rect);\n const dst = inscribe(sizes.dst, {\n x,\n y,\n width,\n height,\n });\n return { src, dst };\n};\n\nconst inscribe = (\n { width, height }: Size,\n rect: { x: number; y: number; width: number; height: number }\n) => {\n const halfWidthDelta = (rect.width - width) / 2.0;\n const halfHeightDelta = (rect.height - height) / 2.0;\n return {\n x: rect.x + halfWidthDelta,\n y: rect.y + halfHeightDelta,\n width,\n height,\n };\n};\n\nconst applyBoxFit = (fit: Fit, input: Size, output: Size) => {\n let src = size(),\n dst = size();\n if (\n input.height <= 0.0 ||\n input.width <= 0.0 ||\n output.height <= 0.0 ||\n output.width <= 0.0\n ) {\n return { src, dst };\n }\n switch (fit) {\n case \"fill\":\n src = input;\n dst = output;\n break;\n case \"contain\":\n src = input;\n if (output.width / output.height > src.width / src.height) {\n dst = size((src.width * output.height) / src.height, output.height);\n } else {\n dst = size(output.width, (src.height * output.width) / src.width);\n }\n break;\n case \"cover\":\n if (output.width / output.height > input.width / input.height) {\n src = size(input.width, (input.width * output.height) / output.width);\n } else {\n src = size((input.height * output.width) / output.height, input.height);\n }\n dst = output;\n break;\n case \"fitWidth\":\n src = size(input.width, (input.width * output.height) / output.width);\n dst = size(output.width, (src.height * output.width) / src.width);\n break;\n case \"fitHeight\":\n src = size((input.height * output.width) / output.height, input.height);\n dst = size((src.width * output.height) / src.height, output.height);\n break;\n case \"none\":\n src = size(\n Math.min(input.width, output.width),\n Math.min(input.height, output.height)\n );\n dst = src;\n break;\n case \"scaleDown\":\n src = input;\n dst = input;\n const aspectRatio = input.width / input.height;\n if (dst.height > output.height) {\n dst = size(output.height * aspectRatio, output.height);\n }\n if (dst.width > output.width) {\n dst = size(output.width, output.width / aspectRatio);\n }\n break;\n default:\n exhaustiveCheck(fit);\n }\n return { src, dst };\n};\n"],"mappings":"AAAA,SAASA,eAAT,QAAgC,6BAAhC;AASA,OAAO,MAAMC,IAAI,GAAG;EAAA,IAACC,KAAD,uEAAS,CAAT;EAAA,IAAYC,MAAZ,uEAAqB,CAArB;EAAA,OAA4B;IAAED,KAAF;IAASC;EAAT,CAA5B;AAAA,CAAb;AAEP,OAAO,MAAMC,SAAS,GAAG,CAACC,GAAD,EAAcC,GAAd,KAA8B;EACrD,MAAMC,MAAM,GAAGD,GAAG,CAACJ,KAAJ,GAAYG,GAAG,CAACH,KAA/B;EACA,MAAMM,MAAM,GAAGF,GAAG,CAACH,MAAJ,GAAaE,GAAG,CAACF,MAAhC;EACA,MAAMM,UAAU,GAAGH,GAAG,CAACI,CAAJ,GAAQL,GAAG,CAACK,CAAJ,GAAQH,MAAnC;EACA,MAAMI,UAAU,GAAGL,GAAG,CAACM,CAAJ,GAAQP,GAAG,CAACO,CAAJ,GAAQJ,MAAnC;EACA,OAAO,CAAC;IAAEC;EAAF,CAAD,EAAiB;IAAEE;EAAF,CAAjB,EAAiC;IAAEJ;EAAF,CAAjC,EAA6C;IAAEC;EAAF,CAA7C,CAAP;AACD,CANM;AAQP,OAAO,MAAMK,QAAQ,GAAG,CACtBC,GADsB,EAEtBC,IAFsB,WAInB;EAAA,IADH;IAAEL,CAAF;IAAKE,CAAL;IAAQV,KAAR;IAAeC;EAAf,CACG;EACH,MAAMa,KAAK,GAAGC,WAAW,CACvBH,GADuB,EAEvB;IAAEZ,KAAK,EAAEa,IAAI,CAACb,KAAd;IAAqBC,MAAM,EAAEY,IAAI,CAACZ;EAAlC,CAFuB,EAGvB;IAAED,KAAF;IAASC;EAAT,CAHuB,CAAzB;EAKA,MAAME,GAAG,GAAGa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AClB,MAAN,GAAemB,MAAM,CAACpB,KAAvB,GAAgCoB,MAAM,CAACnB,MAAxC,EAAgDkB,KAAK,CAAClB,MAAtD,CAAV;MACAG,GAAG,GAAGL,IAAI,CAAEI,GAAG,CAACH,KAAJ,GAAYoB,MAAM,CAACnB,MAApB,GAA8BE,GAAG,CAACF,MAAnC,EAA2CmB,MAAM,CAACnB,MAAlD,CAAV;MACA;;IACF,KAAK,MAAL;MACEE,GAAG,GAAGJ,IAAI,CACRsB,IAAI,CAACC,GAAL,CAASH,KAAK,CAACnB,KAAf,EAAsBoB,MAAM,CAACpB,KAA7B,CADQ,EAERqB,IAAI,CAACC,GAAL,CAASH,KAAK,CAAClB,MAAf,EAAuBmB,MAAM,CAACnB,MAA9B,CAFQ,CAAV;MAIAG,GAAG,GAAGD,GAAN;MACA;;IACF,KAAK,WAAL;MACEA,GAAG,GAAGgB,KAAN;MACAf,GAAG,GAAGe,KAAN;MACA,MAAMI,WAAW,GAAGJ,KAAK,CAACnB,KAAN,GAAcmB,KAAK,CAAClB,MAAxC;;MACA,IAAIG,GAAG,CAACH,MAAJ,GAAamB,MAAM,CAACnB,MAAxB,EAAgC;QAC9BG,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACnB,MAAP,GAAgBsB,WAAjB,EAA8BH,MAAM,CAACnB,MAArC,CAAV;MACD;;MACD,IAAIG,GAAG,CAACJ,KAAJ,GAAYoB,MAAM,CAACpB,KAAvB,EAA8B;QAC5BI,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACpB,KAAR,EAAeoB,MAAM,CAACpB,KAAP,GAAeuB,WAA9B,CAAV;MACD;;MACD;;IACF;MACEzB,eAAe,CAACc,GAAD,CAAf;EAhDJ;;EAkDA,OAAO;IAAET,GAAF;IAAOC;EAAP,CAAP;AACD,CA9DD"}
@@ -22,8 +22,8 @@ export const processGradientProps = (Skia, _ref) => {
22
22
  processTransformProps(localMatrix, transform);
23
23
  return {
24
24
  colors: colors.map(color => Skia.Color(color)),
25
- positions: positions !== null && positions !== void 0 ? positions : null,
26
- mode: TileMode[enumKey(mode !== null && mode !== void 0 ? mode : "clamp")],
25
+ positions: positions ?? null,
26
+ mode: TileMode[enumKey(mode ?? "clamp")],
27
27
  flags,
28
28
  localMatrix
29
29
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["Gradient.ts"],"names":["TileMode","enumKey","processTransformProps","transformOrigin","origin","transform","translateX","x","translateY","y","processGradientProps","Skia","colors","positions","mode","flags","localMatrix","Matrix","map","color","Color","getRect","props","width","height","rect","undefined","XYWHRect"],"mappings":"AACA,SAASA,QAAT,QAAyB,qBAAzB;AAGA,SAASC,OAAT,QAAwB,QAAxB;AACA,SAASC,qBAAT,QAAsC,aAAtC;AAEA,OAAO,MAAMC,eAAe,GAAG,CAACC,MAAD,EAAiBC,SAAjB,KAA6C,CAC1E;AAAEC,EAAAA,UAAU,EAAEF,MAAM,CAACG;AAArB,CAD0E,EAE1E;AAAEC,EAAAA,UAAU,EAAEJ,MAAM,CAACK;AAArB,CAF0E,EAG1E,GAAGJ,SAHuE,EAI1E;AAAEC,EAAAA,UAAU,EAAE,CAACF,MAAM,CAACG;AAAtB,CAJ0E,EAK1E;AAAEC,EAAAA,UAAU,EAAE,CAACJ,MAAM,CAACK;AAAtB,CAL0E,CAArE;AAQP,OAAO,MAAMC,oBAAoB,GAAG,CAClCC,IADkC,WAG/B;AAAA,MADH;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,SAAV;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA,KAA3B;AAAkC,OAAGV;AAArC,GACG;AACH,QAAMW,WAAW,GAAGL,IAAI,CAACM,MAAL,EAApB;AACAf,EAAAA,qBAAqB,CAACc,WAAD,EAAcX,SAAd,CAArB;AACA,SAAO;AACLO,IAAAA,MAAM,EAAEA,MAAM,CAACM,GAAP,CAAYC,KAAD,IAAWR,IAAI,CAACS,KAAL,CAAWD,KAAX,CAAtB,CADH;AAELN,IAAAA,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAe,IAFnB;AAGLC,IAAAA,IAAI,EAAEd,QAAQ,CAACC,OAAO,CAACa,IAAD,aAACA,IAAD,cAACA,IAAD,GAAS,OAAT,CAAR,CAHT;AAILC,IAAAA,KAJK;AAKLC,IAAAA;AALK,GAAP;AAOD,CAbM;AAeP,OAAO,MAAMK,OAAO,GAAG,CACrBV,IADqB,EAErBW,KAFqB,KAGE;AACvB,QAAM;AAAEf,IAAAA,CAAF;AAAKE,IAAAA,CAAL;AAAQc,IAAAA,KAAR;AAAeC,IAAAA;AAAf,MAA0BF,KAAhC;;AACA,MAAIA,KAAK,CAACG,IAAV,EAAgB;AACd,WAAOH,KAAK,CAACG,IAAb;AACD,GAFD,MAEO,IACLlB,CAAC,KAAKmB,SAAN,IACAjB,CAAC,KAAKiB,SADN,IAEAH,KAAK,KAAKG,SAFV,IAGAF,MAAM,KAAKE,SAJN,EAKL;AACA,WAAOf,IAAI,CAACgB,QAAL,CAAcpB,CAAd,EAAiBE,CAAjB,EAAoBc,KAApB,EAA2BC,MAA3B,CAAP;AACD,GAPM,MAOA;AACL,WAAOE,SAAP;AACD;AACF,CAjBM","sourcesContent":["import type { Skia, SkRect, Transforms2d, Vector } from \"../../../skia/types\";\nimport { TileMode } from \"../../../skia/types\";\nimport type { GradientProps, ImageShaderProps } from \"../../types\";\n\nimport { enumKey } from \"./Enum\";\nimport { processTransformProps } from \"./Transform\";\n\nexport const transformOrigin = (origin: Vector, transform: Transforms2d) => [\n { translateX: origin.x },\n { translateY: origin.y },\n ...transform,\n { translateX: -origin.x },\n { translateY: -origin.y },\n];\n\nexport const processGradientProps = (\n Skia: Skia,\n { colors, positions, mode, flags, ...transform }: GradientProps\n) => {\n const localMatrix = Skia.Matrix();\n processTransformProps(localMatrix, transform);\n return {\n colors: colors.map((color) => Skia.Color(color)),\n positions: positions ?? null,\n mode: TileMode[enumKey(mode ?? \"clamp\")],\n flags,\n localMatrix,\n };\n};\n\nexport const getRect = (\n Skia: Skia,\n props: Omit<ImageShaderProps, \"tx\" | \"ty\" | \"fm\" | \"mm\" | \"fit\" | \"image\">\n): SkRect | undefined => {\n const { x, y, width, height } = props;\n if (props.rect) {\n return props.rect;\n } else if (\n x !== undefined &&\n y !== undefined &&\n width !== undefined &&\n height !== undefined\n ) {\n return Skia.XYWHRect(x, y, width, height);\n } else {\n return undefined;\n }\n};\n"]}
1
+ {"version":3,"names":["TileMode","enumKey","processTransformProps","transformOrigin","origin","transform","translateX","x","translateY","y","processGradientProps","Skia","colors","positions","mode","flags","localMatrix","Matrix","map","color","Color","getRect","props","width","height","rect","undefined","XYWHRect"],"sources":["Gradient.ts"],"sourcesContent":["import type { Skia, SkRect, Transforms2d, Vector } from \"../../../skia/types\";\nimport { TileMode } from \"../../../skia/types\";\nimport type { GradientProps, ImageShaderProps } from \"../../types\";\n\nimport { enumKey } from \"./Enum\";\nimport { processTransformProps } from \"./Transform\";\n\nexport const transformOrigin = (origin: Vector, transform: Transforms2d) => [\n { translateX: origin.x },\n { translateY: origin.y },\n ...transform,\n { translateX: -origin.x },\n { translateY: -origin.y },\n];\n\nexport const processGradientProps = (\n Skia: Skia,\n { colors, positions, mode, flags, ...transform }: GradientProps\n) => {\n const localMatrix = Skia.Matrix();\n processTransformProps(localMatrix, transform);\n return {\n colors: colors.map((color) => Skia.Color(color)),\n positions: positions ?? null,\n mode: TileMode[enumKey(mode ?? \"clamp\")],\n flags,\n localMatrix,\n };\n};\n\nexport const getRect = (\n Skia: Skia,\n props: Omit<ImageShaderProps, \"tx\" | \"ty\" | \"fm\" | \"mm\" | \"fit\" | \"image\">\n): SkRect | undefined => {\n const { x, y, width, height } = props;\n if (props.rect) {\n return props.rect;\n } else if (\n x !== undefined &&\n y !== undefined &&\n width !== undefined &&\n height !== undefined\n ) {\n return Skia.XYWHRect(x, y, width, height);\n } else {\n return undefined;\n }\n};\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,qBAAzB;AAGA,SAASC,OAAT,QAAwB,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I,CAACgB,QAAL,CAAcpB,CAAd,EAAiBE,CAAjB,EAAoBc,KAApB,EAA2BC,MAA3B,CAAP;EACD,CAPM,MAOA;IACL,OAAOE,SAAP;EACD;AACF,CAjBM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Path.ts"],"names":["isPath","processPath","Skia","rawPath","path","Path","MakeFromSVGString","Error","isPathDef","def"],"mappings":"AACA,SAASA,MAAT,QAAuB,qBAAvB;AAGA,OAAO,MAAMC,WAAW,GAAG,CAACC,IAAD,EAAaC,OAAb,KAAkC;AAC3D,QAAMC,IAAI,GACR,OAAOD,OAAP,KAAmB,QAAnB,GACID,IAAI,CAACG,IAAL,CAAUC,iBAAV,CAA4BH,OAA5B,CADJ,GAEIA,OAHN;;AAIA,MAAI,CAACC,IAAL,EAAW;AACT,UAAM,IAAIG,KAAJ,CAAU,mBAAmBJ,OAA7B,CAAN;AACD;;AACD,SAAOC,IAAP;AACD,CATM,C,CAWP;;AACA,OAAO,MAAMI,SAAS,GAAIC,GAAD,IACvB,OAAOA,GAAP,KAAe,QAAf,IAA2BT,MAAM,CAACS,GAAD,CAD5B","sourcesContent":["import type { Skia } from \"../../../skia/types\";\nimport { isPath } from \"../../../skia/types\";\nimport type { PathDef } from \"../../types\";\n\nexport const processPath = (Skia: Skia, rawPath: PathDef) => {\n const path =\n typeof rawPath === \"string\"\n ? Skia.Path.MakeFromSVGString(rawPath)\n : rawPath;\n if (!path) {\n throw new Error(\"Invalid path: \" + rawPath);\n }\n return path;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isPathDef = (def: any): def is PathDef =>\n typeof def === \"string\" || isPath(def);\n"]}
1
+ {"version":3,"names":["isPath","processPath","Skia","rawPath","path","Path","MakeFromSVGString","Error","isPathDef","def"],"sources":["Path.ts"],"sourcesContent":["import type { Skia } from \"../../../skia/types\";\nimport { isPath } from \"../../../skia/types\";\nimport type { PathDef } from \"../../types\";\n\nexport const processPath = (Skia: Skia, rawPath: PathDef) => {\n const path =\n typeof rawPath === \"string\"\n ? Skia.Path.MakeFromSVGString(rawPath)\n : rawPath;\n if (!path) {\n throw new Error(\"Invalid path: \" + rawPath);\n }\n return path;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isPathDef = (def: any): def is PathDef =>\n typeof def === \"string\" || isPath(def);\n"],"mappings":"AACA,SAASA,MAAT,QAAuB,qBAAvB;AAGA,OAAO,MAAMC,WAAW,GAAG,CAACC,IAAD,EAAaC,OAAb,KAAkC;EAC3D,MAAMC,IAAI,GACR,OAAOD,OAAP,KAAmB,QAAnB,GACID,IAAI,CAACG,IAAL,CAAUC,iBAAV,CAA4BH,OAA5B,CADJ,GAEIA,OAHN;;EAIA,IAAI,CAACC,IAAL,EAAW;IACT,MAAM,IAAIG,KAAJ,CAAU,mBAAmBJ,OAA7B,CAAN;EACD;;EACD,OAAOC,IAAP;AACD,CATM,C,CAWP;;AACA,OAAO,MAAMI,SAAS,GAAIC,GAAD,IACvB,OAAOA,GAAP,KAAe,QAAf,IAA2BT,MAAM,CAACS,GAAD,CAD5B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radius.ts"],"names":["processRadius","Skia","radius","Point"],"mappings":"AAGA,OAAO,MAAMA,aAAa,GAAG,CAACC,IAAD,EAAaC,MAAb,KAAwC;AACnE,MAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,WAAOD,IAAI,CAACE,KAAL,CAAWD,MAAX,EAAmBA,MAAnB,CAAP;AACD;;AACD,SAAOA,MAAP;AACD,CALM","sourcesContent":["import type { Skia, Vector } from \"../../../skia/types\";\nimport type { Radius } from \"../../types\";\n\nexport const processRadius = (Skia: Skia, radius: Radius): Vector => {\n if (typeof radius === \"number\") {\n return Skia.Point(radius, radius);\n }\n return radius;\n};\n"]}
1
+ {"version":3,"names":["processRadius","Skia","radius","Point"],"sources":["Radius.ts"],"sourcesContent":["import type { Skia, Vector } from \"../../../skia/types\";\nimport type { Radius } from \"../../types\";\n\nexport const processRadius = (Skia: Skia, radius: Radius): Vector => {\n if (typeof radius === \"number\") {\n return Skia.Point(radius, radius);\n }\n return radius;\n};\n"],"mappings":"AAGA,OAAO,MAAMA,aAAa,GAAG,CAACC,IAAD,EAAaC,MAAb,KAAwC;EACnE,IAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAOD,IAAI,CAACE,KAAL,CAAWD,MAAX,EAAmBA,MAAnB,CAAP;EACD;;EACD,OAAOA,MAAP;AACD,CALM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Rect.ts"],"names":["processRadius","isEdge","pos","b","x","y","width","height","isRRectCtor","def","rect","undefined","isRectCtor","processRect","Skia","XYWHRect","processRRect","r","RRectXY"],"mappings":"AAAA;AAIA,SAASA,aAAT,QAA8B,UAA9B;AAEA,OAAO,MAAMC,MAAM,GAAG,CAACC,GAAD,EAAcC,CAAd,KACpBD,GAAG,CAACE,CAAJ,KAAUD,CAAC,CAACC,CAAZ,IAAiBF,GAAG,CAACG,CAAJ,KAAUF,CAAC,CAACE,CAA7B,IAAkCH,GAAG,CAACE,CAAJ,KAAUD,CAAC,CAACG,KAA9C,IAAuDJ,GAAG,CAACG,CAAJ,KAAUF,CAAC,CAACI,MAD9D,C,CAGP;;AACA,MAAMC,WAAW,GAAIC,GAAD,IACjBA,GAAD,CAAaC,IAAb,KAAsBC,SADxB,C,CAEA;;;AACA,MAAMC,UAAU,GAAIH,GAAD,IAChBA,GAAD,CAAaC,IAAb,KAAsBC,SADxB;;AAGA,OAAO,MAAME,WAAW,GAAG,CAACC,IAAD,EAAaL,GAAb,KAA8B;AACvD,MAAIG,UAAU,CAACH,GAAD,CAAd,EAAqB;AACnB,WAAOK,IAAI,CAACC,QAAL,CAAcN,GAAG,CAACL,CAAlB,EAAqBK,GAAG,CAACJ,CAAzB,EAA4BI,GAAG,CAACH,KAAhC,EAAuCG,GAAG,CAACF,MAA3C,CAAP;AACD,GAFD,MAEO;AACL,WAAOE,GAAG,CAACC,IAAX;AACD;AACF,CANM;AAQP,OAAO,MAAMM,YAAY,GAAG,CAACF,IAAD,EAAaL,GAAb,KAA+B;AACzD,MAAID,WAAW,CAACC,GAAD,CAAf,EAAsB;AACpB,UAAMQ,CAAC,GAAGjB,aAAa,CAACc,IAAD,EAAOL,GAAG,CAACQ,CAAX,CAAvB;AACA,WAAOH,IAAI,CAACI,OAAL,CACLJ,IAAI,CAACC,QAAL,CAAcN,GAAG,CAACL,CAAlB,EAAqBK,GAAG,CAACJ,CAAzB,EAA4BI,GAAG,CAACH,KAAhC,EAAuCG,GAAG,CAACF,MAA3C,CADK,EAELU,CAAC,CAACb,CAFG,EAGLa,CAAC,CAACZ,CAHG,CAAP;AAKD,GAPD,MAOO;AACL,WAAOI,GAAG,CAACC,IAAX;AACD;AACF,CAXM","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Skia, SkRect, Vector } from \"../../../skia/types\";\nimport type { RectCtor, RectDef, RRectCtor, RRectDef } from \"../../types\";\n\nimport { processRadius } from \"./Radius\";\n\nexport const isEdge = (pos: Vector, b: SkRect) =>\n pos.x === b.x || pos.y === b.y || pos.x === b.width || pos.y === b.height;\n\n// We have an issue to check property existence on JSI backed instances\nconst isRRectCtor = (def: RRectDef): def is RRectCtor =>\n (def as any).rect === undefined;\n// We have an issue to check property existence on JSI backed instances\nconst isRectCtor = (def: RectDef): def is RectCtor =>\n (def as any).rect === undefined;\n\nexport const processRect = (Skia: Skia, def: RectDef) => {\n if (isRectCtor(def)) {\n return Skia.XYWHRect(def.x, def.y, def.width, def.height);\n } else {\n return def.rect;\n }\n};\n\nexport const processRRect = (Skia: Skia, def: RRectDef) => {\n if (isRRectCtor(def)) {\n const r = processRadius(Skia, def.r);\n return Skia.RRectXY(\n Skia.XYWHRect(def.x, def.y, def.width, def.height),\n r.x,\n r.y\n );\n } else {\n return def.rect;\n }\n};\n"]}
1
+ {"version":3,"names":["processRadius","isEdge","pos","b","x","y","width","height","isRRectCtor","def","rect","undefined","isRectCtor","processRect","Skia","XYWHRect","processRRect","r","RRectXY"],"sources":["Rect.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Skia, SkRect, Vector } from \"../../../skia/types\";\nimport type { RectCtor, RectDef, RRectCtor, RRectDef } from \"../../types\";\n\nimport { processRadius } from \"./Radius\";\n\nexport const isEdge = (pos: Vector, b: SkRect) =>\n pos.x === b.x || pos.y === b.y || pos.x === b.width || pos.y === b.height;\n\n// We have an issue to check property existence on JSI backed instances\nconst isRRectCtor = (def: RRectDef): def is RRectCtor =>\n (def as any).rect === undefined;\n// We have an issue to check property existence on JSI backed instances\nconst isRectCtor = (def: RectDef): def is RectCtor =>\n (def as any).rect === undefined;\n\nexport const processRect = (Skia: Skia, def: RectDef) => {\n if (isRectCtor(def)) {\n return Skia.XYWHRect(def.x, def.y, def.width, def.height);\n } else {\n return def.rect;\n }\n};\n\nexport const processRRect = (Skia: Skia, def: RRectDef) => {\n if (isRRectCtor(def)) {\n const r = processRadius(Skia, def.r);\n return Skia.RRectXY(\n Skia.XYWHRect(def.x, def.y, def.width, def.height),\n r.x,\n r.y\n );\n } else {\n return def.rect;\n }\n};\n"],"mappings":"AAAA;AAIA,SAASA,aAAT,QAA8B,UAA9B;AAEA,OAAO,MAAMC,MAAM,GAAG,CAACC,GAAD,EAAcC,CAAd,KACpBD,GAAG,CAACE,CAAJ,KAAUD,CAAC,CAACC,CAAZ,IAAiBF,GAAG,CAACG,CAAJ,KAAUF,CAAC,CAACE,CAA7B,IAAkCH,GAAG,CAACE,CAAJ,KAAUD,CAAC,CAACG,KAA9C,IAAuDJ,GAAG,CAACG,CAAJ,KAAUF,CAAC,CAACI,MAD9D,C,CAGP;;AACA,MAAMC,WAAW,GAAIC,GAAD,IACjBA,GAAD,CAAaC,IAAb,KAAsBC,SADxB,C,CAEA;;;AACA,MAAMC,UAAU,GAAIH,GAAD,IAChBA,GAAD,CAAaC,IAAb,KAAsBC,SADxB;;AAGA,OAAO,MAAME,WAAW,GAAG,CAACC,IAAD,EAAaL,GAAb,KAA8B;EACvD,IAAIG,UAAU,CAACH,GAAD,CAAd,EAAqB;IACnB,OAAOK,IAAI,CAACC,QAAL,CAAcN,GAAG,CAACL,CAAlB,EAAqBK,GAAG,CAACJ,CAAzB,EAA4BI,GAAG,CAACH,KAAhC,EAAuCG,GAAG,CAACF,MAA3C,CAAP;EACD,CAFD,MAEO;IACL,OAAOE,GAAG,CAACC,IAAX;EACD;AACF,CANM;AAQP,OAAO,MAAMM,YAAY,GAAG,CAACF,IAAD,EAAaL,GAAb,KAA+B;EACzD,IAAID,WAAW,CAACC,GAAD,CAAf,EAAsB;IACpB,MAAMQ,CAAC,GAAGjB,aAAa,CAACc,IAAD,EAAOL,GAAG,CAACQ,CAAX,CAAvB;IACA,OAAOH,IAAI,CAACI,OAAL,CACLJ,IAAI,CAACC,QAAL,CAAcN,GAAG,CAACL,CAAlB,EAAqBK,GAAG,CAACJ,CAAzB,EAA4BI,GAAG,CAACH,KAAhC,EAAuCG,GAAG,CAACF,MAA3C,CADK,EAELU,CAAC,CAACb,CAFG,EAGLa,CAAC,CAACZ,CAHG,CAAP;EAKD,CAPD,MAOO;IACL,OAAOI,GAAG,CAACC,IAAX;EACD;AACF,CAXM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Transform.ts"],"names":["processTransform","processTransformProps","m3","props","transform","origin","matrix","translate","x","y","concat","identity"],"mappings":"AAEA,SAASA,gBAAT,QAAiC,qBAAjC;AAEA,OAAO,MAAMC,qBAAqB,GAAG,CAACC,EAAD,EAAeC,KAAf,KAAyC;AAC5E,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,MAAb;AAAqBC,IAAAA;AAArB,MAAgCH,KAAtC;;AACA,MAAIG,MAAJ,EAAY;AACV,QAAID,MAAJ,EAAY;AACVH,MAAAA,EAAE,CAACK,SAAH,CAAaF,MAAM,CAACG,CAApB,EAAuBH,MAAM,CAACI,CAA9B;AACAP,MAAAA,EAAE,CAACQ,MAAH,CAAUJ,MAAV;AACAJ,MAAAA,EAAE,CAACK,SAAH,CAAa,CAACF,MAAM,CAACG,CAArB,EAAwB,CAACH,MAAM,CAACI,CAAhC;AACD,KAJD,MAIO;AACLP,MAAAA,EAAE,CAACS,QAAH;AACAT,MAAAA,EAAE,CAACQ,MAAH,CAAUJ,MAAV;AACD;AACF,GATD,MASO,IAAIF,SAAJ,EAAe;AACpBF,IAAAA,EAAE,CAACS,QAAH;;AACA,QAAIN,MAAJ,EAAY;AACVH,MAAAA,EAAE,CAACK,SAAH,CAAaF,MAAM,CAACG,CAApB,EAAuBH,MAAM,CAACI,CAA9B;AACD;;AACDT,IAAAA,gBAAgB,CAACE,EAAD,EAAKE,SAAL,CAAhB;;AACA,QAAIC,MAAJ,EAAY;AACVH,MAAAA,EAAE,CAACK,SAAH,CAAa,CAACF,MAAM,CAACG,CAArB,EAAwB,CAACH,MAAM,CAACI,CAAhC;AACD;AACF;AACF,CArBM","sourcesContent":["import type { TransformProps } from \"../../types\";\nimport type { SkMatrix } from \"../../../skia/types\";\nimport { processTransform } from \"../../../skia/types\";\n\nexport const processTransformProps = (m3: SkMatrix, props: TransformProps) => {\n const { transform, origin, matrix } = props;\n if (matrix) {\n if (origin) {\n m3.translate(origin.x, origin.y);\n m3.concat(matrix);\n m3.translate(-origin.x, -origin.y);\n } else {\n m3.identity();\n m3.concat(matrix);\n }\n } else if (transform) {\n m3.identity();\n if (origin) {\n m3.translate(origin.x, origin.y);\n }\n processTransform(m3, transform);\n if (origin) {\n m3.translate(-origin.x, -origin.y);\n }\n }\n};\n"]}
1
+ {"version":3,"names":["processTransform","processTransformProps","m3","props","transform","origin","matrix","translate","x","y","concat","identity"],"sources":["Transform.ts"],"sourcesContent":["import type { TransformProps } from \"../../types\";\nimport type { SkMatrix } from \"../../../skia/types\";\nimport { processTransform } from \"../../../skia/types\";\n\nexport const processTransformProps = (m3: SkMatrix, props: TransformProps) => {\n const { transform, origin, matrix } = props;\n if (matrix) {\n if (origin) {\n m3.translate(origin.x, origin.y);\n m3.concat(matrix);\n m3.translate(-origin.x, -origin.y);\n } else {\n m3.identity();\n m3.concat(matrix);\n }\n } else if (transform) {\n m3.identity();\n if (origin) {\n m3.translate(origin.x, origin.y);\n }\n processTransform(m3, transform);\n if (origin) {\n m3.translate(-origin.x, -origin.y);\n }\n }\n};\n"],"mappings":"AAEA,SAASA,gBAAT,QAAiC,qBAAjC;AAEA,OAAO,MAAMC,qBAAqB,GAAG,CAACC,EAAD,EAAeC,KAAf,KAAyC;EAC5E,MAAM;IAAEC,SAAF;IAAaC,MAAb;IAAqBC;EAArB,IAAgCH,KAAtC;;EACA,IAAIG,MAAJ,EAAY;IACV,IAAID,MAAJ,EAAY;MACVH,EAAE,CAACK,SAAH,CAAaF,MAAM,CAACG,CAApB,EAAuBH,MAAM,CAACI,CAA9B;MACAP,EAAE,CAACQ,MAAH,CAAUJ,MAAV;MACAJ,EAAE,CAACK,SAAH,CAAa,CAACF,MAAM,CAACG,CAArB,EAAwB,CAACH,MAAM,CAACI,CAAhC;IACD,CAJD,MAIO;MACLP,EAAE,CAACS,QAAH;MACAT,EAAE,CAACQ,MAAH,CAAUJ,MAAV;IACD;EACF,CATD,MASO,IAAIF,SAAJ,EAAe;IACpBF,EAAE,CAACS,QAAH;;IACA,IAAIN,MAAJ,EAAY;MACVH,EAAE,CAACK,SAAH,CAAaF,MAAM,CAACG,CAApB,EAAuBH,MAAM,CAACI,CAA9B;IACD;;IACDT,gBAAgB,CAACE,EAAD,EAAKE,SAAL,CAAhB;;IACA,IAAIC,MAAJ,EAAY;MACVH,EAAE,CAACK,SAAH,CAAa,CAACF,MAAM,CAACG,CAArB,EAAwB,CAACH,MAAM,CAACI,CAAhC;IACD;EACF;AACF,CArBM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAd;AACA,cAAc,QAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd","sourcesContent":["export * from \"./Enum\";\nexport * from \"./Path\";\nexport * from \"./Fitting\";\nexport * from \"./Color\";\nexport * from \"./Rect\";\nexport * from \"./Radius\";\nexport * from \"./Circle\";\nexport * from \"./Gradient\";\nexport * from \"./Transform\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Enum\";\nexport * from \"./Path\";\nexport * from \"./Fitting\";\nexport * from \"./Color\";\nexport * from \"./Rect\";\nexport * from \"./Radius\";\nexport * from \"./Circle\";\nexport * from \"./Gradient\";\nexport * from \"./Transform\";\n"],"mappings":"AAAA,cAAc,QAAd;AACA,cAAc,QAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["BackdropFilterNode.ts"],"names":["isColorFilter","NodeType","JsiDrawingNode","JsiDeclarationNode","BackdropFilterNode","constructor","ctx","props","BackdropFilter","deriveProps","draw","canvas","child","_children","filter","materialize","saveLayer","undefined","Skia","ImageFilter","MakeColorFilter","restore"],"mappings":"AAAA,SAASA,aAAT,QAA8B,qBAA9B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,OAAO,MAAMC,kBAAN,SAAiCF,cAAjC,CAAqE;AAC1EG,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;AAClD,UAAMD,GAAN,EAAWL,QAAQ,CAACO,cAApB,EAAoCD,KAApC;AACD;;AAESE,EAAAA,WAAW,GAAG;AACtB,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAA6B;AAAA,QAA5B;AAAEC,MAAAA;AAAF,KAA4B;AAC/B,UAAMC,KAAK,GAAG,KAAKC,SAAL,CAAe,CAAf,CAAd;AACA,UAAMC,MAAM,GACVF,KAAK,YAAYT,kBAAjB,GAAsCS,KAAK,CAACG,WAAN,EAAtC,GAA4D,IAD9D;AAEAJ,IAAAA,MAAM,CAACK,SAAP,CACEC,SADF,EAEE,IAFF,EAGEjB,aAAa,CAACc,MAAD,CAAb,GACI,KAAKI,IAAL,CAAUC,WAAV,CAAsBC,eAAtB,CAAsCN,MAAtC,EAA8C,IAA9C,CADJ,GAEIA,MALN;AAOAH,IAAAA,MAAM,CAACU,OAAP;AACD;;AArByE","sourcesContent":["import { isColorFilter } from \"../../../skia/types\";\nimport type { ChildrenProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nexport class BackdropFilterNode extends JsiDrawingNode<ChildrenProps, null> {\n constructor(ctx: NodeContext, props: ChildrenProps) {\n super(ctx, NodeType.BackdropFilter, props);\n }\n\n protected deriveProps() {\n return null;\n }\n\n draw({ canvas }: DrawingContext) {\n const child = this._children[0];\n const filter =\n child instanceof JsiDeclarationNode ? child.materialize() : null;\n canvas.saveLayer(\n undefined,\n null,\n isColorFilter(filter)\n ? this.Skia.ImageFilter.MakeColorFilter(filter, null)\n : filter\n );\n canvas.restore();\n }\n}\n"]}
1
+ {"version":3,"names":["isColorFilter","NodeType","JsiDrawingNode","JsiDeclarationNode","BackdropFilterNode","constructor","ctx","props","BackdropFilter","deriveProps","draw","canvas","child","_children","filter","materialize","saveLayer","undefined","Skia","ImageFilter","MakeColorFilter","restore"],"sources":["BackdropFilterNode.ts"],"sourcesContent":["import { isColorFilter } from \"../../../skia/types\";\nimport type { ChildrenProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nexport class BackdropFilterNode extends JsiDrawingNode<ChildrenProps, null> {\n constructor(ctx: NodeContext, props: ChildrenProps) {\n super(ctx, NodeType.BackdropFilter, props);\n }\n\n protected deriveProps() {\n return null;\n }\n\n draw({ canvas }: DrawingContext) {\n const child = this._children[0];\n const filter =\n child instanceof JsiDeclarationNode ? child.materialize() : null;\n canvas.saveLayer(\n undefined,\n null,\n isColorFilter(filter)\n ? this.Skia.ImageFilter.MakeColorFilter(filter, null)\n : filter\n );\n canvas.restore();\n }\n}\n"],"mappings":"AAAA,SAASA,aAAT,QAA8B,qBAA9B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,OAAO,MAAMC,kBAAN,SAAiCF,cAAjC,CAAqE;EAC1EG,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWL,QAAQ,CAACO,cAApB,EAAoCD,KAApC;EACD;;EAESE,WAAW,GAAG;IACtB,OAAO,IAAP;EACD;;EAEDC,IAAI,OAA6B;IAAA,IAA5B;MAAEC;IAAF,CAA4B;IAC/B,MAAMC,KAAK,GAAG,KAAKC,SAAL,CAAe,CAAf,CAAd;IACA,MAAMC,MAAM,GACVF,KAAK,YAAYT,kBAAjB,GAAsCS,KAAK,CAACG,WAAN,EAAtC,GAA4D,IAD9D;IAEAJ,MAAM,CAACK,SAAP,CACEC,SADF,EAEE,IAFF,EAGEjB,aAAa,CAACc,MAAD,CAAb,GACI,KAAKI,IAAL,CAAUC,WAAV,CAAsBC,eAAtB,CAAsCN,MAAtC,EAA8C,IAA9C,CADJ,GAEIA,MALN;IAOAH,MAAM,CAACU,OAAP;EACD;;AArByE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Box.ts"],"names":["BlurStyle","ClipOp","isRRect","DeclarationType","NodeType","JsiDeclarationNode","processColor","JsiRenderNode","inflate","Skia","box","dx","dy","tx","ty","RRectXY","XYWHRect","rect","x","y","width","height","rx","ry","deflate","BoxShadowNode","constructor","ctx","props","Unknown","Box","materialize","BoxNode","renderNode","canvas","paint","opacity","defaultBox","shadows","_children","map","node","filter","n","shadow","inner","color","blur","spread","lPaint","Paint","setColor","setMaskFilter","MaskFilter","MakeBlur","Normal","drawRRect","delta","Point","Math","abs","save","clipRRect","Intersect","outer","drawDRRect","restore"],"mappings":"AACA,SAASA,SAAT,EAAoBC,MAApB,EAA4BC,OAA5B,QAA2C,qBAA3C;AAEA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AAGA,SAASC,kBAAT,QAAmC,SAAnC;AACA,SAASC,YAAT,QAA6B,cAA7B;AACA,SAASC,aAAT,QAA8B,eAA9B;;AAEA,MAAMC,OAAO,GAAG,UACdC,IADc,EAEdC,GAFc,EAGdC,EAHc,EAIdC,EAJc;AAAA,MAKdC,EALc,uEAKT,CALS;AAAA,MAMdC,EANc,uEAMT,CANS;AAAA,SAQdL,IAAI,CAACM,OAAL,CACEN,IAAI,CAACO,QAAL,CACEN,GAAG,CAACO,IAAJ,CAASC,CAAT,GAAaP,EAAb,GAAkBE,EADpB,EAEEH,GAAG,CAACO,IAAJ,CAASE,CAAT,GAAaP,EAAb,GAAkBE,EAFpB,EAGEJ,GAAG,CAACO,IAAJ,CAASG,KAAT,GAAiB,IAAIT,EAHvB,EAIED,GAAG,CAACO,IAAJ,CAASI,MAAT,GAAkB,IAAIT,EAJxB,CADF,EAOEF,GAAG,CAACY,EAAJ,GAASX,EAPX,EAQED,GAAG,CAACa,EAAJ,GAASX,EARX,CARc;AAAA,CAAhB;;AAmBA,MAAMY,OAAO,GAAG,UACdf,IADc,EAEdC,GAFc,EAGdC,EAHc,EAIdC,EAJc;AAAA,MAKdC,EALc,uEAKT,CALS;AAAA,MAMdC,EANc,uEAMT,CANS;AAAA,SAOXN,OAAO,CAACC,IAAD,EAAOC,GAAP,EAAY,CAACC,EAAb,EAAiB,CAACC,EAAlB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AsBT,MAAM,CAAC8D,SAA7B,EAAwC,KAAxC;AACA,YAAMd,MAAM,GAAG,KAAKxC,IAAL,CAAUyC,KAAV,EAAf;AACAD,MAAAA,MAAM,CAACE,QAAP,CAAgB7C,YAAY,CAAC,KAAKG,IAAN,EAAYqC,KAAZ,EAAmBV,OAAnB,CAA5B;AACAa,MAAAA,MAAM,CAACG,aAAP,CACE,KAAK3C,IAAL,CAAU4C,UAAV,CAAqBC,QAArB,CAA8BtD,SAAS,CAACuD,MAAxC,EAAgDR,IAAhD,EAAsD,IAAtD,CADF;AAGA,YAAMF,KAAK,GAAGrB,OAAO,CAAC,KAAKf,IAAN,EAAYC,GAAZ,EAAiBsC,MAAjB,EAAyBA,MAAzB,EAAiCrC,EAAjC,EAAqCC,EAArC,CAArB;AACA,YAAMoD,KAAK,GAAGxD,OAAO,CAAC,KAAKC,IAAN,EAAYC,GAAZ,EAAiB+C,KAAK,CAACvC,CAAvB,EAA0BuC,KAAK,CAACtC,CAAhC,CAArB;AACAe,MAAAA,MAAM,CAAC+B,UAAP,CAAkBD,KAAlB,EAAyBnB,KAAzB,EAAgCI,MAAhC;AACAf,MAAAA,MAAM,CAACgC,OAAP;AACD,KAhBH;AAiBD;;AApDkD","sourcesContent":["import type { SkRRect, Skia } from \"../../../skia/types\";\nimport { BlurStyle, ClipOp, isRRect } from \"../../../skia/types\";\nimport type { DrawingContext } from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport type { BoxShadowProps, BoxProps } from \"../../types/Drawings\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport { processColor } from \"../datatypes\";\nimport { JsiRenderNode } from \"../RenderNode\";\n\nconst inflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) =>\n Skia.RRectXY(\n Skia.XYWHRect(\n box.rect.x - dx + tx,\n box.rect.y - dy + ty,\n box.rect.width + 2 * dx,\n box.rect.height + 2 * dy\n ),\n box.rx + dx,\n box.ry + dy\n );\n\nconst deflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) => inflate(Skia, box, -dx, -dy, tx, ty);\n\nexport class BoxShadowNode extends JsiDeclarationNode<\n BoxShadowProps,\n BoxShadowProps\n> {\n constructor(ctx: NodeContext, props: BoxShadowProps) {\n super(ctx, DeclarationType.Unknown, NodeType.Box, props);\n }\n\n materialize() {\n return this.props;\n }\n}\n\nexport class BoxNode extends JsiRenderNode<BoxProps> {\n constructor(ctx: NodeContext, props: BoxProps) {\n super(ctx, NodeType.Box, props);\n }\n\n renderNode({ canvas, paint, opacity }: DrawingContext) {\n const { box: defaultBox } = this.props;\n const box = isRRect(defaultBox)\n ? defaultBox\n : this.Skia.RRectXY(defaultBox, 0, 0);\n const shadows = this._children\n .map((node) => {\n if (node instanceof BoxShadowNode) {\n return node.materialize();\n }\n return null;\n })\n .filter((n): n is BoxShadowProps => n !== null);\n shadows\n .filter((shadow) => !shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const lPaint = this.Skia.Paint();\n lPaint.setColor(processColor(this.Skia, color, opacity));\n lPaint.setMaskFilter(\n this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n canvas.drawRRect(\n inflate(this.Skia, box, spread, spread, dx, dy),\n lPaint\n );\n });\n\n canvas.drawRRect(box, paint);\n\n shadows\n .filter((shadow) => shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const delta = this.Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));\n canvas.save();\n canvas.clipRRect(box, ClipOp.Intersect, false);\n const lPaint = this.Skia.Paint();\n lPaint.setColor(processColor(this.Skia, color, opacity));\n lPaint.setMaskFilter(\n this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n const inner = deflate(this.Skia, box, spread, spread, dx, dy);\n const outer = inflate(this.Skia, box, delta.x, delta.y);\n canvas.drawDRRect(outer, inner, lPaint);\n canvas.restore();\n });\n }\n}\n"]}
1
+ {"version":3,"names":["BlurStyle","ClipOp","isRRect","DeclarationType","NodeType","JsiDeclarationNode","processColor","JsiRenderNode","inflate","Skia","box","dx","dy","tx","ty","RRectXY","XYWHRect","rect","x","y","width","height","rx","ry","deflate","BoxShadowNode","constructor","ctx","props","Unknown","Box","materialize","BoxNode","renderNode","canvas","paint","opacity","defaultBox","shadows","_children","map","node","filter","n","shadow","inner","color","blur","spread","lPaint","Paint","setColor","setMaskFilter","MaskFilter","MakeBlur","Normal","drawRRect","delta","Point","Math","abs","save","clipRRect","Intersect","outer","drawDRRect","restore"],"sources":["Box.ts"],"sourcesContent":["import type { SkRRect, Skia } from \"../../../skia/types\";\nimport { BlurStyle, ClipOp, isRRect } from \"../../../skia/types\";\nimport type { DrawingContext } from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport type { BoxShadowProps, BoxProps } from \"../../types/Drawings\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport { processColor } from \"../datatypes\";\nimport { JsiRenderNode } from \"../RenderNode\";\n\nconst inflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) =>\n Skia.RRectXY(\n Skia.XYWHRect(\n box.rect.x - dx + tx,\n box.rect.y - dy + ty,\n box.rect.width + 2 * dx,\n box.rect.height + 2 * dy\n ),\n box.rx + dx,\n box.ry + dy\n );\n\nconst deflate = (\n Skia: Skia,\n box: SkRRect,\n dx: number,\n dy: number,\n tx = 0,\n ty = 0\n) => inflate(Skia, box, -dx, -dy, tx, ty);\n\nexport class BoxShadowNode extends JsiDeclarationNode<\n BoxShadowProps,\n BoxShadowProps\n> {\n constructor(ctx: NodeContext, props: BoxShadowProps) {\n super(ctx, DeclarationType.Unknown, NodeType.Box, props);\n }\n\n materialize() {\n return this.props;\n }\n}\n\nexport class BoxNode extends JsiRenderNode<BoxProps> {\n constructor(ctx: NodeContext, props: BoxProps) {\n super(ctx, NodeType.Box, props);\n }\n\n renderNode({ canvas, paint, opacity }: DrawingContext) {\n const { box: defaultBox } = this.props;\n const box = isRRect(defaultBox)\n ? defaultBox\n : this.Skia.RRectXY(defaultBox, 0, 0);\n const shadows = this._children\n .map((node) => {\n if (node instanceof BoxShadowNode) {\n return node.materialize();\n }\n return null;\n })\n .filter((n): n is BoxShadowProps => n !== null);\n shadows\n .filter((shadow) => !shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const lPaint = this.Skia.Paint();\n lPaint.setColor(processColor(this.Skia, color, opacity));\n lPaint.setMaskFilter(\n this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n canvas.drawRRect(\n inflate(this.Skia, box, spread, spread, dx, dy),\n lPaint\n );\n });\n\n canvas.drawRRect(box, paint);\n\n shadows\n .filter((shadow) => shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const delta = this.Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));\n canvas.save();\n canvas.clipRRect(box, ClipOp.Intersect, false);\n const lPaint = this.Skia.Paint();\n lPaint.setColor(processColor(this.Skia, color, opacity));\n lPaint.setMaskFilter(\n this.Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n const inner = deflate(this.Skia, box, spread, spread, dx, dy);\n const outer = inflate(this.Skia, box, delta.x, delta.y);\n canvas.drawDRRect(outer, inner, lPaint);\n canvas.restore();\n });\n }\n}\n"],"mappings":"AACA,SAASA,SAAT,EAAoBC,MAApB,EAA4BC,OAA5B,QAA2C,qBAA3C;AAEA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AAGA,SAASC,kBAAT,QAAmC,SAAnC;AACA,SAASC,YAAT,QAA6B,cAA7B;AACA,SAASC,aAAT,Q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AlB,EAAyBnB,KAAzB,EAAgCI,MAAhC;MACAf,MAAM,CAACgC,OAAP;IACD,CAhBH;EAiBD;;AApDkD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CircleNode.ts"],"names":["NodeType","processCircle","JsiDrawingNode","CircleNode","constructor","ctx","props","Circle","deriveProps","Skia","c","draw","canvas","paint","derived","Error","x","y","drawCircle","r"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,aAAT,QAA8B,cAA9B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,UAAN,SAAyBD,cAAzB,CAA8D;AACnEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;AAChD,UAAMD,GAAN,EAAWL,QAAQ,CAACO,MAApB,EAA4BD,KAA5B;AACD;;AAESE,EAAAA,WAAW,GAAG;AACtB,WAAOP,aAAa,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAb,CAAqCI,CAA5C;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;;AACtC,QAAI,CAAC,KAAKC,OAAV,EAAmB;AACjB,YAAM,IAAIC,KAAJ,CAAU,4BAAV,CAAN;AACD;;AACD,UAAM;AAAEC,MAAAA,CAAF;AAAKC,MAAAA;AAAL,QAAW,KAAKH,OAAtB;AACAF,IAAAA,MAAM,CAACM,UAAP,CAAkBF,CAAlB,EAAqBC,CAArB,EAAwB,KAAKX,KAAL,CAAWa,CAAnC,EAAsCN,KAAtC;AACD;;AAfkE","sourcesContent":["import type { SkPoint } from \"../../../skia/types\";\nimport type { CircleProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processCircle } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class CircleNode extends JsiDrawingNode<CircleProps, SkPoint> {\n constructor(ctx: NodeContext, props: CircleProps) {\n super(ctx, NodeType.Circle, props);\n }\n\n protected deriveProps() {\n return processCircle(this.Skia, this.props).c;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"CircleNode: c is undefined\");\n }\n const { x, y } = this.derived;\n canvas.drawCircle(x, y, this.props.r, paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","processCircle","JsiDrawingNode","CircleNode","constructor","ctx","props","Circle","deriveProps","Skia","c","draw","canvas","paint","derived","Error","x","y","drawCircle","r"],"sources":["CircleNode.ts"],"sourcesContent":["import type { SkPoint } from \"../../../skia/types\";\nimport type { CircleProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processCircle } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class CircleNode extends JsiDrawingNode<CircleProps, SkPoint> {\n constructor(ctx: NodeContext, props: CircleProps) {\n super(ctx, NodeType.Circle, props);\n }\n\n protected deriveProps() {\n return processCircle(this.Skia, this.props).c;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n if (!this.derived) {\n throw new Error(\"CircleNode: c is undefined\");\n }\n const { x, y } = this.derived;\n canvas.drawCircle(x, y, this.props.r, paint);\n }\n}\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,aAAT,QAA8B,cAA9B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,UAAN,SAAyBD,cAAzB,CAA8D;EACnEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;IAChD,MAAMD,GAAN,EAAWL,QAAQ,CAACO,MAApB,EAA4BD,KAA5B;EACD;;EAESE,WAAW,GAAG;IACtB,OAAOP,aAAa,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAb,CAAqCI,CAA5C;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,CAAC,KAAKC,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,4BAAV,CAAN;IACD;;IACD,MAAM;MAAEC,CAAF;MAAKC;IAAL,IAAW,KAAKH,OAAtB;IACAF,MAAM,CAACM,UAAP,CAAkBF,CAAlB,EAAqBC,CAArB,EAAwB,KAAKX,KAAL,CAAWa,CAAnC,EAAsCN,KAAtC;EACD;;AAfkE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CustomDrawingNode.ts"],"names":["NodeType","JsiDrawingNode","CustomDrawingNode","constructor","ctx","props","Drawing","deriveProps","draw","drawing"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,iBAAN,SAAgCD,cAAhC,CAGL;AACAE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAkD;AAC3D,UAAMD,GAAN,EAAWJ,QAAQ,CAACM,OAApB,EAA6BD,KAA7B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,CAACJ,GAAD,EAAsB;AACxB,SAAKC,KAAL,CAAWI,OAAX,CAAmBL,GAAnB;AACD;;AAXD","sourcesContent":["import type { CustomDrawingNodeProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class CustomDrawingNode extends JsiDrawingNode<\n CustomDrawingNodeProps,\n null\n> {\n constructor(ctx: NodeContext, props: CustomDrawingNodeProps) {\n super(ctx, NodeType.Drawing, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw(ctx: DrawingContext) {\n this.props.drawing(ctx);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","JsiDrawingNode","CustomDrawingNode","constructor","ctx","props","Drawing","deriveProps","draw","drawing"],"sources":["CustomDrawingNode.ts"],"sourcesContent":["import type { CustomDrawingNodeProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class CustomDrawingNode extends JsiDrawingNode<\n CustomDrawingNodeProps,\n null\n> {\n constructor(ctx: NodeContext, props: CustomDrawingNodeProps) {\n super(ctx, NodeType.Drawing, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw(ctx: DrawingContext) {\n this.props.drawing(ctx);\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,iBAAN,SAAgCD,cAAhC,CAGL;EACAE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAkD;IAC3D,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,OAApB,EAA6BD,KAA7B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,CAACJ,GAAD,EAAsB;IACxB,KAAKC,KAAL,CAAWI,OAAX,CAAmBL,GAAnB;EACD;;AAXD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DiffRectNode.ts"],"names":["NodeType","JsiDrawingNode","DiffRectNode","constructor","ctx","props","DiffRect","deriveProps","draw","canvas","paint","outer","inner","drawDRRect"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,cAA3B,CAA+D;AACpEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;AAClD,UAAMD,GAAN,EAAWJ,QAAQ,CAACM,QAApB,EAA8BD,KAA9B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtC,UAAM;AAAEC,MAAAA,KAAF;AAASC,MAAAA;AAAT,QAAmB,KAAKP,KAA9B;AACAI,IAAAA,MAAM,CAACI,UAAP,CAAkBF,KAAlB,EAAyBC,KAAzB,EAAgCF,KAAhC;AACD;;AAZmE","sourcesContent":["import type { DiffRectProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class DiffRectNode extends JsiDrawingNode<DiffRectProps, null> {\n constructor(ctx: NodeContext, props: DiffRectProps) {\n super(ctx, NodeType.DiffRect, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { outer, inner } = this.props;\n canvas.drawDRRect(outer, inner, paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","JsiDrawingNode","DiffRectNode","constructor","ctx","props","DiffRect","deriveProps","draw","canvas","paint","outer","inner","drawDRRect"],"sources":["DiffRectNode.ts"],"sourcesContent":["import type { DiffRectProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class DiffRectNode extends JsiDrawingNode<DiffRectProps, null> {\n constructor(ctx: NodeContext, props: DiffRectProps) {\n super(ctx, NodeType.DiffRect, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { outer, inner } = this.props;\n canvas.drawDRRect(outer, inner, paint);\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,cAA3B,CAA+D;EACpEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,QAApB,EAA8BD,KAA9B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,KAAF;MAASC;IAAT,IAAmB,KAAKP,KAA9B;IACAI,MAAM,CAACI,UAAP,CAAkBF,KAAlB,EAAyBC,KAAzB,EAAgCF,KAAhC;EACD;;AAZmE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["FillNode.ts"],"names":["NodeType","JsiDrawingNode","FillNode","constructor","ctx","props","Fill","deriveProps","draw","canvas","paint","drawPaint"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAA8D;AACnEE,EAAAA,WAAW,CAACC,GAAD,EAAiD;AAAA,QAA9BC,KAA8B,uEAAJ,EAAI;AAC1D,UAAMD,GAAN,EAAWJ,QAAQ,CAACM,IAApB,EAA0BD,KAA1B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtCD,IAAAA,MAAM,CAACE,SAAP,CAAiBD,KAAjB;AACD;;AAXkE","sourcesContent":["import type { DrawingContext, DrawingNodeProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class FillNode extends JsiDrawingNode<DrawingNodeProps, null> {\n constructor(ctx: NodeContext, props: DrawingNodeProps = {}) {\n super(ctx, NodeType.Fill, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n canvas.drawPaint(paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","JsiDrawingNode","FillNode","constructor","ctx","props","Fill","deriveProps","draw","canvas","paint","drawPaint"],"sources":["FillNode.ts"],"sourcesContent":["import type { DrawingContext, DrawingNodeProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class FillNode extends JsiDrawingNode<DrawingNodeProps, null> {\n constructor(ctx: NodeContext, props: DrawingNodeProps = {}) {\n super(ctx, NodeType.Fill, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n canvas.drawPaint(paint);\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAA8D;EACnEE,WAAW,CAACC,GAAD,EAAiD;IAAA,IAA9BC,KAA8B,uEAAJ,EAAI;IAC1D,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,IAApB,EAA0BD,KAA1B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtCD,MAAM,CAACE,SAAP,CAAiBD,KAAjB;EACD;;AAXkE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ImageNode.ts"],"names":["NodeType","fitRects","processRect","JsiDrawingNode","ImageNode","constructor","ctx","props","Image","deriveProps","image","fit","rect","Skia","src","dst","x","y","width","height","draw","canvas","paint","derived","Error","drawImageRect"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,QAAT,EAAmBC,WAAnB,QAAsC,cAAtC;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAGL;AACAE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;AAC/C,UAAMD,GAAN,EAAWN,QAAQ,CAACQ,KAApB,EAA2BD,KAA3B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEC,MAAAA,KAAF;AAASC,MAAAA;AAAT,QAAiB,KAAKJ,KAA5B;AACA,UAAMK,IAAI,GAAGV,WAAW,CAAC,KAAKW,IAAN,EAAY,KAAKN,KAAjB,CAAxB;AACA,UAAM;AAAEO,MAAAA,GAAF;AAAOC,MAAAA;AAAP,QAAed,QAAQ,CAC3BU,GAD2B,EAE3B;AACEK,MAAAA,CAAC,EAAE,CADL;AAEEC,MAAAA,CAAC,EAAE,CAFL;AAGEC,MAAAA,KAAK,EAAER,KAAK,CAACQ,KAAN,EAHT;AAIEC,MAAAA,MAAM,EAAET,KAAK,CAACS,MAAN;AAJV,KAF2B,EAQ3BP,IAR2B,CAA7B;AAUA,WAAO;AAAEE,MAAAA,GAAF;AAAOC,MAAAA;AAAP,KAAP;AACD;;AAEDK,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtC,UAAM;AAAEZ,MAAAA;AAAF,QAAY,KAAKH,KAAvB;;AACA,QAAI,CAAC,KAAKgB,OAAV,EAAmB;AACjB,YAAM,IAAIC,KAAJ,CAAU,sCAAV,CAAN;AACD;;AACD,UAAM;AAAEV,MAAAA,GAAF;AAAOC,MAAAA;AAAP,QAAe,KAAKQ,OAA1B;AACAF,IAAAA,MAAM,CAACI,aAAP,CAAqBf,KAArB,EAA4BI,GAA5B,EAAiCC,GAAjC,EAAsCO,KAAtC;AACD;;AA5BD","sourcesContent":["import type { SkRect } from \"../../../skia/types\";\nimport type { DrawingContext, ImageProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { fitRects, processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class ImageNode extends JsiDrawingNode<\n ImageProps,\n { src: SkRect; dst: SkRect }\n> {\n constructor(ctx: NodeContext, props: ImageProps) {\n super(ctx, NodeType.Image, props);\n }\n\n deriveProps() {\n const { image, fit } = this.props;\n const rect = processRect(this.Skia, this.props);\n const { src, dst } = fitRects(\n fit,\n {\n x: 0,\n y: 0,\n width: image.width(),\n height: image.height(),\n },\n rect\n );\n return { src, dst };\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { image } = this.props;\n if (!this.derived) {\n throw new Error(\"ImageNode: src and dst are undefined\");\n }\n const { src, dst } = this.derived;\n canvas.drawImageRect(image, src, dst, paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","fitRects","processRect","JsiDrawingNode","ImageNode","constructor","ctx","props","Image","deriveProps","image","fit","rect","Skia","src","dst","x","y","width","height","draw","canvas","paint","derived","Error","drawImageRect"],"sources":["ImageNode.ts"],"sourcesContent":["import type { SkRect } from \"../../../skia/types\";\nimport type { DrawingContext, ImageProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { fitRects, processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class ImageNode extends JsiDrawingNode<\n ImageProps,\n { src: SkRect; dst: SkRect }\n> {\n constructor(ctx: NodeContext, props: ImageProps) {\n super(ctx, NodeType.Image, props);\n }\n\n deriveProps() {\n const { image, fit } = this.props;\n const rect = processRect(this.Skia, this.props);\n const { src, dst } = fitRects(\n fit,\n {\n x: 0,\n y: 0,\n width: image.width(),\n height: image.height(),\n },\n rect\n );\n return { src, dst };\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { image } = this.props;\n if (!this.derived) {\n throw new Error(\"ImageNode: src and dst are undefined\");\n }\n const { src, dst } = this.derived;\n canvas.drawImageRect(image, src, dst, paint);\n }\n}\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,QAAT,EAAmBC,WAAnB,QAAsC,cAAtC;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAGL;EACAE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWN,QAAQ,CAACQ,KAApB,EAA2BD,KAA3B;EACD;;EAEDE,WAAW,GAAG;IACZ,MAAM;MAAEC,KAAF;MAASC;IAAT,IAAiB,KAAKJ,KAA5B;IACA,MAAMK,IAAI,GAAGV,WAAW,CAAC,KAAKW,IAAN,EAAY,KAAKN,KAAjB,CAAxB;IACA,MAAM;MAAEO,GAAF;MAAOC;IAAP,IAAed,QAAQ,CAC3BU,GAD2B,EAE3B;MACEK,CAAC,EAAE,CADL;MAEEC,CAAC,EAAE,CAFL;MAGEC,KAAK,EAAER,KAAK,CAACQ,KAAN,EAHT;MAIEC,MAAM,EAAET,KAAK,CAACS,MAAN;IAJV,CAF2B,EAQ3BP,IAR2B,CAA7B;IAUA,OAAO;MAAEE,GAAF;MAAOC;IAAP,CAAP;EACD;;EAEDK,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEZ;IAAF,IAAY,KAAKH,KAAvB;;IACA,IAAI,CAAC,KAAKgB,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,sCAAV,CAAN;IACD;;IACD,MAAM;MAAEV,GAAF;MAAOC;IAAP,IAAe,KAAKQ,OAA1B;IACAF,MAAM,CAACI,aAAP,CAAqBf,KAArB,EAA4BI,GAA5B,EAAiCC,GAAjC,EAAsCO,KAAtC;EACD;;AA5BD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ImageSVG.ts"],"names":["NodeType","processRect","JsiDrawingNode","ImageSVGNode","constructor","ctx","props","ImageSVG","deriveProps","draw","canvas","svg","x","y","width","height","Skia","save","translate","drawSvg","restore"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,cAA3B,CAA+D;AACpEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;AAClD,UAAMD,GAAN,EAAWL,QAAQ,CAACO,QAApB,EAA8BD,KAA9B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAA6B;AAAA,QAA5B;AAAEC,MAAAA;AAAF,KAA4B;AAC/B,UAAM;AAAEC,MAAAA;AAAF,QAAU,KAAKL,KAArB;AACA,UAAM;AAAEM,MAAAA,CAAF;AAAKC,MAAAA,CAAL;AAAQC,MAAAA,KAAR;AAAeC,MAAAA;AAAf,QAA0Bd,WAAW,CAAC,KAAKe,IAAN,EAAY,KAAKV,KAAjB,CAA3C;AACAI,IAAAA,MAAM,CAACO,IAAP;AACAP,IAAAA,MAAM,CAACQ,SAAP,CAAiBN,CAAjB,EAAoBC,CAApB;AACAH,IAAAA,MAAM,CAACS,OAAP,CAAeR,GAAf,EAAoBG,KAApB,EAA2BC,MAA3B;AACAL,IAAAA,MAAM,CAACU,OAAP;AACD;;AAhBmE","sourcesContent":["import type { DrawingContext, ImageSVGProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class ImageSVGNode extends JsiDrawingNode<ImageSVGProps, null> {\n constructor(ctx: NodeContext, props: ImageSVGProps) {\n super(ctx, NodeType.ImageSVG, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas }: DrawingContext) {\n const { svg } = this.props;\n const { x, y, width, height } = processRect(this.Skia, this.props);\n canvas.save();\n canvas.translate(x, y);\n canvas.drawSvg(svg, width, height);\n canvas.restore();\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","processRect","JsiDrawingNode","ImageSVGNode","constructor","ctx","props","ImageSVG","deriveProps","draw","canvas","svg","x","y","width","height","Skia","save","translate","drawSvg","restore"],"sources":["ImageSVG.ts"],"sourcesContent":["import type { DrawingContext, ImageSVGProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class ImageSVGNode extends JsiDrawingNode<ImageSVGProps, null> {\n constructor(ctx: NodeContext, props: ImageSVGProps) {\n super(ctx, NodeType.ImageSVG, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas }: DrawingContext) {\n const { svg } = this.props;\n const { x, y, width, height } = processRect(this.Skia, this.props);\n canvas.save();\n canvas.translate(x, y);\n canvas.drawSvg(svg, width, height);\n canvas.restore();\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,cAA3B,CAA+D;EACpEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWL,QAAQ,CAACO,QAApB,EAA8BD,KAA9B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAA6B;IAAA,IAA5B;MAAEC;IAAF,CAA4B;IAC/B,MAAM;MAAEC;IAAF,IAAU,KAAKL,KAArB;IACA,MAAM;MAAEM,CAAF;MAAKC,CAAL;MAAQC,KAAR;MAAeC;IAAf,IAA0Bd,WAAW,CAAC,KAAKe,IAAN,EAAY,KAAKV,KAAjB,CAA3C;IACAI,MAAM,CAACO,IAAP;IACAP,MAAM,CAACQ,SAAP,CAAiBN,CAAjB,EAAoBC,CAApB;IACAH,MAAM,CAACS,OAAP,CAAeR,GAAf,EAAoBG,KAApB,EAA2BC,MAA3B;IACAL,MAAM,CAACU,OAAP;EACD;;AAhBmE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["LineNode.ts"],"names":["NodeType","JsiDrawingNode","LineNode","constructor","ctx","props","Line","deriveProps","draw","canvas","paint","p1","p2","drawLine","x","y"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAuD;AAC5DE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;AAC9C,UAAMD,GAAN,EAAWJ,QAAQ,CAACM,IAApB,EAA0BD,KAA1B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtC,UAAM;AAAEC,MAAAA,EAAF;AAAMC,MAAAA;AAAN,QAAa,KAAKP,KAAxB;AACAI,IAAAA,MAAM,CAACI,QAAP,CAAgBF,EAAE,CAACG,CAAnB,EAAsBH,EAAE,CAACI,CAAzB,EAA4BH,EAAE,CAACE,CAA/B,EAAkCF,EAAE,CAACG,CAArC,EAAwCL,KAAxC;AACD;;AAZ2D","sourcesContent":["import type { DrawingContext, LineProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class LineNode extends JsiDrawingNode<LineProps, null> {\n constructor(ctx: NodeContext, props: LineProps) {\n super(ctx, NodeType.Line, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { p1, p2 } = this.props;\n canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","JsiDrawingNode","LineNode","constructor","ctx","props","Line","deriveProps","draw","canvas","paint","p1","p2","drawLine","x","y"],"sources":["LineNode.ts"],"sourcesContent":["import type { DrawingContext, LineProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class LineNode extends JsiDrawingNode<LineProps, null> {\n constructor(ctx: NodeContext, props: LineProps) {\n super(ctx, NodeType.Line, props);\n }\n\n deriveProps() {\n return null;\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { p1, p2 } = this.props;\n canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);\n }\n}\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAuD;EAC5DE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,IAApB,EAA0BD,KAA1B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,EAAF;MAAMC;IAAN,IAAa,KAAKP,KAAxB;IACAI,MAAM,CAACI,QAAP,CAAgBF,EAAE,CAACG,CAAnB,EAAsBH,EAAE,CAACI,CAAzB,EAA4BH,EAAE,CAACE,CAA/B,EAAkCF,EAAE,CAACG,CAArC,EAAwCL,KAAxC;EACD;;AAZ2D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["OvalNode.ts"],"names":["NodeType","processRect","JsiDrawingNode","OvalNode","constructor","ctx","props","Oval","deriveProps","Skia","draw","canvas","paint","derived","undefined","Error","drawOval"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAyD;AAC9DE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;AAC9C,UAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAOP,WAAW,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAlB;AACD;;AAEDI,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;;AACtC,QAAI,KAAKC,OAAL,KAAiBC,SAArB,EAAgC;AAC9B,YAAM,IAAIC,KAAJ,CAAU,6BAAV,CAAN;AACD;;AACDJ,IAAAA,MAAM,CAACK,QAAP,CAAgB,KAAKH,OAArB,EAA8BD,KAA9B;AACD;;AAd6D","sourcesContent":["import type { SkRect } from \"../../../skia/types\";\nimport type { DrawingContext, OvalProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class OvalNode extends JsiDrawingNode<OvalProps, SkRect> {\n constructor(ctx: NodeContext, props: OvalProps) {\n super(ctx, NodeType.Oval, 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(\"OvalNode: rect is undefined\");\n }\n canvas.drawOval(this.derived, paint);\n }\n}\n"]}
1
+ {"version":3,"names":["NodeType","processRect","JsiDrawingNode","OvalNode","constructor","ctx","props","Oval","deriveProps","Skia","draw","canvas","paint","derived","undefined","Error","drawOval"],"sources":["OvalNode.ts"],"sourcesContent":["import type { SkRect } from \"../../../skia/types\";\nimport type { DrawingContext, OvalProps } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { processRect } from \"../datatypes\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\n\nexport class OvalNode extends JsiDrawingNode<OvalProps, SkRect> {\n constructor(ctx: NodeContext, props: OvalProps) {\n super(ctx, NodeType.Oval, 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(\"OvalNode: rect is undefined\");\n }\n canvas.drawOval(this.derived, paint);\n }\n}\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAyD;EAC9DE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAOP,WAAW,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAlB;EACD;;EAEDI,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,"sources":["PatchNode.ts"],"names":["BlendMode","NodeType","ALPHA","enumKey","processColor","JsiDrawingNode","PatchNode","constructor","ctx","props","Patch","deriveProps","colors","blendMode","patch","defaultBlendMode","DstOver","SrcOver","mode","points","pos","c2","c1","map","c","Skia","undefined","draw","canvas","paint","opacity","derived","Error","texture","drawPatch"],"mappings":"AACA,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,KAAT,EAAgBC,OAAhB,EAAyBC,YAAzB,QAA6C,cAA7C;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAGL;AACAE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;AAC/C,UAAMD,GAAN,EAAWP,QAAQ,CAACS,KAApB,EAA2BD,KAA3B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,M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A;AAAF,QAAc,KAAKxB,KAAzB;AACA,UAAM;AAAEG,MAAAA,MAAF;AAAUO,MAAAA,MAAV;AAAkBD,MAAAA;AAAlB,QAA2B,KAAKa,OAAtC;AACAH,IAAAA,MAAM,CAACM,SAAP,CACEf,MADF,EAEEW,OAAO,KAAK,CAAZ,GACIlB,MADJ,GAEIA,MAAM,IACJA,MAAM,CAACW,GAAP,CAAYC,CAAD,IAAO;AAChBA,MAAAA,CAAC,CAACtB,KAAD,CAAD,GAAWsB,CAAC,CAACtB,KAAD,CAAD,GAAW4B,OAAtB;AACA,aAAON,CAAP;AACD,KAHD,CALR,EASES,OATF,EAUEf,IAVF,EAWEW,KAXF;AAaD;;AAvDD","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"]}
1
+ {"version":3,"names":["BlendMode","NodeType","ALPHA","enumKey","processColor","JsiDrawingNode","PatchNode","constructor","ctx","props","Patch","deriveProps","colors","blendMode","patch","defaultBlendMode","DstOver","SrcOver","mode","points","pos","c2","c1","map","c","Skia","undefined","draw","canvas","paint","opacity","derived","Error","texture","drawPatch"],"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,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,KAAT,EAAgBC,OAAhB,EAAyBC,YAAzB,QAA6C,cAA7C;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAGL;EACAE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWP,QAAQ,CAACS,KAApB,EAA2BD,KAA3B;EACD;;EAEDE,WAAW,GAAG;IACZ,MAAM;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,IAA+B,KAAKL,KAA1C;IACA,MAAMM,gBAAgB,GAAGH,MAAM,GAAGZ,SAAS,CAACgB,OAAb,GAAuBhB,SAAS,CAACiB,OAAhE;IACA,MAAMC,IAAI,GAAGL,SAAS,GAAGb,SAAS,CAACG,OAAO,CAACU,SAAD,CAAR,CAAZ,GAAmCE,gBAAzD,CAHY,CAIZ;IACA;IACA;IACA;IACA;;IACA,OAAO;MACLG,IADK;MAELC,MAAM,EAAE,CACNL,KAAK,CAAC,CAAD,CAAL,CAASM,GADH,EAENN,KAAK,CAAC,CAAD,CAAL,CAASO,EAFH,EAGNP,KAAK,CAAC,CAAD,CAAL,CAASQ,EAHH,EAINR,KAAK,CAAC,CAAD,CAAL,CAASM,GAJH,EAKNN,KAAK,CAAC,CAAD,CAAL,CAASO,EALH,EAMNP,KAAK,CAAC,CAAD,CAAL,CAASQ,EANH,EAONR,KAAK,CAAC,CAAD,CAAL,CAASM,GAPH,EAQNN,KAAK,CAAC,CAAD,CAAL,CAASO,EARH,EASNP,KAAK,CAAC,CAAD,CAAL,CAASQ,EATH,EAUNR,KAAK,CAAC,CAAD,CAAL,CAASM,GAVH,EAWNN,KAAK,CAAC,CAAD,CAAL,CAASO,EAXH,EAYNP,KAAK,CAAC,CAAD,CAAL,CAASQ,EAZH,CAFH;MAgBLV,MAAM,EAAEA,MAAM,GACVA,MAAM,CAACW,GAAP,CAAYC,CAAD,IAAOpB,YAAY,CAAC,KAAKqB,IAAN,EAAYD,CAAZ,EAAe,CAAf,CAA9B,CADU,GAEVE;IAlBC,CAAP;EAoBD;;EAEDC,IAAI,OAA6C;IAAA,IAA5C;MAAEC,MAAF;MAAUC,KAAV;MAAiBC;IAAjB,CAA4C;;IAC/C,IAAI,CAAC,KAAKC,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,kCAAV,CAAN;IACD;;IACD,MAAM;MAAEC;IAAF,IAAc,KAAKxB,KAAzB;IACA,MAAM;MAAEG,MAAF;MAAUO,MAAV;MAAkBD;IAAlB,IAA2B,KAAKa,OAAtC;IACAH,MAAM,CAACM,SAAP,CACEf,MADF,EAEEW,OAAO,KAAK,CAAZ,GACIlB,MADJ,GAEIA,MAAM,IACJA,MAAM,CAACW,GAAP,CAAYC,CAAD,IAAO;MAChBA,CAAC,CAACtB,KAAD,CAAD,GAAWsB,CAAC,CAACtB,KAAD,CAAD,GAAW4B,OAAtB;MACA,OAAON,CAAP;IACD,CAHD,CALR,EASES,OATF,EAUEf,IAVF,EAWEW,KAXF;EAaD;;AAvDD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PathNode.ts"],"names":["FillType","NodeType","enumKey","processPath","JsiDrawingNode","PathNode","constructor","ctx","props","Path","deriveProps","start","end","fillType","stroke","pathProps","hasStartOffset","hasEndOffset","hasStrokeOptions","undefined","hasFillType","willMutatePath","pristinePath","Skia","path","copy","setFillType","trim","draw","canvas","paint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AAsB,KAAtB;AACD;;AACD,WAAOY,IAAP;AACD;;AAEDI,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;;AACtC,QAAI,CAAC,KAAKC,OAAV,EAAmB;AACjB,YAAM,IAAIC,KAAJ,CAAU,sBAAV,CAAN;AACD;;AACDH,IAAAA,MAAM,CAACI,QAAP,CAAgB,KAAKF,OAArB,EAA8BD,KAA9B;AACD;;AAhC6D","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"]}
1
+ {"version":3,"names":["FillType","NodeType","enumKey","processPath","JsiDrawingNode","PathNode","constructor","ctx","props","Path","deriveProps","start","end","fillType","stroke","pathProps","hasStartOffset","hasEndOffset","hasStrokeOptions","undefined","hasFillType","willMutatePath","pristinePath","Skia","path","copy","setFillType","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":"AAAA,SAASA,QAAT,QAAyB,qBAAzB;AAGA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,cAArC;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAyD;EAC9DE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWN,QAAQ,CAACQ,IAApB,EAA0BD,KAA1B;EACD;;EAESE,WAAW,GAAG;IACtB,MAAM;MAAEC,KAAF;MAASC,GAAT;MAAcC,QAAd;MAAwBC,MAAxB;MAAgC,GAAGC;IAAnC,IAAiD,KAAKP,KAA5D;IACA,MAAMQ,cAAc,GAAGL,KAAK,KAAK,CAAjC;IACA,MAAMM,YAAY,GAAGL,GAAG,KAAK,CAA7B;IACA,MAAMM,gBAAgB,GAAGJ,MAAM,KAAKK,SAApC;IACA,MAAMC,WAAW,GAAG,CAAC,CAACP,QAAtB;IACA,MAAMQ,cAAc,GAClBL,cAAc,IAAIC,YAAlB,IAAkCC,gBAAlC,IAAsDE,WADxD;IAEA,MAAME,YAAY,GAAGnB,WAAW,CAAC,KAAKoB,IAAN,EAAYR,SAAS,CAACS,IAAtB,CAAhC;IACA,MAAMA,IAAI,GAAGH,cAAc,GAAGC,YAAY,CAACG,IAAb,EAAH,GAAyBH,YAApD;;IACA,IAAIF,WAAJ,EAAiB;MACfI,IAAI,CAACE,WAAL,CAAiB1B,QAAQ,CAACE,OAAO,CAACW,QAAD,CAAR,CAAzB;IACD;;IACD,IAAIK,gBAAJ,EAAsB;MACpBM,IAAI,CAACV,MAAL,CAAYA,MAAZ;IACD;;IACD,IAAIE,cAAc,IAAIC,YAAtB,EAAoC;MAClCO,IAAI,CAACG,IAAL,CAAUhB,KAAV,EAAiBC,GAAjB,EAAsB,KAAtB;IACD;;IACD,OAAOY,IAAP;EACD;;EAEDI,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,CAAC,KAAKC,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,sBAAV,CAAN;IACD;;IACDH,MAAM,CAACI,QAAP,CAAgB,KAAKF,OAArB,EAA8BD,KAA9B;EACD;;AAhC6D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PictureNode.ts"],"names":["NodeType","JsiDrawingNode","PictureNode","constructor","ctx","props","Picture","deriveProps","draw","canvas","picture","drawPicture"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,WAAN,SAA0BD,cAA1B,CAA6D;AAClEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAwC;AACjD,UAAMD,GAAN,EAAWJ,QAAQ,CAACM,OAApB,EAA6BD,KAA7B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAA6B;AAAA,QAA5B;AAAEC,MAAAA;AAAF,KAA4B;AAC/B,UAAM;AAAEC,MAAAA;AAAF,QAAc,KAAKL,KAAzB;AACAI,IAAAA,MAAM,CAACE,WAAP,CAAmBD,OAAnB;AACD;;AAZiE","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"]}
1
+ {"version":3,"names":["NodeType","JsiDrawingNode","PictureNode","constructor","ctx","props","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,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,WAAN,SAA0BD,cAA1B,CAA6D;EAClEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAwC;IACjD,MAAMD,GAAN,EAAWJ,QAAQ,CAACM,OAApB,EAA6BD,KAA7B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAA6B;IAAA,IAA5B;MAAEC;IAAF,CAA4B;IAC/B,MAAM;MAAEC;IAAF,IAAc,KAAKL,KAAzB;IACAI,MAAM,CAACE,WAAP,CAAmBD,OAAnB;EACD;;AAZiE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PointsNode.ts"],"names":["PointMode","NodeType","enumKey","JsiDrawingNode","PointsNode","constructor","ctx","props","Points","deriveProps","draw","canvas","paint","points","mode","drawPoints"],"mappings":"AAAA,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,OAAT,QAAwB,cAAxB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,UAAN,SAAyBD,cAAzB,CAA2D;AAChEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;AAChD,UAAMD,GAAN,EAAWL,QAAQ,CAACO,MAApB,EAA4BD,KAA5B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtC,UAAM;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,QAAmB,KAAKP,KAA9B;AACAI,IAAAA,MAAM,CAACI,UAAP,CAAkBf,SAAS,CAACE,OAAO,CAACY,IAAD,CAAR,CAA3B,EAA4CD,MAA5C,EAAoDD,KAApD;AACD;;AAZ+D","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"]}
1
+ {"version":3,"names":["PointMode","NodeType","enumKey","JsiDrawingNode","PointsNode","constructor","ctx","props","Points","deriveProps","draw","canvas","paint","points","mode","drawPoints"],"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,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,OAAT,QAAwB,cAAxB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,UAAN,SAAyBD,cAAzB,CAA2D;EAChEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;IAChD,MAAMD,GAAN,EAAWL,QAAQ,CAACO,MAApB,EAA4BD,KAA5B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,IAAP;EACD;;EAEDC,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,MAAF;MAAUC;IAAV,IAAmB,KAAKP,KAA9B;IACAI,MAAM,CAACI,UAAP,CAAkBf,SAAS,CAACE,OAAO,CAACY,IAAD,CAAR,CAA3B,EAA4CD,MAA5C,EAAoDD,KAApD;EACD;;AAZ+D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RRectNode.ts"],"names":["NodeType","processRRect","JsiDrawingNode","RRectNode","constructor","ctx","props","RRect","deriveProps","Skia","draw","canvas","paint","derived","undefined","Error","drawRRect"],"mappings":";;AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,YAAT,QAA6B,cAA7B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAAkE;AAGvEE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA4C;AACrD,UAAMD,GAAN,EAAWL,QAAQ,CAACO,KAApB,EAA2BD,KAA3B;;AADqD;AAEtD;;AAESE,EAAAA,WAAW,GAAG;AACtB,WAAOP,YAAY,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAnB;AACD;;AAEDI,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;;AACtC,QAAI,KAAKC,OAAL,KAAiBC,SAArB,EAAgC;AAC9B,YAAM,IAAIC,KAAJ,CAAU,8BAAV,CAAN;AACD;;AACDJ,IAAAA,MAAM,CAACK,SAAP,CAAiB,KAAKH,OAAtB,EAA+BD,KAA/B;AACD;;AAhBsE","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"]}
1
+ {"version":3,"names":["NodeType","processRRect","JsiDrawingNode","RRectNode","constructor","ctx","props","RRect","deriveProps","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,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,YAAT,QAA6B,cAA7B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAAkE;EAGvEE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA4C;IACrD,MAAMD,GAAN,EAAWL,QAAQ,CAACO,KAApB,EAA2BD,KAA3B;;IADqD;EAEtD;;EAESE,WAAW,GAAG;IACtB,OAAOP,YAAY,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAnB;EACD;;EAEDI,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,"sources":["RectNode.ts"],"names":["NodeType","processRect","JsiDrawingNode","RectNode","constructor","ctx","props","Rect","deriveProps","Skia","draw","canvas","paint","derived","undefined","Error","drawRect"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAyD;AAC9DE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;AAC9C,UAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;AACD;;AAEDE,EAAAA,WAAW,GAAG;AACZ,WAAOP,WAAW,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAlB;AACD;;AAEDI,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;;AACtC,QAAI,KAAKC,OAAL,KAAiBC,SAArB,EAAgC;AAC9B,YAAM,IAAIC,KAAJ,CAAU,6BAAV,CAAN;AACD;;AACDJ,IAAAA,MAAM,CAACK,QAAP,CAAgB,KAAKH,OAArB,EAA8BD,KAA9B;AACD;;AAd6D","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"]}
1
+ {"version":3,"names":["NodeType","processRect","JsiDrawingNode","RectNode","constructor","ctx","props","Rect","deriveProps","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,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAyD;EAC9DE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAOP,WAAW,CAAC,KAAKQ,IAAN,EAAY,KAAKH,KAAjB,CAAlB;EACD;;EAEDI,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,"sources":["Text.ts"],"names":["NodeType","processPath","JsiDrawingNode","TextNode","constructor","ctx","props","Text","deriveProps","draw","canvas","paint","text","x","y","font","drawText","TextPathNode","TextPath","path","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"],"mappings":"AAOA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AAEA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAuD;AAC5DE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;AAC9C,UAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;AACD;;AAESE,EAAAA,WAAW,GAAG;AACtB,WAAO,IAAP;AACD;;AAEDC,EAAAA,IAAI,OAAoC;AAAA,QAAnC;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAmC;AACtC,UAAM;AAAEC,MAAAA,IAAF;AAAQC,MAAAA,CAAR;AAAWC,MAAAA,CAAX;AAAcC,MAAAA;AAAd,QAAuB,KAAKT,KAAlC;AACAI,IAAAA,MAAM,CAACM,QAAP,CAAgBJ,IAAhB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BH,KAA5B,EAAmCI,IAAnC;AACD;;AAZ2D;AAe9D,OAAO,MAAME,YAAN,SAA2Bf,cAA3B,CAAqE;AAC1EE,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;AAClD,UAAMD,GAAN,EAAWL,QAAQ,CAACkB,QAApB,EAA8BZ,KAA9B;AACD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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"]}
1
+ {"version":3,"names":["NodeType","processPath","JsiDrawingNode","TextNode","constructor","ctx","props","Text","deriveProps","draw","canvas","paint","text","x","y","font","drawText","TextPathNode","TextPath","path","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,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,WAAT,QAA4B,cAA5B;AAEA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,QAAN,SAAuBD,cAAvB,CAAuD;EAC5DE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAqC;IAC9C,MAAMD,GAAN,EAAWL,QAAQ,CAACO,IAApB,EAA0BD,KAA1B;EACD;;EAESE,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,KAAKT,KAAlC;IACAI,MAAM,CAACM,QAAP,CAAgBJ,IAAhB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BH,KAA5B,EAAmCI,IAAnC;EACD;;AAZ2D;AAe9D,OAAO,MAAME,YAAN,SAA2Bf,cAA3B,CAAqE;EAC1EE,WAAW,CAACC,GAAD,EAAmBC,KA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B,CAAsE;EAC3EE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAuC;IAChD,MAAMD,GAAN,EAAWL,QAAQ,CAACqD,MAApB,EAA4B/C,KAA5B;EACD;;EAEDE,WAAW,GAAG;IACZ,OAAO,KAAKF,KAAL,CAAWgD,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;;EAEDnD,IAAI,QAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;;IACtC,IAAI,CAAC,KAAKoC,OAAV,EAAmB;MACjB,MAAM,IAAIC,KAAJ,CAAU,qCAAV,CAAN;IACD;;IACD,MAAM;MAAEM,MAAF;MAAUM;IAAV,IAAwB,KAAKb,OAAnC;IACA,MAAM;MAAElC,CAAF;MAAKC,CAAL;MAAQC;IAAR,IAAiB,KAAKT,KAA5B;IACAI,MAAM,CAACmD,UAAP,CAAkBP,MAAlB,EAA0BM,SAA1B,EAAqC/C,CAArC,EAAwCC,CAAxC,EAA2CC,IAA3C,EAAiDJ,KAAjD;EACD;;AAxB0E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["VerticesNode.ts"],"names":["VertexMode","BlendMode","NodeType","enumKey","processColor","JsiDrawingNode","VerticesNode","constructor","ctx","props","Vertices","deriveProps","mode","vertices","textures","colors","indices","vertexMode","Triangles","Skia","MakeVertices","map","c","undefined","draw","canvas","paint","blendMode","defaultBlendMode","DstOver","SrcOver","blend","derived","Error","drawVertices"],"mappings":"AACA,SAASA,UAAT,EAAqBC,SAArB,QAAsC,qBAAtC;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U,KAAJ,CAAU,qCAAV,CAAN;AACD;;AACDR,IAAAA,MAAM,CAACS,YAAP,CAAoB,KAAKF,OAAzB,EAAkCD,KAAlC,EAAyCL,KAAzC;AACD;;AAzByE","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"]}
1
+ {"version":3,"names":["VertexMode","BlendMode","NodeType","enumKey","processColor","JsiDrawingNode","VerticesNode","constructor","ctx","props","Vertices","deriveProps","mode","vertices","textures","colors","indices","vertexMode","Triangles","Skia","MakeVertices","map","c","undefined","draw","canvas","paint","blendMode","defaultBlendMode","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,SAASA,UAAT,EAAqBC,SAArB,QAAsC,qBAAtC;AAEA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,OAAT,EAAkBC,YAAlB,QAAsC,cAAtC;AACA,SAASC,cAAT,QAA+B,gBAA/B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,cAA3B,CAAqE;EAC1EE,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAyC;IAClD,MAAMD,GAAN,EAAWN,QAAQ,CAACQ,QAApB,EAA8BD,KAA9B;EACD;;EAESE,WAAW,GAAG;IACtB,MAAM;MAAEC,IAAF;MAAQC,QAAR;MAAkBC,QAAlB;MAA4BC,MAA5B;MAAoCC;IAApC,IAAgD,KAAKP,KAA3D;IACA,MAAMQ,UAAU,GAAGL,IAAI,GAAGZ,UAAU,CAACG,OAAO,CAACS,IAAD,CAAR,CAAb,GAA+BZ,UAAU,CAACkB,SAAjE;IACA,OAAO,KAAKC,IAAL,CAAUC,YAAV,CACLH,UADK,EAELJ,QAFK,EAGLC,QAHK,EAILC,MAAM,GAAGA,MAAM,CAACM,GAAP,CAAYC,CAAD,IAAOlB,YAAY,CAAC,KAAKe,IAAN,EAAYG,CAAZ,EAAe,CAAf,CAA9B,CAAH,GAAsDC,SAJvD,EAKLP,OALK,CAAP;EAOD;;EAEDQ,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEX,MAAF;MAAUY;IAAV,IAAwB,KAAKlB,KAAnC;IACA,MAAMmB,gBAAgB,GAAGb,MAAM,GAAGd,SAAS,CAAC4B,OAAb,GAAuB5B,SAAS,CAAC6B,OAAhE;IACA,MAAMC,KAAK,GAAGJ,SAAS,GAAG1B,SAAS,CAACE,OAAO,CAACwB,SAAD,CAAR,CAAZ,GAAmCC,gBAA1D;;IACA,IAAI,KAAKI,OAAL,KAAiBT,SAArB,EAAgC;MAC9B,MAAM,IAAIU,KAAJ,CAAU,qCAAV,CAAN;IACD;;IACDR,MAAM,CAACS,YAAP,CAAoB,KAAKF,OAAzB,EAAkCD,KAAlC,EAAyCL,KAAzC;EACD;;AAzByE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,YAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,gBAAd;AACA,cAAc,qBAAd;AACA,cAAc,QAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,YAAd;AACA,cAAc,sBAAd;AACA,cAAc,OAAd","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"]}
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,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,YAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,gBAAd;AACA,cAAc,qBAAd;AACA,cAAc,QAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,YAAd;AACA,cAAc,sBAAd;AACA,cAAc,OAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd","sourcesContent":["export * from \"../types\";\nexport * from \"./JsiSkDOM\";\nexport * from \"./datatypes\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"../types\";\nexport * from \"./JsiSkDOM\";\nexport * from \"./datatypes\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["BlendNode.ts"],"names":["BlendMode","DeclarationType","NodeType","JsiDeclarationNode","enumKey","ImageFilterDeclaration","ShaderDeclaration","BlendNode","constructor","ctx","props","ImageFilter","Blend","checkChild","child","_children","length","declarationType","Shader","addChild","Error","type","insertChildBefore","before","materialize","Skia","blend","mode","reverse","reduce","inner","outer","MakeBlend"],"mappings":"AAEA,SAASA,SAAT,QAA0B,qBAA1B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,sBAA1C;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,SAASC,OAAT,QAAwB,cAAxB;AAEA,SAASC,sBAAT,QAAuC,gBAAvC;AACA,SAASC,iBAAT,QAAkC,WAAlC;AAEA,OAAO,MAAMC,SAAN,SAAwBJ,kBAAxB,CAGL;AACAK,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;AAC/C,UAAMD,GAAN,EAAWR,eAAe,CAACU,WAA3B,EAAwCT,QAAQ,CAACU,KAAjD,EAAwDF,KAAxD;AACD;;AAEOG,EAAAA,UAAU,CAChBC,KADgB,EAEhB;AACA,QAAI,KAAKC,SAAL,CAAeC,MAAf,GAAwB,CAA5B,EAA+B;AAC7B,UAAIF,KAAK,CAACG,eAAN,KAA0BhB,eAAe,CAACU,WAA9C,EAA2D;AACzD,aAAKM,eAAL,GAAuBhB,eAAe,CAACU,WAAvC;AACD,OAFD,MAEO;AACL,aAAKM,eAAL,GAAuBhB,eAAe,CAACiB,MAAvC;AACD;AACF;AACF;;AAEDC,EAAAA,QAAQ,CAACL,KAAD,EAAuB;AAC7B,QACE,EAAEA,KAAK,YAAYX,kBAAnB,KACCW,KAAK,CAACG,eAAN,KAA0BhB,eAAe,CAACiB,MAA1C,IACCJ,KAAK,CAACG,eAAN,KAA0BhB,eAAe,CAACU,WAH9C,EAIE;AACA,YAAM,IAAIS,KAAJ,CAAW,4BAA2BN,KAAK,CAACO,IAAK,OAA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A6BK,KAAK,CAACP,WAAN,EAA7B,EAAkDM,KAAlD,CAAP;AACD,OAPI,EAOF,IAPE,CAAP;AAQD;AACF;;AA9DD","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"]}
1
+ {"version":3,"names":["BlendMode","DeclarationType","NodeType","JsiDeclarationNode","enumKey","ImageFilterDeclaration","ShaderDeclaration","BlendNode","constructor","ctx","props","ImageFilter","Blend","checkChild","child","_children","length","declarationType","Shader","addChild","Error","type","insertChildBefore","before","materialize","Skia","blend","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,SAASA,SAAT,QAA0B,qBAA1B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,sBAA1C;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,SAASC,OAAT,QAAwB,cAAxB;AAEA,SAASC,sBAAT,QAAuC,gBAAvC;AACA,SAASC,iBAAT,QAAkC,WAAlC;AAEA,OAAO,MAAMC,SAAN,SAAwBJ,kBAAxB,CAGL;EACAK,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWR,eAAe,CAACU,WAA3B,EAAwCT,QAAQ,CAACU,KAAjD,EAAwDF,KAAxD;EACD;;EAEOG,UAAU,CAChBC,KADgB,EAEhB;IACA,IAAI,KAAKC,SAAL,CAAeC,MAAf,GAAwB,CAA5B,EAA+B;MAC7B,IAAIF,KAAK,CAACG,eAAN,KAA0BhB,eAAe,CAACU,WAA9C,EAA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BqB,SAAjB,CAA2BN,KAA3B,EAAkCK,KAAK,CAACP,WAAN,EAAlC,EAAuDM,KAAvD,CAAP;MACD,CAPI,EAOF,IAPE,CAAP;IAQD,CATD,MASO;MACL,OAAQ,KAAKf,SAAN,CACJa,OADI,GAEJC,MAFI,CAEoB,CAACC,KAAD,EAAQC,KAAR,KAAkB;QACzC,IAAID,KAAK,KAAK,IAAd,EAAoB;UAClB,OAAOC,KAAK,CAACP,WAAN,EAAP;QACD;;QACD,OAAOC,IAAI,CAACP,MAAL,CAAYc,SAAZ,CAAsBN,KAAtB,EAA6BK,KAAK,CAACP,WAAN,EAA7B,EAAkDM,KAAlD,CAAP;MACD,CAPI,EAOF,IAPE,CAAP;IAQD;EACF;;AA9DD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ColorFilters.ts"],"names":["BlendMode","JsiDeclarationNode","DeclarationType","NodeType","processColor","enumKey","ColorFilterDeclaration","constructor","ctx","type","props","ColorFilter","addChild","child","Error","insertChildBefore","before","compose","filter","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","MatrixColorFilterNode","MatrixColorFilter","matrix","cf","MakeMatrix","BlendColorFilterNode","BlendColorFilter","mode","color","MakeBlend","LinearToSRGBGammaColorFilterNode","LinearToSRGBGammaColorFilter","MakeLinearToSRGBGamma","SRGBToLinearGammaColorFilterNode","SRGBToLinearGammaColorFilter","MakeSRGBToLinearGamma","LumaColorFilterNode","LumaColorFilter","MakeLumaColorFilter","LerpColorFilterNode","LerpColorFilter","t","first","second","MakeLerp"],"mappings":"AAAA,SAASA,SAAT,QAA0B,qBAA1B;AAGA,SAASC,kBAAT,QAAmC,SAAnC;AAMA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,YAAT,QAA6B,cAA7B;AACA,SAASC,OAAT,QAAwB,mBAAxB;AAGA,OAAO,MAAeC,sBAAf,SAGGL,kBAHH,CAGkD;AACvDM,EAAAA,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAA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D;;AARgF;AAWnF,OAAO,MAAMU,gCAAN,SAA+ClC,sBAA/C,CAA4E;AACjFC,EAAAA,WAAW,CAACC,GAAD,EAAmB;AAC5B,UAAMA,GAAN,EAAWL,QAAQ,CAACsC,4BAApB,EAAkD,IAAlD;AACD;;AAEDf,EAAAA,WAAW,GAAG;AACZ,UAAMI,EAAE,GAAG,KAAKR,IAAL,CAAUX,WAAV,CAAsB+B,qBAAtB,EAAX;AACA,WAAO,KAAKzB,OAAL,CAAaa,EAAb,CAAP;AACD;;AARgF;AAWnF,OAAO,MAAMa,mBAAN,SAAkCrC,sBAAlC,CAA+D;AACpEC,EAAAA,WAAW,CAACC,GAAD,EAAmB;AAC5B,UAAMA,GAAN,EAAWL,QAAQ,CAACyC,eAApB,EAAqC,IAArC;AACD;;AAEDlB,EAAAA,WAAW,GAAG;AACZ,UAAMI,EAAE,GAAG,KAAKR,IAAL,CAAUX,WAAV,CAAsBkC,mBAAtB,EAAX;AACA,WAAO,KAAK5B,OAAL,CAAaa,EAAb,CAAP;AACD;;AARmE;AAWtE,OAAO,MAAMgB,mBAAN,SAAkCxC,sBAAlC,CAA+E;AACpFC,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAgD;AACzD,UAAMF,GAAN,EAAWL,QAAQ,CAAC4C,eAApB,EAAqCrC,KAArC;AACD;;AAEDgB,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEsB,MAAAA;AAAF,QAAQ,KAAKtC,KAAnB;AACA,UAAM,CAACuC,KAAD,EAAQC,MAAR,IAAkB,KAAK/B,QAAL,EAAxB;AAIA,WAAO,KAAKG,IAAL,CAAUX,WAAV,CAAsBwC,QAAtB,CACLH,CADK,EAELC,KAAK,CAACvB,WAAN,EAFK,EAGLwB,MAAM,CAACxB,WAAP,EAHK,CAAP;AAKD;;AAhBmF","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"]}
1
+ {"version":3,"names":["BlendMode","JsiDeclarationNode","DeclarationType","NodeType","processColor","enumKey","ColorFilterDeclaration","constructor","ctx","type","props","ColorFilter","addChild","child","Error","insertChildBefore","before","compose","filter","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","MatrixColorFilterNode","MatrixColorFilter","matrix","cf","MakeMatrix","BlendColorFilterNode","BlendColorFilter","mode","color","MakeBlend","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,SAASA,SAAT,QAA0B,qBAA1B;AAGA,SAASC,kBAAT,QAAmC,SAAnC;AAMA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,YAAT,QAA6B,cAA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