@shopify/react-native-skia 0.1.126 → 0.1.129

Sign up to get free protection for your applications and to get access to all the features.
Files changed (786) hide show
  1. package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
  2. package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
  3. package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
  4. package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
  5. package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
  6. package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
  7. package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/renderer/Canvas.js +1 -3
  10. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  11. package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
  12. package/lib/commonjs/renderer/components/Blend.js +1 -3
  13. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  14. package/lib/commonjs/renderer/components/Compose.js +2 -6
  15. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  16. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +1 -3
  17. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  18. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +2 -4
  19. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  20. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  21. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  22. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +1 -3
  23. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  24. package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -3
  25. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  26. package/lib/commonjs/renderer/components/pathEffects/Corner.js +1 -3
  27. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  28. package/lib/commonjs/renderer/components/pathEffects/Dash.js +1 -3
  29. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  30. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +1 -3
  31. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  32. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +1 -3
  33. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  34. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +2 -4
  35. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  36. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +1 -3
  37. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  38. package/lib/commonjs/renderer/components/pathEffects/Sum.js +1 -3
  39. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  40. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  41. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  42. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  43. package/lib/commonjs/renderer/components/shapes/Patch.js +1 -3
  44. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  45. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  46. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  47. package/lib/commonjs/renderer/index.js +13 -0
  48. package/lib/commonjs/renderer/index.js.map +1 -1
  49. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  50. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  51. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  52. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  53. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  54. package/lib/commonjs/renderer/processors/Rects.js +5 -1
  55. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  56. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  57. package/lib/commonjs/renderer/processors/math/Matrix3.js +2 -2
  58. package/lib/commonjs/renderer/processors/math/Matrix3.js.map +1 -1
  59. package/lib/commonjs/skia/Skia.js +2 -36
  60. package/lib/commonjs/skia/Skia.js.map +1 -1
  61. package/lib/commonjs/skia/{Color.js → core/Color.js} +1 -1
  62. package/lib/commonjs/skia/core/Color.js.map +1 -0
  63. package/lib/commonjs/skia/{Data → core}/Data.js +29 -8
  64. package/lib/commonjs/skia/core/Data.js.map +1 -0
  65. package/lib/commonjs/skia/{Font/useFont.js → core/Font.js} +4 -4
  66. package/lib/commonjs/skia/core/Font.js.map +1 -0
  67. package/lib/commonjs/skia/{Image/useImage.js → core/Image.js} +4 -4
  68. package/lib/commonjs/skia/core/Image.js.map +1 -0
  69. package/lib/commonjs/skia/{Paint/usePaint.js → core/Paint.js} +14 -4
  70. package/lib/commonjs/skia/core/Paint.js.map +1 -0
  71. package/lib/commonjs/skia/{Path/usePath.js → core/Path.js} +1 -1
  72. package/lib/commonjs/skia/core/Path.js.map +1 -0
  73. package/lib/commonjs/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
  74. package/lib/commonjs/skia/core/Picture.js.map +1 -0
  75. package/lib/commonjs/skia/core/SVG.js +15 -0
  76. package/lib/commonjs/skia/core/SVG.js.map +1 -0
  77. package/lib/commonjs/skia/{Shader/useShader.js → core/Shader.js} +1 -1
  78. package/lib/commonjs/skia/core/Shader.js.map +1 -0
  79. package/lib/commonjs/skia/{Typeface/useTypeface.js → core/Typeface.js} +3 -3
  80. package/lib/commonjs/skia/core/Typeface.js.map +1 -0
  81. package/lib/commonjs/skia/core/index.js +136 -0
  82. package/lib/commonjs/skia/core/index.js.map +1 -0
  83. package/lib/commonjs/skia/index.js +8 -302
  84. package/lib/commonjs/skia/index.js.map +1 -1
  85. package/lib/commonjs/skia/{Canvas.js → types/Canvas.js} +0 -0
  86. package/lib/commonjs/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
  87. package/lib/commonjs/skia/types/Color.js +2 -0
  88. package/lib/commonjs/skia/{ColorFilter/ColorFilterFactory.js.map → types/Color.js.map} +0 -0
  89. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
  90. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
  91. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
  92. package/lib/{module/skia → commonjs/skia/types}/ColorFilter/ColorFilterFactory.js.map +0 -0
  93. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
  94. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
  95. package/lib/commonjs/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
  96. package/lib/commonjs/skia/{ContourMeasure.js.map → types/ContourMeasure.js.map} +0 -0
  97. package/lib/commonjs/skia/types/Data/Data.js +6 -0
  98. package/lib/commonjs/skia/{Data/DataFactory.js.map → types/Data/Data.js.map} +0 -0
  99. package/lib/commonjs/skia/{Data → types/Data}/DataFactory.js +0 -0
  100. package/lib/{module/skia → commonjs/skia/types}/Data/DataFactory.js.map +0 -0
  101. package/lib/commonjs/skia/{Data → types/Data}/index.js +0 -0
  102. package/lib/commonjs/skia/{Data → types/Data}/index.js.map +0 -0
  103. package/lib/commonjs/skia/{Font → types/Font}/Font.js +0 -0
  104. package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
  105. package/lib/commonjs/skia/{Font → types/Font}/index.js +0 -13
  106. package/lib/commonjs/skia/{FontMgr → types/Font}/index.js.map +1 -1
  107. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
  108. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js.map +0 -0
  109. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
  110. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js.map +0 -0
  111. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/index.js +13 -0
  112. package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
  113. package/lib/commonjs/skia/{Image → types/Image}/Image.js +0 -0
  114. package/lib/commonjs/skia/{Image → types/Image}/Image.js.map +1 -1
  115. package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js +0 -0
  116. package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
  117. package/lib/commonjs/skia/{Image → types/Image}/index.js +0 -13
  118. package/lib/commonjs/skia/types/Image/index.js.map +1 -0
  119. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
  120. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
  121. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
  122. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
  123. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
  124. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
  125. package/lib/commonjs/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
  126. package/lib/commonjs/skia/{JsiInstance.js.map → types/JsiInstance.js.map} +0 -0
  127. package/lib/commonjs/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
  128. package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
  129. package/lib/commonjs/skia/{Matrix.js → types/Matrix.js} +0 -0
  130. package/lib/commonjs/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
  131. package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js +0 -0
  132. package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
  133. package/lib/commonjs/skia/{Paint → types/Paint}/Paint.js +1 -13
  134. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
  135. package/lib/commonjs/skia/{Paint → types/Paint}/index.js +0 -13
  136. package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
  137. package/lib/commonjs/skia/{Path → types/Path}/Path.js +0 -0
  138. package/lib/commonjs/skia/{Path → types/Path}/Path.js.map +0 -0
  139. package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js +0 -0
  140. package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js.map +0 -0
  141. package/lib/commonjs/skia/{Path → types/Path}/index.js +0 -13
  142. package/lib/commonjs/skia/types/Path/index.js.map +1 -0
  143. package/lib/commonjs/skia/{PathEffect.js → types/PathEffect.js} +0 -0
  144. package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
  145. package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js +0 -0
  146. package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js.map +0 -0
  147. package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
  148. package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js.map +0 -0
  149. package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
  150. package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js.map +0 -0
  151. package/lib/commonjs/skia/{Picture → types/Picture}/index.js +0 -13
  152. package/lib/commonjs/skia/{Paint → types/Picture}/index.js.map +1 -1
  153. package/lib/commonjs/skia/{Point.js → types/Point.js} +0 -0
  154. package/lib/commonjs/skia/{Point.js.map → types/Point.js.map} +0 -0
  155. package/lib/commonjs/skia/{RRect.js → types/RRect.js} +0 -0
  156. package/lib/commonjs/skia/{RRect.js.map → types/RRect.js.map} +0 -0
  157. package/lib/commonjs/skia/{RSXform.js → types/RSXform.js} +0 -0
  158. package/lib/commonjs/skia/{RSXform.js.map → types/RSXform.js.map} +0 -0
  159. package/lib/commonjs/skia/{Rect.js → types/Rect.js} +0 -0
  160. package/lib/commonjs/skia/{Rect.js.map → types/Rect.js.map} +0 -0
  161. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
  162. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js.map +0 -0
  163. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
  164. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js.map +0 -0
  165. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
  166. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
  167. package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js +0 -0
  168. package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js.map +0 -0
  169. package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
  170. package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js.map +0 -0
  171. package/lib/commonjs/skia/{SVG → types/SVG}/index.js +0 -13
  172. package/lib/commonjs/skia/{Font → types/SVG}/index.js.map +1 -1
  173. package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js +0 -0
  174. package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js.map +0 -0
  175. package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
  176. package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js.map +0 -0
  177. package/lib/commonjs/skia/{Shader → types/Shader}/index.js +0 -13
  178. package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
  179. package/lib/commonjs/skia/types/Skia.js +6 -0
  180. package/lib/commonjs/skia/{Surface/Surface.js.map → types/Skia.js.map} +0 -0
  181. package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js +0 -0
  182. package/lib/{module/skia → commonjs/skia/types}/Surface/Surface.js.map +0 -0
  183. package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
  184. package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js.map +0 -0
  185. package/lib/commonjs/skia/{Surface → types/Surface}/index.js +0 -0
  186. package/lib/commonjs/skia/{Surface → types/Surface}/index.js.map +0 -0
  187. package/lib/commonjs/skia/{TextBlob.js → types/TextBlob.js} +0 -0
  188. package/lib/commonjs/skia/{TextBlob.js.map → types/TextBlob.js.map} +0 -0
  189. package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
  190. package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js.map +0 -0
  191. package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
  192. package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js.map +0 -0
  193. package/lib/commonjs/skia/{Typeface → types/Typeface}/index.js +0 -13
  194. package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
  195. package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
  196. package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
  197. package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js +0 -0
  198. package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js.map +0 -0
  199. package/lib/commonjs/skia/types/index.js +370 -0
  200. package/lib/commonjs/skia/types/index.js.map +1 -0
  201. package/lib/commonjs/skia/web/api/Host.js +66 -0
  202. package/lib/commonjs/skia/web/api/Host.js.map +1 -0
  203. package/lib/commonjs/skia/web/api/JsiSkCanvas.js +170 -0
  204. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +1 -0
  205. package/lib/commonjs/skia/web/api/JsiSkColor.js +180 -0
  206. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +1 -0
  207. package/lib/commonjs/skia/web/api/JsiSkColorFilter.js +18 -0
  208. package/lib/commonjs/skia/web/api/JsiSkColorFilter.js.map +1 -0
  209. package/lib/commonjs/skia/web/api/JsiSkImage.js +56 -0
  210. package/lib/commonjs/skia/web/api/JsiSkImage.js.map +1 -0
  211. package/lib/commonjs/skia/web/api/JsiSkPaint.js +106 -0
  212. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +1 -0
  213. package/lib/commonjs/skia/web/api/JsiSkRect.js +34 -0
  214. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +1 -0
  215. package/lib/commonjs/skia/web/api/JsiSkSurface.js +31 -0
  216. package/lib/commonjs/skia/web/api/JsiSkSurface.js.map +1 -0
  217. package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js +30 -0
  218. package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
  219. package/lib/commonjs/skia/web/api/index.js +26 -0
  220. package/lib/commonjs/skia/web/api/index.js.map +1 -0
  221. package/lib/commonjs/skia/web/index.js +19 -0
  222. package/lib/commonjs/skia/web/index.js.map +1 -0
  223. package/lib/commonjs/values/hooks/useValue.js.map +1 -1
  224. package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
  225. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
  226. package/lib/commonjs/values/web/api.js.map +1 -1
  227. package/lib/commonjs/views/SkiaView.js.map +1 -1
  228. package/lib/commonjs/views/types.js.map +1 -1
  229. package/lib/module/animation/decay/runDecay.js.map +1 -1
  230. package/lib/module/animation/functions/interpolateColors.js.map +1 -1
  231. package/lib/module/animation/spring/runSpring.js.map +1 -1
  232. package/lib/module/animation/spring/useSpring.js.map +1 -1
  233. package/lib/module/animation/timing/createTiming.js.map +1 -1
  234. package/lib/module/animation/timing/runTiming.js.map +1 -1
  235. package/lib/module/animation/timing/useTiming.js.map +1 -1
  236. package/lib/module/index.js.map +1 -1
  237. package/lib/module/renderer/Canvas.js +1 -2
  238. package/lib/module/renderer/Canvas.js.map +1 -1
  239. package/lib/module/renderer/DependencyManager.js.map +1 -1
  240. package/lib/module/renderer/components/Blend.js +1 -2
  241. package/lib/module/renderer/components/Blend.js.map +1 -1
  242. package/lib/module/renderer/components/Compose.js +1 -3
  243. package/lib/module/renderer/components/Compose.js.map +1 -1
  244. package/lib/module/renderer/components/colorFilters/Lerp.js +1 -2
  245. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  246. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +1 -2
  247. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  248. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  249. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  250. package/lib/module/renderer/components/imageFilters/Shadow.js +1 -2
  251. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  252. package/lib/module/renderer/components/maskFilters/Blur.js +1 -2
  253. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  254. package/lib/module/renderer/components/pathEffects/Corner.js +1 -2
  255. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  256. package/lib/module/renderer/components/pathEffects/Dash.js +1 -2
  257. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  258. package/lib/module/renderer/components/pathEffects/Discrete.js +1 -2
  259. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  260. package/lib/module/renderer/components/pathEffects/Line2D.js +1 -2
  261. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  262. package/lib/module/renderer/components/pathEffects/Path1D.js +1 -2
  263. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  264. package/lib/module/renderer/components/pathEffects/Path2D.js +1 -2
  265. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  266. package/lib/module/renderer/components/pathEffects/Sum.js +1 -2
  267. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  268. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  269. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  270. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  271. package/lib/module/renderer/components/shapes/Patch.js +1 -2
  272. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  273. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  274. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  275. package/lib/module/renderer/index.js +1 -0
  276. package/lib/module/renderer/index.js.map +1 -1
  277. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  278. package/lib/module/renderer/nodes/Node.js.map +1 -1
  279. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  280. package/lib/module/renderer/processors/Clips.js.map +1 -1
  281. package/lib/module/renderer/processors/Font.js.map +1 -1
  282. package/lib/module/renderer/processors/Rects.js +1 -0
  283. package/lib/module/renderer/processors/Rects.js.map +1 -1
  284. package/lib/module/renderer/processors/Transform.js.map +1 -1
  285. package/lib/module/renderer/processors/math/Matrix3.js +2 -2
  286. package/lib/module/renderer/processors/math/Matrix3.js.map +1 -1
  287. package/lib/module/skia/Skia.js +2 -35
  288. package/lib/module/skia/Skia.js.map +1 -1
  289. package/lib/module/skia/{Color.js → core/Color.js} +1 -2
  290. package/lib/module/skia/core/Color.js.map +1 -0
  291. package/lib/module/skia/core/Data.js +56 -0
  292. package/lib/module/skia/core/Data.js.map +1 -0
  293. package/lib/module/skia/{Font/useFont.js → core/Font.js} +5 -5
  294. package/lib/module/skia/core/Font.js.map +1 -0
  295. package/lib/module/skia/core/Image.js +8 -0
  296. package/lib/module/skia/core/Image.js.map +1 -0
  297. package/lib/module/skia/{Paint/usePaint.js → core/Paint.js} +8 -3
  298. package/lib/module/skia/core/Paint.js.map +1 -0
  299. package/lib/module/skia/{Path/usePath.js → core/Path.js} +1 -1
  300. package/lib/module/skia/core/Path.js.map +1 -0
  301. package/lib/module/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
  302. package/lib/module/skia/core/Picture.js.map +1 -0
  303. package/lib/module/skia/core/SVG.js +4 -0
  304. package/lib/module/skia/core/SVG.js.map +1 -0
  305. package/lib/module/skia/{Shader/useShader.js → core/Shader.js} +1 -1
  306. package/lib/module/skia/core/Shader.js.map +1 -0
  307. package/lib/module/skia/core/Typeface.js +8 -0
  308. package/lib/module/skia/core/Typeface.js.map +1 -0
  309. package/lib/module/skia/core/index.js +11 -0
  310. package/lib/module/skia/core/index.js.map +1 -0
  311. package/lib/module/skia/index.js +2 -23
  312. package/lib/module/skia/index.js.map +1 -1
  313. package/lib/module/skia/{Canvas.js → types/Canvas.js} +0 -0
  314. package/lib/module/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
  315. package/lib/module/skia/types/Color.js +2 -0
  316. package/lib/module/skia/{ContourMeasure.js.map → types/Color.js.map} +0 -0
  317. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
  318. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
  319. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
  320. package/lib/module/skia/{FontMgr/FontMgr.js.map → types/ColorFilter/ColorFilterFactory.js.map} +0 -0
  321. package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
  322. package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
  323. package/lib/module/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
  324. package/lib/module/skia/{FontMgr/FontMgrFactory.js.map → types/ContourMeasure.js.map} +0 -0
  325. package/lib/module/skia/types/Data/Data.js +2 -0
  326. package/lib/module/skia/{JsiInstance.js.map → types/Data/Data.js.map} +0 -0
  327. package/lib/module/skia/{Data → types/Data}/DataFactory.js +0 -0
  328. package/lib/module/skia/{Path/PathFactory.js.map → types/Data/DataFactory.js.map} +0 -0
  329. package/lib/module/skia/{Data → types/Data}/index.js +0 -0
  330. package/lib/module/skia/{Data → types/Data}/index.js.map +0 -0
  331. package/lib/module/skia/{Font → types/Font}/Font.js +0 -0
  332. package/lib/module/skia/types/Font/Font.js.map +1 -0
  333. package/lib/module/skia/types/Font/index.js +2 -0
  334. package/lib/module/skia/types/Font/index.js.map +1 -0
  335. package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
  336. package/lib/module/skia/{Picture/Picture.js.map → types/FontMgr/FontMgr.js.map} +0 -0
  337. package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
  338. package/lib/module/skia/{Picture/PictureFactory.js.map → types/FontMgr/FontMgrFactory.js.map} +0 -0
  339. package/lib/module/skia/types/FontMgr/index.js +3 -0
  340. package/lib/module/skia/types/FontMgr/index.js.map +1 -0
  341. package/lib/module/skia/{Image → types/Image}/Image.js +0 -0
  342. package/lib/module/skia/{Image → types/Image}/Image.js.map +1 -1
  343. package/lib/module/skia/{Image → types/Image}/ImageFactory.js +0 -0
  344. package/lib/module/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
  345. package/lib/module/skia/types/Image/index.js +3 -0
  346. package/lib/module/skia/types/Image/index.js.map +1 -0
  347. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
  348. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
  349. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
  350. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
  351. package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
  352. package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
  353. package/lib/module/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
  354. package/lib/module/skia/{Picture/PictureRecorder.js.map → types/JsiInstance.js.map} +0 -0
  355. package/lib/module/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
  356. package/lib/module/skia/types/MaskFilter.js.map +1 -0
  357. package/lib/module/skia/{Matrix.js → types/Matrix.js} +0 -0
  358. package/lib/module/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
  359. package/lib/module/skia/{Paint → types/Paint}/BlendMode.js +0 -0
  360. package/lib/module/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
  361. package/lib/module/skia/{Paint → types/Paint}/Paint.js +0 -6
  362. package/lib/module/skia/types/Paint/Paint.js.map +1 -0
  363. package/lib/module/skia/types/Paint/index.js +3 -0
  364. package/lib/module/skia/types/Paint/index.js.map +1 -0
  365. package/lib/module/skia/{Path → types/Path}/Path.js +0 -0
  366. package/lib/module/skia/{Path → types/Path}/Path.js.map +0 -0
  367. package/lib/module/skia/{Path → types/Path}/PathFactory.js +0 -0
  368. package/lib/module/skia/{RRect.js.map → types/Path/PathFactory.js.map} +0 -0
  369. package/lib/module/skia/types/Path/index.js +3 -0
  370. package/lib/module/skia/types/Path/index.js.map +1 -0
  371. package/lib/module/skia/{PathEffect.js → types/PathEffect.js} +0 -0
  372. package/lib/module/skia/types/PathEffect.js.map +1 -0
  373. package/lib/module/skia/{Picture → types/Picture}/Picture.js +0 -0
  374. package/lib/module/skia/{RSXform.js.map → types/Picture/Picture.js.map} +0 -0
  375. package/lib/module/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
  376. package/lib/module/skia/{Rect.js.map → types/Picture/PictureFactory.js.map} +0 -0
  377. package/lib/module/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
  378. package/lib/module/skia/{RuntimeEffect/RuntimeEffect.js.map → types/Picture/PictureRecorder.js.map} +0 -0
  379. package/lib/module/skia/{Picture → types/Picture}/index.js +0 -1
  380. package/lib/module/skia/types/Picture/index.js.map +1 -0
  381. package/lib/module/skia/{Point.js → types/Point.js} +0 -0
  382. package/lib/module/skia/{Point.js.map → types/Point.js.map} +0 -0
  383. package/lib/module/skia/{RRect.js → types/RRect.js} +0 -0
  384. package/lib/module/skia/{RuntimeEffect/RuntimeEffectFactory.js.map → types/RRect.js.map} +0 -0
  385. package/lib/module/skia/{RSXform.js → types/RSXform.js} +0 -0
  386. package/lib/module/skia/{SVG/SVG.js.map → types/RSXform.js.map} +0 -0
  387. package/lib/module/skia/{Rect.js → types/Rect.js} +0 -0
  388. package/lib/module/skia/{SVG/SVGFactory.js.map → types/Rect.js.map} +0 -0
  389. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
  390. package/lib/module/skia/{Shader/ShaderFactory.js.map → types/RuntimeEffect/RuntimeEffect.js.map} +0 -0
  391. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
  392. package/lib/module/skia/{Surface/SurfaceFactory.js.map → types/RuntimeEffect/RuntimeEffectFactory.js.map} +0 -0
  393. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
  394. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
  395. package/lib/module/skia/{SVG → types/SVG}/SVG.js +0 -0
  396. package/lib/module/skia/{TextBlob.js.map → types/SVG/SVG.js.map} +0 -0
  397. package/lib/module/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
  398. package/lib/module/skia/{Typeface/Typeface.js.map → types/SVG/SVGFactory.js.map} +0 -0
  399. package/lib/module/skia/types/SVG/index.js +3 -0
  400. package/lib/module/skia/types/SVG/index.js.map +1 -0
  401. package/lib/module/skia/{Shader → types/Shader}/Shader.js +0 -0
  402. package/lib/module/skia/{Shader → types/Shader}/Shader.js.map +0 -0
  403. package/lib/module/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
  404. package/lib/module/skia/{Typeface/TypefaceFactory.js.map → types/Shader/ShaderFactory.js.map} +0 -0
  405. package/lib/module/skia/types/Shader/index.js +3 -0
  406. package/lib/module/skia/types/Shader/index.js.map +1 -0
  407. package/lib/module/skia/types/Skia.js +2 -0
  408. package/lib/module/skia/types/Skia.js.map +1 -0
  409. package/lib/module/skia/{Surface → types/Surface}/Surface.js +0 -0
  410. package/lib/module/skia/types/Surface/Surface.js.map +1 -0
  411. package/lib/module/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
  412. package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
  413. package/lib/module/skia/{Surface → types/Surface}/index.js +0 -0
  414. package/lib/module/skia/{Surface → types/Surface}/index.js.map +0 -0
  415. package/lib/module/skia/{TextBlob.js → types/TextBlob.js} +0 -0
  416. package/lib/module/skia/types/TextBlob.js.map +1 -0
  417. package/lib/module/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
  418. package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
  419. package/lib/module/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
  420. package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
  421. package/lib/module/skia/types/Typeface/index.js +3 -0
  422. package/lib/module/skia/types/Typeface/index.js.map +1 -0
  423. package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
  424. package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
  425. package/lib/module/skia/{Vertices → types/Vertices}/index.js +0 -0
  426. package/lib/module/skia/{Vertices → types/Vertices}/index.js.map +0 -0
  427. package/lib/module/skia/types/index.js +29 -0
  428. package/lib/module/skia/types/index.js.map +1 -0
  429. package/lib/module/skia/web/api/Host.js +36 -0
  430. package/lib/module/skia/web/api/Host.js.map +1 -0
  431. package/lib/module/skia/web/api/JsiSkCanvas.js +160 -0
  432. package/lib/module/skia/web/api/JsiSkCanvas.js.map +1 -0
  433. package/lib/module/skia/web/api/JsiSkColor.js +170 -0
  434. package/lib/module/skia/web/api/JsiSkColor.js.map +1 -0
  435. package/lib/module/skia/web/api/JsiSkColorFilter.js +8 -0
  436. package/lib/module/skia/web/api/JsiSkColorFilter.js.map +1 -0
  437. package/lib/module/skia/web/api/JsiSkImage.js +46 -0
  438. package/lib/module/skia/web/api/JsiSkImage.js.map +1 -0
  439. package/lib/module/skia/web/api/JsiSkPaint.js +96 -0
  440. package/lib/module/skia/web/api/JsiSkPaint.js.map +1 -0
  441. package/lib/module/skia/web/api/JsiSkRect.js +24 -0
  442. package/lib/module/skia/web/api/JsiSkRect.js.map +1 -0
  443. package/lib/module/skia/web/api/JsiSkSurface.js +19 -0
  444. package/lib/module/skia/web/api/JsiSkSurface.js.map +1 -0
  445. package/lib/module/skia/web/api/JsiSkSurfaceFactory.js +19 -0
  446. package/lib/module/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
  447. package/lib/module/skia/web/api/index.js +13 -0
  448. package/lib/module/skia/web/api/index.js.map +1 -0
  449. package/lib/module/skia/web/index.js +2 -0
  450. package/lib/module/skia/web/index.js.map +1 -0
  451. package/lib/module/values/hooks/useValue.js.map +1 -1
  452. package/lib/module/values/hooks/useValueEffect.js.map +1 -1
  453. package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
  454. package/lib/module/values/web/api.js.map +1 -1
  455. package/lib/module/views/SkiaView.js.map +1 -1
  456. package/lib/module/views/types.js.map +1 -1
  457. package/lib/typescript/src/animation/decay/runDecay.d.ts +2 -2
  458. package/lib/typescript/src/animation/spring/runSpring.d.ts +2 -2
  459. package/lib/typescript/src/animation/spring/useSpring.d.ts +2 -2
  460. package/lib/typescript/src/animation/timing/createTiming.d.ts +2 -2
  461. package/lib/typescript/src/animation/timing/runTiming.d.ts +2 -2
  462. package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
  463. package/lib/typescript/src/animation/timing/useTiming.d.ts +2 -2
  464. package/lib/typescript/src/renderer/Canvas.d.ts +4 -4
  465. package/lib/typescript/src/renderer/DependencyManager.d.ts +2 -2
  466. package/lib/typescript/src/renderer/DrawingContext.d.ts +1 -2
  467. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +1 -1
  468. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  469. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +1 -2
  470. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +1 -1
  471. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  472. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  473. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  474. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  475. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  476. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +1 -1
  477. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -2
  478. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  479. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  480. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  481. package/lib/typescript/src/renderer/index.d.ts +1 -0
  482. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  483. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  484. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +3 -3
  485. package/lib/typescript/src/renderer/processors/Clips.d.ts +1 -2
  486. package/lib/typescript/src/renderer/processors/Font.d.ts +1 -2
  487. package/lib/typescript/src/renderer/processors/Rects.d.ts +2 -0
  488. package/lib/typescript/src/renderer/processors/Transform.d.ts +1 -1
  489. package/lib/typescript/src/skia/Skia.d.ts +2 -35
  490. package/lib/typescript/src/skia/{Color.d.ts → core/Color.d.ts} +1 -2
  491. package/lib/typescript/src/skia/core/Data.d.ts +5 -0
  492. package/lib/typescript/src/skia/core/Font.d.ts +5 -0
  493. package/lib/typescript/src/skia/core/Image.d.ts +5 -0
  494. package/lib/typescript/src/skia/{Paint/usePaint.d.ts → core/Paint.d.ts} +2 -1
  495. package/lib/typescript/src/skia/{Path/usePath.d.ts → core/Path.d.ts} +1 -2
  496. package/lib/typescript/src/skia/{Picture/usePicture.d.ts → core/Picture.d.ts} +1 -3
  497. package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
  498. package/lib/typescript/src/skia/{Shader/useShader.d.ts → core/Shader.d.ts} +0 -0
  499. package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
  500. package/lib/typescript/src/skia/core/index.d.ts +10 -0
  501. package/lib/typescript/src/skia/index.d.ts +2 -23
  502. package/lib/typescript/src/skia/{Canvas.d.ts → types/Canvas.d.ts} +0 -0
  503. package/lib/typescript/src/skia/types/Color.d.ts +2 -0
  504. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.d.ts +0 -0
  505. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.d.ts +1 -1
  506. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/index.d.ts +0 -0
  507. package/lib/typescript/src/skia/{ContourMeasure.d.ts → types/ContourMeasure.d.ts} +0 -0
  508. package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
  509. package/lib/typescript/src/skia/{Data → types/Data}/DataFactory.d.ts +0 -0
  510. package/lib/typescript/src/skia/{Data → types/Data}/index.d.ts +0 -0
  511. package/lib/typescript/src/skia/{Font → types/Font}/Font.d.ts +1 -1
  512. package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
  513. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgr.d.ts +1 -1
  514. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.d.ts +0 -0
  515. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/index.d.ts +1 -0
  516. package/lib/typescript/src/skia/{Image → types/Image}/Image.d.ts +2 -2
  517. package/lib/typescript/src/skia/{Image → types/Image}/ImageFactory.d.ts +0 -0
  518. package/lib/typescript/src/skia/{Image → types/Image}/index.d.ts +0 -1
  519. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.d.ts +0 -0
  520. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.d.ts +2 -2
  521. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/index.d.ts +0 -0
  522. package/lib/typescript/src/skia/{JsiInstance.d.ts → types/JsiInstance.d.ts} +0 -0
  523. package/lib/typescript/src/skia/{MaskFilter.d.ts → types/MaskFilter.d.ts} +3 -3
  524. package/lib/typescript/src/skia/{Matrix.d.ts → types/Matrix.d.ts} +0 -0
  525. package/lib/typescript/src/skia/{Paint → types/Paint}/BlendMode.d.ts +0 -0
  526. package/lib/typescript/src/skia/{Paint → types/Paint}/Paint.d.ts +5 -6
  527. package/lib/typescript/src/skia/{Paint → types/Paint}/index.d.ts +0 -1
  528. package/lib/typescript/src/skia/{Path → types/Path}/Path.d.ts +0 -0
  529. package/lib/typescript/src/skia/{Path → types/Path}/PathFactory.d.ts +0 -0
  530. package/lib/typescript/src/skia/{Path → types/Path}/index.d.ts +0 -1
  531. package/lib/typescript/src/skia/{PathEffect.d.ts → types/PathEffect.d.ts} +10 -10
  532. package/lib/typescript/src/skia/{Picture → types/Picture}/Picture.d.ts +0 -0
  533. package/lib/typescript/src/skia/{Picture → types/Picture}/PictureFactory.d.ts +0 -0
  534. package/lib/typescript/src/skia/{Picture → types/Picture}/PictureRecorder.d.ts +0 -0
  535. package/lib/typescript/src/skia/{Picture → types/Picture}/index.d.ts +0 -1
  536. package/lib/typescript/src/skia/{Point.d.ts → types/Point.d.ts} +0 -0
  537. package/lib/typescript/src/skia/{RRect.d.ts → types/RRect.d.ts} +0 -0
  538. package/lib/typescript/src/skia/{RSXform.d.ts → types/RSXform.d.ts} +0 -0
  539. package/lib/typescript/src/skia/{Rect.d.ts → types/Rect.d.ts} +0 -0
  540. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.d.ts +0 -0
  541. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.d.ts +0 -0
  542. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.d.ts +0 -0
  543. package/lib/typescript/src/skia/{SVG → types/SVG}/SVG.d.ts +0 -0
  544. package/lib/typescript/src/skia/{SVG → types/SVG}/SVGFactory.d.ts +1 -1
  545. package/lib/typescript/src/skia/{SVG → types/SVG}/index.d.ts +0 -1
  546. package/lib/typescript/src/skia/{Shader → types/Shader}/Shader.d.ts +0 -0
  547. package/lib/typescript/src/skia/{Shader → types/Shader}/ShaderFactory.d.ts +0 -0
  548. package/lib/typescript/src/skia/{Shader → types/Shader}/index.d.ts +0 -1
  549. package/lib/typescript/src/skia/{SkiaApi.d.ts → types/Skia.d.ts} +2 -5
  550. package/lib/typescript/src/skia/{Surface → types/Surface}/Surface.d.ts +0 -0
  551. package/lib/typescript/src/skia/{Surface → types/Surface}/SurfaceFactory.d.ts +0 -0
  552. package/lib/typescript/src/skia/{Surface → types/Surface}/index.d.ts +0 -0
  553. package/lib/typescript/src/skia/{TextBlob.d.ts → types/TextBlob.d.ts} +0 -0
  554. package/lib/typescript/src/skia/{Typeface → types/Typeface}/Typeface.d.ts +0 -0
  555. package/lib/typescript/src/skia/{Typeface → types/Typeface}/TypefaceFactory.d.ts +1 -1
  556. package/lib/typescript/src/skia/{Typeface → types/Typeface}/index.d.ts +0 -1
  557. package/lib/typescript/src/skia/{Vertices → types/Vertices}/Vertices.d.ts +0 -0
  558. package/lib/typescript/src/skia/{Vertices → types/Vertices}/index.d.ts +0 -0
  559. package/lib/typescript/src/skia/types/index.d.ts +28 -0
  560. package/lib/typescript/src/skia/web/api/Host.d.ts +18 -0
  561. package/lib/typescript/src/skia/web/api/JsiSkCanvas.d.ts +44 -0
  562. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +3 -0
  563. package/lib/typescript/src/skia/web/api/JsiSkColorFilter.d.ts +6 -0
  564. package/lib/typescript/src/skia/web/api/JsiSkImage.d.ts +12 -0
  565. package/lib/typescript/src/skia/web/api/JsiSkPaint.d.ts +26 -0
  566. package/lib/typescript/src/skia/web/api/JsiSkRect.d.ts +10 -0
  567. package/lib/typescript/src/skia/web/api/JsiSkSurface.d.ts +8 -0
  568. package/lib/typescript/src/skia/web/api/JsiSkSurfaceFactory.d.ts +8 -0
  569. package/lib/typescript/src/skia/web/api/index.d.ts +10 -0
  570. package/lib/typescript/src/skia/web/index.d.ts +1 -0
  571. package/lib/typescript/src/values/api.d.ts +1 -1
  572. package/lib/typescript/src/values/api.web.d.ts +1 -1
  573. package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +1 -1
  574. package/lib/typescript/src/values/hooks/useValue.d.ts +2 -2
  575. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +2 -2
  576. package/lib/typescript/src/values/types.d.ts +5 -5
  577. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +2 -2
  578. package/lib/typescript/src/views/SkiaView.d.ts +4 -4
  579. package/lib/typescript/src/views/types.d.ts +3 -4
  580. package/package.json +5 -3
  581. package/react-native-skia.podspec +1 -1
  582. package/src/animation/decay/runDecay.ts +5 -2
  583. package/src/animation/functions/interpolateColors.ts +1 -2
  584. package/src/animation/spring/runSpring.ts +2 -2
  585. package/src/animation/spring/useSpring.ts +2 -2
  586. package/src/animation/timing/createTiming.ts +2 -2
  587. package/src/animation/timing/runTiming.ts +2 -2
  588. package/src/animation/timing/useTiming.ts +2 -2
  589. package/src/index.ts +0 -1
  590. package/src/renderer/Canvas.tsx +4 -5
  591. package/src/renderer/DependencyManager.tsx +2 -2
  592. package/src/renderer/DrawingContext.ts +1 -2
  593. package/src/renderer/components/Blend.tsx +1 -2
  594. package/src/renderer/components/Compose.tsx +1 -3
  595. package/src/renderer/components/colorFilters/Lerp.tsx +1 -2
  596. package/src/renderer/components/imageFilters/DisplacementMap.tsx +1 -2
  597. package/src/renderer/components/imageFilters/InnerShadow.tsx +1 -2
  598. package/src/renderer/components/imageFilters/RuntimeShader.tsx +1 -1
  599. package/src/renderer/components/imageFilters/Shadow.tsx +2 -3
  600. package/src/renderer/components/maskFilters/Blur.tsx +1 -2
  601. package/src/renderer/components/pathEffects/Corner.tsx +1 -2
  602. package/src/renderer/components/pathEffects/Dash.tsx +1 -2
  603. package/src/renderer/components/pathEffects/Discrete.tsx +1 -2
  604. package/src/renderer/components/pathEffects/Line2D.tsx +2 -3
  605. package/src/renderer/components/pathEffects/Path1D.tsx +1 -2
  606. package/src/renderer/components/pathEffects/Path2D.tsx +2 -3
  607. package/src/renderer/components/pathEffects/Sum.tsx +1 -2
  608. package/src/renderer/components/shaders/Gradient.ts +1 -1
  609. package/src/renderer/components/shapes/Box.tsx +1 -3
  610. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  611. package/src/renderer/components/shapes/Patch.tsx +1 -2
  612. package/src/renderer/components/text/TextBlob.tsx +1 -1
  613. package/src/renderer/components/text/TextPath.tsx +1 -2
  614. package/src/renderer/index.ts +1 -0
  615. package/src/renderer/nodes/Declaration.tsx +1 -1
  616. package/src/renderer/nodes/Node.ts +1 -1
  617. package/src/renderer/processors/Animations/Animations.ts +5 -8
  618. package/src/renderer/processors/Clips.ts +1 -2
  619. package/src/renderer/processors/Font.ts +1 -2
  620. package/src/renderer/processors/Rects.ts +4 -0
  621. package/src/renderer/processors/Transform.ts +1 -1
  622. package/src/renderer/processors/math/Matrix3.ts +2 -2
  623. package/src/skia/Skia.ts +2 -38
  624. package/src/skia/__tests__/Rects.spec.ts +40 -0
  625. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  626. package/src/skia/{Color.ts → core/Color.ts} +2 -6
  627. package/src/skia/core/Data.ts +78 -0
  628. package/src/skia/{Font/useFont.ts → core/Font.ts} +8 -5
  629. package/src/skia/core/Image.ts +12 -0
  630. package/src/skia/{Paint/usePaint.ts → core/Paint.ts} +7 -2
  631. package/src/skia/{Path/usePath.ts → core/Path.ts} +1 -3
  632. package/src/skia/{Picture/usePicture.ts → core/Picture.ts} +1 -4
  633. package/src/skia/core/SVG.ts +9 -0
  634. package/src/skia/{Shader/useShader.ts → core/Shader.ts} +0 -0
  635. package/src/skia/core/Typeface.ts +11 -0
  636. package/src/skia/core/index.ts +10 -0
  637. package/src/skia/index.ts +2 -23
  638. package/src/skia/{Canvas.ts → types/Canvas.ts} +0 -0
  639. package/src/skia/types/Color.ts +4 -0
  640. package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.ts +0 -0
  641. package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.ts +1 -1
  642. package/src/skia/{ColorFilter → types/ColorFilter}/index.ts +0 -0
  643. package/src/skia/{ContourMeasure.tsx → types/ContourMeasure.tsx} +0 -0
  644. package/src/skia/types/Data/Data.ts +5 -0
  645. package/src/skia/{Data → types/Data}/DataFactory.ts +0 -0
  646. package/src/skia/{Data → types/Data}/index.ts +0 -0
  647. package/src/skia/{Font → types/Font}/Font.ts +1 -1
  648. package/src/skia/types/Font/index.ts +1 -0
  649. package/src/skia/{FontMgr → types/FontMgr}/FontMgr.ts +1 -1
  650. package/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.ts +1 -6
  651. package/src/skia/{FontMgr → types/FontMgr}/index.ts +1 -0
  652. package/src/skia/{Image → types/Image}/Image.ts +2 -2
  653. package/src/skia/{Image → types/Image}/ImageFactory.ts +0 -0
  654. package/src/skia/{Image → types/Image}/index.ts +0 -1
  655. package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.ts +0 -0
  656. package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.ts +2 -2
  657. package/src/skia/{ImageFilter → types/ImageFilter}/index.ts +0 -0
  658. package/src/skia/{JsiInstance.ts → types/JsiInstance.ts} +0 -0
  659. package/src/skia/{MaskFilter.ts → types/MaskFilter.ts} +3 -3
  660. package/src/skia/{Matrix.ts → types/Matrix.ts} +0 -0
  661. package/src/skia/{Paint → types/Paint}/BlendMode.ts +0 -0
  662. package/src/skia/{Paint → types/Paint}/Paint.ts +5 -12
  663. package/src/skia/{Paint → types/Paint}/index.ts +0 -1
  664. package/src/skia/{Path → types/Path}/Path.ts +0 -0
  665. package/src/skia/{Path → types/Path}/PathFactory.ts +0 -0
  666. package/src/skia/{Path → types/Path}/index.ts +0 -1
  667. package/src/skia/{PathEffect.ts → types/PathEffect.ts} +14 -10
  668. package/src/skia/{Picture → types/Picture}/Picture.ts +0 -0
  669. package/src/skia/{Picture → types/Picture}/PictureFactory.ts +0 -0
  670. package/src/skia/{Picture → types/Picture}/PictureRecorder.ts +0 -0
  671. package/src/skia/{Picture → types/Picture}/index.ts +0 -1
  672. package/src/skia/{Point.ts → types/Point.ts} +0 -0
  673. package/src/skia/{RRect.ts → types/RRect.ts} +0 -0
  674. package/src/skia/{RSXform.ts → types/RSXform.ts} +0 -0
  675. package/src/skia/{Rect.ts → types/Rect.ts} +0 -0
  676. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.ts +0 -0
  677. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.ts +0 -0
  678. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.ts +0 -0
  679. package/src/skia/{SVG → types/SVG}/SVG.ts +0 -0
  680. package/src/skia/{SVG → types/SVG}/SVGFactory.ts +1 -1
  681. package/src/skia/{SVG → types/SVG}/index.ts +0 -1
  682. package/src/skia/{Shader → types/Shader}/Shader.ts +0 -0
  683. package/src/skia/{Shader → types/Shader}/ShaderFactory.ts +0 -0
  684. package/src/skia/{Shader → types/Shader}/index.ts +0 -1
  685. package/src/skia/{SkiaApi.ts → types/Skia.ts} +6 -8
  686. package/src/skia/{Surface → types/Surface}/Surface.ts +0 -0
  687. package/src/skia/{Surface → types/Surface}/SurfaceFactory.ts +0 -0
  688. package/src/skia/{Surface → types/Surface}/index.ts +0 -0
  689. package/src/skia/{TextBlob.ts → types/TextBlob.ts} +0 -0
  690. package/src/skia/{Typeface → types/Typeface}/Typeface.ts +0 -0
  691. package/src/skia/{Typeface → types/Typeface}/TypefaceFactory.ts +1 -1
  692. package/src/skia/{Typeface → types/Typeface}/index.ts +0 -1
  693. package/src/skia/{Vertices → types/Vertices}/Vertices.tsx +0 -0
  694. package/src/skia/{Vertices → types/Vertices}/index.ts +0 -0
  695. package/src/skia/types/index.ts +28 -0
  696. package/src/skia/web/api/Host.ts +50 -0
  697. package/src/skia/web/api/JsiSkCanvas.ts +322 -0
  698. package/src/skia/web/api/JsiSkColor.ts +181 -0
  699. package/src/skia/web/api/JsiSkColorFilter.ts +14 -0
  700. package/src/skia/web/api/JsiSkImage.ts +66 -0
  701. package/src/skia/web/api/JsiSkPaint.ts +103 -0
  702. package/src/skia/web/api/JsiSkRect.ts +27 -0
  703. package/src/skia/web/api/JsiSkSurface.ts +25 -0
  704. package/src/skia/web/api/JsiSkSurfaceFactory.ts +20 -0
  705. package/src/skia/web/api/index.ts +15 -0
  706. package/src/skia/web/index.ts +1 -0
  707. package/src/values/hooks/useValue.ts +2 -2
  708. package/src/values/hooks/useValueEffect.ts +2 -5
  709. package/src/values/types.ts +6 -6
  710. package/src/values/web/RNSkReadonlyValue.ts +2 -2
  711. package/src/values/web/api.ts +4 -4
  712. package/src/views/SkiaView.tsx +3 -3
  713. package/src/views/types.ts +3 -4
  714. package/lib/commonjs/skia/Color.js.map +0 -1
  715. package/lib/commonjs/skia/Data/Data.js.map +0 -1
  716. package/lib/commonjs/skia/Font/Font.js.map +0 -1
  717. package/lib/commonjs/skia/Font/useFont.js.map +0 -1
  718. package/lib/commonjs/skia/Image/index.js.map +0 -1
  719. package/lib/commonjs/skia/Image/useImage.js.map +0 -1
  720. package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
  721. package/lib/commonjs/skia/MaskFilter.js.map +0 -1
  722. package/lib/commonjs/skia/Paint/Paint.js.map +0 -1
  723. package/lib/commonjs/skia/Paint/usePaint.js.map +0 -1
  724. package/lib/commonjs/skia/Path/index.js.map +0 -1
  725. package/lib/commonjs/skia/Path/usePath.js.map +0 -1
  726. package/lib/commonjs/skia/PathEffect.js.map +0 -1
  727. package/lib/commonjs/skia/Picture/index.js.map +0 -1
  728. package/lib/commonjs/skia/Picture/usePicture.js.map +0 -1
  729. package/lib/commonjs/skia/SVG/index.js.map +0 -1
  730. package/lib/commonjs/skia/SVG/useSvg.js +0 -15
  731. package/lib/commonjs/skia/SVG/useSvg.js.map +0 -1
  732. package/lib/commonjs/skia/Shader/index.js.map +0 -1
  733. package/lib/commonjs/skia/Shader/useShader.js.map +0 -1
  734. package/lib/commonjs/skia/SkiaApi.js +0 -4
  735. package/lib/commonjs/skia/SkiaApi.js.map +0 -1
  736. package/lib/commonjs/skia/Typeface/index.js.map +0 -1
  737. package/lib/commonjs/skia/Typeface/useTypeface.js.map +0 -1
  738. package/lib/module/skia/Color.js.map +0 -1
  739. package/lib/module/skia/Data/Data.js +0 -35
  740. package/lib/module/skia/Data/Data.js.map +0 -1
  741. package/lib/module/skia/Font/Font.js.map +0 -1
  742. package/lib/module/skia/Font/index.js +0 -3
  743. package/lib/module/skia/Font/index.js.map +0 -1
  744. package/lib/module/skia/Font/useFont.js.map +0 -1
  745. package/lib/module/skia/FontMgr/index.js +0 -2
  746. package/lib/module/skia/FontMgr/index.js.map +0 -1
  747. package/lib/module/skia/Image/index.js +0 -4
  748. package/lib/module/skia/Image/index.js.map +0 -1
  749. package/lib/module/skia/Image/useImage.js +0 -8
  750. package/lib/module/skia/Image/useImage.js.map +0 -1
  751. package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
  752. package/lib/module/skia/MaskFilter.js.map +0 -1
  753. package/lib/module/skia/Paint/Paint.js.map +0 -1
  754. package/lib/module/skia/Paint/index.js +0 -4
  755. package/lib/module/skia/Paint/index.js.map +0 -1
  756. package/lib/module/skia/Paint/usePaint.js.map +0 -1
  757. package/lib/module/skia/Path/index.js +0 -4
  758. package/lib/module/skia/Path/index.js.map +0 -1
  759. package/lib/module/skia/Path/usePath.js.map +0 -1
  760. package/lib/module/skia/PathEffect.js.map +0 -1
  761. package/lib/module/skia/Picture/index.js.map +0 -1
  762. package/lib/module/skia/Picture/usePicture.js.map +0 -1
  763. package/lib/module/skia/SVG/index.js +0 -4
  764. package/lib/module/skia/SVG/index.js.map +0 -1
  765. package/lib/module/skia/SVG/useSvg.js +0 -4
  766. package/lib/module/skia/SVG/useSvg.js.map +0 -1
  767. package/lib/module/skia/Shader/index.js +0 -4
  768. package/lib/module/skia/Shader/index.js.map +0 -1
  769. package/lib/module/skia/Shader/useShader.js.map +0 -1
  770. package/lib/module/skia/SkiaApi.js +0 -2
  771. package/lib/module/skia/SkiaApi.js.map +0 -1
  772. package/lib/module/skia/Typeface/index.js +0 -4
  773. package/lib/module/skia/Typeface/index.js.map +0 -1
  774. package/lib/module/skia/Typeface/useTypeface.js +0 -8
  775. package/lib/module/skia/Typeface/useTypeface.js.map +0 -1
  776. package/lib/typescript/src/skia/Data/Data.d.ts +0 -9
  777. package/lib/typescript/src/skia/Font/index.d.ts +0 -2
  778. package/lib/typescript/src/skia/Font/useFont.d.ts +0 -6
  779. package/lib/typescript/src/skia/Image/useImage.d.ts +0 -5
  780. package/lib/typescript/src/skia/SVG/useSvg.d.ts +0 -2
  781. package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +0 -5
  782. package/src/skia/Data/Data.ts +0 -61
  783. package/src/skia/Font/index.ts +0 -2
  784. package/src/skia/Image/useImage.ts +0 -9
  785. package/src/skia/SVG/useSvg.ts +0 -6
  786. package/src/skia/Typeface/useTypeface.ts +0 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["runDecay.ts"],"names":["runDecay","value","config","resolvedConfig","deceleration","velocityFactor","velocity","from","current","updateFunction","t","state","finished","lastTimestamp","startTimestamp","initialVelocity","animation","ValueApi","createAnimation"],"mappings":";;;;;;;AAAA;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAA2BC,MAA3B,KAAoD;AAC1E,QAAMC,cAAkC,GAAG;AACzCC,IAAAA,YAAY,EAAE,KAD2B;AAEzCC,IAAAA,cAAc,EAAE,CAFyB;AAGzCC,IAAAA,QAAQ,EAAE,CAH+B;AAIzCC,IAAAA,IAAI,EAAEN,KAAK,CAACO,OAJ6B;AAKzC,OAAGN;AALsC,GAA3C;;AAOA,QAAMO,cAAc,GAAG,CAACC,CAAD,EAAYC,KAAZ,KAA8C;AACnE,QAAI,CAACA,KAAL,EAAY;AACV,aAAO;AACLH,QAAAA,OAAO,EAAEL,cAAc,CAACI,IADnB;AAELK,QAAAA,QAAQ,EAAE,KAFL;AAGLC,QAAAA,aAAa,EAAEH,CAHV;AAILI,QAAAA,cAAc,EAAEJ,CAJX;AAKLK,QAAAA,eAAe,EAAEZ,cAAc,CAACG,QAL3B;AAMLA,QAAAA,QAAQ,EAAEH,cAAc,CAACG;AANpB,OAAP;AAQD;;AACD,WAAO,kBAAMI,CAAN,EAASC,KAAT,EAAgBR,cAAhB,CAAP;AACD,GAZD;;AAaAF,EAAAA,KAAK,CAACe,SAAN,GAAkBC,cAASC,eAAT,CAAyBT,cAAzB,CAAlB;AACA,SAAOR,KAAK,CAACe,SAAb;AACD,CAvBM","sourcesContent":["import { ValueApi } from \"../../values/api\";\nimport type { SkiaValue } from \"../../values/types\";\n\nimport { decay } from \"./decay\";\nimport type { DecayConfig, DefaultDecayConfig, DecayState } from \"./types\";\n\n/**\n * Runs a decay animation from the current value to zero with the given decay\n * configuration.\n * @param value value to animate\n * @param config Configuration or default configuration\n * @returns Animation\n */\nexport const runDecay = (value: SkiaValue<number>, config?: DecayConfig) => {\n const resolvedConfig: DefaultDecayConfig = {\n deceleration: 0.998,\n velocityFactor: 1,\n velocity: 0,\n from: value.current,\n ...config,\n };\n const updateFunction = (t: number, state: DecayState | undefined) => {\n if (!state) {\n return {\n current: resolvedConfig.from,\n finished: false,\n lastTimestamp: t,\n startTimestamp: t,\n initialVelocity: resolvedConfig.velocity,\n velocity: resolvedConfig.velocity,\n };\n }\n return decay(t, state, resolvedConfig);\n };\n value.animation = ValueApi.createAnimation(updateFunction);\n return value.animation;\n};\n"]}
1
+ {"version":3,"sources":["runDecay.ts"],"names":["runDecay","value","config","resolvedConfig","deceleration","velocityFactor","velocity","from","current","updateFunction","t","state","finished","lastTimestamp","startTimestamp","initialVelocity","animation","ValueApi","createAnimation"],"mappings":";;;;;;;AAAA;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CACtBC,KADsB,EAEtBC,MAFsB,KAGnB;AACH,QAAMC,cAAkC,GAAG;AACzCC,IAAAA,YAAY,EAAE,KAD2B;AAEzCC,IAAAA,cAAc,EAAE,CAFyB;AAGzCC,IAAAA,QAAQ,EAAE,CAH+B;AAIzCC,IAAAA,IAAI,EAAEN,KAAK,CAACO,OAJ6B;AAKzC,OAAGN;AALsC,GAA3C;;AAOA,QAAMO,cAAc,GAAG,CAACC,CAAD,EAAYC,KAAZ,KAA8C;AACnE,QAAI,CAACA,KAAL,EAAY;AACV,aAAO;AACLH,QAAAA,OAAO,EAAEL,cAAc,CAACI,IADnB;AAELK,QAAAA,QAAQ,EAAE,KAFL;AAGLC,QAAAA,aAAa,EAAEH,CAHV;AAILI,QAAAA,cAAc,EAAEJ,CAJX;AAKLK,QAAAA,eAAe,EAAEZ,cAAc,CAACG,QAL3B;AAMLA,QAAAA,QAAQ,EAAEH,cAAc,CAACG;AANpB,OAAP;AAQD;;AACD,WAAO,kBAAMI,CAAN,EAASC,KAAT,EAAgBR,cAAhB,CAAP;AACD,GAZD;;AAaAF,EAAAA,KAAK,CAACe,SAAN,GAAkBC,cAASC,eAAT,CAAyBT,cAAzB,CAAlB;AACA,SAAOR,KAAK,CAACe,SAAb;AACD,CA1BM","sourcesContent":["import { ValueApi } from \"../../values/api\";\nimport type { SkiaMutableValue } from \"../../values/types\";\n\nimport { decay } from \"./decay\";\nimport type { DecayConfig, DefaultDecayConfig, DecayState } from \"./types\";\n\n/**\n * Runs a decay animation from the current value to zero with the given decay\n * configuration.\n * @param value value to animate\n * @param config Configuration or default configuration\n * @returns Animation\n */\nexport const runDecay = (\n value: SkiaMutableValue<number>,\n config?: DecayConfig\n) => {\n const resolvedConfig: DefaultDecayConfig = {\n deceleration: 0.998,\n velocityFactor: 1,\n velocity: 0,\n from: value.current,\n ...config,\n };\n const updateFunction = (t: number, state: DecayState | undefined) => {\n if (!state) {\n return {\n current: resolvedConfig.from,\n finished: false,\n lastTimestamp: t,\n startTimestamp: t,\n initialVelocity: resolvedConfig.velocity,\n velocity: resolvedConfig.velocity,\n };\n }\n return decay(t, state, resolvedConfig);\n };\n value.animation = ValueApi.createAnimation(updateFunction);\n return value.animation;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["interpolateColors.ts"],"names":["interpolateColorsRGB","value","inputRange","outputRange","r","map","c","g","b","a","Float32Array","interpolateColors","_outputRange","cl","Skia","Color","mixColors","x","y","c1","c2"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;AAEA,MAAMA,oBAAoB,GAAG,CAC3BC,KAD2B,EAE3BC,UAF2B,EAG3BC,WAH2B,KAIxB;AACH,QAAMC,CAAC,GAAG,8BACRH,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAMC,CAAC,GAAG,8BACRN,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAME,CAAC,GAAG,8BACRP,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAMG,CAAC,GAAG,8BACRR,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,SAAO,IAAII,YAAJ,CAAiB,CAACN,CAAD,EAAIG,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CAAP;AACD,CA9BD;;AAgCO,MAAME,iBAAiB,GAAG,CAC/BV,KAD+B,EAE/BC,UAF+B,EAG/BU,YAH+B,KAI5B;AACH,QAAMT,WAAW,GAAGS,YAAY,CAACP,GAAb,CAAkBQ,EAAD,IAAQC,WAAKC,KAAL,CAAWF,EAAX,CAAzB,CAApB;;AACA,SAAOb,oBAAoB,CAACC,KAAD,EAAQC,UAAR,EAAoBC,WAApB,CAA3B;AACD,CAPM;;;;AASA,MAAMa,SAAS,GAAG,CAACf,KAAD,EAAgBgB,CAAhB,EAA0BC,CAA1B,KAAuC;AAC9D,QAAMC,EAAE,GAAGL,WAAKC,KAAL,CAAWE,CAAX,CAAX;;AACA,QAAMG,EAAE,GAAGN,WAAKC,KAAL,CAAWG,CAAX,CAAX;;AACA,SAAO,IAAIR,YAAJ,CAAiB,CACtB,mBAAIT,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CADsB,EAEtB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAFsB,EAGtB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAHsB,EAItB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAJsB,CAAjB,CAAP;AAMD,CATM","sourcesContent":["import { mix } from \"../../renderer\";\nimport type { Color } from \"../../skia\";\nimport { Skia } from \"../../skia\";\nimport type { SkColor } from \"../../skia/Color\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n return new Float32Array([r, g, b, a]);\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"]}
1
+ {"version":3,"sources":["interpolateColors.ts"],"names":["interpolateColorsRGB","value","inputRange","outputRange","r","map","c","g","b","a","Float32Array","interpolateColors","_outputRange","cl","Skia","Color","mixColors","x","y","c1","c2"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAEA,MAAMA,oBAAoB,GAAG,CAC3BC,KAD2B,EAE3BC,UAF2B,EAG3BC,WAH2B,KAIxB;AACH,QAAMC,CAAC,GAAG,8BACRH,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAMC,CAAC,GAAG,8BACRN,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAME,CAAC,GAAG,8BACRP,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,QAAMG,CAAC,GAAG,8BACRR,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;AAMA,SAAO,IAAII,YAAJ,CAAiB,CAACN,CAAD,EAAIG,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CAAP;AACD,CA9BD;;AAgCO,MAAME,iBAAiB,GAAG,CAC/BV,KAD+B,EAE/BC,UAF+B,EAG/BU,YAH+B,KAI5B;AACH,QAAMT,WAAW,GAAGS,YAAY,CAACP,GAAb,CAAkBQ,EAAD,IAAQC,WAAKC,KAAL,CAAWF,EAAX,CAAzB,CAApB;;AACA,SAAOb,oBAAoB,CAACC,KAAD,EAAQC,UAAR,EAAoBC,WAApB,CAA3B;AACD,CAPM;;;;AASA,MAAMa,SAAS,GAAG,CAACf,KAAD,EAAgBgB,CAAhB,EAA0BC,CAA1B,KAAuC;AAC9D,QAAMC,EAAE,GAAGL,WAAKC,KAAL,CAAWE,CAAX,CAAX;;AACA,QAAMG,EAAE,GAAGN,WAAKC,KAAL,CAAWG,CAAX,CAAX;;AACA,SAAO,IAAIR,YAAJ,CAAiB,CACtB,mBAAIT,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CADsB,EAEtB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAFsB,EAGtB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAHsB,EAItB,mBAAInB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAJsB,CAAjB,CAAP;AAMD,CATM","sourcesContent":["import { mix } from \"../../renderer\";\nimport type { Color, SkColor } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n return new Float32Array([r, g, b, a]);\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["runSpring.ts"],"names":["runSpring","value","toOrParams","config","callback","Spring","Config","Default"],"mappings":";;;;;;;AAMA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;AAClB,SAAO,0BACLH,KADK,EAELC,UAFK,EAGL,gCAAmBC,MAAnB,aAAmBA,MAAnB,cAAmBA,MAAnB,GAA6BE,eAAOC,MAAP,CAAcC,OAA3C,CAHK,EAILH,QAJK,CAAP;AAMD,CAZM","sourcesContent":["import type { SkiaValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n SpringConfig,\n AnimationCallback,\n} from \"../types\";\nimport { runTiming } from \"../timing/runTiming\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runSpring = (\n value: SkiaValue<number>,\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n return runTiming(\n value,\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n};\n"]}
1
+ {"version":3,"sources":["runSpring.ts"],"names":["runSpring","value","toOrParams","config","callback","Spring","Config","Default"],"mappings":";;;;;;;AAMA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;AAClB,SAAO,0BACLH,KADK,EAELC,UAFK,EAGL,gCAAmBC,MAAnB,aAAmBA,MAAnB,cAAmBA,MAAnB,GAA6BE,eAAOC,MAAP,CAAcC,OAA3C,CAHK,EAILH,QAJK,CAAP;AAMD,CAZM","sourcesContent":["import type { SkiaMutableValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n SpringConfig,\n AnimationCallback,\n} from \"../types\";\nimport { runTiming } from \"../timing/runTiming\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runSpring = (\n value: SkiaMutableValue<number>,\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n return runTiming(\n value,\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSpring.ts"],"names":["useSpring","toOrParams","config","callback","Spring","Config","Default"],"mappings":";;;;;;;AAMA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAKvB,uBACEF,UADF,EAEE,gCAAmBC,MAAnB,aAAmBA,MAAnB,cAAmBA,MAAnB,GAA6BE,eAAOC,MAAP,CAAcC,OAA3C,CAFF,EAGEH,QAHF,CALK","sourcesContent":["import type { SkiaReadonlyValue } from \"../../values/types\";\nimport type {\n SpringConfig,\n AnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport { useTiming } from \"../timing\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creats a spring based animation value that will run whenever\n * the animation parameters change.\n * @param toOrParams\n * @param config\n * @returns\n */\nexport const useSpring = (\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaReadonlyValue<number> =>\n useTiming(\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n"]}
1
+ {"version":3,"sources":["useSpring.ts"],"names":["useSpring","toOrParams","config","callback","Spring","Config","Default"],"mappings":";;;;;;;AAMA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAKvB,uBACEF,UADF,EAEE,gCAAmBC,MAAnB,aAAmBA,MAAnB,cAAmBA,MAAnB,GAA6BE,eAAOC,MAAP,CAAcC,OAA3C,CAFF,EAGEH,QAHF,CALK","sourcesContent":["import type { SkiaValue } from \"../../values/types\";\nimport type {\n SpringConfig,\n AnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport { useTiming } from \"../timing\";\n\nimport { Spring } from \"./Spring\";\nimport { createSpringEasing } from \"./functions/spring\";\n\n/**\n * Creats a spring based animation value that will run whenever\n * the animation parameters change.\n * @param toOrParams\n * @param config\n * @returns\n */\nexport const useSpring = (\n toOrParams: number | AnimationParams,\n config?: SpringConfig,\n callback?: AnimationCallback\n): SkiaValue<number> =>\n useTiming(\n toOrParams,\n createSpringEasing(config ?? Spring.Config.Default),\n callback\n );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["createTiming.ts"],"names":["createTiming","params","value","callback","resolvedParams","from","current","animationFunction","t","state","nextState","duration","easing","loop","yoyo","finished","to","ValueApi","createAnimation"],"mappings":";;;;;;;AAMA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAG,CAC1BC,MAD0B,EAE1BC,KAF0B,EAG1BC,QAH0B,KAIvB;AAAA;;AACH;AACA;AACA,QAAMC,cAAc,GAAG,EACrB,GAAGH,MADkB;AAErBI,IAAAA,IAAI,0BAAEJ,MAAM,CAACI,IAAT,uDAAiBH,KAAjB,aAAiBA,KAAjB,uBAAiBA,KAAK,CAAEI,OAAxB,uCAAmC;AAFlB,GAAvB,CAHG,CAQH;;AACA,QAAMC,iBAAiB,GAAG,CAACC,CAAD,EAAYC,KAAZ,KAAkD;AAAA;;AAC1E;AACA,UAAMC,SAAS,GAAG,uBAChBF,CADgB,EAEhBP,MAAM,CAACU,QAFS,EAGhBV,MAAM,CAACW,MAHS,kBAIhBX,MAAM,CAACY,IAJS,uDAID,KAJC,kBAKhBZ,MAAM,CAACa,IALS,uDAKD,KALC,EAMhBL,KANgB,aAMhBA,KANgB,cAMhBA,KANgB,GAMP;AAAEH,MAAAA,OAAO,EAAEL,MAAM,CAACI,IAAlB;AAAyBU,MAAAA,QAAQ,EAAE;AAAnC,KANO,CAAlB;AAQA,UAAMT,OAAO,GACXI,SAAS,CAACJ,OAAV,IAAqBF,cAAc,CAACY,EAAf,GAAoBZ,cAAc,CAACC,IAAxD,IACAD,cAAc,CAACC,IAFjB;;AAGA,QAAIF,QAAQ,IAAIO,SAAS,CAACK,QAAV,KAAuB,IAAvC,EAA6C;AAC3CZ,MAAAA,QAAQ,CAACG,OAAD,CAAR;AACD;;AACD,WAAO,EACL,GAAGI,SADE;AAELJ,MAAAA;AAFK,KAAP;AAID,GApBD,CATG,CA+BH;;;AACA,SAAOW,cAASC,eAAT,CAAyBX,iBAAzB,CAAP;AACD,CArCM","sourcesContent":["import type {\n TimingConfig,\n RequiredAnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport type { AnimationState, SkiaValue } from \"../../values/types\";\nimport { ValueApi } from \"../../values/api\";\n\nimport { timing } from \"./functions\";\n\n/**\n * Creates an animation that is driven by a clock value.\n * The value will be run from / to the value in params and modified\n * by the provided easing curve for the length of the duration. When\n * the value has reached its desired \"to\" value the animation\n * will be stopped. If loop is set to true, the animation will continue\n * to run until stopped.\n *\n * @param params Animation parameters\n * @param config Spring or timing configuration\n * @param value Optional value that the animation will update\n * @params an animation value that can be used to start/stop\n * the animation.\n */\nexport const createTiming = (\n params: RequiredAnimationParams & Required<TimingConfig>,\n value?: SkiaValue<number>,\n callback?: AnimationCallback\n) => {\n // Update from to be either the declared from value,\n // the current value of the value or zero\n const resolvedParams = {\n ...params,\n from: params.from ?? value?.current ?? 0,\n };\n\n // Update function for the animation value\n const animationFunction = (t: number, state: AnimationState | undefined) => {\n // Update the input value using the provided update function\n const nextState = timing(\n t,\n params.duration,\n params.easing,\n params.loop ?? false,\n params.yoyo ?? false,\n state ?? { current: params.from!, finished: false }\n );\n const current =\n nextState.current * (resolvedParams.to - resolvedParams.from!) +\n resolvedParams.from!;\n if (callback && nextState.finished === true) {\n callback(current);\n }\n return {\n ...nextState,\n current,\n };\n };\n\n // Create animation value\n return ValueApi.createAnimation(animationFunction);\n};\n"]}
1
+ {"version":3,"sources":["createTiming.ts"],"names":["createTiming","params","value","callback","resolvedParams","from","current","animationFunction","t","state","nextState","duration","easing","loop","yoyo","finished","to","ValueApi","createAnimation"],"mappings":";;;;;;;AAMA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAG,CAC1BC,MAD0B,EAE1BC,KAF0B,EAG1BC,QAH0B,KAIvB;AAAA;;AACH;AACA;AACA,QAAMC,cAAc,GAAG,EACrB,GAAGH,MADkB;AAErBI,IAAAA,IAAI,0BAAEJ,MAAM,CAACI,IAAT,uDAAiBH,KAAjB,aAAiBA,KAAjB,uBAAiBA,KAAK,CAAEI,OAAxB,uCAAmC;AAFlB,GAAvB,CAHG,CAQH;;AACA,QAAMC,iBAAiB,GAAG,CAACC,CAAD,EAAYC,KAAZ,KAAkD;AAAA;;AAC1E;AACA,UAAMC,SAAS,GAAG,uBAChBF,CADgB,EAEhBP,MAAM,CAACU,QAFS,EAGhBV,MAAM,CAACW,MAHS,kBAIhBX,MAAM,CAACY,IAJS,uDAID,KAJC,kBAKhBZ,MAAM,CAACa,IALS,uDAKD,KALC,EAMhBL,KANgB,aAMhBA,KANgB,cAMhBA,KANgB,GAMP;AAAEH,MAAAA,OAAO,EAAEL,MAAM,CAACI,IAAlB;AAAyBU,MAAAA,QAAQ,EAAE;AAAnC,KANO,CAAlB;AAQA,UAAMT,OAAO,GACXI,SAAS,CAACJ,OAAV,IAAqBF,cAAc,CAACY,EAAf,GAAoBZ,cAAc,CAACC,IAAxD,IACAD,cAAc,CAACC,IAFjB;;AAGA,QAAIF,QAAQ,IAAIO,SAAS,CAACK,QAAV,KAAuB,IAAvC,EAA6C;AAC3CZ,MAAAA,QAAQ,CAACG,OAAD,CAAR;AACD;;AACD,WAAO,EACL,GAAGI,SADE;AAELJ,MAAAA;AAFK,KAAP;AAID,GApBD,CATG,CA+BH;;;AACA,SAAOW,cAASC,eAAT,CAAyBX,iBAAzB,CAAP;AACD,CArCM","sourcesContent":["import type {\n TimingConfig,\n RequiredAnimationParams,\n AnimationCallback,\n} from \"../types\";\nimport type { AnimationState, SkiaMutableValue } from \"../../values/types\";\nimport { ValueApi } from \"../../values/api\";\n\nimport { timing } from \"./functions\";\n\n/**\n * Creates an animation that is driven by a clock value.\n * The value will be run from / to the value in params and modified\n * by the provided easing curve for the length of the duration. When\n * the value has reached its desired \"to\" value the animation\n * will be stopped. If loop is set to true, the animation will continue\n * to run until stopped.\n *\n * @param params Animation parameters\n * @param config Spring or timing configuration\n * @param value Optional value that the animation will update\n * @params an animation value that can be used to start/stop\n * the animation.\n */\nexport const createTiming = (\n params: RequiredAnimationParams & Required<TimingConfig>,\n value?: SkiaMutableValue<number>,\n callback?: AnimationCallback\n) => {\n // Update from to be either the declared from value,\n // the current value of the value or zero\n const resolvedParams = {\n ...params,\n from: params.from ?? value?.current ?? 0,\n };\n\n // Update function for the animation value\n const animationFunction = (t: number, state: AnimationState | undefined) => {\n // Update the input value using the provided update function\n const nextState = timing(\n t,\n params.duration,\n params.easing,\n params.loop ?? false,\n params.yoyo ?? false,\n state ?? { current: params.from!, finished: false }\n );\n const current =\n nextState.current * (resolvedParams.to - resolvedParams.from!) +\n resolvedParams.from!;\n if (callback && nextState.finished === true) {\n callback(current);\n }\n return {\n ...nextState,\n current,\n };\n };\n\n // Create animation value\n return ValueApi.createAnimation(animationFunction);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["runTiming.ts"],"names":["runTiming","value","toOrParams","config","callback","resolvedParameters","animation"],"mappings":";;;;;;;AAOA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;AAClB,QAAMC,kBAAkB,GAAG,kCAAkBH,UAAlB,EAA8BC,MAA9B,CAA3B;AACA,QAAMG,SAAS,GAAG,gCAAaD,kBAAb,EAAiCJ,KAAjC,EAAwCG,QAAxC,CAAlB;AACAH,EAAAA,KAAK,CAACK,SAAN,GAAkBA,SAAlB;AACA,SAAOA,SAAP;AACD,CAVM","sourcesContent":["import type { SkiaValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring or timing configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runTiming = (\n value: SkiaValue<number>,\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n const resolvedParameters = getResolvedParams(toOrParams, config);\n const animation = createTiming(resolvedParameters, value, callback);\n value.animation = animation;\n return animation;\n};\n"]}
1
+ {"version":3,"sources":["runTiming.ts"],"names":["runTiming","value","toOrParams","config","callback","resolvedParameters","animation"],"mappings":";;;;;;;AAOA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,KADuB,EAEvBC,UAFuB,EAGvBC,MAHuB,EAIvBC,QAJuB,KAKL;AAClB,QAAMC,kBAAkB,GAAG,kCAAkBH,UAAlB,EAA8BC,MAA9B,CAA3B;AACA,QAAMG,SAAS,GAAG,gCAAaD,kBAAb,EAAiCJ,KAAjC,EAAwCG,QAAxC,CAAlB;AACAH,EAAAA,KAAK,CAACK,SAAN,GAAkBA,SAAlB;AACA,SAAOA,SAAP;AACD,CAVM","sourcesContent":["import type { SkiaMutableValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n/**\n * Creates a new animation on an existing value that will be driven by\n * an animation value. The value will be run from / to the value in\n * params and modified by the provided easing curve for the length of\n * the duration. When the value has reached its desired \"to\" value the\n * animation will be stopped.\n *\n * @param value The value to animate\n * @param toOrParams To value or Animation parameters\n * @param config Spring or timing configuration\n * @returns an animation value that can be used to start/stop\n * the animation.\n */\nexport const runTiming = (\n value: SkiaMutableValue<number>,\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaAnimation => {\n const resolvedParameters = getResolvedParams(toOrParams, config);\n const animation = createTiming(resolvedParameters, value, callback);\n value.animation = animation;\n return animation;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTiming.ts"],"names":["useTiming","toOrParams","config","callback","prevCfgRef","resolvedParameters","nextParams","equals","current","value","from","prevAnimationRef","prevParamsRef","animation","undefined","a","b","JSON","stringify"],"mappings":";;;;;;;AAAA;;AAQA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAIO;AAAA;;AAC9B;AACA;AACA,QAAMC,UAAU,GAAG,oBAAnB;AACA,QAAMC,kBAAkB,GAAG,oBAAQ,MAAM;AACvC,UAAMC,UAAU,GAAG,kCAAkBL,UAAlB,EAA8BC,MAA9B,CAAnB;;AACA,QAAI,CAACK,MAAM,CAACH,UAAU,CAACI,OAAZ,EAAqBF,UAArB,CAAX,EAA6C;AAC3CF,MAAAA,UAAU,CAACI,OAAX,GAAqBF,UAArB;AACD;;AACD,WAAOF,UAAU,CAACI,OAAlB;AACD,GAN0B,EAMxB,CAACN,MAAD,EAASD,UAAT,CANwB,CAA3B,CAJ8B,CAY9B;;AACA,QAAMQ,KAAK,GAAG,iDAASJ,kBAAkB,CAACK,IAA5B,yEAAoC,CAApC,CAAd,CAb8B,CAe9B;AACA;;AACA,QAAMC,gBAAgB,GAAG,oBAAzB;AACA,QAAMC,aAAa,GAAG,oBAAtB;AACA,QAAMC,SAAS,GAAG,oBAAQ,MAAM;AAC9B,QAAI,CAACN,MAAM,CAACK,aAAa,CAACJ,OAAf,EAAwBH,kBAAxB,CAAX,EAAwD;AACtDO,MAAAA,aAAa,CAACJ,OAAd,GAAwBH,kBAAxB;AACAM,MAAAA,gBAAgB,CAACH,OAAjB,GAA2B,gCACzBH,kBADyB,EAEzBI,KAFyB,EAGzBN,QAHyB,CAA3B;AAKD;;AACD,WAAOQ,gBAAgB,CAACH,OAAxB;AACD,GAViB,EAUf,CAACL,QAAD,EAAWE,kBAAX,EAA+BI,KAA/B,CAVe,CAAlB,CAnB8B,CA+B9B;;AACA,wBAAU,MAAM;AACdA,IAAAA,KAAK,CAACI,SAAN,GAAkBA,SAAlB;AACA,WAAO,MAAOJ,KAAK,CAACI,SAAN,GAAkBC,SAAhC;AACD,GAHD,EAGG,CAACD,SAAD,EAAYJ,KAAZ,CAHH,EAhC8B,CAqC9B;;AACA,SAAOA,KAAP;AACD,CA3CM;;;;AA6CP,MAAMF,MAAM,GAAG,CAASQ,CAAT,EAAgBC,CAAhB,KAA0B;AACvC,SAAOC,IAAI,CAACC,SAAL,CAAeH,CAAf,MAAsBE,IAAI,CAACC,SAAL,CAAeF,CAAf,CAA7B;AACD,CAFD","sourcesContent":["import { useEffect, useMemo, useRef } from \"react\";\n\nimport type { SkiaReadonlyValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\nimport { useValue } from \"../../values/hooks/useValue\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n\n/**\n * Creats an animation value that will run whenever\n * the animation parameters change. The animation start immediately.\n * @param toOrParams\n * @param config\n * @returns A value that is animated\n */\nexport const useTiming = (\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaReadonlyValue<number> => {\n // Resolve parameters - keep a cached version to avoid\n // unnecesary re-renders.\n const prevCfgRef = useRef<ReturnType<typeof getResolvedParams>>();\n const resolvedParameters = useMemo(() => {\n const nextParams = getResolvedParams(toOrParams, config);\n if (!equals(prevCfgRef.current, nextParams)) {\n prevCfgRef.current = nextParams;\n }\n return prevCfgRef.current!;\n }, [config, toOrParams]);\n\n // Create value\n const value = useValue(resolvedParameters.from ?? 0);\n\n // Create timing animation - keep a cached version to avoid\n // uneccessary recreation of animations\n const prevAnimationRef = useRef<SkiaAnimation>();\n const prevParamsRef = useRef<typeof resolvedParameters>();\n const animation = useMemo(() => {\n if (!equals(prevParamsRef.current, resolvedParameters)) {\n prevParamsRef.current = resolvedParameters;\n prevAnimationRef.current = createTiming(\n resolvedParameters,\n value,\n callback\n );\n }\n return prevAnimationRef.current!;\n }, [callback, resolvedParameters, value]);\n\n // Run animation on the value - and stop it on unmount\n useEffect(() => {\n value.animation = animation;\n return () => (value.animation = undefined);\n }, [animation, value]);\n\n // Return the value that is animated\n return value;\n};\n\nconst equals = <T1, T2>(a: T1, b: T2) => {\n return JSON.stringify(a) === JSON.stringify(b);\n};\n"]}
1
+ {"version":3,"sources":["useTiming.ts"],"names":["useTiming","toOrParams","config","callback","prevCfgRef","resolvedParameters","nextParams","equals","current","value","from","prevAnimationRef","prevParamsRef","animation","undefined","a","b","JSON","stringify"],"mappings":";;;;;;;AAAA;;AAQA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,SAAS,GAAG,CACvBC,UADuB,EAEvBC,MAFuB,EAGvBC,QAHuB,KAID;AAAA;;AACtB;AACA;AACA,QAAMC,UAAU,GAAG,oBAAnB;AACA,QAAMC,kBAAkB,GAAG,oBAAQ,MAAM;AACvC,UAAMC,UAAU,GAAG,kCAAkBL,UAAlB,EAA8BC,MAA9B,CAAnB;;AACA,QAAI,CAACK,MAAM,CAACH,UAAU,CAACI,OAAZ,EAAqBF,UAArB,CAAX,EAA6C;AAC3CF,MAAAA,UAAU,CAACI,OAAX,GAAqBF,UAArB;AACD;;AACD,WAAOF,UAAU,CAACI,OAAlB;AACD,GAN0B,EAMxB,CAACN,MAAD,EAASD,UAAT,CANwB,CAA3B,CAJsB,CAYtB;;AACA,QAAMQ,KAAK,GAAG,iDAASJ,kBAAkB,CAACK,IAA5B,yEAAoC,CAApC,CAAd,CAbsB,CAetB;AACA;;AACA,QAAMC,gBAAgB,GAAG,oBAAzB;AACA,QAAMC,aAAa,GAAG,oBAAtB;AACA,QAAMC,SAAS,GAAG,oBAAQ,MAAM;AAC9B,QAAI,CAACN,MAAM,CAACK,aAAa,CAACJ,OAAf,EAAwBH,kBAAxB,CAAX,EAAwD;AACtDO,MAAAA,aAAa,CAACJ,OAAd,GAAwBH,kBAAxB;AACAM,MAAAA,gBAAgB,CAACH,OAAjB,GAA2B,gCACzBH,kBADyB,EAEzBI,KAFyB,EAGzBN,QAHyB,CAA3B;AAKD;;AACD,WAAOQ,gBAAgB,CAACH,OAAxB;AACD,GAViB,EAUf,CAACL,QAAD,EAAWE,kBAAX,EAA+BI,KAA/B,CAVe,CAAlB,CAnBsB,CA+BtB;;AACA,wBAAU,MAAM;AACdA,IAAAA,KAAK,CAACI,SAAN,GAAkBA,SAAlB;AACA,WAAO,MAAOJ,KAAK,CAACI,SAAN,GAAkBC,SAAhC;AACD,GAHD,EAGG,CAACD,SAAD,EAAYJ,KAAZ,CAHH,EAhCsB,CAqCtB;;AACA,SAAOA,KAAP;AACD,CA3CM;;;;AA6CP,MAAMF,MAAM,GAAG,CAASQ,CAAT,EAAgBC,CAAhB,KAA0B;AACvC,SAAOC,IAAI,CAACC,SAAL,CAAeH,CAAf,MAAsBE,IAAI,CAACC,SAAL,CAAeF,CAAf,CAA7B;AACD,CAFD","sourcesContent":["import { useEffect, useMemo, useRef } from \"react\";\n\nimport type { SkiaValue, SkiaAnimation } from \"../../values/types\";\nimport type {\n AnimationParams,\n TimingConfig,\n AnimationCallback,\n} from \"../types\";\nimport { useValue } from \"../../values/hooks/useValue\";\n\nimport { getResolvedParams } from \"./functions\";\nimport { createTiming } from \"./createTiming\";\n\n/**\n * Creats an animation value that will run whenever\n * the animation parameters change. The animation start immediately.\n * @param toOrParams\n * @param config\n * @returns A value that is animated\n */\nexport const useTiming = (\n toOrParams: number | AnimationParams,\n config?: TimingConfig,\n callback?: AnimationCallback\n): SkiaValue<number> => {\n // Resolve parameters - keep a cached version to avoid\n // unnecesary re-renders.\n const prevCfgRef = useRef<ReturnType<typeof getResolvedParams>>();\n const resolvedParameters = useMemo(() => {\n const nextParams = getResolvedParams(toOrParams, config);\n if (!equals(prevCfgRef.current, nextParams)) {\n prevCfgRef.current = nextParams;\n }\n return prevCfgRef.current!;\n }, [config, toOrParams]);\n\n // Create value\n const value = useValue(resolvedParameters.from ?? 0);\n\n // Create timing animation - keep a cached version to avoid\n // uneccessary recreation of animations\n const prevAnimationRef = useRef<SkiaAnimation>();\n const prevParamsRef = useRef<typeof resolvedParameters>();\n const animation = useMemo(() => {\n if (!equals(prevParamsRef.current, resolvedParameters)) {\n prevParamsRef.current = resolvedParameters;\n prevAnimationRef.current = createTiming(\n resolvedParameters,\n value,\n callback\n );\n }\n return prevAnimationRef.current!;\n }, [callback, resolvedParameters, value]);\n\n // Run animation on the value - and stop it on unmount\n useEffect(() => {\n value.animation = animation;\n return () => (value.animation = undefined);\n }, [animation, value]);\n\n // Return the value that is animated\n return value;\n};\n\nconst equals = <T1, T2>(a: T1, b: T2) => {\n return JSON.stringify(a) === JSON.stringify(b);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["import \"./skia/NativeSetup\";\n\nexport * from \"./renderer\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["import \"./skia/NativeSetup\";\nexport * from \"./renderer\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./values\";\nexport * from \"./animation\";\n"]}
@@ -15,8 +15,6 @@ var _skia = require("../skia");
15
15
 
16
16
  var _useValue = require("../values/hooks/useValue");
17
17
 
18
- var _Paint = require("../skia/Paint/Paint");
19
-
20
18
  var _HostConfig = require("./HostConfig");
21
19
 
22
20
  var _processors = require("./processors");
@@ -120,7 +118,7 @@ const Canvas = /*#__PURE__*/(0, _react.forwardRef)((_ref, forwardedRef) => {
120
118
  };
121
119
  }
122
120
 
123
- const paint = (0, _Paint.SkiaPaint)();
121
+ const paint = (0, _skia.SkiaPaint)();
124
122
  const ctx = {
125
123
  width,
126
124
  height,
@@ -1 +1 @@
1
- {"version":3,"sources":["Canvas.tsx"],"names":["CanvasContext","React","createContext","useCanvas","size","Error","useCanvasSize","console","warn","skiaReconciler","skHostConfig","injectIntoDevTools","bundleType","version","rendererPackageName","render","element","root","container","updateContainer","depMgr","subscribe","useCanvasRef","defaultFontMgr","Skia","FontMgr","RefDefault","Canvas","forwardedRef","children","style","debug","mode","onTouch","fontMgr","canvasCtx","width","height","innerRef","ref","useCombinedRefs","tick","setTick","redraw","t","Container","DependencyManager","createContainer","onDraw","canvas","info","timestamp","touches","current","paint","ctx","opacity","center","draw","unsubscribe","refs","targetRef","useRef","useEffect","forEach"],"mappings":"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","sourcesContent":["import React, {\n useEffect,\n useState,\n useCallback,\n useMemo,\n useContext,\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 { Skia } from \"../skia\";\nimport type { FontMgr } from \"../skia/FontMgr/FontMgr\";\nimport { useValue } from \"../values/hooks/useValue\";\nimport type { SkiaReadonlyValue } from \"../values/types\";\nimport { SkiaPaint } from \"../skia/Paint/Paint\";\n\nimport { debug as hostDebug, skHostConfig } from \"./HostConfig\";\n// import { debugTree } from \"./nodes\";\nimport { vec } from \"./processors\";\nimport { Container } from \"./nodes\";\nimport { DependencyManager } from \"./DependencyManager\";\n\nconst CanvasContext = React.createContext<SkiaReadonlyValue<{\n width: number;\n height: number;\n}> | null>(null);\n\nexport const useCanvas = () => {\n const size = useContext(CanvasContext);\n if (!size) {\n throw new Error(\"Canvas context is not available\");\n }\n return { size };\n};\n\nexport const useCanvasSize = () => {\n console.warn(\n \"useCanvasSize is deprecated, use the size member of useCanvas() instead.\"\n );\n return useCanvas().size;\n};\n\nexport const skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nconst render = (element: ReactNode, root: OpaqueRoot, container: Container) => {\n skiaReconciler.updateContainer(element, root, null, () => {\n hostDebug(\"updateContainer\");\n\n container.depMgr.subscribe();\n });\n};\n\nexport const useCanvasRef = () => useRef<SkiaView>(null);\n\nexport interface CanvasProps extends ComponentProps<typeof SkiaView> {\n ref?: RefObject<SkiaView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n fontMgr?: FontMgr;\n}\n\nconst defaultFontMgr = Skia.FontMgr.RefDefault();\n\nexport const Canvas = forwardRef<SkiaView, CanvasProps>(\n ({ children, style, debug, mode, onTouch, fontMgr }, forwardedRef) => {\n const canvasCtx = useValue({ width: 0, height: 0 });\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const [tick, setTick] = useState(0);\n const redraw = useCallback(() => setTick((t) => t + 1), []);\n\n const container = useMemo(\n () => new Container(new DependencyManager(ref), redraw),\n [redraw, ref]\n );\n\n const root = useMemo(\n () => skiaReconciler.createContainer(container, 0, false, null),\n [container]\n );\n // Render effect\n useEffect(() => {\n render(\n <CanvasContext.Provider value={canvasCtx}>\n {children}\n </CanvasContext.Provider>,\n root,\n container\n );\n }, [children, root, redraw, container, canvasCtx]);\n\n // Draw callback\n const onDraw = useDrawCallback(\n (canvas, info) => {\n // TODO: if tree is empty (count === 1) maybe we should not render?\n const { width, height, timestamp } = info;\n if (onTouch) {\n onTouch(info.touches);\n }\n if (\n width !== canvasCtx.current.width ||\n height !== canvasCtx.current.height\n ) {\n canvasCtx.current = { width, height };\n }\n const paint = SkiaPaint();\n const ctx = {\n width,\n height,\n timestamp,\n canvas,\n paint,\n opacity: 1,\n ref,\n center: vec(width / 2, height / 2),\n fontMgr: fontMgr ?? defaultFontMgr,\n };\n container.draw(ctx);\n },\n [tick, onTouch]\n );\n\n useEffect(() => {\n return () => {\n container.depMgr.unsubscribe();\n };\n }, [container]);\n\n return (\n <SkiaView\n ref={ref}\n style={style}\n onDraw={onDraw}\n mode={mode}\n debug={debug}\n />\n );\n }\n);\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"]}
1
+ {"version":3,"sources":["Canvas.tsx"],"names":["CanvasContext","React","createContext","useCanvas","size","Error","useCanvasSize","console","warn","skiaReconciler","skHostConfig","injectIntoDevTools","bundleType","version","rendererPackageName","render","element","root","container","updateContainer","depMgr","subscribe","useCanvasRef","defaultFontMgr","Skia","FontMgr","RefDefault","Canvas","forwardedRef","children","style","debug","mode","onTouch","fontMgr","canvasCtx","width","height","innerRef","ref","useCombinedRefs","tick","setTick","redraw","t","Container","DependencyManager","createContainer","onDraw","canvas","info","timestamp","touches","current","paint","ctx","opacity","center","draw","unsubscribe","refs","targetRef","useRef","useEffect","forEach"],"mappings":"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","sourcesContent":["import React, {\n useEffect,\n useState,\n useCallback,\n useMemo,\n useContext,\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 { Skia, SkiaPaint } from \"../skia\";\nimport type { FontMgr } from \"../skia\";\nimport { useValue } from \"../values/hooks/useValue\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { debug as hostDebug, skHostConfig } from \"./HostConfig\";\n// import { debugTree } from \"./nodes\";\nimport { vec } from \"./processors\";\nimport { Container } from \"./nodes\";\nimport { DependencyManager } from \"./DependencyManager\";\n\nconst CanvasContext = React.createContext<SkiaValue<{\n width: number;\n height: number;\n}> | null>(null);\n\nexport const useCanvas = () => {\n const size = useContext(CanvasContext);\n if (!size) {\n throw new Error(\"Canvas context is not available\");\n }\n return { size };\n};\n\nexport const useCanvasSize = () => {\n console.warn(\n \"useCanvasSize is deprecated, use the size member of useCanvas() instead.\"\n );\n return useCanvas().size;\n};\n\nexport const skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nconst render = (element: ReactNode, root: OpaqueRoot, container: Container) => {\n skiaReconciler.updateContainer(element, root, null, () => {\n hostDebug(\"updateContainer\");\n\n container.depMgr.subscribe();\n });\n};\n\nexport const useCanvasRef = () => useRef<SkiaView>(null);\n\nexport interface CanvasProps extends ComponentProps<typeof SkiaView> {\n ref?: RefObject<SkiaView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n fontMgr?: FontMgr;\n}\n\nconst defaultFontMgr = Skia.FontMgr.RefDefault();\n\nexport const Canvas = forwardRef<SkiaView, CanvasProps>(\n ({ children, style, debug, mode, onTouch, fontMgr }, forwardedRef) => {\n const canvasCtx = useValue({ width: 0, height: 0 });\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const [tick, setTick] = useState(0);\n const redraw = useCallback(() => setTick((t) => t + 1), []);\n\n const container = useMemo(\n () => new Container(new DependencyManager(ref), redraw),\n [redraw, ref]\n );\n\n const root = useMemo(\n () => skiaReconciler.createContainer(container, 0, false, null),\n [container]\n );\n // Render effect\n useEffect(() => {\n render(\n <CanvasContext.Provider value={canvasCtx}>\n {children}\n </CanvasContext.Provider>,\n root,\n container\n );\n }, [children, root, redraw, container, canvasCtx]);\n\n // Draw callback\n const onDraw = useDrawCallback(\n (canvas, info) => {\n // TODO: if tree is empty (count === 1) maybe we should not render?\n const { width, height, timestamp } = info;\n if (onTouch) {\n onTouch(info.touches);\n }\n if (\n width !== canvasCtx.current.width ||\n height !== canvasCtx.current.height\n ) {\n canvasCtx.current = { width, height };\n }\n const paint = SkiaPaint();\n const ctx = {\n width,\n height,\n timestamp,\n canvas,\n paint,\n opacity: 1,\n ref,\n center: vec(width / 2, height / 2),\n fontMgr: fontMgr ?? defaultFontMgr,\n };\n container.draw(ctx);\n },\n [tick, onTouch]\n );\n\n useEffect(() => {\n return () => {\n container.depMgr.unsubscribe();\n };\n }, [container]);\n\n return (\n <SkiaView\n ref={ref}\n style={style}\n onDraw={onDraw}\n mode={mode}\n debug={debug}\n />\n );\n }\n);\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["DependencyManager.tsx"],"names":["DependencyManager","constructor","ref","Map","unSubscribeNode","node","subscription","subscriptions","get","unsubscribe","delete","subscribeNode","props","values","Object","filter","isValue","length","set","subscribe","current","Error","forEach","registerValues","clear"],"mappings":";;;;;;;AAKA;;;;AAMO,MAAMA,iBAAN,CAAwB;AAO7BC,EAAAA,WAAW,CAACC,GAAD,EAA2B;AAAA;;AAAA,2CAFlC,IAAIC,GAAJ,EAEkC;;AACpC,SAAKD,GAAL,GAAWA,GAAX;AACD;;AAEDE,EAAAA,eAAe,CAACC,IAAD,EAAa;AAC1B,UAAMC,YAAY,GAAG,KAAKC,aAAL,CAAmBC,GAAnB,CAAuBH,IAAvB,CAArB;;AACA,QAAIC,YAAY,IAAIA,YAAY,CAACG,WAAjC,EAA8C;AAC5CH,MAAAA,YAAY,CAACG,WAAb;AACD;;AACD,SAAKF,aAAL,CAAmBG,MAAnB,CAA0BL,IAA1B;AACD;;AAEDM,EAAAA,aAAa,CAACN,IAAD,EAAaO,KAAb,EAA2B;AACtC,UAAMC,MAAM,GAAGC,MAAM,CAACD,MAAP,CAAcD,KAAd,EAAqBG,MAArB,CAA4BC,mBAA5B,CAAf;;AACA,QAAIH,MAAM,CAACI,MAAP,GAAgB,CAApB,EAAuB;AACrB,WAAKV,aAAL,CAAmBW,GAAnB,CAAuBb,IAAvB,EAA6B;AAAEQ,QAAAA,MAAF;AAAUJ,QAAAA,WAAW,EAAE;AAAvB,OAA7B;AACD;AACF;;AAEDU,EAAAA,SAAS,GAAG;AACV,QAAI,KAAKjB,GAAL,CAASkB,OAAT,KAAqB,IAAzB,EAA+B;AAC7B,YAAM,IAAIC,KAAJ,CAAU,uBAAV,CAAN;AACD;;AACD,SAAKd,aAAL,CAAmBe,OAAnB,CAA4BhB,YAAD,IAAkB;AAC3C,UAAIA,YAAY,CAACG,WAAb,KAA6B,IAAjC,EAAuC;AACrCH,QAAAA,YAAY,CAACG,WAAb,GAA2B,KAAKP,GAAL,CAASkB,OAAT,CAAkBG,cAAlB,CACzBjB,YAAY,CAACO,MADY,CAA3B;AAGD;AACF,KAND;AAOD;;AAEDJ,EAAAA,WAAW,GAAG;AACZ,SAAKF,aAAL,CAAmBe,OAAnB,CAA2B,QAAqB;AAAA,UAApB;AAAEb,QAAAA;AAAF,OAAoB;;AAC9C,UAAIA,WAAJ,EAAiB;AACfA,QAAAA,WAAW;AACZ;AACF,KAJD;AAKA,SAAKF,aAAL,CAAmBiB,KAAnB;AACD;;AA9C4B","sourcesContent":["import type { RefObject } from \"react\";\n\nimport type { SkiaView } from \"../views\";\nimport type { SkiaReadonlyValue } from \"../values\";\n\nimport { isValue } from \"./processors\";\nimport type { Node } from \"./nodes\";\n\ntype Unsubscribe = () => void;\ntype Props = { [key: string]: unknown };\n\nexport class DependencyManager {\n ref: RefObject<SkiaView>;\n subscriptions: Map<\n Node,\n { values: SkiaReadonlyValue<unknown>[]; unsubscribe: null | Unsubscribe }\n > = new Map();\n\n constructor(ref: RefObject<SkiaView>) {\n this.ref = ref;\n }\n\n unSubscribeNode(node: Node) {\n const subscription = this.subscriptions.get(node);\n if (subscription && subscription.unsubscribe) {\n subscription.unsubscribe();\n }\n this.subscriptions.delete(node);\n }\n\n subscribeNode(node: Node, props: Props) {\n const values = Object.values(props).filter(isValue);\n if (values.length > 0) {\n this.subscriptions.set(node, { values, unsubscribe: null });\n }\n }\n\n subscribe() {\n if (this.ref.current === null) {\n throw new Error(\"Canvas ref is not set\");\n }\n this.subscriptions.forEach((subscription) => {\n if (subscription.unsubscribe === null) {\n subscription.unsubscribe = this.ref.current!.registerValues(\n subscription.values\n );\n }\n });\n }\n\n unsubscribe() {\n this.subscriptions.forEach(({ unsubscribe }) => {\n if (unsubscribe) {\n unsubscribe();\n }\n });\n this.subscriptions.clear();\n }\n}\n"]}
1
+ {"version":3,"sources":["DependencyManager.tsx"],"names":["DependencyManager","constructor","ref","Map","unSubscribeNode","node","subscription","subscriptions","get","unsubscribe","delete","subscribeNode","props","values","Object","filter","isValue","length","set","subscribe","current","Error","forEach","registerValues","clear"],"mappings":";;;;;;;AAKA;;;;AAMO,MAAMA,iBAAN,CAAwB;AAO7BC,EAAAA,WAAW,CAACC,GAAD,EAA2B;AAAA;;AAAA,2CAFlC,IAAIC,GAAJ,EAEkC;;AACpC,SAAKD,GAAL,GAAWA,GAAX;AACD;;AAEDE,EAAAA,eAAe,CAACC,IAAD,EAAa;AAC1B,UAAMC,YAAY,GAAG,KAAKC,aAAL,CAAmBC,GAAnB,CAAuBH,IAAvB,CAArB;;AACA,QAAIC,YAAY,IAAIA,YAAY,CAACG,WAAjC,EAA8C;AAC5CH,MAAAA,YAAY,CAACG,WAAb;AACD;;AACD,SAAKF,aAAL,CAAmBG,MAAnB,CAA0BL,IAA1B;AACD;;AAEDM,EAAAA,aAAa,CAACN,IAAD,EAAaO,KAAb,EAA2B;AACtC,UAAMC,MAAM,GAAGC,MAAM,CAACD,MAAP,CAAcD,KAAd,EAAqBG,MAArB,CAA4BC,mBAA5B,CAAf;;AACA,QAAIH,MAAM,CAACI,MAAP,GAAgB,CAApB,EAAuB;AACrB,WAAKV,aAAL,CAAmBW,GAAnB,CAAuBb,IAAvB,EAA6B;AAAEQ,QAAAA,MAAF;AAAUJ,QAAAA,WAAW,EAAE;AAAvB,OAA7B;AACD;AACF;;AAEDU,EAAAA,SAAS,GAAG;AACV,QAAI,KAAKjB,GAAL,CAASkB,OAAT,KAAqB,IAAzB,EAA+B;AAC7B,YAAM,IAAIC,KAAJ,CAAU,uBAAV,CAAN;AACD;;AACD,SAAKd,aAAL,CAAmBe,OAAnB,CAA4BhB,YAAD,IAAkB;AAC3C,UAAIA,YAAY,CAACG,WAAb,KAA6B,IAAjC,EAAuC;AACrCH,QAAAA,YAAY,CAACG,WAAb,GAA2B,KAAKP,GAAL,CAASkB,OAAT,CAAkBG,cAAlB,CACzBjB,YAAY,CAACO,MADY,CAA3B;AAGD;AACF,KAND;AAOD;;AAEDJ,EAAAA,WAAW,GAAG;AACZ,SAAKF,aAAL,CAAmBe,OAAnB,CAA2B,QAAqB;AAAA,UAApB;AAAEb,QAAAA;AAAF,OAAoB;;AAC9C,UAAIA,WAAJ,EAAiB;AACfA,QAAAA,WAAW;AACZ;AACF,KAJD;AAKA,SAAKF,aAAL,CAAmBiB,KAAnB;AACD;;AA9C4B","sourcesContent":["import type { RefObject } from \"react\";\n\nimport type { SkiaView } from \"../views\";\nimport type { SkiaValue } from \"../values\";\n\nimport { isValue } from \"./processors\";\nimport type { Node } from \"./nodes\";\n\ntype Unsubscribe = () => void;\ntype Props = { [key: string]: unknown };\n\nexport class DependencyManager {\n ref: RefObject<SkiaView>;\n subscriptions: Map<\n Node,\n { values: SkiaValue<unknown>[]; unsubscribe: null | Unsubscribe }\n > = new Map();\n\n constructor(ref: RefObject<SkiaView>) {\n this.ref = ref;\n }\n\n unSubscribeNode(node: Node) {\n const subscription = this.subscriptions.get(node);\n if (subscription && subscription.unsubscribe) {\n subscription.unsubscribe();\n }\n this.subscriptions.delete(node);\n }\n\n subscribeNode(node: Node, props: Props) {\n const values = Object.values(props).filter(isValue);\n if (values.length > 0) {\n this.subscriptions.set(node, { values, unsubscribe: null });\n }\n }\n\n subscribe() {\n if (this.ref.current === null) {\n throw new Error(\"Canvas ref is not set\");\n }\n this.subscriptions.forEach((subscription) => {\n if (subscription.unsubscribe === null) {\n subscription.unsubscribe = this.ref.current!.registerValues(\n subscription.values\n );\n }\n });\n }\n\n unsubscribe() {\n this.subscriptions.forEach(({ unsubscribe }) => {\n if (unsubscribe) {\n unsubscribe();\n }\n });\n this.subscriptions.clear();\n }\n}\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../skia");
11
11
 
12
12
  var _nodes = require("../nodes");
13
13
 
14
- var _Shader = require("../../skia/Shader/Shader");
15
-
16
14
  var _Paint = require("../processors/Paint");
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -29,7 +27,7 @@ const onDeclare = (0, _nodes.createDeclaration)((_ref, children) => {
29
27
 
30
28
  if ((0, _skia.isImageFilter)(outer) && (0, _skia.isImageFilter)(inner)) {
31
29
  return _skia.Skia.ImageFilter.MakeBlend(blend, outer, inner);
32
- } else if ((0, _Shader.isShader)(outer) && (0, _Shader.isShader)(inner)) {
30
+ } else if ((0, _skia.isShader)(outer) && (0, _skia.isShader)(inner)) {
33
31
  return _skia.Skia.Shader.MakeBlend(blend, outer, inner);
34
32
  }
35
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Blend.tsx"],"names":["onDeclare","children","mode","inner","outer","blend","BlendMode","Skia","ImageFilter","MakeBlend","Shader","Error","Blend","props"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;;;;;AAOA,MAAMA,SAAS,GAAG,8BAA8B,OAAWC,QAAX,KAAwB;AAAA,MAAvB;AAAEC,IAAAA;AAAF,GAAuB;AACtE,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBH,QAAvB;;AACA,QAAMI,KAAK,GAAGC,gBAAU,oBAAQJ,IAAR,CAAV,CAAd;;AACA,MAAI,yBAAcE,KAAd,KAAwB,yBAAcD,KAAd,CAA5B,EAAkD;AAChD,WAAOI,WAAKC,WAAL,CAAiBC,SAAjB,CAA2BJ,KAA3B,EAAkCD,KAAlC,EAAyCD,KAAzC,CAAP;AACD,GAFD,MAEO,IAAI,sBAASC,KAAT,KAAmB,sBAASD,KAAT,CAAvB,EAAwC;AAC7C,WAAOI,WAAKG,MAAL,CAAYD,SAAZ,CAAsBJ,KAAtB,EAA6BD,KAA7B,EAAoCD,KAApC,CAAP;AACD;;AACD,QAAM,IAAIQ,KAAJ,CAAU,kDAAV,CAAN;AACD,CATiB,CAAlB;;AAWO,MAAMC,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport { isImageFilter, Skia, BlendMode } from \"../../skia\";\nimport { createDeclaration } from \"../nodes\";\nimport type { AnimatedProps, SkEnum } from \"../processors\";\nimport { isShader } from \"../../skia/Shader/Shader\";\nimport { enumKey } from \"../processors/Paint\";\n\ninterface BlendProps {\n mode: SkEnum<typeof BlendMode>;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<BlendProps>(({ mode }, children) => {\n const [inner, outer] = children;\n const blend = BlendMode[enumKey(mode)];\n if (isImageFilter(outer) && isImageFilter(inner)) {\n return Skia.ImageFilter.MakeBlend(blend, outer, inner);\n } else if (isShader(outer) && isShader(inner)) {\n return Skia.Shader.MakeBlend(blend, outer, inner);\n }\n throw new Error(\"<Blend /> can only blend Shaders or ImageFilters\");\n});\n\nexport const Blend = (props: AnimatedProps<BlendProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Blend.tsx"],"names":["onDeclare","children","mode","inner","outer","blend","BlendMode","Skia","ImageFilter","MakeBlend","Shader","Error","Blend","props"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAEA;;;;;;AAOA,MAAMA,SAAS,GAAG,8BAA8B,OAAWC,QAAX,KAAwB;AAAA,MAAvB;AAAEC,IAAAA;AAAF,GAAuB;AACtE,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBH,QAAvB;;AACA,QAAMI,KAAK,GAAGC,gBAAU,oBAAQJ,IAAR,CAAV,CAAd;;AACA,MAAI,yBAAcE,KAAd,KAAwB,yBAAcD,KAAd,CAA5B,EAAkD;AAChD,WAAOI,WAAKC,WAAL,CAAiBC,SAAjB,CAA2BJ,KAA3B,EAAkCD,KAAlC,EAAyCD,KAAzC,CAAP;AACD,GAFD,MAEO,IAAI,oBAASC,KAAT,KAAmB,oBAASD,KAAT,CAAvB,EAAwC;AAC7C,WAAOI,WAAKG,MAAL,CAAYD,SAAZ,CAAsBJ,KAAtB,EAA6BD,KAA7B,EAAoCD,KAApC,CAAP;AACD;;AACD,QAAM,IAAIQ,KAAJ,CAAU,kDAAV,CAAN;AACD,CATiB,CAAlB;;AAWO,MAAMC,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport { isImageFilter, Skia, BlendMode, isShader } from \"../../skia\";\nimport { createDeclaration } from \"../nodes\";\nimport type { AnimatedProps, SkEnum } from \"../processors\";\nimport { enumKey } from \"../processors/Paint\";\n\ninterface BlendProps {\n mode: SkEnum<typeof BlendMode>;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<BlendProps>(({ mode }, children) => {\n const [inner, outer] = children;\n const blend = BlendMode[enumKey(mode)];\n if (isImageFilter(outer) && isImageFilter(inner)) {\n return Skia.ImageFilter.MakeBlend(blend, outer, inner);\n } else if (isShader(outer) && isShader(inner)) {\n return Skia.Shader.MakeBlend(blend, outer, inner);\n }\n throw new Error(\"<Blend /> can only blend Shaders or ImageFilters\");\n});\n\nexport const Blend = (props: AnimatedProps<BlendProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,10 +11,6 @@ var _skia = require("../../skia");
11
11
 
12
12
  var _Declaration = require("../nodes/Declaration");
13
13
 
14
- var _ColorFilter = require("../../skia/ColorFilter/ColorFilter");
15
-
16
- var _ImageFilter = require("../../skia/ImageFilter/ImageFilter");
17
-
18
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
15
 
20
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -22,9 +18,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
22
18
  const onDeclare = (0, _Declaration.createDeclaration)((_, children) => {
23
19
  const [inner, outer] = children;
24
20
 
25
- if ((0, _ColorFilter.isColorFilter)(outer) && (0, _ColorFilter.isColorFilter)(inner)) {
21
+ if ((0, _skia.isColorFilter)(outer) && (0, _skia.isColorFilter)(inner)) {
26
22
  return _skia.Skia.ColorFilter.MakeCompose(outer, inner);
27
- } else if ((0, _ImageFilter.isImageFilter)(outer) && (0, _ImageFilter.isImageFilter)(inner)) {
23
+ } else if ((0, _skia.isImageFilter)(outer) && (0, _skia.isImageFilter)(inner)) {
28
24
  return _skia.Skia.ImageFilter.MakeCompose(outer, inner);
29
25
  }
30
26
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Compose.tsx"],"names":["onDeclare","_","children","inner","outer","Skia","ColorFilter","MakeCompose","ImageFilter","Error","Compose","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AACA;;;;;;AAMA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,CAAD,EAAIC,QAAJ,KAAiB;AACnD,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBF,QAAvB;;AACA,MAAI,gCAAcE,KAAd,KAAwB,gCAAcD,KAAd,CAA5B,EAAkD;AAChD,WAAOE,WAAKC,WAAL,CAAiBC,WAAjB,CAA6BH,KAA7B,EAAoCD,KAApC,CAAP;AACD,GAFD,MAEO,IAAI,gCAAcC,KAAd,KAAwB,gCAAcD,KAAd,CAA5B,EAAkD;AACvD,WAAOE,WAAKG,WAAL,CAAiBD,WAAjB,CAA6BH,KAA7B,EAAoCD,KAApC,CAAP;AACD;;AACD,QAAM,IAAIM,KAAJ,CACJ,8DADI,CAAN;AAGD,CAViB,CAAlB;;AAYO,MAAMC,OAAO,GAAIC,KAAD,IAAwC;AAC7D,sBAAO;AAAe,IAAA,SAAS,EAAEX;AAA1B,KAAyCW,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../skia\";\nimport { createDeclaration } from \"../nodes/Declaration\";\nimport type { AnimatedProps } from \"../processors/Animations/Animations\";\nimport { isColorFilter } from \"../../skia/ColorFilter/ColorFilter\";\nimport { isImageFilter } from \"../../skia/ImageFilter/ImageFilter\";\n\nexport interface ComposeProps {\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration((_, children) => {\n const [inner, outer] = children;\n if (isColorFilter(outer) && isColorFilter(inner)) {\n return Skia.ColorFilter.MakeCompose(outer, inner);\n } else if (isImageFilter(outer) && isImageFilter(inner)) {\n return Skia.ImageFilter.MakeCompose(outer, inner);\n }\n throw new Error(\n \"ComposeFilter can only compose ColorFilters and ImageFilters\"\n );\n});\n\nexport const Compose = (props: AnimatedProps<ComposeProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Compose.tsx"],"names":["onDeclare","_","children","inner","outer","Skia","ColorFilter","MakeCompose","ImageFilter","Error","Compose","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,CAAD,EAAIC,QAAJ,KAAiB;AACnD,QAAM,CAACC,KAAD,EAAQC,KAAR,IAAiBF,QAAvB;;AACA,MAAI,yBAAcE,KAAd,KAAwB,yBAAcD,KAAd,CAA5B,EAAkD;AAChD,WAAOE,WAAKC,WAAL,CAAiBC,WAAjB,CAA6BH,KAA7B,EAAoCD,KAApC,CAAP;AACD,GAFD,MAEO,IAAI,yBAAcC,KAAd,KAAwB,yBAAcD,KAAd,CAA5B,EAAkD;AACvD,WAAOE,WAAKG,WAAL,CAAiBD,WAAjB,CAA6BH,KAA7B,EAAoCD,KAApC,CAAP;AACD;;AACD,QAAM,IAAIM,KAAJ,CACJ,8DADI,CAAN;AAGD,CAViB,CAAlB;;AAYO,MAAMC,OAAO,GAAIC,KAAD,IAAwC;AAC7D,sBAAO;AAAe,IAAA,SAAS,EAAEX;AAA1B,KAAyCW,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isImageFilter, isColorFilter } from \"../../skia\";\nimport { createDeclaration } from \"../nodes/Declaration\";\nimport type { AnimatedProps } from \"../processors/Animations/Animations\";\n\nexport interface ComposeProps {\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration((_, children) => {\n const [inner, outer] = children;\n if (isColorFilter(outer) && isColorFilter(inner)) {\n return Skia.ColorFilter.MakeCompose(outer, inner);\n } else if (isImageFilter(outer) && isImageFilter(inner)) {\n return Skia.ImageFilter.MakeCompose(outer, inner);\n }\n throw new Error(\n \"ComposeFilter can only compose ColorFilters and ImageFilters\"\n );\n});\n\nexport const Compose = (props: AnimatedProps<ComposeProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _ColorFilter = require("../../../skia/ColorFilter/ColorFilter");
15
-
16
14
  var _Compose = require("./Compose");
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -23,7 +21,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
23
21
  let {
24
22
  t
25
23
  } = _ref;
26
- const [src, dst] = children.filter(_ColorFilter.isColorFilter);
24
+ const [src, dst] = children.filter(_skia.isColorFilter);
27
25
 
28
26
  const cf = _skia.Skia.ColorFilter.MakeLerp(t, src, dst);
29
27
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Lerp.tsx"],"names":["onDeclare","children","t","src","dst","filter","isColorFilter","cf","Skia","ColorFilter","MakeLerp","c","Lerp","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AAEA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAA6B,OAAQC,QAAR,KAAqB;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AAClE,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaH,QAAQ,CAACI,MAAT,CAAgBC,0BAAhB,CAAnB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,QAAjB,CAA0BR,CAA1B,EAA6BC,GAA7B,EAAkCC,GAAlC,CAAX;;AACA,SAAO,iCACLG,EADK,EAELN,QAAQ,CAACI,MAAT,CAAiBM,CAAD,IAAOA,CAAC,KAAKR,GAAN,IAAaQ,CAAC,KAAKP,GAA1C,CAFK,CAAP;AAID,CAPiB,CAAlB;;AASO,MAAMQ,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { isColorFilter } from \"../../../skia/ColorFilter/ColorFilter\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface LerpProps {\n t: number;\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<LerpProps>(({ t }, children) => {\n const [src, dst] = children.filter(isColorFilter);\n const cf = Skia.ColorFilter.MakeLerp(t, src, dst);\n return composeColorFilter(\n cf,\n children.filter((c) => c !== src && c !== dst)\n );\n});\n\nexport const Lerp = (props: AnimatedProps<LerpProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Lerp.tsx"],"names":["onDeclare","children","t","src","dst","filter","isColorFilter","cf","Skia","ColorFilter","MakeLerp","c","Lerp","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAGA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAA6B,OAAQC,QAAR,KAAqB;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AAClE,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaH,QAAQ,CAACI,MAAT,CAAgBC,mBAAhB,CAAnB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,QAAjB,CAA0BR,CAA1B,EAA6BC,GAA7B,EAAkCC,GAAlC,CAAX;;AACA,SAAO,iCACLG,EADK,EAELN,QAAQ,CAACI,MAAT,CAAiBM,CAAD,IAAOA,CAAC,KAAKR,GAAN,IAAaQ,CAAC,KAAKP,GAA1C,CAFK,CAAP;AAID,CAPiB,CAAlB;;AASO,MAAMQ,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isColorFilter } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface LerpProps {\n t: number;\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<LerpProps>(({ t }, children) => {\n const [src, dst] = children.filter(isColorFilter);\n const cf = Skia.ColorFilter.MakeLerp(t, src, dst);\n return composeColorFilter(\n cf,\n children.filter((c) => c !== src && c !== dst)\n );\n});\n\nexport const Lerp = (props: AnimatedProps<LerpProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -13,8 +13,6 @@ var _nodes = require("../../nodes");
13
13
 
14
14
  var _processors = require("../../processors");
15
15
 
16
- var _ImageFilterFactory = require("../../../skia/ImageFilter/ImageFilterFactory");
17
-
18
16
  var _getInput = require("./getInput");
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -29,9 +27,9 @@ const onDeclare = (0, _nodes.createDeclaration)((_ref, children) => {
29
27
  } = _ref;
30
28
  const [in1, in2] = children.filter(c => !!c);
31
29
 
32
- const x = _ImageFilterFactory.ColorChannel[(0, _processors.enumKey)(channelX)];
30
+ const x = _skia.ColorChannel[(0, _processors.enumKey)(channelX)];
33
31
 
34
- const y = _ImageFilterFactory.ColorChannel[(0, _processors.enumKey)(channelY)];
32
+ const y = _skia.ColorChannel[(0, _processors.enumKey)(channelY)];
35
33
 
36
34
  const map = (0, _getInput.getInput)([in1]);
37
35
  const input = in2 ? (0, _getInput.getInput)([in2]) : null;
@@ -1 +1 @@
1
- {"version":3,"sources":["DisplacementMap.tsx"],"names":["onDeclare","children","channelX","channelY","scale","in1","in2","filter","c","x","ColorChannel","y","map","input","Error","Skia","ImageFilter","MakeDisplacementMap","DisplacementMap","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,8BAChB,OAAgCC,QAAhC,KAA6C;AAAA,MAA5C;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,QAAZ;AAAsBC,IAAAA;AAAtB,GAA4C;AAC3C,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaL,QAAQ,CAACM,MAAT,CAAiBC,CAAD,IAAO,CAAC,CAACA,CAAzB,CAAnB;;AACA,QAAMC,CAAC,GAAGC,iCAAa,yBAAQR,QAAR,CAAb,CAAV;;AACA,QAAMS,CAAC,GAAGD,iCAAa,yBAAQP,QAAR,CAAb,CAAV;;AACA,QAAMS,GAAG,GAAG,wBAAS,CAACP,GAAD,CAAT,CAAZ;AACA,QAAMQ,KAAK,GAAGP,GAAG,GAAG,wBAAS,CAACA,GAAD,CAAT,CAAH,GAAqB,IAAtC;;AACA,MAAI,CAACM,GAAL,EAAU;AACR,UAAM,IAAIE,KAAJ,CAAU,6BAAV,CAAN;AACD;;AACD,SAAOC,WAAKC,WAAL,CAAiBC,mBAAjB,CAAqCR,CAArC,EAAwCE,CAAxC,EAA2CP,KAA3C,EAAkDQ,GAAlD,EAAuDC,KAAvD,CAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,eAAe,GAAIC,KAAD,IAAgD;AAC7E,sBAAO;AAAe,IAAA,SAAS,EAAEnB;AAA1B,KAAyCmB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes\";\nimport type { SkEnum, AnimatedProps } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport { ColorChannel } from \"../../../skia/ImageFilter/ImageFilterFactory\";\n\nimport { getInput } from \"./getInput\";\n\nexport interface DisplacementMapProps {\n channelX: SkEnum<typeof ColorChannel>;\n channelY: SkEnum<typeof ColorChannel>;\n scale: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DisplacementMapProps>(\n ({ channelX, channelY, scale }, children) => {\n const [in1, in2] = children.filter((c) => !!c);\n const x = ColorChannel[enumKey(channelX)];\n const y = ColorChannel[enumKey(channelY)];\n const map = getInput([in1]);\n const input = in2 ? getInput([in2]) : null;\n if (!map) {\n throw new Error(\"No DisplacementMap provided\");\n }\n return Skia.ImageFilter.MakeDisplacementMap(x, y, scale, map, input);\n }\n);\n\nexport const DisplacementMap = (props: AnimatedProps<DisplacementMapProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["DisplacementMap.tsx"],"names":["onDeclare","children","channelX","channelY","scale","in1","in2","filter","c","x","ColorChannel","y","map","input","Error","Skia","ImageFilter","MakeDisplacementMap","DisplacementMap","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,8BAChB,OAAgCC,QAAhC,KAA6C;AAAA,MAA5C;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,QAAZ;AAAsBC,IAAAA;AAAtB,GAA4C;AAC3C,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaL,QAAQ,CAACM,MAAT,CAAiBC,CAAD,IAAO,CAAC,CAACA,CAAzB,CAAnB;;AACA,QAAMC,CAAC,GAAGC,mBAAa,yBAAQR,QAAR,CAAb,CAAV;;AACA,QAAMS,CAAC,GAAGD,mBAAa,yBAAQP,QAAR,CAAb,CAAV;;AACA,QAAMS,GAAG,GAAG,wBAAS,CAACP,GAAD,CAAT,CAAZ;AACA,QAAMQ,KAAK,GAAGP,GAAG,GAAG,wBAAS,CAACA,GAAD,CAAT,CAAH,GAAqB,IAAtC;;AACA,MAAI,CAACM,GAAL,EAAU;AACR,UAAM,IAAIE,KAAJ,CAAU,6BAAV,CAAN;AACD;;AACD,SAAOC,WAAKC,WAAL,CAAiBC,mBAAjB,CAAqCR,CAArC,EAAwCE,CAAxC,EAA2CP,KAA3C,EAAkDQ,GAAlD,EAAuDC,KAAvD,CAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,eAAe,GAAIC,KAAD,IAAgD;AAC7E,sBAAO;AAAe,IAAA,SAAS,EAAEnB;AAA1B,KAAyCmB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, ColorChannel } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes\";\nimport type { SkEnum, AnimatedProps } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\n\nimport { getInput } from \"./getInput\";\n\nexport interface DisplacementMapProps {\n channelX: SkEnum<typeof ColorChannel>;\n channelY: SkEnum<typeof ColorChannel>;\n scale: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DisplacementMapProps>(\n ({ channelX, channelY, scale }, children) => {\n const [in1, in2] = children.filter((c) => !!c);\n const x = ColorChannel[enumKey(channelX)];\n const y = ColorChannel[enumKey(channelY)];\n const map = getInput([in1]);\n const input = in2 ? getInput([in2]) : null;\n if (!map) {\n throw new Error(\"No DisplacementMap provided\");\n }\n return Skia.ImageFilter.MakeDisplacementMap(x, y, scale, map, input);\n }\n);\n\nexport const DisplacementMap = (props: AnimatedProps<DisplacementMapProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["InnerShadow.tsx"],"names":["Black","Skia","Color","MakeInnerShadow","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver"],"mappings":";;;;;;;AACA;;AAGA,MAAMA,KAAK,GAAGC,WAAKC,KAAL,CAAW,OAAX,CAAd;;AAEO,MAAMC,eAAe,GAAG,CAC7BC,UAD6B,EAE7BC,EAF6B,EAG7BC,EAH6B,EAI7BC,MAJ6B,EAK7BC,MAL6B,EAM7BC,KAN6B,EAO7BC,KAP6B,KAQ1B;AACH,QAAMC,aAAa,GAAGV,WAAKW,WAAL,CAAiBC,eAAjB,CACpBZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2Bf,KAA3B,EAAkCgB,gBAAUC,GAA5C,CADoB,EAEpB,IAFoB,CAAtB;;AAIA,QAAMC,WAAW,GAAGjB,WAAKW,WAAL,CAAiBC,eAAjB,CAClBZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2Bf,KAA3B,EAAkCgB,gBAAUG,KAA5C,CADkB,EAElB,IAFkB,CAApB;;AAIA,QAAMC,EAAE,GAAGnB,WAAKW,WAAL,CAAiBC,eAAjB,CACTZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2BN,KAA3B,EAAkCO,gBAAUK,MAA5C,CADS,EAET,IAFS,CAAX;;AAIA,QAAMC,EAAE,GAAGrB,WAAKW,WAAL,CAAiBW,UAAjB,CAA4BlB,EAA5B,EAAgCC,EAAhC,EAAoCc,EAApC,CAAX;;AACA,QAAMI,EAAE,GAAGvB,WAAKW,WAAL,CAAiBa,QAAjB,CAA0BlB,MAA1B,EAAkCC,MAAlC,EAA0CkB,eAASC,KAAnD,EAA0DL,EAA1D,CAAX;;AACA,QAAMM,EAAE,GAAG3B,WAAKW,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUG,KAArC,EAA4CD,WAA5C,EAAyDM,EAAzD,CAAX;;AACA,MAAIpB,UAAJ,EAAgB;AACd,WAAOwB,EAAP;AACD;;AACD,SAAO3B,WAAKW,WAAL,CAAiBiB,WAAjB,CACLnB,KADK,EAELT,WAAKW,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUc,OAArC,EAA8CnB,aAA9C,EAA6DiB,EAA7D,CAFK,CAAP;AAID,CA/BM","sourcesContent":["import type { SkColor } from \"../../../skia\";\nimport { BlendMode, Skia, TileMode } from \"../../../skia\";\nimport type { SkImageFilter } from \"../../../skia/ImageFilter/ImageFilter\";\n\nconst Black = Skia.Color(\"black\");\n\nexport const MakeInnerShadow = (\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"]}
1
+ {"version":3,"sources":["InnerShadow.tsx"],"names":["Black","Skia","Color","MakeInnerShadow","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver"],"mappings":";;;;;;;AACA;;AAEA,MAAMA,KAAK,GAAGC,WAAKC,KAAL,CAAW,OAAX,CAAd;;AAEO,MAAMC,eAAe,GAAG,CAC7BC,UAD6B,EAE7BC,EAF6B,EAG7BC,EAH6B,EAI7BC,MAJ6B,EAK7BC,MAL6B,EAM7BC,KAN6B,EAO7BC,KAP6B,KAQ1B;AACH,QAAMC,aAAa,GAAGV,WAAKW,WAAL,CAAiBC,eAAjB,CACpBZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2Bf,KAA3B,EAAkCgB,gBAAUC,GAA5C,CADoB,EAEpB,IAFoB,CAAtB;;AAIA,QAAMC,WAAW,GAAGjB,WAAKW,WAAL,CAAiBC,eAAjB,CAClBZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2Bf,KAA3B,EAAkCgB,gBAAUG,KAA5C,CADkB,EAElB,IAFkB,CAApB;;AAIA,QAAMC,EAAE,GAAGnB,WAAKW,WAAL,CAAiBC,eAAjB,CACTZ,WAAKa,WAAL,CAAiBC,SAAjB,CAA2BN,KAA3B,EAAkCO,gBAAUK,MAA5C,CADS,EAET,IAFS,CAAX;;AAIA,QAAMC,EAAE,GAAGrB,WAAKW,WAAL,CAAiBW,UAAjB,CAA4BlB,EAA5B,EAAgCC,EAAhC,EAAoCc,EAApC,CAAX;;AACA,QAAMI,EAAE,GAAGvB,WAAKW,WAAL,CAAiBa,QAAjB,CAA0BlB,MAA1B,EAAkCC,MAAlC,EAA0CkB,eAASC,KAAnD,EAA0DL,EAA1D,CAAX;;AACA,QAAMM,EAAE,GAAG3B,WAAKW,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUG,KAArC,EAA4CD,WAA5C,EAAyDM,EAAzD,CAAX;;AACA,MAAIpB,UAAJ,EAAgB;AACd,WAAOwB,EAAP;AACD;;AACD,SAAO3B,WAAKW,WAAL,CAAiBiB,WAAjB,CACLnB,KADK,EAELT,WAAKW,WAAL,CAAiBG,SAAjB,CAA2BC,gBAAUc,OAArC,EAA8CnB,aAA9C,EAA6DiB,EAA7D,CAFK,CAAP;AAID,CA/BM","sourcesContent":["import type { SkColor, SkImageFilter } from \"../../../skia\";\nimport { BlendMode, Skia, TileMode } from \"../../../skia\";\n\nconst Black = Skia.Color(\"black\");\n\nexport const MakeInnerShadow = (\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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RuntimeShader.tsx"],"names":["onDeclare","children","source","rtb","Skia","RuntimeShaderBuilder","ImageFilter","MakeRuntimeShader","RuntimeShader","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAIA;;;;;;AAMA,MAAMA,SAAS,GAAG,oCAChB,OAAaC,QAAb,KAA0B;AAAA,MAAzB;AAAEC,IAAAA;AAAF,GAAyB;;AACxB,QAAMC,GAAG,GAAGC,WAAKC,oBAAL,CAA0BH,MAA1B,CAAZ;;AACA,SAAOE,WAAKE,WAAL,CAAiBC,iBAAjB,CAAmCJ,GAAnC,EAAwC,IAAxC,EAA8C,wBAASF,QAAT,CAA9C,CAAP;AACD,CAJe,CAAlB;;AAOO,MAAMO,aAAa,GAAIC,KAAD,IAA8C;AACzE,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { SkRuntimeEffect } from \"../../../skia/RuntimeEffect/RuntimeEffect\";\n\nimport { getInput } from \"./getInput\";\n\nexport interface RuntimeShaderProps {\n source: SkRuntimeEffect;\n}\n\nconst onDeclare = createDeclaration<RuntimeShaderProps>(\n ({ source }, children) => {\n const rtb = Skia.RuntimeShaderBuilder(source);\n return Skia.ImageFilter.MakeRuntimeShader(rtb, null, getInput(children));\n }\n);\n\nexport const RuntimeShader = (props: AnimatedProps<RuntimeShaderProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["RuntimeShader.tsx"],"names":["onDeclare","children","source","rtb","Skia","RuntimeShaderBuilder","ImageFilter","MakeRuntimeShader","RuntimeShader","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAIA;;;;;;AAMA,MAAMA,SAAS,GAAG,oCAChB,OAAaC,QAAb,KAA0B;AAAA,MAAzB;AAAEC,IAAAA;AAAF,GAAyB;;AACxB,QAAMC,GAAG,GAAGC,WAAKC,oBAAL,CAA0BH,MAA1B,CAAZ;;AACA,SAAOE,WAAKE,WAAL,CAAiBC,iBAAjB,CAAmCJ,GAAnC,EAAwC,IAAxC,EAA8C,wBAASF,QAAT,CAA9C,CAAP;AACD,CAJe,CAAlB;;AAOO,MAAMO,aAAa,GAAIC,KAAD,IAA8C;AACzE,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { SkRuntimeEffect } from \"../../../skia\";\n\nimport { getInput } from \"./getInput\";\n\nexport interface RuntimeShaderProps {\n source: SkRuntimeEffect;\n}\n\nconst onDeclare = createDeclaration<RuntimeShaderProps>(\n ({ source }, children) => {\n const rtb = Skia.RuntimeShaderBuilder(source);\n return Skia.ImageFilter.MakeRuntimeShader(rtb, null, getInput(children));\n }\n);\n\nexport const RuntimeShader = (props: AnimatedProps<RuntimeShaderProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _Color = require("../../../skia/Color");
15
-
16
14
  var _getInput = require("./getInput");
17
15
 
18
16
  var _InnerShadow = require("./InnerShadow");
@@ -34,7 +32,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children, _ref2) =>
34
32
  opacity
35
33
  } = _ref2;
36
34
  const input = (0, _getInput.getInput)(children);
37
- const color = (0, _Color.processColor)(cl, opacity);
35
+ const color = (0, _skia.processColor)(cl, opacity);
38
36
  let factory;
39
37
 
40
38
  if (inner) {
@@ -1 +1 @@
1
- {"version":3,"sources":["Shadow.tsx"],"names":["onDeclare","children","dx","dy","blur","color","cl","shadowOnly","inner","opacity","input","factory","MakeInnerShadow","bind","Skia","ImageFilter","MakeDropShadowOnly","MakeDropShadow","Shadow","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAGA;;AAEA;;AACA;;;;;;AAWA,MAAMA,SAAS,GAAG,oCAChB,OAAiDC,QAAjD,YAA2E;AAAA,MAA1E;AAAEC,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUC,IAAAA,IAAV;AAAgBC,IAAAA,KAAK,EAAEC,EAAvB;AAA2BC,IAAAA,UAA3B;AAAuCC,IAAAA;AAAvC,GAA0E;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AACzE,QAAMC,KAAK,GAAG,wBAAST,QAAT,CAAd;AACA,QAAMI,KAAK,GAAG,yBAAaC,EAAb,EAAiBG,OAAjB,CAAd;AACA,MAAIE,OAAJ;;AACA,MAAIH,KAAJ,EAAW;AACTG,IAAAA,OAAO,GAAGC,6BAAgBC,IAAhB,CAAqB,IAArB,EAA2BN,UAA3B,CAAV;AACD,GAFD,MAEO;AACLI,IAAAA,OAAO,GAAGJ,UAAU,GAChBO,WAAKC,WAAL,CAAiBC,kBADD,GAEhBF,WAAKC,WAAL,CAAiBE,cAFrB;AAGD;;AACD,SAAON,OAAO,CAACT,EAAD,EAAKC,EAAL,EAASC,IAAT,EAAeA,IAAf,EAAqBC,KAArB,EAA4BK,KAA5B,CAAd;AACD,CAbe,CAAlB;;AAgBO,MAAMQ,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAe,IAAA,SAAS,EAAEnB;AAA1B,KAAyCmB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { Color } from \"../../../skia/Color\";\nimport { processColor } from \"../../../skia/Color\";\n\nimport { getInput } from \"./getInput\";\nimport { MakeInnerShadow } from \"./InnerShadow\";\n\nexport interface ShadowProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nconst onDeclare = createDeclaration<ShadowProps>(\n ({ dx, dy, blur, color: cl, shadowOnly, inner }, children, { opacity }) => {\n const input = getInput(children);\n const color = processColor(cl, opacity);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, shadowOnly);\n } else {\n factory = shadowOnly\n ? Skia.ImageFilter.MakeDropShadowOnly\n : Skia.ImageFilter.MakeDropShadow;\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n);\n\nexport const Shadow = (props: AnimatedProps<ShadowProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Shadow.tsx"],"names":["onDeclare","children","dx","dy","blur","color","cl","shadowOnly","inner","opacity","input","factory","MakeInnerShadow","bind","Skia","ImageFilter","MakeDropShadowOnly","MakeDropShadow","Shadow","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAIA;;AACA;;;;;;AAWA,MAAMA,SAAS,GAAG,oCAChB,OAAiDC,QAAjD,YAA2E;AAAA,MAA1E;AAAEC,IAAAA,EAAF;AAAMC,IAAAA,EAAN;AAAUC,IAAAA,IAAV;AAAgBC,IAAAA,KAAK,EAAEC,EAAvB;AAA2BC,IAAAA,UAA3B;AAAuCC,IAAAA;AAAvC,GAA0E;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AACzE,QAAMC,KAAK,GAAG,wBAAST,QAAT,CAAd;AACA,QAAMI,KAAK,GAAG,wBAAaC,EAAb,EAAiBG,OAAjB,CAAd;AACA,MAAIE,OAAJ;;AACA,MAAIH,KAAJ,EAAW;AACTG,IAAAA,OAAO,GAAGC,6BAAgBC,IAAhB,CAAqB,IAArB,EAA2BN,UAA3B,CAAV;AACD,GAFD,MAEO;AACLI,IAAAA,OAAO,GAAGJ,UAAU,GAChBO,WAAKC,WAAL,CAAiBC,kBADD,GAEhBF,WAAKC,WAAL,CAAiBE,cAFrB;AAGD;;AACD,SAAON,OAAO,CAACT,EAAD,EAAKC,EAAL,EAASC,IAAT,EAAeA,IAAf,EAAqBC,KAArB,EAA4BK,KAA5B,CAAd;AACD,CAbe,CAAlB;;AAgBO,MAAMQ,MAAM,GAAIC,KAAD,IAAuC;AAC3D,sBAAO;AAAe,IAAA,SAAS,EAAEnB;AAA1B,KAAyCmB,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia, processColor } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { Color } from \"../../../skia\";\n\nimport { getInput } from \"./getInput\";\nimport { MakeInnerShadow } from \"./InnerShadow\";\n\nexport interface ShadowProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nconst onDeclare = createDeclaration<ShadowProps>(\n ({ dx, dy, blur, color: cl, shadowOnly, inner }, children, { opacity }) => {\n const input = getInput(children);\n const color = processColor(cl, opacity);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, shadowOnly);\n } else {\n factory = shadowOnly\n ? Skia.ImageFilter.MakeDropShadowOnly\n : Skia.ImageFilter.MakeDropShadow;\n }\n return factory(dx, dy, blur, blur, color, input);\n }\n);\n\nexport const Shadow = (props: AnimatedProps<ShadowProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -7,8 +7,6 @@ exports.BlurMask = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _MaskFilter = require("../../../skia/MaskFilter");
11
-
12
10
  var _skia = require("../../../skia");
13
11
 
14
12
  var _Declaration = require("../../nodes/Declaration");
@@ -25,7 +23,7 @@ const onDeclare = (0, _Declaration.createDeclaration)(_ref => {
25
23
  blur,
26
24
  respectCTM
27
25
  } = _ref;
28
- return _skia.Skia.MaskFilter.MakeBlur(_MaskFilter.BlurStyle[(0, _processors.enumKey)(style)], blur, respectCTM);
26
+ return _skia.Skia.MaskFilter.MakeBlur(_skia.BlurStyle[(0, _processors.enumKey)(style)], blur, respectCTM);
29
27
  });
30
28
 
31
29
  const BlurMask = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["Blur.tsx"],"names":["onDeclare","style","blur","respectCTM","Skia","MaskFilter","MakeBlur","BlurStyle","BlurMask","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,QAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAAgC;AAC/B,SAAOC,WAAKC,UAAL,CAAgBC,QAAhB,CACLC,sBAAU,yBAAQN,KAAR,CAAV,CADK,EAELC,IAFK,EAGLC,UAHK,CAAP;AAKD,CAPe,CAAlB;;AAUO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBT,EAAAA,KAAK,EAAE,QADe;AAEtBE,EAAAA,UAAU,EAAE;AAFU,CAAxB","sourcesContent":["import React from \"react\";\n\nimport { BlurStyle } from \"../../../skia/MaskFilter\";\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { SkEnum } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface BlurMaskProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n\nconst onDeclare = createDeclaration<BlurMaskProps>(\n ({ style, blur, respectCTM }) => {\n return Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n);\n\nexport const BlurMask = (props: AnimatedProps<BlurMaskProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nBlurMask.defaultProps = {\n style: \"normal\",\n respectCTM: true,\n};\n"]}
1
+ {"version":3,"sources":["Blur.tsx"],"names":["onDeclare","style","blur","respectCTM","Skia","MaskFilter","MakeBlur","BlurStyle","BlurMask","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,QAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAAgC;AAC/B,SAAOC,WAAKC,UAAL,CAAgBC,QAAhB,CACLC,gBAAU,yBAAQN,KAAR,CAAV,CADK,EAELC,IAFK,EAGLC,UAHK,CAAP;AAKD,CAPe,CAAlB;;AAUO,MAAMK,QAAQ,GAAIC,KAAD,IAAyC;AAC/D,sBAAO;AAAe,IAAA,SAAS,EAAET;AAA1B,KAAyCS,KAAzC,EAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;AACtBT,EAAAA,KAAK,EAAE,QADe;AAEtBE,EAAAA,UAAU,EAAE;AAFU,CAAxB","sourcesContent":["import React from \"react\";\n\nimport { BlurStyle, Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { SkEnum } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface BlurMaskProps {\n style: SkEnum<typeof BlurStyle>;\n blur: number;\n respectCTM: boolean;\n}\n\nconst onDeclare = createDeclaration<BlurMaskProps>(\n ({ style, blur, respectCTM }) => {\n return Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n }\n);\n\nexport const BlurMask = (props: AnimatedProps<BlurMaskProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nBlurMask.defaultProps = {\n style: \"normal\",\n respectCTM: true,\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _PathEffect = require("../../../skia/PathEffect");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -21,7 +19,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
21
19
  let {
22
20
  r
23
21
  } = _ref;
24
- const [child] = children.filter(_PathEffect.isPathEffect);
22
+ const [child] = children.filter(_skia.isPathEffect);
25
23
 
26
24
  const pe = _skia.Skia.PathEffect.MakeCorner(r);
27
25
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Corner.tsx"],"names":["onDeclare","children","r","child","filter","isPathEffect","pe","Skia","PathEffect","MakeCorner","MakeCompose","CornerPathEffect","props"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAEA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAChB,OAAQC,QAAR,KAAqB;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACnB,QAAM,CAACC,KAAD,IAAUF,QAAQ,CAACG,MAAT,CAAgBC,wBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,UAAhB,CAA2BP,CAA3B,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,QAAI,CAACG,EAAL,EAAS;AACP,aAAOH,KAAP;AACD;;AACD,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,gBAAgB,GAC3BC,KAD8B,IAE3B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEZ;AAA1B,KAAyCY,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { isPathEffect } from \"../../../skia/PathEffect\";\n\nexport interface CornerPathEffectProps {\n r: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<CornerPathEffectProps>(\n ({ r }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeCorner(r);\n if (child) {\n if (!pe) {\n return child;\n }\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const CornerPathEffect = (\n props: AnimatedProps<CornerPathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Corner.tsx"],"names":["onDeclare","children","r","child","filter","isPathEffect","pe","Skia","PathEffect","MakeCorner","MakeCompose","CornerPathEffect","props"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;;;;;AAQA,MAAMA,SAAS,GAAG,oCAChB,OAAQC,QAAR,KAAqB;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACnB,QAAM,CAACC,KAAD,IAAUF,QAAQ,CAACG,MAAT,CAAgBC,kBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,UAAhB,CAA2BP,CAA3B,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,QAAI,CAACG,EAAL,EAAS;AACP,aAAOH,KAAP;AACD;;AACD,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,gBAAgB,GAC3BC,KAD8B,IAE3B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEZ;AAA1B,KAAyCY,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface CornerPathEffectProps {\n r: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<CornerPathEffectProps>(\n ({ r }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeCorner(r);\n if (child) {\n if (!pe) {\n return child;\n }\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const CornerPathEffect = (\n props: AnimatedProps<CornerPathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _PathEffect = require("../../../skia/PathEffect");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -22,7 +20,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
22
20
  intervals,
23
21
  phase
24
22
  } = _ref;
25
- const [child] = children.filter(_PathEffect.isPathEffect);
23
+ const [child] = children.filter(_skia.isPathEffect);
26
24
 
27
25
  const pe = _skia.Skia.PathEffect.MakeDash(intervals, phase);
28
26
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Dash.tsx"],"names":["onDeclare","children","intervals","phase","child","filter","isPathEffect","pe","Skia","PathEffect","MakeDash","MakeCompose","DashPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;;;;;AAQA,MAAMA,SAAS,GAAG,oCAChB,OAAuBC,QAAvB,KAAoC;AAAA,MAAnC;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAAmC;AAClC,QAAM,CAACC,KAAD,IAAUH,QAAQ,CAACI,MAAT,CAAgBC,wBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,QAAhB,CAAyBR,SAAzB,EAAoCC,KAApC,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CARe,CAAlB;;AAWO,MAAMK,cAAc,GAAIC,KAAD,IAA+C;AAC3E,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { isPathEffect } from \"../../../skia/PathEffect\";\n\nexport interface DashPathEffectProps {\n intervals: number[];\n phase?: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DashPathEffectProps>(\n ({ intervals, phase }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeDash(intervals, phase);\n if (child) {\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const DashPathEffect = (props: AnimatedProps<DashPathEffectProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Dash.tsx"],"names":["onDeclare","children","intervals","phase","child","filter","isPathEffect","pe","Skia","PathEffect","MakeDash","MakeCompose","DashPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,OAAuBC,QAAvB,KAAoC;AAAA,MAAnC;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAAmC;AAClC,QAAM,CAACC,KAAD,IAAUH,QAAQ,CAACI,MAAT,CAAgBC,kBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,QAAhB,CAAyBR,SAAzB,EAAoCC,KAApC,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CARe,CAAlB;;AAWO,MAAMK,cAAc,GAAIC,KAAD,IAA+C;AAC3E,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface DashPathEffectProps {\n intervals: number[];\n phase?: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DashPathEffectProps>(\n ({ intervals, phase }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeDash(intervals, phase);\n if (child) {\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const DashPathEffect = (props: AnimatedProps<DashPathEffectProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _PathEffect = require("../../../skia/PathEffect");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -23,7 +21,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
23
21
  deviation,
24
22
  seed
25
23
  } = _ref;
26
- const [child] = children.filter(_PathEffect.isPathEffect);
24
+ const [child] = children.filter(_skia.isPathEffect);
27
25
 
28
26
  const pe = _skia.Skia.PathEffect.MakeDiscrete(length, deviation, seed);
29
27
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Discrete.tsx"],"names":["onDeclare","children","length","deviation","seed","child","filter","isPathEffect","pe","Skia","PathEffect","MakeDiscrete","MakeCompose","DiscretePathEffect","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,OAA8BC,QAA9B,KAA2C;AAAA,MAA1C;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,SAAV;AAAqBC,IAAAA;AAArB,GAA0C;AACzC,QAAM,CAACC,KAAD,IAAUJ,QAAQ,CAACK,MAAT,CAAgBC,wBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,YAAhB,CAA6BT,MAA7B,EAAqCC,SAArC,EAAgDC,IAAhD,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CARe,CAAlB;;AAWO,MAAMK,kBAAkB,GAC7BC,KADgC,IAE7B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEd;AAA1B,KAAyCc,KAAzC,EAAP;AACD,CAJM;;;AAMPD,kBAAkB,CAACE,YAAnB,GAAkC;AAChCX,EAAAA,IAAI,EAAE;AAD0B,CAAlC","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { isPathEffect } from \"../../../skia/PathEffect\";\n\nexport interface DiscretePathEffectProps {\n length: number;\n deviation: number;\n seed: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DiscretePathEffectProps>(\n ({ length, deviation, seed }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n if (child) {\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const DiscretePathEffect = (\n props: AnimatedProps<DiscretePathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nDiscretePathEffect.defaultProps = {\n seed: 0,\n};\n"]}
1
+ {"version":3,"sources":["Discrete.tsx"],"names":["onDeclare","children","length","deviation","seed","child","filter","isPathEffect","pe","Skia","PathEffect","MakeDiscrete","MakeCompose","DiscretePathEffect","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;AAUA,MAAMA,SAAS,GAAG,oCAChB,OAA8BC,QAA9B,KAA2C;AAAA,MAA1C;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,SAAV;AAAqBC,IAAAA;AAArB,GAA0C;AACzC,QAAM,CAACC,KAAD,IAAUJ,QAAQ,CAACK,MAAT,CAAgBC,kBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,YAAhB,CAA6BT,MAA7B,EAAqCC,SAArC,EAAgDC,IAAhD,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CARe,CAAlB;;AAWO,MAAMK,kBAAkB,GAC7BC,KADgC,IAE7B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEd;AAA1B,KAAyCc,KAAzC,EAAP;AACD,CAJM;;;AAMPD,kBAAkB,CAACE,YAAnB,GAAkC;AAChCX,EAAAA,IAAI,EAAE;AAD0B,CAAlC","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nexport interface DiscretePathEffectProps {\n length: number;\n deviation: number;\n seed: number;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<DiscretePathEffectProps>(\n ({ length, deviation, seed }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n if (child) {\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const DiscretePathEffect = (\n props: AnimatedProps<DiscretePathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nDiscretePathEffect.defaultProps = {\n seed: 0,\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _PathEffect = require("../../../skia/PathEffect");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -22,7 +20,7 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
22
20
  width,
23
21
  matrix
24
22
  } = _ref;
25
- const [child] = children.filter(_PathEffect.isPathEffect);
23
+ const [child] = children.filter(_skia.isPathEffect);
26
24
 
27
25
  const pe = _skia.Skia.PathEffect.MakeLine2D(width, matrix);
28
26
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Line2D.tsx"],"names":["onDeclare","children","width","matrix","child","filter","isPathEffect","pe","Skia","PathEffect","MakeLine2D","MakeCompose","Line2DPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;;;;;AASA,MAAMA,SAAS,GAAG,oCAChB,OAAoBC,QAApB,KAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAgC;AAC/B,QAAM,CAACC,KAAD,IAAUH,QAAQ,CAACI,MAAT,CAAgBC,wBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,UAAhB,CAA2BR,KAA3B,EAAkCC,MAAlC,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,QAAI,CAACG,EAAL,EAAS;AACP,aAAOH,KAAP;AACD;;AACD,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,gBAAgB,GAC3BC,KAD8B,IAE3B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport { isPathEffect } from \"../../../skia/PathEffect\";\nimport type { SkMatrix } from \"../../../skia/Matrix\";\n\nexport interface Line2DPathEffectProps {\n children?: ReactNode | ReactNode[];\n width: number;\n matrix: SkMatrix;\n}\n\nconst onDeclare = createDeclaration<Line2DPathEffectProps>(\n ({ width, matrix }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeLine2D(width, matrix);\n if (child) {\n if (!pe) {\n return child;\n }\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const Line2DPathEffect = (\n props: AnimatedProps<Line2DPathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Line2D.tsx"],"names":["onDeclare","children","width","matrix","child","filter","isPathEffect","pe","Skia","PathEffect","MakeLine2D","MakeCompose","Line2DPathEffect","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;AAUA,MAAMA,SAAS,GAAG,oCAChB,OAAoBC,QAApB,KAAiC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAgC;AAC/B,QAAM,CAACC,KAAD,IAAUH,QAAQ,CAACI,MAAT,CAAgBC,kBAAhB,CAAhB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,UAAL,CAAgBC,UAAhB,CAA2BR,KAA3B,EAAkCC,MAAlC,CAAX;;AACA,MAAIC,KAAJ,EAAW;AACT,QAAI,CAACG,EAAL,EAAS;AACP,aAAOH,KAAP;AACD;;AACD,WAAOI,WAAKC,UAAL,CAAgBE,WAAhB,CAA4BJ,EAA5B,EAAgCH,KAAhC,CAAP;AACD;;AACD,SAAOG,EAAP;AACD,CAXe,CAAlB;;AAcO,MAAMK,gBAAgB,GAC3BC,KAD8B,IAE3B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isPathEffect } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\nimport type { SkMatrix } from \"../../../skia\";\n\nexport interface Line2DPathEffectProps {\n children?: ReactNode | ReactNode[];\n width: number;\n matrix: SkMatrix;\n}\n\nconst onDeclare = createDeclaration<Line2DPathEffectProps>(\n ({ width, matrix }, children) => {\n const [child] = children.filter(isPathEffect);\n const pe = Skia.PathEffect.MakeLine2D(width, matrix);\n if (child) {\n if (!pe) {\n return child;\n }\n return Skia.PathEffect.MakeCompose(pe, child);\n }\n return pe;\n }\n);\n\nexport const Line2DPathEffect = (\n props: AnimatedProps<Line2DPathEffectProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -11,8 +11,6 @@ var _skia = require("../../../skia");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
14
- var _PathEffect = require("../../../skia/PathEffect");
15
-
16
14
  var _Paint = require("../../processors/Paint");
17
15
 
18
16
  var _Paths = require("../../processors/Paths");
@@ -28,9 +26,9 @@ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
28
26
  phase,
29
27
  style
30
28
  } = _ref;
31
- const [child] = children.filter(_PathEffect.isPathEffect);
29
+ const [child] = children.filter(_skia.isPathEffect);
32
30
 
33
- const pe = _skia.Skia.PathEffect.MakePath1D((0, _Paths.processPath)(path), advance, phase, _PathEffect.Path1DEffectStyle[(0, _Paint.enumKey)(style)]);
31
+ const pe = _skia.Skia.PathEffect.MakePath1D((0, _Paths.processPath)(path), advance, phase, _skia.Path1DEffectStyle[(0, _Paint.enumKey)(style)]);
34
32
 
35
33
  if (child) {
36
34
  if (!pe) {