@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":["ImageFilters.ts"],"names":["BlendMode","ColorChannel","processUniforms","TileMode","DeclarationType","NodeType","processRadius","enumKey","processColor","JsiDeclarationNode","Black","Float32Array","of","MakeInnerShadow","Skia","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","Decal","f4","MakeCompose","SrcOver","ImageFilterDeclaration","constructor","ctx","type","props","getOptionalChildInstance","index","child","_children","getMandatoryChildInstance","isImageFilter","materialize","isShader","MakeShader","declarationType","Error","OffsetImageFilterNode","OffsetImageFilter","x","y","DisplacementMapImageFilterNode","DisplacementMapImageFilter","channelX","channelY","scale","MakeDisplacementMap","BlurImageFilterNode","BlurImageFilter","mode","blur","sigma","DropShadowImageFilterNode","cl","inner","factory","bind","MakeDropShadowOnly","MakeDropShadow","MorphologyOperator","MorphologyImageFilterNode","MorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","BlendImageFilterNode","BlendImageFilter","a","b","RuntimeShaderImageFilterNode","RuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","MakeRuntimeShader"],"mappings":"AACA,SACEA,SADF,EAEEC,YAFF,EAGEC,eAHF,EAIEC,QAJF,QAKO,qBALP;AAeA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,aAAT,EAAwBC,OAAxB,EAAiCC,YAAjC,QAAqD,cAArD;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,MAAMC,KAAK,GAAGC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CAAd;;AAEA,MAAMC,eAAe,GAAG,CACtBC,IADsB,EAEtBC,UAFsB,EAGtBC,EAHsB,EAItBC,EAJsB,EAKtBC,MALsB,EAMtBC,MANsB,EAOtBC,KAPsB,EAQtBC,KARsB,KASnB;AACH,QAAMC,aAAa,GAAGR,IAAI,CAAC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AAA,WAAW,GAAG;AACZ,UAAM;AAAEiB,MAAAA;AAAF,QAAW,KAAKxB,KAAtB;AACA,UAAM6C,CAAC,GAAG,KAAKxC,yBAAL,CAA+B,CAA/B,CAAV;AACA,UAAMyC,CAAC,GAAG,KAAKzC,yBAAL,CAA+B,CAA/B,CAAV;AACA,WAAO,KAAKnC,IAAL,CAAUS,WAAV,CAAsBG,SAAtB,CAAgC0C,IAAhC,EAAsCqB,CAAtC,EAAyCC,CAAzC,CAAP;AACD;;AAVqF;AAaxF,OAAO,MAAMC,4BAAN,SAA2CnD,sBAA3C,CAAiG;AACtGC,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAyD;AAClE,UAAMF,GAAN,EAAWrC,QAAQ,CAACuF,wBAApB,EAA8ChD,KAA9C;AACD;;AAEDO,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAE0C,MAAAA,MAAF;AAAUC,MAAAA;AAAV,QAAuB,KAAKlD,KAAlC;AACA,UAAMmD,GAAG,GAAG,KAAKjF,IAAL,CAAUkF,oBAAV,CAA+BH,MAA/B,CAAZ;;AACA,QAAIC,QAAJ,EAAc;AACZ5F,MAAAA,eAAe,CAAC2F,MAAD,EAASC,QAAT,EAAmBC,GAAnB,CAAf;AACD;;AACD,UAAM1E,KAAK,GAAG,KAAKwB,wBAAL,CAA8B,CAA9B,CAAd;AACA,WAAO,KAAK/B,IAAL,CAAUS,WAAV,CAAsB0E,iBAAtB,CAAwCF,GAAxC,EAA6C,IAA7C,EAAmD1E,KAAnD,CAAP;AACD;;AAbqG","sourcesContent":["import type { SkImageFilter, SkColor, Skia } from \"../../../skia/types\";\nimport {\n BlendMode,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processRadius, enumKey, processColor } from \"../datatypes\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nconst Black = Float32Array.of(0, 0, 0, 1);\n\nconst MakeInnerShadow = (\n Skia: Skia,\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n\nexport abstract class ImageFilterDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkImageFilter, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.ImageFilter, type, props);\n }\n\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isImageFilter()) {\n return child.materialize();\n } else if (child.isShader()) {\n return this.Skia.ImageFilter.MakeShader(child.materialize(), null);\n } else if (child.declarationType === DeclarationType.ColorFilter) {\n return this.Skia.ImageFilter.MakeColorFilter(child.materialize(), null);\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class OffsetImageFilterNode extends ImageFilterDeclaration<OffsetImageFilterProps> {\n constructor(ctx: NodeContext, props: OffsetImageFilterProps) {\n super(ctx, NodeType.OffsetImageFilter, props);\n }\n\n materialize() {\n const { x, y } = this.props;\n return this.Skia.ImageFilter.MakeOffset(\n x,\n y,\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DisplacementMapImageFilterNode extends ImageFilterDeclaration<DisplacementMapImageFilterProps> {\n constructor(ctx: NodeContext, props: DisplacementMapImageFilterProps) {\n super(ctx, NodeType.DisplacementMapImageFilter, props);\n }\n\n materialize() {\n const { channelX, channelY, scale } = this.props;\n return this.Skia.ImageFilter.MakeDisplacementMap(\n ColorChannel[enumKey(channelX)],\n ColorChannel[enumKey(channelY)],\n scale,\n this.getMandatoryChildInstance(0),\n this.getOptionalChildInstance(1)\n );\n }\n}\n\nexport class BlurImageFilterNode extends ImageFilterDeclaration<BlurImageFilterProps> {\n constructor(ctx: NodeContext, props: BlurImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { mode, blur } = this.props;\n const sigma = processRadius(this.Skia, blur);\n return this.Skia.ImageFilter.MakeBlur(\n sigma.x,\n sigma.y,\n TileMode[enumKey(mode)],\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadowImageFilterProps> {\n constructor(ctx: NodeContext, props: DropShadowImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { dx, dy, blur, shadowOnly, color: cl, inner } = this.props;\n const color = processColor(this.Skia, cl, 1);\n const input = this.getOptionalChildInstance(0);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, this.Skia, shadowOnly);\n } else {\n factory = shadowOnly\n ? this.Skia.ImageFilter.MakeDropShadowOnly.bind(this.Skia.ImageFilter)\n : this.Skia.ImageFilter.MakeDropShadow.bind(this.Skia.ImageFilter);\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n}\n\nexport enum MorphologyOperator {\n Erode,\n Dilate,\n}\n\nexport class MorphologyImageFilterNode extends ImageFilterDeclaration<MorphologyImageFilterProps> {\n constructor(ctx: NodeContext, props: MorphologyImageFilterProps) {\n super(ctx, NodeType.MorphologyImageFilter, props);\n }\n\n materialize() {\n const { operator } = this.props;\n const r = processRadius(this.Skia, this.props.radius);\n const input = this.getOptionalChildInstance(0);\n if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {\n return this.Skia.ImageFilter.MakeErode(r.x, r.y, input);\n }\n return this.Skia.ImageFilter.MakeDilate(r.x, r.y, input);\n }\n}\n\nexport class BlendImageFilterNode extends ImageFilterDeclaration<BlendImageFilterProps> {\n constructor(ctx: NodeContext, props: BlendImageFilterProps) {\n super(ctx, NodeType.BlendImageFilter, props);\n }\n\n materialize() {\n const { mode } = this.props;\n const a = this.getMandatoryChildInstance(0);\n const b = this.getMandatoryChildInstance(1);\n return this.Skia.ImageFilter.MakeBlend(mode, a, b);\n }\n}\n\nexport class RuntimeShaderImageFilterNode extends ImageFilterDeclaration<RuntimeShaderImageFilterProps> {\n constructor(ctx: NodeContext, props: RuntimeShaderImageFilterProps) {\n super(ctx, NodeType.RuntimeShaderImageFilter, props);\n }\n\n materialize() {\n const { source, uniforms } = this.props;\n const rtb = this.Skia.RuntimeShaderBuilder(source);\n if (uniforms) {\n processUniforms(source, uniforms, rtb);\n }\n const input = this.getOptionalChildInstance(0);\n return this.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input);\n }\n}\n"]}
1
+ {"version":3,"names":["BlendMode","ColorChannel","processUniforms","TileMode","DeclarationType","NodeType","processRadius","enumKey","processColor","JsiDeclarationNode","Black","Float32Array","of","MakeInnerShadow","Skia","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","Decal","f4","MakeCompose","SrcOver","ImageFilterDeclaration","constructor","ctx","type","props","getOptionalChildInstance","index","child","_children","getMandatoryChildInstance","isImageFilter","materialize","isShader","MakeShader","declarationType","Error","OffsetImageFilterNode","OffsetImageFilter","x","y","DisplacementMapImageFilterNode","DisplacementMapImageFilter","channelX","channelY","scale","MakeDisplacementMap","BlurImageFilterNode","BlurImageFilter","mode","blur","sigma","DropShadowImageFilterNode","cl","inner","factory","bind","MakeDropShadowOnly","MakeDropShadow","MorphologyOperator","MorphologyImageFilterNode","MorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","BlendImageFilterNode","BlendImageFilter","a","b","RuntimeShaderImageFilterNode","RuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","MakeRuntimeShader"],"sources":["ImageFilters.ts"],"sourcesContent":["import type { SkImageFilter, SkColor, Skia } from \"../../../skia/types\";\nimport {\n BlendMode,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processRadius, enumKey, processColor } from \"../datatypes\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\n\nconst Black = Float32Array.of(0, 0, 0, 1);\n\nconst MakeInnerShadow = (\n Skia: Skia,\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n\nexport abstract class ImageFilterDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkImageFilter, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.ImageFilter, type, props);\n }\n\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isImageFilter()) {\n return child.materialize();\n } else if (child.isShader()) {\n return this.Skia.ImageFilter.MakeShader(child.materialize(), null);\n } else if (child.declarationType === DeclarationType.ColorFilter) {\n return this.Skia.ImageFilter.MakeColorFilter(child.materialize(), null);\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class OffsetImageFilterNode extends ImageFilterDeclaration<OffsetImageFilterProps> {\n constructor(ctx: NodeContext, props: OffsetImageFilterProps) {\n super(ctx, NodeType.OffsetImageFilter, props);\n }\n\n materialize() {\n const { x, y } = this.props;\n return this.Skia.ImageFilter.MakeOffset(\n x,\n y,\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DisplacementMapImageFilterNode extends ImageFilterDeclaration<DisplacementMapImageFilterProps> {\n constructor(ctx: NodeContext, props: DisplacementMapImageFilterProps) {\n super(ctx, NodeType.DisplacementMapImageFilter, props);\n }\n\n materialize() {\n const { channelX, channelY, scale } = this.props;\n return this.Skia.ImageFilter.MakeDisplacementMap(\n ColorChannel[enumKey(channelX)],\n ColorChannel[enumKey(channelY)],\n scale,\n this.getMandatoryChildInstance(0),\n this.getOptionalChildInstance(1)\n );\n }\n}\n\nexport class BlurImageFilterNode extends ImageFilterDeclaration<BlurImageFilterProps> {\n constructor(ctx: NodeContext, props: BlurImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { mode, blur } = this.props;\n const sigma = processRadius(this.Skia, blur);\n return this.Skia.ImageFilter.MakeBlur(\n sigma.x,\n sigma.y,\n TileMode[enumKey(mode)],\n this.getOptionalChildInstance(0)\n );\n }\n}\n\nexport class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadowImageFilterProps> {\n constructor(ctx: NodeContext, props: DropShadowImageFilterProps) {\n super(ctx, NodeType.BlurImageFilter, props);\n }\n\n materialize() {\n const { dx, dy, blur, shadowOnly, color: cl, inner } = this.props;\n const color = processColor(this.Skia, cl, 1);\n const input = this.getOptionalChildInstance(0);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, this.Skia, shadowOnly);\n } else {\n factory = shadowOnly\n ? this.Skia.ImageFilter.MakeDropShadowOnly.bind(this.Skia.ImageFilter)\n : this.Skia.ImageFilter.MakeDropShadow.bind(this.Skia.ImageFilter);\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n}\n\nexport enum MorphologyOperator {\n Erode,\n Dilate,\n}\n\nexport class MorphologyImageFilterNode extends ImageFilterDeclaration<MorphologyImageFilterProps> {\n constructor(ctx: NodeContext, props: MorphologyImageFilterProps) {\n super(ctx, NodeType.MorphologyImageFilter, props);\n }\n\n materialize() {\n const { operator } = this.props;\n const r = processRadius(this.Skia, this.props.radius);\n const input = this.getOptionalChildInstance(0);\n if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {\n return this.Skia.ImageFilter.MakeErode(r.x, r.y, input);\n }\n return this.Skia.ImageFilter.MakeDilate(r.x, r.y, input);\n }\n}\n\nexport class BlendImageFilterNode extends ImageFilterDeclaration<BlendImageFilterProps> {\n constructor(ctx: NodeContext, props: BlendImageFilterProps) {\n super(ctx, NodeType.BlendImageFilter, props);\n }\n\n materialize() {\n const { mode } = this.props;\n const a = this.getMandatoryChildInstance(0);\n const b = this.getMandatoryChildInstance(1);\n return this.Skia.ImageFilter.MakeBlend(mode, a, b);\n }\n}\n\nexport class RuntimeShaderImageFilterNode extends ImageFilterDeclaration<RuntimeShaderImageFilterProps> {\n constructor(ctx: NodeContext, props: RuntimeShaderImageFilterProps) {\n super(ctx, NodeType.RuntimeShaderImageFilter, props);\n }\n\n materialize() {\n const { source, uniforms } = this.props;\n const rtb = this.Skia.RuntimeShaderBuilder(source);\n if (uniforms) {\n processUniforms(source, uniforms, rtb);\n }\n const input = this.getOptionalChildInstance(0);\n return this.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input);\n }\n}\n"],"mappings":"AACA,SACEA,SADF,EAEEC,YAFF,EAGEC,eAHF,EAIEC,QAJF,QAKO,qBALP;AAeA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,aAAT,EAAwBC,OAAxB,EAAiCC,YAAjC,QAAqD,cAArD;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,MAAMC,KAAK,GAAGC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CAAd;;AAEA,MAAMC,eAAe,GAAG,CACtBC,IADsB,EAEtBC,UAFsB,EAGtBC,EAHsB,EAItBC,EAJsB,EAKtBC,MALsB,EAMtBC,MANsB,EAOtBC,KAPsB,EAQtBC,KARsB,KASnB;EACH,MAAMC,aAAa,GAAGR,IAAI,C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AAtB,CAAgC0C,IAAhC,EAAsCqB,CAAtC,EAAyCC,CAAzC,CAAP;EACD;;AAVqF;AAaxF,OAAO,MAAMC,4BAAN,SAA2CnD,sBAA3C,CAAiG;EACtGC,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAyD;IAClE,MAAMF,GAAN,EAAWrC,QAAQ,CAACuF,wBAApB,EAA8ChD,KAA9C;EACD;;EAEDO,WAAW,GAAG;IACZ,MAAM;MAAE0C,MAAF;MAAUC;IAAV,IAAuB,KAAKlD,KAAlC;IACA,MAAMmD,GAAG,GAAG,KAAKjF,IAAL,CAAUkF,oBAAV,CAA+BH,MAA/B,CAAZ;;IACA,IAAIC,QAAJ,EAAc;MACZ5F,eAAe,CAAC2F,MAAD,EAASC,QAAT,EAAmBC,GAAnB,CAAf;IACD;;IACD,MAAM1E,KAAK,GAAG,KAAKwB,wBAAL,CAA8B,CAA9B,CAAd;IACA,OAAO,KAAK/B,IAAL,CAAUS,WAAV,CAAsB0E,iBAAtB,CAAwCF,GAAxC,EAA6C,IAA7C,EAAmD1E,KAAnD,CAAP;EACD;;AAbqG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["MaskFilters.ts"],"names":["BlurStyle","JsiDeclarationNode","DeclarationType","NodeType","enumKey","BlurMaskFilterNode","constructor","ctx","props","MaskFilter","BlurMaskFilter","materialize","style","blur","respectCTM","Skia","MakeBlur"],"mappings":"AACA,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,OAAT,QAAwB,cAAxB;AAEA,OAAO,MAAMC,kBAAN,SAAiCJ,kBAAjC,CAGL;AACAK,EAAAA,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA+C;AACxD,UAAMD,GAAN,EAAWL,eAAe,CAACO,UAA3B,EAAuCN,QAAQ,CAACO,cAAhD,EAAgEF,KAAhE;AACD;;AAEDG,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEC,MAAAA,KAAF;AAASC,MAAAA,IAAT;AAAeC,MAAAA;AAAf,QAA8B,KAAKN,KAAzC;AACA,WAAO,KAAKO,IAAL,CAAUN,UAAV,CAAqBO,QAArB,CACLhB,SAAS,CAACI,OAAO,CAACQ,KAAD,CAAR,CADJ,EAELC,IAFK,EAGLC,UAHK,CAAP;AAKD;;AAZD","sourcesContent":["import type { SkMaskFilter } from \"../../../skia/types\";\nimport { BlurStyle } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type { BlurMaskFilterProps } from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes\";\n\nexport class BlurMaskFilterNode extends JsiDeclarationNode<\n BlurMaskFilterProps,\n SkMaskFilter\n> {\n constructor(ctx: NodeContext, props: BlurMaskFilterProps) {\n super(ctx, DeclarationType.MaskFilter, NodeType.BlurMaskFilter, props);\n }\n\n materialize() {\n const { style, blur, respectCTM } = this.props;\n return this.Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n}\n"]}
1
+ {"version":3,"names":["BlurStyle","JsiDeclarationNode","DeclarationType","NodeType","enumKey","BlurMaskFilterNode","constructor","ctx","props","MaskFilter","BlurMaskFilter","materialize","style","blur","respectCTM","Skia","MakeBlur"],"sources":["MaskFilters.ts"],"sourcesContent":["import type { SkMaskFilter } from \"../../../skia/types\";\nimport { BlurStyle } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type { BlurMaskFilterProps } from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes\";\n\nexport class BlurMaskFilterNode extends JsiDeclarationNode<\n BlurMaskFilterProps,\n SkMaskFilter\n> {\n constructor(ctx: NodeContext, props: BlurMaskFilterProps) {\n super(ctx, DeclarationType.MaskFilter, NodeType.BlurMaskFilter, props);\n }\n\n materialize() {\n const { style, blur, respectCTM } = this.props;\n return this.Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n}\n"],"mappings":"AACA,SAASA,SAAT,QAA0B,qBAA1B;AAEA,SAASC,kBAAT,QAAmC,SAAnC;AAEA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,OAAT,QAAwB,cAAxB;AAEA,OAAO,MAAMC,kBAAN,SAAiCJ,kBAAjC,CAGL;EACAK,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAA+C;IACxD,MAAMD,GAAN,EAAWL,eAAe,CAACO,UAA3B,EAAuCN,QAAQ,CAACO,cAAhD,EAAgEF,KAAhE;EACD;;EAEDG,WAAW,GAAG;IACZ,MAAM;MAAEC,KAAF;MAASC,IAAT;MAAeC;IAAf,IAA8B,KAAKN,KAAzC;IACA,OAAO,KAAKO,IAAL,CAAUN,UAAV,CAAqBO,QAArB,CACLhB,SAAS,CAACI,OAAO,CAACQ,KAAD,CAAR,CADJ,EAELC,IAFK,EAGLC,UAHK,CAAP;EAKD;;AAZD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["PathEffects.ts"],"names":["Path1DEffectStyle","JsiDeclarationNode","DeclarationType","NodeType","enumKey","processPath","PathEffectDeclaration","constructor","ctx","type","props","PathEffect","addChild","child","Error","insertChildBefore","before","compose","pe","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","getOptionalChildInstance","index","getMandatoryChildInstance","isPathEffect","DiscretePathEffectNode","DiscretePathEffect","deviation","seed","MakeDiscrete","Path2DPathEffectNode","Path2DPathEffect","matrix","path","MakePath2D","DashPathEffectNode","DashPathEffect","intervals","phase","MakeDash","CornerPathEffectNode","CornerPathEffect","r","MakeCorner","SumPathEffectNode","SumPathEffect","MakeSum","Line2DPathEffectNode","Line2DPathEffect","width","MakeLine2D","Path1DPathEffectNode","Path1DPathEffect","advance","style","MakePath1D"],"mapp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AP;AACD;;AAZD;AAeF,OAAO,MAAMuC,oBAAN,SAAmCnD,qBAAnC,CAGL;AACAC,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAiD;AAC1D,UAAMF,GAAN,EAAWL,QAAQ,CAACuD,gBAApB,EAAsChD,KAAtC;AACD;;AAEDgB,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEiC,MAAAA,OAAF;AAAWf,MAAAA,KAAX;AAAkBgB,MAAAA;AAAlB,QAA4B,KAAKlD,KAAvC;AACA,UAAM6B,IAAI,GAAGlC,WAAW,CAAC,KAAKiB,IAAN,EAAY,KAAKZ,KAAL,CAAW6B,IAAvB,CAAxB;AACA,UAAMrB,EAAE,GAAG,KAAKI,IAAL,CAAUX,UAAV,CAAqBkD,UAArB,CACTtB,IADS,EAEToB,OAFS,EAGTf,KAHS,EAIT5C,iBAAiB,CAACI,OAAO,CAACwD,KAAD,CAAR,CAJR,CAAX;;AAMA,QAAI1C,EAAE,KAAK,IAAX,EAAiB;AACf,aAAO,IAAP;AACD;;AACD,WAAO,KAAKD,OAAL,CAAaC,EAAb,CAAP;AACD;;AAlBD","sourcesContent":["import { Path1DEffectStyle } from \"../../../skia/types\";\nimport type { SkPathEffect } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Node,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes/Enum\";\nimport { processPath } from \"../datatypes\";\n\nabstract class PathEffectDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkPathEffect, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.PathEffect, type, props);\n }\n\n addChild(child: Node<unknown>) {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n }\n\n compose(pe: SkPathEffect) {\n const children = this._children as PathEffectDeclaration<unknown>[];\n if (this._children.length === 0) {\n return pe;\n } else {\n return this.Skia.PathEffect.MakeCompose(\n pe,\n children.reduce<SkPathEffect | null>((acc, child) => {\n if (acc === null) {\n return child.materialize();\n }\n return this.Skia.PathEffect.MakeCompose(acc, child.materialize());\n }, null) as SkPathEffect\n );\n }\n }\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isPathEffect()) {\n return child.materialize();\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class DiscretePathEffectNode extends PathEffectDeclaration<DiscretePathEffectProps> {\n constructor(ctx: NodeContext, props: DiscretePathEffectProps) {\n super(ctx, NodeType.DiscretePathEffect, props);\n }\n\n materialize() {\n const { length, deviation, seed } = this.props;\n const pe = this.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n return this.compose(pe);\n }\n}\n\nexport class Path2DPathEffectNode extends PathEffectDeclaration<\n Path2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path2DPathEffectProps) {\n super(ctx, NodeType.Path2DPathEffect, props);\n }\n\n materialize() {\n const { matrix } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath2D(matrix, path);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class DashPathEffectNode extends PathEffectDeclaration<DashPathEffectProps> {\n constructor(ctx: NodeContext, props: DashPathEffectProps) {\n super(ctx, NodeType.DashPathEffect, props);\n }\n\n materialize() {\n const { intervals, phase } = this.props;\n const pe = this.Skia.PathEffect.MakeDash(intervals, phase);\n return this.compose(pe);\n }\n}\n\nexport class CornerPathEffectNode extends PathEffectDeclaration<\n CornerPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: CornerPathEffectProps) {\n super(ctx, NodeType.CornerPathEffect, props);\n }\n\n materialize() {\n const { r } = this.props;\n const pe = this.Skia.PathEffect.MakeCorner(r);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class SumPathEffectNode extends PathEffectDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.SumPathEffect, null);\n }\n\n materialize() {\n return this.Skia.PathEffect.MakeSum(\n this.getMandatoryChildInstance(0),\n this.getMandatoryChildInstance(1)\n );\n }\n}\n\nexport class Line2DPathEffectNode extends PathEffectDeclaration<\n Line2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Line2DPathEffectProps) {\n super(ctx, NodeType.Line2DPathEffect, props);\n }\n\n materialize() {\n const { width, matrix } = this.props;\n const pe = this.Skia.PathEffect.MakeLine2D(width, matrix);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class Path1DPathEffectNode extends PathEffectDeclaration<\n Path1DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path1DPathEffectProps) {\n super(ctx, NodeType.Path1DPathEffect, props);\n }\n\n materialize() {\n const { advance, phase, style } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath1D(\n path,\n advance,\n phase,\n Path1DEffectStyle[enumKey(style)]\n );\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n"]}
1
+ {"version":3,"names":["Path1DEffectStyle","JsiDeclarationNode","DeclarationType","NodeType","enumKey","processPath","PathEffectDeclaration","constructor","ctx","type","props","PathEffect","addChild","child","Error","insertChildBefore","before","compose","pe","children","_children","length","Skia","MakeCompose","reduce","acc","materialize","getOptionalChildInstance","index","getMandatoryChildInstance","isPathEffect","DiscretePathEffectNode","DiscretePathEffect","deviation","seed","MakeDiscrete","Path2DPathEffectNode","Path2DPathEffect","matrix","path","MakePath2D","DashPathEffectNode","DashPathEffect","intervals","phase","MakeDash","CornerPathEffectNode","CornerPathEffect","r","MakeCorner","SumPathEffectNode","SumPathEffect","MakeSum","Line2DPathEffectNode","Line2DPathEffect","width","MakeLine2D","Path1DPathEffectNode","Path1DPathEffect","advance","style","MakePath1D"],"sources":["PathEffects.ts"],"sourcesContent":["import { Path1DEffectStyle } from \"../../../skia/types\";\nimport type { SkPathEffect } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Node,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { enumKey } from \"../datatypes/Enum\";\nimport { processPath } from \"../datatypes\";\n\nabstract class PathEffectDeclaration<\n P,\n Nullable extends null | never = never\n> extends JsiDeclarationNode<P, SkPathEffect, Nullable> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.PathEffect, type, props);\n }\n\n addChild(child: Node<unknown>) {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.addChild(child);\n }\n\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {\n if (!(child instanceof PathEffectDeclaration)) {\n throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);\n }\n super.insertChildBefore(child, before);\n }\n\n compose(pe: SkPathEffect) {\n const children = this._children as PathEffectDeclaration<unknown>[];\n if (this._children.length === 0) {\n return pe;\n } else {\n return this.Skia.PathEffect.MakeCompose(\n pe,\n children.reduce<SkPathEffect | null>((acc, child) => {\n if (acc === null) {\n return child.materialize();\n }\n return this.Skia.PathEffect.MakeCompose(acc, child.materialize());\n }, null) as SkPathEffect\n );\n }\n }\n getOptionalChildInstance(index: number) {\n const child = this._children[index];\n if (!child) {\n return null;\n }\n return this.getMandatoryChildInstance(index);\n }\n\n getMandatoryChildInstance(index: number) {\n const child = this._children[index];\n if (child instanceof JsiDeclarationNode) {\n if (child.isPathEffect()) {\n return child.materialize();\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n } else {\n throw new Error(`Found invalid child ${child.type} in ${this.type}`);\n }\n }\n}\n\nexport class DiscretePathEffectNode extends PathEffectDeclaration<DiscretePathEffectProps> {\n constructor(ctx: NodeContext, props: DiscretePathEffectProps) {\n super(ctx, NodeType.DiscretePathEffect, props);\n }\n\n materialize() {\n const { length, deviation, seed } = this.props;\n const pe = this.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n return this.compose(pe);\n }\n}\n\nexport class Path2DPathEffectNode extends PathEffectDeclaration<\n Path2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path2DPathEffectProps) {\n super(ctx, NodeType.Path2DPathEffect, props);\n }\n\n materialize() {\n const { matrix } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath2D(matrix, path);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class DashPathEffectNode extends PathEffectDeclaration<DashPathEffectProps> {\n constructor(ctx: NodeContext, props: DashPathEffectProps) {\n super(ctx, NodeType.DashPathEffect, props);\n }\n\n materialize() {\n const { intervals, phase } = this.props;\n const pe = this.Skia.PathEffect.MakeDash(intervals, phase);\n return this.compose(pe);\n }\n}\n\nexport class CornerPathEffectNode extends PathEffectDeclaration<\n CornerPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: CornerPathEffectProps) {\n super(ctx, NodeType.CornerPathEffect, props);\n }\n\n materialize() {\n const { r } = this.props;\n const pe = this.Skia.PathEffect.MakeCorner(r);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class SumPathEffectNode extends PathEffectDeclaration<null> {\n constructor(ctx: NodeContext) {\n super(ctx, NodeType.SumPathEffect, null);\n }\n\n materialize() {\n return this.Skia.PathEffect.MakeSum(\n this.getMandatoryChildInstance(0),\n this.getMandatoryChildInstance(1)\n );\n }\n}\n\nexport class Line2DPathEffectNode extends PathEffectDeclaration<\n Line2DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Line2DPathEffectProps) {\n super(ctx, NodeType.Line2DPathEffect, props);\n }\n\n materialize() {\n const { width, matrix } = this.props;\n const pe = this.Skia.PathEffect.MakeLine2D(width, matrix);\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n\nexport class Path1DPathEffectNode extends PathEffectDeclaration<\n Path1DPathEffectProps,\n null\n> {\n constructor(ctx: NodeContext, props: Path1DPathEffectProps) {\n super(ctx, NodeType.Path1DPathEffect, props);\n }\n\n materialize() {\n const { advance, phase, style } = this.props;\n const path = processPath(this.Skia, this.props.path);\n const pe = this.Skia.PathEffect.MakePath1D(\n path,\n advance,\n phase,\n Path1DEffectStyle[enumKey(style)]\n );\n if (pe === null) {\n return null;\n }\n return this.compose(pe);\n }\n}\n"],"mappings":"AAAA,SAASA,iBAAT,QAAkC,qBAAlC;AAGA,SAASC,kBAAT,QAAmC,SAAnC;AAUA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,OAAT,QAAwB,mBAAxB;AACA,SAASC,WAAT,QAA4B,cAA5B;;AAEA,MAAeC,qBAAf,SAGUL,kBAHV,CAGwD;EACtDM,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWN,eAAe,CAACS,UAA3B,EAAuCF,IAAvC,EAA6CC,KAA7C;EACD;;EAEDE,QAAQ,CAACC,KAAD,EAAuB;IAC7B,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;IACD,OAAO,KAAKD,OAAL,CAAaC,EAAb,CAAP;EACD;;AAlBD"}
@@ -44,8 +44,6 @@ export class ImageShaderNode extends ShaderDeclaration {
44
44
  const rct = getRect(this.Skia, imageShaderProps);
45
45
 
46
46
  if (rct) {
47
- var _imageShaderProps$tra;
48
-
49
47
  const rects = fitRects(fit, {
50
48
  x: 0,
51
49
  y: 0,
@@ -53,7 +51,7 @@ export class ImageShaderNode extends ShaderDeclaration {
53
51
  height: image.height()
54
52
  }, rct);
55
53
  const m3 = rect2rect(rects.src, rects.dst);
56
- imageShaderProps.transform = [...((_imageShaderProps$tra = imageShaderProps.transform) !== null && _imageShaderProps$tra !== void 0 ? _imageShaderProps$tra : []), ...m3];
54
+ imageShaderProps.transform = [...(imageShaderProps.transform ?? []), ...m3];
57
55
  }
58
56
 
59
57
  const lm = this.Skia.Matrix();
@@ -128,7 +126,7 @@ export class LinearGradientNode extends ShaderDeclaration {
128
126
  localMatrix,
129
127
  flags
130
128
  } = processGradientProps(this.Skia, this.props);
131
- return this.Skia.Shader.MakeLinearGradient(start, end, colors, positions !== null && positions !== void 0 ? positions : null, mode, localMatrix, flags);
129
+ return this.Skia.Shader.MakeLinearGradient(start, end, colors, positions ?? null, mode, localMatrix, flags);
132
130
  }
133
131
 
134
132
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["Shaders.ts"],"names":["processUniforms","FilterMode","MipmapMode","TileMode","JsiDeclarationNode","DeclarationType","NodeType","processColor","enumKey","fitRects","getRect","processGradientProps","processTransformProps","rect2rect","ShaderDeclaration","constructor","ctx","type","props","Shader","ShaderNode","materialize","source","uniforms","transform","m3","Skia","Matrix","makeShaderWithChildren","children","filter","child","isShader","map","ImageShaderNode","ImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","rects","x","y","width","height","src","dst","lm","makeShaderOptions","ColorNode","ColorShader","color","MakeColor","TurbulenceNode","Turbulence","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeTurbulence","FractalNoiseNode","FractalNoise","MakeFractalNoise","LinearGradientNode","LinearGradient","start","end","colors","positions","mode","localMatrix","flags","MakeLinearGradient","RadialGradientNode","RadialGradient","c","r","MakeRadialGradient","SweepGradientNode","SweepGradient","MakeSweepGradient","TwoPointConicalGradientNode","TwoPointConicalGradient","startR","endR","MakeTwoPointConicalGradient"],"mappings":"AAAA,SACEA,eADF,EAEEC,UAFF,EAGEC,UAHF,EAIEC,QAJF,QAKO,qBALP;AAQA,SAASC,kBAAT,QAAmC,SAAnC;AAYA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,YAAT,QAA6B,oBAA7B;AACA,SACEC,OADF,EAEEC,QAFF,EAGEC,OAHF,EAIEC,oBAJF,EAKEC,qBALF,EAMEC,SANF,QAOO,cAPP;AASA,OAAO,MAAeC,iBAAf,SAA4CV,kBAA5C,CAGL;AACAW,EAAAA,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;AACtD,UAAMF,GAAN,EAAWX,eAAe,CAACc,MAA3B,EAAmCF,IAAnC,EAAyCC,KAAzC;AACD;;AAHD;AAMF,OAAO,MAAME,UAAN,SAAyBN,iBAAzB,CAAwD;AAC7DC,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAuC;AAChD,UAAMF,GAAN,EAAWV,QAAQ,CAACa,MAApB,EAA4BD,KAA5B;AACD;;AAEDG,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,QAAV;AAAoB,SAAGC;AAAvB,QAAqC,KAAKN,KAAhD;AACA,UAAMO,EAAE,GAAG,KAAKC,IAAL,CAAUC,MAAV,EAAX;AACAf,IAAAA,qBAAqB,CAACa,EAAD,EAAKD,SAAL,CAArB;AACA,WAAOF,MAAM,CAACM,sBAAP,CACL5B,eAAe,CAACsB,MAAD,EAASC,QAAT,CADV,EAEL,KAAKM,QAAL,GACGC,MADH,CAEKC,KAAD,IACEA,KAAK,YAAY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ARK,EASLC,GATK,CAAP;AAWD;;AApB0E;AAuB7E,OAAO,MAAMe,2BAAN,SAA0CzE,iBAA1C,CAA0F;AAC/FC,EAAAA,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAwD;AACjE,UAAMF,GAAN,EAAWV,QAAQ,CAACkF,uBAApB,EAA6CtE,KAA7C;AACD;;AAEDG,EAAAA,WAAW,GAAG;AACZ,UAAM;AAAEoE,MAAAA,MAAF;AAAUC,MAAAA,IAAV;AAAgBnB,MAAAA,KAAhB;AAAuBC,MAAAA;AAAvB,QAA+B,KAAKtD,KAA1C;AACA,UAAM;AAAEuD,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA,IAArB;AAA2BC,MAAAA,WAA3B;AAAwCC,MAAAA;AAAxC,QACJlE,oBAAoB,CAAC,KAAKe,IAAN,EAAY,KAAKR,KAAjB,CADtB;AAEA,WAAO,KAAKQ,IAAL,CAAUP,MAAV,CAAiBwE,2BAAjB,CACLpB,KADK,EAELkB,MAFK,EAGLjB,GAHK,EAILkB,IAJK,EAKLjB,MALK,EAMLC,SANK,EAOLC,IAPK,EAQLC,WARK,EASLC,KATK,CAAP;AAWD;;AApB8F","sourcesContent":["import {\n processUniforms,\n FilterMode,\n MipmapMode,\n TileMode,\n} from \"../../../skia/types\";\nimport type { SkShader } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processColor } from \"../datatypes/Color\";\nimport {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../datatypes\";\n\nexport abstract class ShaderDeclaration<P> extends JsiDeclarationNode<\n P,\n SkShader\n> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.Shader, type, props);\n }\n}\n\nexport class ShaderNode extends ShaderDeclaration<ShaderProps> {\n constructor(ctx: NodeContext, props: ShaderProps) {\n super(ctx, NodeType.Shader, props);\n }\n\n materialize() {\n const { source, uniforms, ...transform } = this.props;\n const m3 = this.Skia.Matrix();\n processTransformProps(m3, transform);\n return source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n this.children()\n .filter(\n (child): child is JsiDeclarationNode<unknown, SkShader> =>\n child instanceof JsiDeclarationNode && child.isShader()\n )\n .map((child) => child.materialize()),\n m3\n );\n }\n}\n\nexport class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {\n constructor(ctx: NodeContext, props: ImageShaderProps) {\n super(ctx, NodeType.ImageShader, props);\n }\n\n materialize() {\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = this.props;\n const rct = getRect(this.Skia, imageShaderProps);\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const m3 = rect2rect(rects.src, rects.dst);\n imageShaderProps.transform = [\n ...(imageShaderProps.transform ?? []),\n ...m3,\n ];\n }\n const lm = this.Skia.Matrix();\n processTransformProps(lm, imageShaderProps);\n return image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n }\n}\n\nexport class ColorNode extends ShaderDeclaration<ColorProps> {\n constructor(ctx: NodeContext, props: ColorProps) {\n super(ctx, NodeType.ColorShader, props);\n }\n\n materialize() {\n const { color } = this.props;\n return this.Skia.Shader.MakeColor(processColor(this.Skia, color, 1));\n }\n}\n\nexport class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {\n constructor(ctx: NodeContext, props: TurbulenceProps) {\n super(ctx, NodeType.Turbulence, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {\n constructor(ctx: NodeContext, props: FractalNoiseProps) {\n super(ctx, NodeType.FractalNoise, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {\n constructor(ctx: NodeContext, props: LinearGradientProps) {\n super(ctx, NodeType.LinearGradient, props);\n }\n\n materialize() {\n const { start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {\n constructor(ctx: NodeContext, props: RadialGradientProps) {\n super(ctx, NodeType.RadialGradient, props);\n }\n\n materialize() {\n const { c, r } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {\n constructor(ctx: NodeContext, props: SweepGradientProps) {\n super(ctx, NodeType.SweepGradient, props);\n }\n\n materialize() {\n const { c, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n }\n}\n\nexport class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConicalGradientProps> {\n constructor(ctx: NodeContext, props: TwoPointConicalGradientProps) {\n super(ctx, NodeType.TwoPointConicalGradient, props);\n }\n\n materialize() {\n const { startR, endR, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n"]}
1
+ {"version":3,"names":["processUniforms","FilterMode","MipmapMode","TileMode","JsiDeclarationNode","DeclarationType","NodeType","processColor","enumKey","fitRects","getRect","processGradientProps","processTransformProps","rect2rect","ShaderDeclaration","constructor","ctx","type","props","Shader","ShaderNode","materialize","source","uniforms","transform","m3","Skia","Matrix","makeShaderWithChildren","children","filter","child","isShader","map","ImageShaderNode","ImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","rects","x","y","width","height","src","dst","lm","makeShaderOptions","ColorNode","ColorShader","color","MakeColor","TurbulenceNode","Turbulence","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeTurbulence","FractalNoiseNode","FractalNoise","MakeFractalNoise","LinearGradientNode","LinearGradient","start","end","colors","positions","mode","localMatrix","flags","MakeLinearGradient","RadialGradientNode","RadialGradient","c","r","MakeRadialGradient","SweepGradientNode","SweepGradient","MakeSweepGradient","TwoPointConicalGradientNode","TwoPointConicalGradient","startR","endR","MakeTwoPointConicalGradient"],"sources":["Shaders.ts"],"sourcesContent":["import {\n processUniforms,\n FilterMode,\n MipmapMode,\n TileMode,\n} from \"../../../skia/types\";\nimport type { SkShader } from \"../../../skia/types\";\nimport type { NodeContext } from \"../Node\";\nimport { JsiDeclarationNode } from \"../Node\";\nimport type {\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../types\";\nimport { DeclarationType, NodeType } from \"../../types\";\nimport { processColor } from \"../datatypes/Color\";\nimport {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../datatypes\";\n\nexport abstract class ShaderDeclaration<P> extends JsiDeclarationNode<\n P,\n SkShader\n> {\n constructor(ctx: NodeContext, type: NodeType, props: P) {\n super(ctx, DeclarationType.Shader, type, props);\n }\n}\n\nexport class ShaderNode extends ShaderDeclaration<ShaderProps> {\n constructor(ctx: NodeContext, props: ShaderProps) {\n super(ctx, NodeType.Shader, props);\n }\n\n materialize() {\n const { source, uniforms, ...transform } = this.props;\n const m3 = this.Skia.Matrix();\n processTransformProps(m3, transform);\n return source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n this.children()\n .filter(\n (child): child is JsiDeclarationNode<unknown, SkShader> =>\n child instanceof JsiDeclarationNode && child.isShader()\n )\n .map((child) => child.materialize()),\n m3\n );\n }\n}\n\nexport class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {\n constructor(ctx: NodeContext, props: ImageShaderProps) {\n super(ctx, NodeType.ImageShader, props);\n }\n\n materialize() {\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = this.props;\n const rct = getRect(this.Skia, imageShaderProps);\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const m3 = rect2rect(rects.src, rects.dst);\n imageShaderProps.transform = [\n ...(imageShaderProps.transform ?? []),\n ...m3,\n ];\n }\n const lm = this.Skia.Matrix();\n processTransformProps(lm, imageShaderProps);\n return image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n }\n}\n\nexport class ColorNode extends ShaderDeclaration<ColorProps> {\n constructor(ctx: NodeContext, props: ColorProps) {\n super(ctx, NodeType.ColorShader, props);\n }\n\n materialize() {\n const { color } = this.props;\n return this.Skia.Shader.MakeColor(processColor(this.Skia, color, 1));\n }\n}\n\nexport class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {\n constructor(ctx: NodeContext, props: TurbulenceProps) {\n super(ctx, NodeType.Turbulence, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {\n constructor(ctx: NodeContext, props: FractalNoiseProps) {\n super(ctx, NodeType.FractalNoise, props);\n }\n\n materialize() {\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;\n return this.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n }\n}\n\nexport class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {\n constructor(ctx: NodeContext, props: LinearGradientProps) {\n super(ctx, NodeType.LinearGradient, props);\n }\n\n materialize() {\n const { start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {\n constructor(ctx: NodeContext, props: RadialGradientProps) {\n super(ctx, NodeType.RadialGradient, props);\n }\n\n materialize() {\n const { c, r } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n\nexport class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {\n constructor(ctx: NodeContext, props: SweepGradientProps) {\n super(ctx, NodeType.SweepGradient, props);\n }\n\n materialize() {\n const { c, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n }\n}\n\nexport class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConicalGradientProps> {\n constructor(ctx: NodeContext, props: TwoPointConicalGradientProps) {\n super(ctx, NodeType.TwoPointConicalGradient, props);\n }\n\n materialize() {\n const { startR, endR, start, end } = this.props;\n const { colors, positions, mode, localMatrix, flags } =\n processGradientProps(this.Skia, this.props);\n return this.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n }\n}\n"],"mappings":"AAAA,SACEA,eADF,EAEEC,UAFF,EAGEC,UAHF,EAIEC,QAJF,QAKO,qBALP;AAQA,SAASC,kBAAT,QAAmC,SAAnC;AAYA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,aAA1C;AACA,SAASC,YAAT,QAA6B,oBAA7B;AACA,SACEC,OADF,EAEEC,QAFF,EAGEC,OAHF,EAIEC,oBAJF,EAKEC,qBALF,EAMEC,SANF,QAOO,cAPP;AASA,OAAO,MAAeC,iBAAf,SAA4CV,kBAA5C,CAGL;EACAW,WAAW,CAACC,GAAD,EAAmBC,IAAnB,EAAmCC,KAAnC,EAA6C;IACtD,MAAMF,GAAN,EAAWX,eAAe,CAACc,MAA3B,EAAmCF,IAAnC,EAAyCC,KAAzC;EACD;;AAHD;AAMF,OAAO,MAAME,UAAN,SAAyBN,iBAAzB,CAAwD;EAC7DC,WAAW,CAACC,GAAD,EAAmBE,KAAnB,EAAuC;IAChD,MAAMF,GAAN,EAAWV,QAAQ,CAACa,MAApB,EAA4BD,KAA5B;EACD;;EAEDG,WAAW,GAAG;IACZ,MAAM;MAAEC,MAAF;MAAUC,QAAV;MAAoB,GAAGC;IAAvB,IAAqC,KAAKN,KAAhD;IACA,MAAMO,EAAE,GAAG,KAAKC,IAAL,CAAUC,MAAV,EAAX;IACAf,qBAAqB,CAACa,EAAD,EAAKD,SAAL,CAArB;IACA,OAAOF,MAAM,CAACM,sBAAP,CACL5B,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AA2BC,WAA3B;MAAwCC;IAAxC,IACJlE,oBAAoB,CAAC,KAAKe,IAAN,EAAY,KAAKR,KAAjB,CADtB;IAEA,OAAO,KAAKQ,IAAL,CAAUP,MAAV,CAAiBwE,2BAAjB,CACLpB,KADK,EAELkB,MAFK,EAGLjB,GAHK,EAILkB,IAJK,EAKLjB,MALK,EAMLC,SANK,EAOLC,IAPK,EAQLC,WARK,EASLC,KATK,CAAP;EAWD;;AApB8F"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,aAAd","sourcesContent":["export * from \"./Shaders\";\nexport * from \"./MaskFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./ImageFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./BlendNode\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Shaders\";\nexport * from \"./MaskFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./ImageFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./BlendNode\";\n"],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,aAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["ColorFilters.ts"],"sourcesContent":["import type { BlendMode, Color } from \"../../skia/types\";\n\nimport type { ChildrenProps, SkEnum } from \"./Common\";\n\nexport interface MatrixColorFilterProps extends ChildrenProps {\n matrix: number[];\n}\n\nexport interface BlendColorFilterProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n color: Color;\n}\n\nexport interface LerpColorFilterProps extends ChildrenProps {\n t: number;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["Common.ts"],"sourcesContent":["import type { ReactNode, RefObject } from \"react\";\n\nimport type {\n BlendMode,\n Color,\n PaintStyle,\n SkMatrix,\n SkPaint,\n SkPath,\n SkRect,\n SkRRect,\n StrokeCap,\n StrokeJoin,\n Transforms2d,\n Vector,\n} from \"../../skia/types\";\n\nimport type { DeclarationNode } from \"./Node\";\n\nexport type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;\n\nexport type PathDef = string | SkPath;\n\nexport type ClipDef = SkRRect | SkRect | PathDef;\n\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport type Radius = number | Vector;\n\nexport interface ChildrenProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport interface RectCtor {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface RRectCtor extends RectCtor {\n r: Radius;\n}\n\nexport type RectDef = RectCtor | { rect: SkRect };\nexport type RRectDef = RRectCtor | { rect: SkRRect };\n\nexport interface PointCircleDef {\n c: Vector;\n r: number;\n}\n\nexport interface ScalarCircleDef {\n cx: number;\n cy: number;\n r: number;\n}\n\nexport type CircleDef = PointCircleDef | ScalarCircleDef;\n\nexport interface TransformProps {\n transform?: Transforms2d;\n origin?: Vector;\n matrix?: SkMatrix;\n}\n\nexport interface PaintProps extends ChildrenProps {\n color?: Color;\n strokeWidth?: number;\n blendMode?: SkEnum<typeof BlendMode>;\n style?: SkEnum<typeof PaintStyle>;\n strokeJoin?: SkEnum<typeof StrokeJoin>;\n strokeCap?: SkEnum<typeof StrokeCap>;\n strokeMiter?: number;\n opacity?: number;\n antiAlias?: boolean;\n}\n\nexport interface GroupProps extends PaintProps, TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: RefObject<DeclarationNode<unknown, SkPaint>> | SkPaint | boolean;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["DrawingContext.ts"],"sourcesContent":["import type { SkCanvas, SkPaint } from \"../../skia/types\";\n\nexport interface DrawingContext {\n canvas: SkCanvas;\n paint: SkPaint;\n opacity: number;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type { RefObject } from \"react\";\n\nimport type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\nimport type { DrawingContext } from \"./DrawingContext\";\nimport type { DeclarationNode } from \"./Node\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint | RefObject<DeclarationNode<unknown, SkPaint>>;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit: Fit;\n image: SkImage;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface CustomDrawingNodeProps extends DrawingNodeProps {\n drawing: (ctx: DrawingContext) => void;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport type ImageSVGProps = RectDef & {\n svg: SkSVG;\n} & DrawingNodeProps;\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["ImageFilters.ts"],"sourcesContent":["import type {\n BlendMode,\n Color,\n ColorChannel,\n SkRuntimeEffect,\n TileMode,\n Uniforms,\n} from \"../../skia/types\";\n\nimport type { Radius, SkEnum, ChildrenProps } from \"./Common\";\n\nexport interface BlurImageFilterProps extends ChildrenProps {\n blur: Radius;\n mode: SkEnum<typeof TileMode>;\n}\n\nexport interface OffsetImageFilterProps extends ChildrenProps {\n x: number;\n y: number;\n}\n\nexport interface RuntimeShaderImageFilterProps extends ChildrenProps {\n source: SkRuntimeEffect;\n uniforms?: Uniforms;\n}\n\nexport interface BlendImageFilterProps extends ChildrenProps {\n mode: BlendMode;\n}\n\nexport interface MorphologyImageFilterProps extends ChildrenProps {\n operator: \"erode\" | \"dilate\";\n radius: Radius;\n}\n\nexport interface DropShadowImageFilterProps extends ChildrenProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nexport interface DisplacementMapImageFilterProps extends ChildrenProps {\n channelX: SkEnum<typeof ColorChannel>;\n channelY: SkEnum<typeof ColorChannel>;\n scale: number;\n}\n\nexport interface BlendProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["MaskFilters.ts"],"sourcesContent":["import type { BlurStyle } from \"../../skia/types\";\n\nimport type { SkEnum } from \"./Common\";\n\nexport interface BlurMaskFilterProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type {\n SkColorFilter,\n SkImageFilter,\n SkMaskFilter,\n SkPaint,\n SkPathEffect,\n SkShader,\n} from \"../../skia/types\";\n\nimport type { GroupProps } from \"./Common\";\nimport type { DrawingContext } from \"./DrawingContext\";\nimport type { DeclarationType, NodeType } from \"./NodeType\";\n\nexport interface Node<P> {\n type: NodeType;\n\n setProps(props: P): void;\n setProp<K extends keyof P>(name: K, v: P[K]): boolean;\n getProps(): P;\n\n children(): Node<unknown>[];\n addChild(child: Node<unknown>): void;\n removeChild(child: Node<unknown>): void;\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;\n}\n\nexport type Invalidate = () => void;\n\nexport interface DeclarationNode<P, T, Nullable extends null | never = never>\n extends Node<P> {\n declarationType: DeclarationType;\n materialize(): T | Nullable;\n\n setInvalidate(invalidate: Invalidate): void;\n\n isPaint(): this is DeclarationNode<unknown, SkPaint>;\n isImageFilter(): this is DeclarationNode<unknown, SkImageFilter>;\n isColorFilter(): this is DeclarationNode<unknown, SkColorFilter>;\n isShader(): this is DeclarationNode<unknown, SkShader>;\n isMaskFilter(): this is DeclarationNode<unknown, SkMaskFilter>;\n isPathEffect(): this is DeclarationNode<unknown, SkPathEffect>;\n}\n\nexport interface RenderNode<P extends GroupProps> extends Node<P> {\n render(ctx: DrawingContext): void;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["NodeType.ts"],"names":["NodeType","DeclarationType"],"mappings":"AAAA,WAAkBA,QAAlB;;WAAkBA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;GAAAA,Q,KAAAA,Q;;AAuElB,WAAkBC,eAAlB;;WAAkBA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;GAAAA,e,KAAAA,e","sourcesContent":["export const enum NodeType {\n // Shaders\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Drawing = \"skDrawing\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n}\n\nexport const enum DeclarationType {\n Paint,\n Shader,\n ImageFilter,\n ColorFilter,\n PathEffect,\n MaskFilter,\n Unknown,\n}\n"]}
1
+ {"version":3,"names":["NodeType","DeclarationType"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Drawing = \"skDrawing\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n}\n\nexport const enum DeclarationType {\n Paint,\n Shader,\n ImageFilter,\n ColorFilter,\n PathEffect,\n MaskFilter,\n Unknown,\n}\n"],"mappings":"AAAA,WAAkBA,QAAlB;;WAAkBA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;GAAAA,Q,KAAAA,Q;;AAuElB,WAAkBC,eAAlB;;WAAkBA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;EAAAA,e,CAAAA,e;GAAAA,e,KAAAA,e"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["PathEffects.ts"],"sourcesContent":["import type { Path1DEffectStyle, SkMatrix } from \"../../skia/types\";\n\nimport type { ChildrenProps, PathDef, SkEnum } from \"./Common\";\n\nexport interface CornerPathEffectProps extends ChildrenProps {\n r: number;\n}\n\nexport interface DiscretePathEffectProps extends ChildrenProps {\n length: number;\n deviation: number;\n seed: number;\n}\n\nexport interface DashPathEffectProps extends ChildrenProps {\n intervals: number[];\n phase?: number;\n}\n\nexport interface Path1DPathEffectProps extends ChildrenProps {\n path: PathDef;\n advance: number;\n phase: number;\n style: SkEnum<typeof Path1DEffectStyle>;\n}\n\nexport interface Path2DPathEffectProps extends ChildrenProps {\n matrix: SkMatrix;\n path: PathDef;\n}\n\nexport interface Line2DPathEffectProps extends ChildrenProps {\n width: number;\n matrix: SkMatrix;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["Shaders.ts"],"sourcesContent":["import type {\n Color,\n FilterMode,\n MipmapMode,\n SkImage,\n SkRect,\n SkRuntimeEffect,\n TileMode,\n Uniforms,\n Vector,\n} from \"../../skia/types\";\n\nimport type {\n SkEnum,\n TransformProps,\n ChildrenProps,\n RectCtor,\n Fit,\n} from \"./Common\";\n\nexport interface ShaderProps extends TransformProps, ChildrenProps {\n source: SkRuntimeEffect;\n uniforms: Uniforms;\n}\n\nexport interface ImageShaderProps extends TransformProps, Partial<RectCtor> {\n tx: SkEnum<typeof TileMode>;\n ty: SkEnum<typeof TileMode>;\n fm: SkEnum<typeof FilterMode>;\n mm: SkEnum<typeof MipmapMode>;\n fit: Fit;\n rect?: SkRect;\n image: SkImage;\n}\n\nexport interface ColorProps {\n color: Color;\n}\n\nexport interface TurbulenceProps {\n freqX: number;\n freqY: number;\n octaves: number;\n seed: number;\n tileWidth: number;\n tileHeight: number;\n}\n\nexport interface FractalNoiseProps {\n freqX: number;\n freqY: number;\n octaves: number;\n seed: number;\n tileWidth: number;\n tileHeight: number;\n}\n\nexport interface GradientProps extends TransformProps {\n colors: Color[];\n positions?: number[];\n mode?: SkEnum<typeof TileMode>;\n flags?: number;\n}\n\nexport interface LinearGradientProps extends GradientProps {\n start: Vector;\n end: Vector;\n}\n\nexport interface RadialGradientProps extends GradientProps {\n c: Vector;\n r: number;\n}\n\nexport interface SweepGradientProps extends GradientProps {\n c: Vector;\n start?: number;\n end?: number;\n}\n\nexport interface TwoPointConicalGradientProps extends GradientProps {\n start: Vector;\n startR: number;\n end: Vector;\n endR: number;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SkDOM.ts"],"sourcesContent":["import type {\n SkImageFilter,\n SkMaskFilter,\n SkShader,\n SkColorFilter,\n SkPathEffect,\n SkPaint,\n} from \"../../skia/types\";\n\nimport type { ChildrenProps, GroupProps, PaintProps } from \"./Common\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n DisplacementMapImageFilterProps,\n MorphologyImageFilterProps,\n BlendProps,\n} from \"./ImageFilters\";\nimport type { DeclarationNode, RenderNode } from \"./Node\";\nimport type {\n BlendColorFilterProps,\n MatrixColorFilterProps,\n LerpColorFilterProps,\n} from \"./ColorFilters\";\nimport type {\n ImageProps,\n CircleProps,\n PathProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n PictureProps,\n ImageSVGProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n} from \"./Drawings\";\nimport type { BlurMaskFilterProps } from \"./MaskFilters\";\nimport type {\n FractalNoiseProps,\n SweepGradientProps,\n ImageShaderProps,\n LinearGradientProps,\n ShaderProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n RadialGradientProps,\n ColorProps,\n} from \"./Shaders\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"./PathEffects\";\n\ntype ImageFilterNode<P> = DeclarationNode<P, SkImageFilter>;\n\ntype PathEffectNode<P> = DeclarationNode<P, SkPathEffect>;\ntype NullablePathEffectNode<P> = DeclarationNode<P, SkPathEffect, null>;\n\ntype DrawingNode<P extends GroupProps> = RenderNode<P>;\n\nexport interface SkDOM {\n Group(props?: GroupProps): RenderNode<GroupProps>;\n Paint(props: PaintProps): DeclarationNode<PaintProps, SkPaint>;\n\n // Drawings\n Fill(props?: DrawingNodeProps): DrawingNode<DrawingNodeProps>;\n Image(props: ImageProps): DrawingNode<ImageProps>;\n Circle(props: CircleProps): DrawingNode<CircleProps>;\n Path(props: PathProps): DrawingNode<PathProps>;\n CustomDrawing(\n props: CustomDrawingNodeProps\n ): DrawingNode<CustomDrawingNodeProps>;\n Line(props: LineProps): DrawingNode<LineProps>;\n Oval(props: OvalProps): DrawingNode<OvalProps>;\n Patch(props: PatchProps): DrawingNode<PatchProps>;\n Points(props: PointsProps): DrawingNode<PointsProps>;\n Rect(props: RectProps): DrawingNode<RectProps>;\n RRect(props: RoundedRectProps): DrawingNode<RoundedRectProps>;\n Vertices(props: VerticesProps): DrawingNode<VerticesProps>;\n Text(props: TextProps): DrawingNode<TextProps>;\n TextPath(props: TextPathProps): DrawingNode<TextPathProps>;\n TextBlob(props: TextBlobProps): DrawingNode<TextBlobProps>;\n Glyphs(props: GlyphsProps): DrawingNode<GlyphsProps>;\n DiffRect(props: DiffRectProps): DrawingNode<DiffRectProps>;\n Picture(props: PictureProps): DrawingNode<PictureProps>;\n ImageSVG(props: ImageSVGProps): DrawingNode<ImageSVGProps>;\n\n // BlurMaskFilters\n BlurMaskFilter(\n props: BlurMaskFilterProps\n ): DeclarationNode<BlurMaskFilterProps, SkMaskFilter>;\n\n // ImageFilters\n BlendImageFilter(\n props: BlendImageFilterProps\n ): ImageFilterNode<BlendImageFilterProps>;\n BlurImageFilter(\n props: BlurImageFilterProps\n ): ImageFilterNode<BlurImageFilterProps>;\n OffsetImageFilter(\n props: OffsetImageFilterProps\n ): ImageFilterNode<OffsetImageFilterProps>;\n DropShadowImageFilter(\n props: DropShadowImageFilterProps\n ): ImageFilterNode<DropShadowImageFilterProps>;\n MorphologyImageFilter(\n props: MorphologyImageFilterProps\n ): ImageFilterNode<MorphologyImageFilterProps>;\n DisplacementMapImageFilter(\n props: DisplacementMapImageFilterProps\n ): ImageFilterNode<DisplacementMapImageFilterProps>;\n RuntimeShaderImageFilter(\n props: RuntimeShaderImageFilterProps\n ): ImageFilterNode<RuntimeShaderImageFilterProps>;\n\n // ColorFilters\n MatrixColorFilter(\n props: MatrixColorFilterProps\n ): DeclarationNode<MatrixColorFilterProps, SkColorFilter>;\n BlendColorFilter(\n props: BlendColorFilterProps\n ): DeclarationNode<BlendColorFilterProps, SkColorFilter>;\n LumaColorFilter(): DeclarationNode<null, SkColorFilter>;\n LinearToSRGBGammaColorFilter(): DeclarationNode<null, SkColorFilter>;\n SRGBToLinearGammaColorFilter(): DeclarationNode<null, SkColorFilter>;\n LerpColorFilter(\n props: LerpColorFilterProps\n ): DeclarationNode<LerpColorFilterProps, SkColorFilter>;\n\n // Shaders\n Shader(props: ShaderProps): DeclarationNode<ShaderProps, SkShader>;\n ImageShader(\n props: ImageShaderProps\n ): DeclarationNode<ImageShaderProps, SkShader>;\n ColorShader(props: ColorProps): DeclarationNode<ColorProps, SkShader>;\n Turbulence(\n props: TurbulenceProps\n ): DeclarationNode<TurbulenceProps, SkShader>;\n FractalNoise(\n props: FractalNoiseProps\n ): DeclarationNode<FractalNoiseProps, SkShader>;\n LinearGradient(\n props: LinearGradientProps\n ): DeclarationNode<LinearGradientProps, SkShader>;\n RadialGradient(\n props: RadialGradientProps\n ): DeclarationNode<RadialGradientProps, SkShader>;\n SweepGradient(\n props: SweepGradientProps\n ): DeclarationNode<SweepGradientProps, SkShader>;\n TwoPointConicalGradient(\n props: TwoPointConicalGradientProps\n ): DeclarationNode<TwoPointConicalGradientProps, SkShader>;\n\n // Path Effects\n CornerPathEffect(\n props: CornerPathEffectProps\n ): NullablePathEffectNode<CornerPathEffectProps>;\n DiscretePathEffect(\n props: DiscretePathEffectProps\n ): PathEffectNode<DiscretePathEffectProps>;\n DashPathEffect(\n props: DashPathEffectProps\n ): PathEffectNode<DashPathEffectProps>;\n Path1DPathEffect(\n props: Path1DPathEffectProps\n ): NullablePathEffectNode<Path1DPathEffectProps>;\n Path2DPathEffect(\n props: Path2DPathEffectProps\n ): NullablePathEffectNode<Path2DPathEffectProps>;\n SumPathEffect(): NullablePathEffectNode<null>;\n Line2DPathEffect(\n props: Line2DPathEffectProps\n ): NullablePathEffectNode<Line2DPathEffectProps>;\n\n // Mixed\n Blend(\n props: BlendProps\n ): DeclarationNode<BlendProps, SkShader | SkImageFilter>;\n BackdropFilter(props: ChildrenProps): RenderNode<ChildrenProps>;\n Box(props: BoxProps): RenderNode<BoxProps>;\n BoxShadow(\n props: BoxShadowProps\n ): DeclarationNode<BoxShadowProps, BoxShadowProps>;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd","sourcesContent":["export * from \"./DrawingContext\";\nexport * from \"./Node\";\nexport * from \"./NodeType\";\nexport * from \"./SkDOM\";\nexport * from \"./Common\";\nexport * from \"./Drawings\";\nexport * from \"./ImageFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./MaskFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./Shaders\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./DrawingContext\";\nexport * from \"./Node\";\nexport * from \"./NodeType\";\nexport * from \"./SkDOM\";\nexport * from \"./Common\";\nexport * from \"./Drawings\";\nexport * from \"./ImageFilters\";\nexport * from \"./ColorFilters\";\nexport * from \"./MaskFilters\";\nexport * from \"./PathEffects\";\nexport * from \"./Shaders\";\n"],"mappings":"AAAA,cAAc,kBAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd","sourcesContent":["export * from \"./reanimated\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./reanimated\";\n"],"mappings":"AAAA,cAAc,cAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAd","sourcesContent":["export * from \"./useSharedValueEffect\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useSharedValueEffect\";\n"],"mappings":"AAAA,cAAc,wBAAd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSharedValueEffect.ts"],"names":["useEffect","useMemo","Reanimated","Core","require","e","useSharedValueWrapper","useSharedValue","undefined","value","useSharedValueEffect","cb","values","input","runOnJS","startMapper","stopMapper","console","warn","mapperId"],"mappings":";;AAAA;;AACA;;AACA;AACA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC,C,CAEA;;AACA,IAAIC,UAAJ;AACA,IAAIC,IAAJ;;AAGA,IAAI;AACFD,EAAAA,UAAU,GAAGE,OAAO,CAAC,yBAAD,CAApB;AACAD,EAAAA,IAAI,GAAGC,OAAO,CAAC,8CAAD,CAAd;AACD,CAHD,CAGE,OAAOC,CAAP,EAAU,CACV;AACD;;AAMD,MAAMC,qBAAqB,GACzB,gBAAAJ,UAAU,UAAV,kDAAYK,cAAZ,MAA+BC,SAA/B,GACKC,KAAD,IAAmBR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Q,KAAKX,SAA/B,EAA0C;AACxCQ,UAAAA,UAAU,CAACG,QAAD,CAAV;AACD;AACF,OAJD;AAKD;;AACD,WAAO,MAAM,CAAE,CAAf,CAtBc,CAuBd;AACD,GAxBQ,EAwBN,CAACN,KAAD,EAAQC,OAAR,EAAiBC,WAAjB,EAA8BC,UAA9B,EAA0CP,KAA1C,EAAiD,GAAGG,MAApD,CAxBM,CAAT;AAyBD,CAhDM","sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable @typescript-eslint/consistent-type-imports */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport { useEffect, useMemo } from \"react\";\n\n// @ts-ignore\nlet Reanimated: typeof import(\"react-native-reanimated\") | undefined;\nlet Core: // @ts-ignore\ntypeof import(\"react-native-reanimated/lib/reanimated2/core\") | undefined;\n\ntry {\n Reanimated = require(\"react-native-reanimated\");\n Core = require(\"react-native-reanimated/lib/reanimated2/core\");\n} catch (e) {\n // Ignore\n}\n\ntype SharedValueTypeWrapper<T = number> = {\n value: T;\n};\n\nconst useSharedValueWrapper =\n Reanimated?.useSharedValue === undefined\n ? (value: number) => useMemo(() => ({ value }), [value])\n : Reanimated.useSharedValue;\n\n/**\n * Connects a shared value from reanimated to a SkiaView or Canvas\n * so whenever the shared value changes the SkiaView will redraw.\n * @param cb Callback that will be called whenever the shared value changes.\n * @param values One or more shared values to listen for.\n */\nexport const useSharedValueEffect = <T = number>(\n cb: () => void,\n value: SharedValueTypeWrapper<T>,\n ...values: SharedValueTypeWrapper<T>[]\n) => {\n const input = useSharedValueWrapper(0);\n const { runOnJS, startMapper, stopMapper } = useMemo(() => {\n if (Reanimated && Core) {\n const { runOnJS } = Reanimated;\n const { startMapper, stopMapper } = Core;\n return { runOnJS, startMapper, stopMapper };\n } else {\n console.warn(\n \"Reanimated was not found and the useSharedValueEffect hook will have no effect.\"\n );\n return {\n runOnJS: undefined,\n startMapper: undefined,\n stopMapper: undefined,\n };\n }\n }, []);\n\n useEffect(() => {\n if (\n startMapper !== undefined &&\n runOnJS !== undefined &&\n stopMapper !== undefined\n ) {\n // Start a mapper in Reanimated\n const mapperId = startMapper(\n () => {\n \"worklet\";\n runOnJS(cb)();\n },\n [value, ...values],\n [input]\n );\n // Return unregistering the mapper\n return () => {\n if (stopMapper && mapperId !== undefined) {\n stopMapper(mapperId);\n }\n };\n }\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [input, runOnJS, startMapper, stopMapper, value, ...values]);\n};\n"]}
1
+ {"version":3,"names":["useEffect","useMemo","Reanimated","Core","require","e","useSharedValueWrapper","useSharedValue","undefined","value","useSharedValueEffect","cb","values","input","runOnJS","startMapper","stopMapper","console","warn","mapperId"],"sources":["useSharedValueEffect.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable @typescript-eslint/consistent-type-imports */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport { useEffect, useMemo } from \"react\";\n\n// @ts-ignore\nlet Reanimated: typeof import(\"react-native-reanimated\") | undefined;\nlet Core: // @ts-ignore\ntypeof import(\"react-native-reanimated/lib/reanimated2/core\") | undefined;\n\ntry {\n Reanimated = require(\"react-native-reanimated\");\n Core = require(\"react-native-reanimated/lib/reanimated2/core\");\n} catch (e) {\n // Ignore\n}\n\ntype SharedValueTypeWrapper<T = number> = {\n value: T;\n};\n\nconst useSharedValueWrapper =\n Reanimated?.useSharedValue === undefined\n ? (value: number) => useMemo(() => ({ value }), [value])\n : Reanimated.useSharedValue;\n\n/**\n * Connects a shared value from reanimated to a SkiaView or Canvas\n * so whenever the shared value changes the SkiaView will redraw.\n * @param cb Callback that will be called whenever the shared value changes.\n * @param values One or more shared values to listen for.\n */\nexport const useSharedValueEffect = <T = number>(\n cb: () => void,\n value: SharedValueTypeWrapper<T>,\n ...values: SharedValueTypeWrapper<T>[]\n) => {\n const input = useSharedValueWrapper(0);\n const { runOnJS, startMapper, stopMapper } = useMemo(() => {\n if (Reanimated && Core) {\n const { runOnJS } = Reanimated;\n const { startMapper, stopMapper } = Core;\n return { runOnJS, startMapper, stopMapper };\n } else {\n console.warn(\n \"Reanimated was not found and the useSharedValueEffect hook will have no effect.\"\n );\n return {\n runOnJS: undefined,\n startMapper: undefined,\n stopMapper: undefined,\n };\n }\n }, []);\n\n useEffect(() => {\n if (\n startMapper !== undefined &&\n runOnJS !== undefined &&\n stopMapper !== undefined\n ) {\n // Start a mapper in Reanimated\n const mapperId = startMapper(\n () => {\n \"worklet\";\n runOnJS(cb)();\n },\n [value, ...values],\n [input]\n );\n // Return unregistering the mapper\n return () => {\n if (stopMapper && mapperId !== undefined) {\n stopMapper(mapperId);\n }\n };\n }\n return () => {};\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [input, runOnJS, startMapper, stopMapper, value, ...values]);\n};\n"],"mappings":";;AAAA;;AACA;;AACA;AACA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC,C,CAEA;;AACA,IAAIC,UAAJ;AACA,IAAIC,IAAJ;;AAGA,IAAI;EACFD,UAAU,GAAGE,OAAO,CAAC,yBAAD,CAApB;EACAD,IAAI,GAAGC,OAAO,CAAC,8CAAD,CAAd;AACD,CAHD,CAGE,OAAOC,CAAP,EAAU,CACV;AACD;;AAMD,MAAMC,qBAAqB,GACzB,gBAAAJ,UAAU,UAAV,kDAAYK,cAAZ,MAA+BC,SAA/B,GACKC,KAAD,IAAmBR,OAAO,CAAC,OAAO;EAAEQ;AAAF,CAAP,CAAD,EAAoB,CAACA,KAAD,CAApB,CAD9B,GAEIP,UAAU,CAACK,cAHjB;AAKA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMG,oBAAoB,GAAG,UAClCC,EADkC,EAElCF,KAFkC,EAI/B;EAAA,kCADAG,MACA;IADAA,MACA;EAAA;;EACH,MAAMC,KAAK,GAAGP,qBAAqB,CAAC,CAAD,CAAnC;EACA,MAAM;IAAEQ,OAAF;IAAWC,WAAX;IAAwBC;EAAxB,IAAuCf,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,cAAc,aAAd","sourcesContent":["import \"./skia/NativeSetup\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":"AAAA,OAAO,oBAAP;AACA,cAAc,YAAd;AACA,cAAc,mBAAd;AACA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,UAAd;AACA,cAAc,aAAd;AACA,cAAc,aAAd;AACA,cAAc,aAAd"}
@@ -26,14 +26,10 @@ class Stub {
26
26
  const Noop = () => {};
27
27
 
28
28
  export const Skia = new Stub();
29
- export const vec = (x, y) => {
30
- var _ref;
31
-
32
- return {
33
- x: x !== null && x !== void 0 ? x : 0,
34
- y: (_ref = y !== null && y !== void 0 ? y : x) !== null && _ref !== void 0 ? _ref : 0
35
- };
36
- };
29
+ export const vec = (x, y) => ({
30
+ x: x ?? 0,
31
+ y: y ?? x ?? 0
32
+ });
37
33
  export const Mock = {
38
34
  // SkiaExports
39
35
  // 1. Skia API. BaseSkia contains the enums, and functions like isPaint etc
@@ -47,6 +43,7 @@ export const Mock = {
47
43
  useImage: Noop,
48
44
  useSVG: Noop,
49
45
  usePicture: Noop,
46
+ createPicture: Noop,
50
47
  // 3. Point/Rect/Transform utilities
51
48
  vec,
52
49
  rect: (x, y, width, height) => ({
@@ -65,11 +62,11 @@ export const Mock = {
65
62
  sub: (a, b) => vec(a.x - b.x, a.y - b.y),
66
63
  neg: a => vec(-a.x, -a.y),
67
64
  dist: (a, b) => Math.hypot(a.x - b.x, a.y - b.y),
68
- translate: _ref2 => {
65
+ translate: _ref => {
69
66
  let {
70
67
  x,
71
68
  y
72
- } = _ref2;
69
+ } = _ref;
73
70
  return [{
74
71
  translateX: x
75
72
  }, {
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":["Values","ValuesHooks","Selector","BaseSkia","useSharedValueEffect","timingFunctions","springFunctions","decayFunctions","interpolateFn","interpolatePathFn","interpolateVectorFn","ShaderLib","Stub","constructor","Proxy","get","apply","set","Noop","Skia","vec","x","y","Mock","useRawData","useData","useFont","useTypeface","useImage","useSVG","usePicture","rect","width","height","rrect","r","rx","ry","point","add","a","b","sub","neg","dist","Math","hypot","translate","translateX","translateY","bounds","topLeft","topRight","bottomLeft","bottomRight","center","processTransform2d","interpolateColors","_value","_inputRange","_outputRange","Float32Array","of","mixColors","_v","_x","_y","createDrawing","createDeclaration"],"mappings":"AAAA;AAGA,OAAO,KAAKA,MAAZ,MAAwB,eAAxB;AACA,OAAO,KAAKC,WAAZ,MAA6B,iBAA7B;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,OAAO,KAAKC,QAAZ,MAA0B,eAA1B;AAKA,SAASC,oBAAT,QAAqC,6CAArC;AACA,OAAO,KAAKC,eAAZ,MAAiC,qBAAjC;AACA,OAAO,KAAKC,eAAZ,MAAiC,qBAAjC;AACA,OAAO,KAAKC,cAAZ,MAAgC,oBAAhC;AACA,OAAO,KAAKC,aAAZ,MAA+B,oCAA/B;AACA,OAAO,KAAKC,iBAAZ,MAAmC,yCAAnC;AACA,OAAO,KAAKC,mBAAZ,MAAqC,0CAArC;AACA,SAASC,SAAT,QAA0B,0CAA1B;;AAEA,MAAMC,IAAN,CAAW;AACTC,EAAAA,WAAW,GAAG;AACZ,WAAO,IAAIC,KAAJ,CAAU,MAAM,CAAE,CAAlB,EAAoB;AACzBC,MAAAA,GAAG,EAAE,MAAM,IAAIH,IAAJ,EADc;AAEzBI,MAAAA,KAAK,EAAE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CJ,KAAGC,WA7CC;AA8CJC,EAAAA,QA9CI;AA+CJ;AACA,KAAGG,eAhDC;AAiDJ,KAAGC,eAjDC;AAkDJ,KAAGC,cAlDC;AAmDJ,KAAGC,aAnDC;AAoDJ,KAAGC,iBApDC;AAqDJ,KAAGC,mBArDC;AAsDJ+C,EAAAA,iBAAiB,EAAE,CACjBC,MADiB,EAEjBC,WAFiB,EAGjBC,YAHiB,KAIdC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CA1DD;AA2DJC,EAAAA,SAAS,EAAE,CAACC,EAAD,EAAaC,EAAb,EAAwBC,EAAxB,KAAsCL,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CA3D7C;AA4DJnD,EAAAA,SA5DI;AA6DJwD,EAAAA,aAAa,EAAEjD,IA7DX;AA8DJkD,EAAAA,iBAAiB,EAAElD;AA9Df,CAPC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Color, Skia as SkiaApi, SkRect, Vector } from \"../skia/types\";\nimport * as Values from \"../values/web\";\nimport * as ValuesHooks from \"../values/hooks\";\nimport { Selector } from \"../values/selector\";\nimport * as BaseSkia from \"../skia/types\";\nimport type * as SkiaExports from \"../skia\";\nimport type * as ExternalExports from \"../external\";\nimport type * as ValueExports from \"../values\";\nimport type * as AnimationExports from \"../animation\";\nimport { useSharedValueEffect } from \"../external/reanimated/useSharedValueEffect\";\nimport * as timingFunctions from \"../animation/timing\";\nimport * as springFunctions from \"../animation/spring\";\nimport * as decayFunctions from \"../animation/decay\";\nimport * as interpolateFn from \"../animation/functions/interpolate\";\nimport * as interpolatePathFn from \"../animation/functions/interpolatePaths\";\nimport * as interpolateVectorFn from \"../animation/functions/interpolateVector\";\nimport { ShaderLib } from \"../renderer/components/shaders/ShaderLib\";\n\nclass Stub {\n constructor() {\n return new Proxy(() => {}, {\n get: () => new Stub(),\n apply: () => new Stub(),\n set: () => true,\n });\n }\n}\n\nconst Noop: () => any = () => {};\n\nexport const Skia: SkiaApi = new Stub() as any;\n\nexport const vec = (x?: number, y?: number) => ({ x: x ?? 0, y: y ?? x ?? 0 });\n\nexport const Mock: typeof SkiaExports &\n typeof ExternalExports &\n typeof ValueExports &\n typeof AnimationExports & {\n createDrawing: () => any;\n createDeclaration: () => any;\n ShaderLib: typeof ShaderLib;\n } = {\n // SkiaExports\n // 1. Skia API. BaseSkia contains the enums, and functions like isPaint etc\n Skia,\n ...BaseSkia,\n // 2. Hooks\n useRawData: Noop,\n useData: Noop,\n useFont: Noop,\n useTypeface: Noop,\n useImage: Noop,\n useSVG: Noop,\n usePicture: Noop,\n // 3. Point/Rect/Transform utilities\n vec,\n rect: (x: number, y: number, width: number, height: number) => ({\n x,\n y,\n width,\n height,\n }),\n rrect: (r: SkRect, rx: number, ry: number) => ({\n rect: r,\n rx,\n ry,\n }),\n point: vec,\n add: (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y),\n sub: (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y),\n neg: (a: Vector) => vec(-a.x, -a.y),\n dist: (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y),\n translate: ({ x, y }: Vector) =>\n [{ translateX: x }, { translateY: y }] as const,\n\n bounds: Noop,\n topLeft: Noop,\n topRight: Noop,\n bottomLeft: Noop,\n bottomRight: Noop,\n center: Noop,\n processTransform2d: Noop,\n // ExternalExports\n useSharedValueEffect,\n // ValueExports\n ...Values,\n ...ValuesHooks,\n Selector,\n // Animations\n ...timingFunctions,\n ...springFunctions,\n ...decayFunctions,\n ...interpolateFn,\n ...interpolatePathFn,\n ...interpolateVectorFn,\n interpolateColors: (\n _value: number,\n _inputRange: number[],\n _outputRange: Color[]\n ) => Float32Array.of(0, 0, 0, 0),\n mixColors: (_v: number, _x: Color, _y: Color) => Float32Array.of(0, 0, 0, 0),\n ShaderLib,\n createDrawing: Noop,\n createDeclaration: Noop,\n};\n"]}
1
+ {"version":3,"names":["Values","ValuesHooks","Selector","BaseSkia","useSharedValueEffect","timingFunctions","springFunctions","decayFunctions","interpolateFn","interpolatePathFn","interpolateVectorFn","ShaderLib","Stub","constructor","Proxy","get","apply","set","Noop","Skia","vec","x","y","Mock","useRawData","useData","useFont","useTypeface","useImage","useSVG","usePicture","createPicture","rect","width","height","rrect","r","rx","ry","point","add","a","b","sub","neg","dist","Math","hypot","translate","translateX","translateY","bounds","topLeft","topRight","bottomLeft","bottomRight","center","processTransform2d","interpolateColors","_value","_inputRange","_outputRange","Float32Array","of","mixColors","_v","_x","_y","createDrawing","createDeclaration"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Color, Skia as SkiaApi, SkRect, Vector } from \"../skia/types\";\nimport * as Values from \"../values/web\";\nimport * as ValuesHooks from \"../values/hooks\";\nimport { Selector } from \"../values/selector\";\nimport * as BaseSkia from \"../skia/types\";\nimport type * as SkiaExports from \"../skia\";\nimport type * as ExternalExports from \"../external\";\nimport type * as ValueExports from \"../values\";\nimport type * as AnimationExports from \"../animation\";\nimport { useSharedValueEffect } from \"../external/reanimated/useSharedValueEffect\";\nimport * as timingFunctions from \"../animation/timing\";\nimport * as springFunctions from \"../animation/spring\";\nimport * as decayFunctions from \"../animation/decay\";\nimport * as interpolateFn from \"../animation/functions/interpolate\";\nimport * as interpolatePathFn from \"../animation/functions/interpolatePaths\";\nimport * as interpolateVectorFn from \"../animation/functions/interpolateVector\";\nimport { ShaderLib } from \"../renderer/components/shaders/ShaderLib\";\n\nclass Stub {\n constructor() {\n return new Proxy(() => {}, {\n get: () => new Stub(),\n apply: () => new Stub(),\n set: () => true,\n });\n }\n}\n\nconst Noop: () => any = () => {};\n\nexport const Skia: SkiaApi = new Stub() as any;\n\nexport const vec = (x?: number, y?: number) => ({ x: x ?? 0, y: y ?? x ?? 0 });\n\nexport const Mock: typeof SkiaExports &\n typeof ExternalExports &\n typeof ValueExports &\n typeof AnimationExports & {\n createDrawing: () => any;\n createDeclaration: () => any;\n ShaderLib: typeof ShaderLib;\n } = {\n // SkiaExports\n // 1. Skia API. BaseSkia contains the enums, and functions like isPaint etc\n Skia,\n ...BaseSkia,\n // 2. Hooks\n useRawData: Noop,\n useData: Noop,\n useFont: Noop,\n useTypeface: Noop,\n useImage: Noop,\n useSVG: Noop,\n usePicture: Noop,\n createPicture: Noop,\n // 3. Point/Rect/Transform utilities\n vec,\n rect: (x: number, y: number, width: number, height: number) => ({\n x,\n y,\n width,\n height,\n }),\n rrect: (r: SkRect, rx: number, ry: number) => ({\n rect: r,\n rx,\n ry,\n }),\n point: vec,\n add: (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y),\n sub: (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y),\n neg: (a: Vector) => vec(-a.x, -a.y),\n dist: (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y),\n translate: ({ x, y }: Vector) =>\n [{ translateX: x }, { translateY: y }] as const,\n\n bounds: Noop,\n topLeft: Noop,\n topRight: Noop,\n bottomLeft: Noop,\n bottomRight: Noop,\n center: Noop,\n processTransform2d: Noop,\n // ExternalExports\n useSharedValueEffect,\n // ValueExports\n ...Values,\n ...ValuesHooks,\n Selector,\n // Animations\n ...timingFunctions,\n ...springFunctions,\n ...decayFunctions,\n ...interpolateFn,\n ...interpolatePathFn,\n ...interpolateVectorFn,\n interpolateColors: (\n _value: number,\n _inputRange: number[],\n _outputRange: Color[]\n ) => Float32Array.of(0, 0, 0, 0),\n mixColors: (_v: number, _x: Color, _y: Color) => Float32Array.of(0, 0, 0, 0),\n ShaderLib,\n createDrawing: Noop,\n createDeclaration: Noop,\n};\n"],"mappings":"AAAA;AAGA,OAAO,KAAKA,MAAZ,MAAwB,eAAxB;AACA,OAAO,KAAKC,WAAZ,MAA6B,iBAA7B;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,OAAO,KAAKC,QAAZ,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U,EAAEpC,IAtCR;EAuCJqC,WAAW,EAAErC,IAvCT;EAwCJsC,MAAM,EAAEtC,IAxCJ;EAyCJuC,kBAAkB,EAAEvC,IAzChB;EA0CJ;EACAd,oBA3CI;EA4CJ;EACA,GAAGJ,MA7CC;EA8CJ,GAAGC,WA9CC;EA+CJC,QA/CI;EAgDJ;EACA,GAAGG,eAjDC;EAkDJ,GAAGC,eAlDC;EAmDJ,GAAGC,cAnDC;EAoDJ,GAAGC,aApDC;EAqDJ,GAAGC,iBArDC;EAsDJ,GAAGC,mBAtDC;EAuDJgD,iBAAiB,EAAE,CACjBC,MADiB,EAEjBC,WAFiB,EAGjBC,YAHiB,KAIdC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CA3DD;EA4DJC,SAAS,EAAE,CAACC,EAAD,EAAaC,EAAb,EAAwBC,EAAxB,KAAsCL,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CA5D7C;EA6DJpD,SA7DI;EA8DJyD,aAAa,EAAElD,IA9DX;EA+DJmD,iBAAiB,EAAEnD;AA/Df,CAPC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Canvas.tsx"],"names":["React","useEffect","useState","useCallback","useMemo","forwardRef","useRef","ReactReconciler","SkiaView","useDrawCallback","useValue","Skia","debug","hostDebug","skHostConfig","Container","DependencyManager","CanvasProvider","skiaReconciler","injectIntoDevTools","bundleType","version","rendererPackageName","render","element","root","container","updateContainer","depMgr","update","useCanvasRef","Canvas","forwardedRef","children","style","mode","onTouch","size","width","height","canvasCtx","innerRef","ref","useCombinedRefs","tick","setTick","redraw","t","registerValues","values","current","Error","createContainer","paint","Paint","onDraw","canvas","info","timestamp","touches","reset","ctx","opacity","center","x","y","draw","remove","refs","targetRef","forEach"],"mappings":"AAAA,OAAOA,KAAP,IACEC,SADF,EAEEC,QAFF,EAGEC,WAHF,EAIEC,O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B,CAA9B;AA8BAnC,EAAAA,SAAS,CAAC,MAAM;AACd,WAAO,MAAM;AACXiB,MAAAA,cAAc,CAACS,eAAf,CAA+B,IAA/B,EAAqCF,IAArC,EAA2C,IAA3C,EAAiD,MAAM;AACrDC,QAAAA,SAAS,CAACE,MAAV,CAAiBuC,MAAjB;AACD,OAFD;AAGD,KAJD;AAKD,GANQ,EAMN,CAACzC,SAAD,EAAYD,IAAZ,CANM,CAAT;AAQA,sBACE,oBAAC,QAAD;AACE,IAAA,GAAG,EAAEiB,GADP;AAEE,IAAA,KAAK,EAAER,KAFT;AAGE,IAAA,MAAM,EAAEqB,MAHV;AAIE,IAAA,IAAI,EAAEpB,IAJR;AAKE,IAAA,KAAK,EAAEvB;AALT,IADF;AASD,CAxF6B,CAAzB;AA2FP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAM+B,eAAe,GAAG,YAEnB;AAAA,oCADAyB,IACA;AADAA,IAAAA,IACA;AAAA;;AACH,QAAMC,SAAS,GAAGrE,KAAK,CAACM,MAAN,CAAgB,IAAhB,CAAlB;AACAN,EAAAA,KAAK,CAACC,SAAN,CAAgB,MAAM;AACpBmE,IAAAA,IAAI,CAACE,OAAL,CAAc5B,GAAD,IAAS;AACpB,UAAIA,GAAJ,EAAS;AACP,YAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;AAC7BA,UAAAA,GAAG,CAAC2B,SAAS,CAACnB,OAAX,CAAH;AACD,SAFD,MAEO;AACLR,UAAAA,GAAG,CAACQ,OAAJ,GAAcmB,SAAS,CAACnB,OAAxB;AACD;AACF;AACF,KARD;AASD,GAVD,EAUG,CAACkB,IAAD,CAVH;AAWA,SAAOC,SAAP;AACD,CAhBD","sourcesContent":["import React, {\n useEffect,\n useState,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n ComponentProps,\n MutableRefObject,\n ForwardedRef,\n} from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport { SkiaView, useDrawCallback } from \"../views\";\nimport type { TouchHandler } from \"../views\";\nimport { useValue } from \"../values/hooks/useValue\";\nimport { Skia } from \"../skia/Skia\";\nimport type { SkiaValue } from \"../values\";\n\nimport { debug as hostDebug, skHostConfig } from \"./HostConfig\";\n// import { debugTree } from \"./nodes\";\nimport { Container } from \"./Container\";\nimport { DependencyManager } from \"./DependencyManager\";\nimport { CanvasProvider } from \"./useCanvas\";\n\nexport const skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nconst render = (element: ReactNode, root: OpaqueRoot, container: Container) => {\n skiaReconciler.updateContainer(element, root, null, () => {\n hostDebug(\"updateContainer\");\n container.depMgr.update();\n });\n};\n\nexport const useCanvasRef = () => useRef<SkiaView>(null);\n\nexport interface CanvasProps extends ComponentProps<typeof SkiaView> {\n ref?: RefObject<SkiaView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nexport const Canvas = forwardRef<SkiaView, CanvasProps>(\n ({ children, style, debug, mode, onTouch }, forwardedRef) => {\n const size = useValue({ width: 0, height: 0 });\n const canvasCtx = useMemo(() => ({ Skia, size }), [size]);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const [tick, setTick] = useState(0);\n const redraw = useCallback(() => {\n setTick((t) => t + 1);\n }, []);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current === null) {\n throw new Error(\"Canvas ref is not set\");\n }\n return ref.current.registerValues(values);\n },\n [ref]\n );\n\n const container = useMemo(() => {\n return new Container(Skia, new DependencyManager(registerValues), redraw);\n }, [redraw, registerValues]);\n\n const root = useMemo(\n () => skiaReconciler.createContainer(container, 0, false, null),\n [container]\n );\n // Render effect\n useEffect(() => {\n render(\n <CanvasProvider value={canvasCtx}>{children}</CanvasProvider>,\n root,\n container\n );\n }, [children, root, redraw, container, canvasCtx]);\n\n const paint = useMemo(() => Skia.Paint(), []);\n\n // Draw callback\n const onDraw = useDrawCallback(\n (canvas, info) => {\n // TODO: if tree is empty (count === 1) maybe we should not render?\n const { width, height, timestamp } = info;\n if (onTouch) {\n onTouch(info.touches);\n }\n if (\n width !== canvasCtx.size.current.width ||\n height !== canvasCtx.size.current.height\n ) {\n canvasCtx.size.current = { width, height };\n }\n paint.reset();\n const ctx = {\n width,\n height,\n timestamp,\n canvas,\n paint,\n opacity: 1,\n ref,\n center: { x: width / 2, y: height / 2 },\n Skia,\n };\n container.draw(ctx);\n },\n [tick, onTouch]\n );\n\n useEffect(() => {\n return () => {\n skiaReconciler.updateContainer(null, root, null, () => {\n container.depMgr.remove();\n });\n };\n }, [container, root]);\n\n return (\n <SkiaView\n ref={ref}\n style={style}\n onDraw={onDraw}\n mode={mode}\n debug={debug}\n />\n );\n }\n);\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"]}
1
+ {"version":3,"names":["React","useEffect","useState","useCallback","useMemo","forwardRef","useRef","ReactReconciler","SkiaView","useDrawCallback","useValue","Skia","debug","hostDebug","skHostConfig","Container","DependencyManager","CanvasProvider","skiaReconciler","injectIntoDevTools","bundleType","version","rendererPackageName","render","element","root","container","updateContainer","depMgr","update","useCanvasRef","Canvas","forwardedRef","children","style","mode","onTouch","size","width","height","canvasCtx","innerRef","ref","useCombinedRefs","tick","setTick","redraw","t","registerValues","values","current","Error","createContainer","paint","Paint","onDraw","canvas","info","timestamp","touches","reset","ctx","opacity","center","x","y","draw","remove","refs","targetRef","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useState,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n ComponentProps,\n MutableRefObject,\n ForwardedRef,\n} from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport { SkiaView, useDrawCallback } from \"../views\";\nimport type { TouchHandler } from \"../views\";\nimport { useValue } from \"../values/hooks/useValue\";\nimport { Skia } from \"../skia/Skia\";\nimport type { SkiaValue } from \"../values\";\n\nimport { debug as hostDebug, skHostConfig } from \"./HostConfig\";\n// import { debugTree } from \"./nodes\";\nimport { Container } from \"./Container\";\nimport { DependencyManager } from \"./DependencyManager\";\nimport { CanvasProvider } from \"./useCanvas\";\n\nexport const skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nconst render = (element: ReactNode, root: OpaqueRoot, container: Container) => {\n skiaReconciler.updateContainer(element, root, null, () => {\n hostDebug(\"updateContainer\");\n container.depMgr.update();\n });\n};\n\nexport const useCanvasRef = () => useRef<SkiaView>(null);\n\nexport interface CanvasProps extends ComponentProps<typeof SkiaView> {\n ref?: RefObject<SkiaView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nexport const Canvas = forwardRef<SkiaView, CanvasProps>(\n ({ children, style, debug, mode, onTouch }, forwardedRef) => {\n const size = useValue({ width: 0, height: 0 });\n const canvasCtx = useMemo(() => ({ Skia, size }), [size]);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const [tick, setTick] = useState(0);\n const redraw = useCallback(() => {\n setTick((t) => t + 1);\n }, []);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current === null) {\n throw new Error(\"Canvas ref is not set\");\n }\n return ref.current.registerValues(values);\n },\n [ref]\n );\n\n const container = useMemo(() => {\n return new Container(Skia, new DependencyManager(registerValues), redraw);\n }, [redraw, registerValues]);\n\n const root = useMemo(\n () => skiaReconciler.createContainer(container, 0, false, null),\n [container]\n );\n // Render effect\n useEffect(() => {\n render(\n <CanvasProvider value={canvasCtx}>{children}</CanvasProvider>,\n root,\n container\n );\n }, [children, root, redraw, container, canvasCtx]);\n\n const paint = useMemo(() => Skia.Paint(), []);\n\n // Draw callback\n const onDraw = useDrawCallback(\n (canvas, info) => {\n // TODO: if tree is empty (count === 1) maybe we should not render?\n const { width, height, timestamp } = info;\n if (onTouch) {\n onTouch(info.touches);\n }\n if (\n width !== canvasCtx.size.current.width ||\n height !== canvasCtx.size.current.height\n ) {\n canvasCtx.size.current = { width, height };\n }\n paint.reset();\n const ctx = {\n width,\n height,\n timestamp,\n canvas,\n paint,\n opacity: 1,\n ref,\n center: { x: width / 2, y: height / 2 },\n Skia,\n };\n container.draw(ctx);\n },\n [tick, onTouch]\n );\n\n useEffect(() => {\n return () => {\n skiaReconciler.updateContainer(null, root, null, () => {\n container.depMgr.remove();\n });\n };\n }, [container, root]);\n\n return (\n <SkiaView\n ref={ref}\n style={style}\n onDraw={onDraw}\n mode={mode}\n debug={debug}\n />\n );\n }\n);\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IACE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,IAAZ,CANM,CAAT;EAQA,oBACE,oBAAC,QAAD;IACE,GAAG,EAAEiB,GADP;IAEE,KAAK,EAAER,KAFT;IAGE,MAAM,EAAEqB,MAHV;IAIE,IAAI,EAAEpB,IAJR;IAKE,KAAK,EAAEvB;EALT,EADF;AASD,CAxF6B,CAAzB;AA2FP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAM+B,eAAe,GAAG,YAEnB;EAAA,kCADAyB,IACA;IADAA,IACA;EAAA;;EACH,MAAMC,SAAS,GAAGrE,KAAK,CAACM,MAAN,CAAgB,IAAhB,CAAlB;EACAN,KAAK,CAACC,SAAN,CAAgB,MAAM;IACpBmE,IAAI,CAACE,OAAL,CAAc5B,GAAD,IAAS;MACpB,IAAIA,GAAJ,EAAS;QACP,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;UAC7BA,GAAG,CAAC2B,SAAS,CAACnB,OAAX,CAAH;QACD,CAFD,MAEO;UACLR,GAAG,CAACQ,OAAJ,GAAcmB,SAAS,CAACnB,OAAxB;QACD;MACF;IACF,CARD;EASD,CAVD,EAUG,CAACkB,IAAD,CAVH;EAWA,OAAOC,SAAP;AACD,CAhBD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Container.tsx"],"names":["JsiSkDOM","Container","constructor","Skia","depMgr","redraw","Sk","_root","Group","draw","ctx","render","root"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AAWA,OAAO,MAAMC,SAAN,CAAgB;AAGrBC,EAAAA,WAAW,CACTC,IADS,EAEFC,MAFE,EAGFC,MAHE,EAIT;AAAA,SAFOD,MAEP,GAFOA,MAEP;AAAA,SADOC,MACP,GADOA,MACP;;AAAA;;AAAA;;AACA,SAAKC,EAAL,GAAU,IAAIN,QAAJ,CAAa;AAAEG,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAb,CAAV;AACA,SAAKG,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;AACD;;AAEDC,EAAAA,IAAI,CAACC,GAAD,EAAsB;AACxB,SAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;AACD;;AAEO,MAAJE,IAAI,GAAG;AACT,WAAO,KAAKL,KAAZ;AACD;;AAlBoB","sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nimport type { DependencyManager } from \"./DependencyManager\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public depMgr: DependencyManager,\n public redraw: () => void\n ) {\n this.Sk = new JsiSkDOM({ Skia, depMgr });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"]}
1
+ {"version":3,"names":["JsiSkDOM","Container","constructor","Skia","depMgr","redraw","Sk","_root","Group","draw","ctx","render","root"],"sources":["Container.tsx"],"sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nimport type { DependencyManager } from \"./DependencyManager\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public depMgr: DependencyManager,\n public redraw: () => void\n ) {\n this.Sk = new JsiSkDOM({ Skia, depMgr });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AAWA,OAAO,MAAMC,SAAN,CAAgB;EAGrBC,WAAW,CACTC,IADS,EAEFC,MAFE,EAGFC,MAHE,EAIT;IAAA,KAFOD,MAEP,GAFOA,MAEP;IAAA,KADOC,MACP,GADOA,MACP;;IAAA;;IAAA;;IACA,KAAKC,EAAL,GAAU,IAAIN,QAAJ,CAAa;MAAEG,IAAF;MAAQC;IAAR,CAAb,CAAV;IACA,KAAKG,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;EACD;;EAEDC,IAAI,CAACC,GAAD,EAAsB;IACxB,KAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;EACD;;EAEO,IAAJE,IAAI,GAAG;IACT,OAAO,KAAKL,KAAZ;EACD;;AAlBoB"}