@shopify/react-native-skia 1.8.0 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (390) hide show
  1. package/cpp/api/JsiSkPaint.h +8 -1
  2. package/lib/commonjs/dom/types/Common.d.ts +6 -4
  3. package/lib/commonjs/dom/types/Common.js.map +1 -1
  4. package/lib/commonjs/dom/types/ImageFilters.d.ts +1 -1
  5. package/lib/commonjs/dom/types/ImageFilters.js.map +1 -1
  6. package/lib/commonjs/dom/types/Node.d.ts +0 -2
  7. package/lib/commonjs/dom/types/Node.js.map +1 -1
  8. package/lib/commonjs/external/reanimated/index.d.ts +0 -1
  9. package/lib/commonjs/external/reanimated/index.js +0 -11
  10. package/lib/commonjs/external/reanimated/index.js.map +1 -1
  11. package/lib/commonjs/external/reanimated/renderHelpers.d.ts +0 -1
  12. package/lib/commonjs/external/reanimated/renderHelpers.js +5 -43
  13. package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
  14. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +1 -8
  15. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  16. package/lib/commonjs/skia/core/AnimatedImage.d.ts +1 -1
  17. package/lib/commonjs/skia/core/AnimatedImage.js +1 -1
  18. package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
  19. package/lib/commonjs/skia/core/Data.d.ts +1 -1
  20. package/lib/commonjs/skia/core/Data.js +2 -8
  21. package/lib/commonjs/skia/core/Data.js.map +1 -1
  22. package/lib/commonjs/skia/types/Paint/Paint.d.ts +1 -0
  23. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  24. package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  25. package/lib/commonjs/skia/web/JsiSkPaint.js +3 -0
  26. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  27. package/lib/commonjs/sksg/Container.d.ts +3 -2
  28. package/lib/commonjs/sksg/Container.js +32 -26
  29. package/lib/commonjs/sksg/Container.js.map +1 -1
  30. package/lib/commonjs/sksg/HostConfig.d.ts +2 -2
  31. package/lib/commonjs/sksg/HostConfig.js +7 -25
  32. package/lib/commonjs/sksg/HostConfig.js.map +1 -1
  33. package/lib/commonjs/sksg/Node.d.ts +19 -0
  34. package/lib/commonjs/sksg/Node.js +78 -0
  35. package/lib/commonjs/sksg/Node.js.map +1 -0
  36. package/lib/commonjs/sksg/Reconciler.d.ts +1 -1
  37. package/lib/commonjs/sksg/Recorder/Core.d.ts +79 -0
  38. package/lib/commonjs/sksg/Recorder/Core.js +110 -0
  39. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -0
  40. package/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +18 -0
  41. package/lib/commonjs/sksg/Recorder/DrawingContext.js +105 -0
  42. package/lib/commonjs/sksg/Recorder/DrawingContext.js.map +1 -0
  43. package/lib/commonjs/sksg/Recorder/Player.d.ts +3 -0
  44. package/lib/commonjs/sksg/Recorder/Player.js +127 -0
  45. package/lib/commonjs/sksg/Recorder/Player.js.map +1 -0
  46. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +50 -0
  47. package/lib/commonjs/sksg/Recorder/Recorder.js +288 -0
  48. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -0
  49. package/lib/commonjs/sksg/Recorder/Recording.d.ts +7 -0
  50. package/lib/commonjs/sksg/Recorder/Recording.js +12 -0
  51. package/lib/commonjs/sksg/Recorder/Recording.js.map +1 -0
  52. package/lib/commonjs/sksg/Recorder/Visitor.d.ts +5 -0
  53. package/lib/commonjs/sksg/Recorder/Visitor.js +293 -0
  54. package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -0
  55. package/lib/commonjs/sksg/Recorder/commands/Box.d.ts +13 -0
  56. package/lib/commonjs/sksg/Recorder/commands/Box.js +71 -0
  57. package/lib/commonjs/sksg/Recorder/commands/Box.js.map +1 -0
  58. package/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +3 -0
  59. package/lib/commonjs/sksg/Recorder/commands/CTM.js +79 -0
  60. package/lib/commonjs/sksg/Recorder/commands/CTM.js.map +1 -0
  61. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  62. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js +76 -0
  63. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js.map +1 -0
  64. package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +24 -0
  65. package/lib/commonjs/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
  66. package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -0
  67. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  68. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +183 -0
  69. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -0
  70. package/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +4 -0
  71. package/lib/commonjs/sksg/Recorder/commands/Paint.js +70 -0
  72. package/lib/commonjs/sksg/Recorder/commands/Paint.js.map +1 -0
  73. package/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  74. package/lib/commonjs/sksg/Recorder/commands/PathEffects.js +137 -0
  75. package/lib/commonjs/sksg/Recorder/commands/PathEffects.js.map +1 -0
  76. package/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +5 -0
  77. package/lib/commonjs/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +58 -15
  78. package/lib/commonjs/sksg/Recorder/commands/Shaders.js.map +1 -0
  79. package/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  80. package/lib/commonjs/sksg/{nodes/utils.js → utils.js} +12 -2
  81. package/lib/commonjs/sksg/utils.js.map +1 -0
  82. package/lib/module/dom/types/Common.d.ts +6 -4
  83. package/lib/module/dom/types/Common.js.map +1 -1
  84. package/lib/module/dom/types/ImageFilters.d.ts +1 -1
  85. package/lib/module/dom/types/ImageFilters.js.map +1 -1
  86. package/lib/module/dom/types/Node.d.ts +0 -2
  87. package/lib/module/dom/types/Node.js.map +1 -1
  88. package/lib/module/external/reanimated/index.d.ts +0 -1
  89. package/lib/module/external/reanimated/index.js +0 -1
  90. package/lib/module/external/reanimated/index.js.map +1 -1
  91. package/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
  92. package/lib/module/external/reanimated/renderHelpers.js +4 -42
  93. package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
  94. package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -8
  95. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  96. package/lib/module/skia/core/AnimatedImage.d.ts +1 -1
  97. package/lib/module/skia/core/AnimatedImage.js +1 -1
  98. package/lib/module/skia/core/AnimatedImage.js.map +1 -1
  99. package/lib/module/skia/core/Data.d.ts +1 -1
  100. package/lib/module/skia/core/Data.js +2 -8
  101. package/lib/module/skia/core/Data.js.map +1 -1
  102. package/lib/module/skia/types/Paint/Paint.d.ts +1 -0
  103. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  104. package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  105. package/lib/module/skia/web/JsiSkPaint.js +3 -0
  106. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  107. package/lib/module/sksg/Container.d.ts +3 -2
  108. package/lib/module/sksg/Container.js +30 -24
  109. package/lib/module/sksg/Container.js.map +1 -1
  110. package/lib/module/sksg/HostConfig.d.ts +2 -2
  111. package/lib/module/sksg/HostConfig.js +7 -25
  112. package/lib/module/sksg/HostConfig.js.map +1 -1
  113. package/lib/module/sksg/Node.d.ts +19 -0
  114. package/lib/module/sksg/Node.js +67 -0
  115. package/lib/module/sksg/Node.js.map +1 -0
  116. package/lib/module/sksg/Reconciler.d.ts +1 -1
  117. package/lib/module/sksg/Recorder/Core.d.ts +79 -0
  118. package/lib/module/sksg/Recorder/Core.js +101 -0
  119. package/lib/module/sksg/Recorder/Core.js.map +1 -0
  120. package/lib/module/sksg/Recorder/DrawingContext.d.ts +18 -0
  121. package/lib/module/sksg/Recorder/DrawingContext.js +98 -0
  122. package/lib/module/sksg/Recorder/DrawingContext.js.map +1 -0
  123. package/lib/module/sksg/Recorder/Player.d.ts +3 -0
  124. package/lib/module/sksg/Recorder/Player.js +120 -0
  125. package/lib/module/sksg/Recorder/Player.js.map +1 -0
  126. package/lib/module/sksg/Recorder/Recorder.d.ts +50 -0
  127. package/lib/module/sksg/Recorder/Recorder.js +281 -0
  128. package/lib/module/sksg/Recorder/Recorder.js.map +1 -0
  129. package/lib/module/sksg/Recorder/Recording.d.ts +7 -0
  130. package/lib/module/sksg/Recorder/Recording.js +5 -0
  131. package/lib/module/sksg/Recorder/Recording.js.map +1 -0
  132. package/lib/module/sksg/Recorder/Visitor.d.ts +5 -0
  133. package/lib/module/sksg/Recorder/Visitor.js +285 -0
  134. package/lib/module/sksg/Recorder/Visitor.js.map +1 -0
  135. package/lib/module/sksg/Recorder/commands/Box.d.ts +13 -0
  136. package/lib/module/sksg/Recorder/commands/Box.js +63 -0
  137. package/lib/module/sksg/Recorder/commands/Box.js.map +1 -0
  138. package/lib/module/sksg/Recorder/commands/CTM.d.ts +3 -0
  139. package/lib/module/sksg/Recorder/commands/CTM.js +72 -0
  140. package/lib/module/sksg/Recorder/commands/CTM.js.map +1 -0
  141. package/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  142. package/lib/module/sksg/Recorder/commands/ColorFilters.js +67 -0
  143. package/lib/module/sksg/Recorder/commands/ColorFilters.js.map +1 -0
  144. package/lib/module/sksg/Recorder/commands/Drawing.d.ts +24 -0
  145. package/lib/module/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
  146. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -0
  147. package/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  148. package/lib/module/sksg/{nodes/imageFilters.js → Recorder/commands/ImageFilters.js} +87 -95
  149. package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -0
  150. package/lib/module/sksg/Recorder/commands/Paint.d.ts +4 -0
  151. package/lib/module/sksg/Recorder/commands/Paint.js +62 -0
  152. package/lib/module/sksg/Recorder/commands/Paint.js.map +1 -0
  153. package/lib/module/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  154. package/lib/module/sksg/Recorder/commands/PathEffects.js +128 -0
  155. package/lib/module/sksg/Recorder/commands/PathEffects.js.map +1 -0
  156. package/lib/module/sksg/Recorder/commands/Shaders.d.ts +5 -0
  157. package/lib/module/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +63 -13
  158. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -0
  159. package/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  160. package/lib/module/sksg/{nodes/utils.js → utils.js} +10 -1
  161. package/lib/module/sksg/utils.js.map +1 -0
  162. package/lib/typescript/lib/commonjs/external/reanimated/renderHelpers.d.ts +0 -1
  163. package/lib/typescript/lib/commonjs/skia/core/AnimatedImage.d.ts +1 -1
  164. package/lib/typescript/lib/commonjs/skia/core/Data.d.ts +1 -1
  165. package/lib/typescript/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  166. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +4 -0
  167. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +1 -3
  168. package/lib/typescript/lib/commonjs/sksg/Node.d.ts +14 -0
  169. package/lib/typescript/lib/commonjs/sksg/Recorder/Core.d.ts +5 -0
  170. package/lib/typescript/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +17 -0
  171. package/lib/typescript/lib/commonjs/sksg/Recorder/Player.d.ts +2 -0
  172. package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +45 -0
  173. package/lib/typescript/lib/commonjs/sksg/Recorder/Recording.d.ts +5 -0
  174. package/lib/typescript/lib/commonjs/sksg/Recorder/Visitor.d.ts +27 -0
  175. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Box.d.ts +3 -0
  176. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +2 -0
  177. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +4 -0
  178. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +6 -0
  179. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +14 -0
  180. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +4 -0
  181. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +3 -0
  182. package/lib/typescript/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
  183. package/lib/typescript/lib/module/external/reanimated/index.d.ts +0 -1
  184. package/lib/typescript/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
  185. package/lib/typescript/lib/module/mock/index.d.ts +1 -1
  186. package/lib/typescript/lib/module/skia/core/AnimatedImage.d.ts +1 -1
  187. package/lib/typescript/lib/module/skia/core/Data.d.ts +1 -1
  188. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  189. package/lib/typescript/lib/module/sksg/Container.d.ts +4 -0
  190. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +1 -3
  191. package/lib/typescript/lib/module/sksg/Node.d.ts +13 -0
  192. package/lib/typescript/lib/module/sksg/Recorder/Core.d.ts +4 -0
  193. package/lib/typescript/lib/module/sksg/Recorder/DrawingContext.d.ts +16 -0
  194. package/lib/typescript/lib/module/sksg/Recorder/Player.d.ts +1 -0
  195. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +44 -0
  196. package/lib/typescript/lib/module/sksg/Recorder/Recording.d.ts +4 -0
  197. package/lib/typescript/lib/module/sksg/Recorder/Visitor.d.ts +26 -0
  198. package/lib/typescript/lib/module/sksg/Recorder/commands/Box.d.ts +2 -0
  199. package/lib/typescript/lib/module/sksg/Recorder/commands/CTM.d.ts +1 -0
  200. package/lib/typescript/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +3 -0
  201. package/lib/typescript/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +5 -0
  202. package/lib/typescript/lib/module/sksg/Recorder/commands/Paint.d.ts +13 -0
  203. package/lib/typescript/lib/module/sksg/Recorder/commands/PathEffects.d.ts +3 -0
  204. package/lib/typescript/lib/module/sksg/Recorder/commands/Shaders.d.ts +2 -0
  205. package/lib/typescript/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
  206. package/lib/typescript/src/dom/types/Common.d.ts +6 -4
  207. package/lib/typescript/src/dom/types/ImageFilters.d.ts +1 -1
  208. package/lib/typescript/src/dom/types/Node.d.ts +0 -2
  209. package/lib/typescript/src/external/reanimated/index.d.ts +0 -1
  210. package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +0 -1
  211. package/lib/typescript/src/skia/core/AnimatedImage.d.ts +1 -1
  212. package/lib/typescript/src/skia/core/Data.d.ts +1 -1
  213. package/lib/typescript/src/skia/types/Paint/Paint.d.ts +1 -0
  214. package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
  215. package/lib/typescript/src/sksg/Container.d.ts +3 -2
  216. package/lib/typescript/src/sksg/HostConfig.d.ts +2 -2
  217. package/lib/typescript/src/sksg/Node.d.ts +19 -0
  218. package/lib/typescript/src/sksg/Reconciler.d.ts +1 -1
  219. package/lib/typescript/src/sksg/Recorder/Core.d.ts +79 -0
  220. package/lib/typescript/src/sksg/Recorder/DrawingContext.d.ts +18 -0
  221. package/lib/typescript/src/sksg/Recorder/Player.d.ts +3 -0
  222. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +50 -0
  223. package/lib/typescript/src/sksg/Recorder/Recording.d.ts +7 -0
  224. package/lib/typescript/src/sksg/Recorder/Visitor.d.ts +5 -0
  225. package/lib/typescript/src/sksg/Recorder/commands/Box.d.ts +13 -0
  226. package/lib/typescript/src/sksg/Recorder/commands/CTM.d.ts +3 -0
  227. package/lib/typescript/src/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  228. package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +24 -0
  229. package/lib/typescript/src/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  230. package/lib/typescript/src/sksg/Recorder/commands/Paint.d.ts +4 -0
  231. package/lib/typescript/src/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  232. package/lib/typescript/src/sksg/Recorder/commands/Shaders.d.ts +5 -0
  233. package/lib/typescript/src/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  234. package/package.json +1 -1
  235. package/src/__tests__/snapshots/image-filter/test-shadow.png +0 -0
  236. package/src/dom/types/Common.ts +7 -5
  237. package/src/dom/types/ImageFilters.ts +2 -1
  238. package/src/dom/types/Node.ts +0 -4
  239. package/src/external/reanimated/index.ts +0 -1
  240. package/src/external/reanimated/renderHelpers.ts +4 -44
  241. package/src/external/reanimated/useAnimatedImageValue.ts +4 -15
  242. package/src/renderer/__tests__/e2e/ColorFilters.spec.tsx +15 -0
  243. package/src/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.tsx +23 -2
  244. package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +91 -2
  245. package/src/renderer/__tests__/setup.tsx +1 -1
  246. package/src/skia/core/AnimatedImage.ts +2 -3
  247. package/src/skia/core/Data.ts +3 -9
  248. package/src/skia/types/Paint/Paint.ts +2 -0
  249. package/src/skia/web/JsiSkPaint.ts +4 -0
  250. package/src/sksg/Container.ts +35 -29
  251. package/src/sksg/HostConfig.ts +5 -50
  252. package/src/sksg/Node.ts +105 -0
  253. package/src/sksg/Recorder/Core.ts +171 -0
  254. package/src/sksg/Recorder/DrawingContext.ts +130 -0
  255. package/src/sksg/Recorder/Player.ts +160 -0
  256. package/src/sksg/Recorder/Recorder.ts +259 -0
  257. package/src/sksg/Recorder/Recording.ts +13 -0
  258. package/src/sksg/Recorder/Visitor.ts +324 -0
  259. package/src/sksg/Recorder/commands/Box.ts +63 -0
  260. package/src/sksg/Recorder/commands/CTM.ts +72 -0
  261. package/src/sksg/Recorder/commands/ColorFilters.ts +87 -0
  262. package/src/sksg/{nodes/drawings.ts → Recorder/commands/Drawing.ts} +29 -65
  263. package/src/sksg/Recorder/commands/ImageFilters.ts +255 -0
  264. package/src/sksg/Recorder/commands/Paint.ts +77 -0
  265. package/src/sksg/Recorder/commands/PathEffects.ts +169 -0
  266. package/src/sksg/{nodes/shaders.ts → Recorder/commands/Shaders.ts} +100 -26
  267. package/src/sksg/{nodes/utils.ts → utils.ts} +14 -1
  268. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  269. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +0 -24
  270. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +0 -1
  271. package/lib/commonjs/sksg/DeclarationContext.d.ts +0 -56
  272. package/lib/commonjs/sksg/DeclarationContext.js +0 -77
  273. package/lib/commonjs/sksg/DeclarationContext.js.map +0 -1
  274. package/lib/commonjs/sksg/DrawingContext.d.ts +0 -13
  275. package/lib/commonjs/sksg/DrawingContext.js +0 -172
  276. package/lib/commonjs/sksg/DrawingContext.js.map +0 -1
  277. package/lib/commonjs/sksg/__tests__/Declarations.spec.d.ts +0 -1
  278. package/lib/commonjs/sksg/__tests__/MockDeclaration.d.ts +0 -57
  279. package/lib/commonjs/sksg/nodes/Node.d.ts +0 -7
  280. package/lib/commonjs/sksg/nodes/Node.js +0 -6
  281. package/lib/commonjs/sksg/nodes/Node.js.map +0 -1
  282. package/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -10
  283. package/lib/commonjs/sksg/nodes/colorFilters.js +0 -79
  284. package/lib/commonjs/sksg/nodes/colorFilters.js.map +0 -1
  285. package/lib/commonjs/sksg/nodes/context.d.ts +0 -3
  286. package/lib/commonjs/sksg/nodes/context.js +0 -394
  287. package/lib/commonjs/sksg/nodes/context.js.map +0 -1
  288. package/lib/commonjs/sksg/nodes/drawings.d.ts +0 -30
  289. package/lib/commonjs/sksg/nodes/drawings.js.map +0 -1
  290. package/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -17
  291. package/lib/commonjs/sksg/nodes/imageFilters.js +0 -197
  292. package/lib/commonjs/sksg/nodes/imageFilters.js.map +0 -1
  293. package/lib/commonjs/sksg/nodes/index.d.ts +0 -3
  294. package/lib/commonjs/sksg/nodes/index.js +0 -39
  295. package/lib/commonjs/sksg/nodes/index.js.map +0 -1
  296. package/lib/commonjs/sksg/nodes/paint.d.ts +0 -3
  297. package/lib/commonjs/sksg/nodes/paint.js +0 -81
  298. package/lib/commonjs/sksg/nodes/paint.js.map +0 -1
  299. package/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -11
  300. package/lib/commonjs/sksg/nodes/pathEffects.js +0 -111
  301. package/lib/commonjs/sksg/nodes/pathEffects.js.map +0 -1
  302. package/lib/commonjs/sksg/nodes/shaders.d.ts +0 -11
  303. package/lib/commonjs/sksg/nodes/shaders.js.map +0 -1
  304. package/lib/commonjs/sksg/nodes/utils.js.map +0 -1
  305. package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  306. package/lib/module/external/reanimated/useDerivedValueOnJS.js +0 -16
  307. package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +0 -1
  308. package/lib/module/sksg/DeclarationContext.d.ts +0 -56
  309. package/lib/module/sksg/DeclarationContext.js +0 -69
  310. package/lib/module/sksg/DeclarationContext.js.map +0 -1
  311. package/lib/module/sksg/DrawingContext.d.ts +0 -13
  312. package/lib/module/sksg/DrawingContext.js +0 -165
  313. package/lib/module/sksg/DrawingContext.js.map +0 -1
  314. package/lib/module/sksg/__tests__/Declarations.spec.d.ts +0 -1
  315. package/lib/module/sksg/__tests__/MockDeclaration.d.ts +0 -57
  316. package/lib/module/sksg/nodes/Node.d.ts +0 -7
  317. package/lib/module/sksg/nodes/Node.js +0 -2
  318. package/lib/module/sksg/nodes/Node.js.map +0 -1
  319. package/lib/module/sksg/nodes/colorFilters.d.ts +0 -10
  320. package/lib/module/sksg/nodes/colorFilters.js +0 -66
  321. package/lib/module/sksg/nodes/colorFilters.js.map +0 -1
  322. package/lib/module/sksg/nodes/context.d.ts +0 -3
  323. package/lib/module/sksg/nodes/context.js +0 -387
  324. package/lib/module/sksg/nodes/context.js.map +0 -1
  325. package/lib/module/sksg/nodes/drawings.d.ts +0 -30
  326. package/lib/module/sksg/nodes/drawings.js.map +0 -1
  327. package/lib/module/sksg/nodes/imageFilters.d.ts +0 -17
  328. package/lib/module/sksg/nodes/imageFilters.js.map +0 -1
  329. package/lib/module/sksg/nodes/index.d.ts +0 -3
  330. package/lib/module/sksg/nodes/index.js +0 -4
  331. package/lib/module/sksg/nodes/index.js.map +0 -1
  332. package/lib/module/sksg/nodes/paint.d.ts +0 -3
  333. package/lib/module/sksg/nodes/paint.js +0 -74
  334. package/lib/module/sksg/nodes/paint.js.map +0 -1
  335. package/lib/module/sksg/nodes/pathEffects.d.ts +0 -11
  336. package/lib/module/sksg/nodes/pathEffects.js +0 -97
  337. package/lib/module/sksg/nodes/pathEffects.js.map +0 -1
  338. package/lib/module/sksg/nodes/shaders.d.ts +0 -11
  339. package/lib/module/sksg/nodes/shaders.js.map +0 -1
  340. package/lib/module/sksg/nodes/utils.js.map +0 -1
  341. package/lib/typescript/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -2
  342. package/lib/typescript/lib/commonjs/sksg/DeclarationContext.d.ts +0 -53
  343. package/lib/typescript/lib/commonjs/sksg/DrawingContext.d.ts +0 -22
  344. package/lib/typescript/lib/commonjs/sksg/nodes/Node.d.ts +0 -1
  345. package/lib/typescript/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -8
  346. package/lib/typescript/lib/commonjs/sksg/nodes/context.d.ts +0 -2
  347. package/lib/typescript/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -12
  348. package/lib/typescript/lib/commonjs/sksg/nodes/index.d.ts +0 -1
  349. package/lib/typescript/lib/commonjs/sksg/nodes/paint.d.ts +0 -2
  350. package/lib/typescript/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -9
  351. package/lib/typescript/lib/commonjs/sksg/nodes/shaders.d.ts +0 -10
  352. package/lib/typescript/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  353. package/lib/typescript/lib/module/sksg/DeclarationContext.d.ts +0 -52
  354. package/lib/typescript/lib/module/sksg/DrawingContext.d.ts +0 -21
  355. package/lib/typescript/lib/module/sksg/nodes/Node.d.ts +0 -1
  356. package/lib/typescript/lib/module/sksg/nodes/colorFilters.d.ts +0 -7
  357. package/lib/typescript/lib/module/sksg/nodes/context.d.ts +0 -1
  358. package/lib/typescript/lib/module/sksg/nodes/imageFilters.d.ts +0 -11
  359. package/lib/typescript/lib/module/sksg/nodes/index.d.ts +0 -3
  360. package/lib/typescript/lib/module/sksg/nodes/paint.d.ts +0 -1
  361. package/lib/typescript/lib/module/sksg/nodes/pathEffects.d.ts +0 -8
  362. package/lib/typescript/lib/module/sksg/nodes/shaders.d.ts +0 -9
  363. package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  364. package/lib/typescript/src/sksg/DeclarationContext.d.ts +0 -56
  365. package/lib/typescript/src/sksg/DrawingContext.d.ts +0 -13
  366. package/lib/typescript/src/sksg/__tests__/Declarations.spec.d.ts +0 -1
  367. package/lib/typescript/src/sksg/__tests__/MockDeclaration.d.ts +0 -57
  368. package/lib/typescript/src/sksg/nodes/Node.d.ts +0 -7
  369. package/lib/typescript/src/sksg/nodes/colorFilters.d.ts +0 -10
  370. package/lib/typescript/src/sksg/nodes/context.d.ts +0 -3
  371. package/lib/typescript/src/sksg/nodes/drawings.d.ts +0 -30
  372. package/lib/typescript/src/sksg/nodes/imageFilters.d.ts +0 -17
  373. package/lib/typescript/src/sksg/nodes/index.d.ts +0 -3
  374. package/lib/typescript/src/sksg/nodes/paint.d.ts +0 -3
  375. package/lib/typescript/src/sksg/nodes/pathEffects.d.ts +0 -11
  376. package/lib/typescript/src/sksg/nodes/shaders.d.ts +0 -11
  377. package/src/external/reanimated/useDerivedValueOnJS.ts +0 -20
  378. package/src/sksg/DeclarationContext.ts +0 -85
  379. package/src/sksg/DrawingContext.ts +0 -226
  380. package/src/sksg/__tests__/Declarations.spec.tsx +0 -235
  381. package/src/sksg/__tests__/MockDeclaration.ts +0 -138
  382. package/src/sksg/nodes/Node.ts +0 -8
  383. package/src/sksg/nodes/colorFilters.ts +0 -79
  384. package/src/sksg/nodes/context.ts +0 -412
  385. package/src/sksg/nodes/imageFilters.ts +0 -235
  386. package/src/sksg/nodes/index.ts +0 -3
  387. package/src/sksg/nodes/paint.ts +0 -75
  388. package/src/sksg/nodes/pathEffects.ts +0 -118
  389. /package/lib/typescript/lib/commonjs/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
  390. /package/lib/typescript/lib/module/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
@@ -0,0 +1,45 @@
1
+ export const __esModule: boolean;
2
+ export class Recorder {
3
+ processProps(props: any): {
4
+ props: any;
5
+ animatedProps: {} | undefined;
6
+ };
7
+ add(command: any): void;
8
+ savePaint(props: any): void;
9
+ restorePaint(): void;
10
+ restorePaintDeclaration(): void;
11
+ materializePaint(): void;
12
+ pushPathEffect(pathEffectType: any, props: any): void;
13
+ pushImageFilter(imageFilterType: any, props: any): void;
14
+ pushColorFilter(colorFilterType: any, props: any): void;
15
+ pushShader(shaderType: any, props: any): void;
16
+ pushBlurMaskFilter(props: any): void;
17
+ composePathEffect(): void;
18
+ composeColorFilter(): void;
19
+ composeImageFilter(): void;
20
+ saveCTM(props: any): void;
21
+ restoreCTM(): void;
22
+ drawPaint(): void;
23
+ saveLayer(): void;
24
+ saveBackdropFilter(): void;
25
+ drawBox(boxProps: any, shadows: any): void;
26
+ drawImage(props: any): void;
27
+ drawCircle(props: any): void;
28
+ drawPoints(props: any): void;
29
+ drawPath(props: any): void;
30
+ drawRect(props: any): void;
31
+ drawRRect(props: any): void;
32
+ drawOval(props: any): void;
33
+ drawLine(props: any): void;
34
+ drawPatch(props: any): void;
35
+ drawVertices(props: any): void;
36
+ drawDiffRect(props: any): void;
37
+ drawText(props: any): void;
38
+ drawTextPath(props: any): void;
39
+ drawTextBlob(props: any): void;
40
+ drawGlyphs(props: any): void;
41
+ drawPicture(props: any): void;
42
+ drawImageSVG(props: any): void;
43
+ drawParagraph(props: any): void;
44
+ drawAtlas(props: any): void;
45
+ }
@@ -0,0 +1,5 @@
1
+ export const __esModule: boolean;
2
+ export function createRecording(commands: any): {
3
+ commands: any;
4
+ paintPool: never[];
5
+ };
@@ -0,0 +1,27 @@
1
+ export const __esModule: boolean;
2
+ export function processPaint({ opacity, color, strokeWidth, blendMode, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither, paint: paintRef }: {
3
+ opacity: any;
4
+ color: any;
5
+ strokeWidth: any;
6
+ blendMode: any;
7
+ style: any;
8
+ strokeJoin: any;
9
+ strokeCap: any;
10
+ strokeMiter: any;
11
+ antiAlias: any;
12
+ dither: any;
13
+ paint: any;
14
+ }): {
15
+ opacity: any;
16
+ color: any;
17
+ strokeWidth: any;
18
+ blendMode: any;
19
+ style: any;
20
+ strokeJoin: any;
21
+ strokeCap: any;
22
+ strokeMiter: any;
23
+ antiAlias: any;
24
+ dither: any;
25
+ paint: any;
26
+ } | null;
27
+ export function visit(recorder: any, root: any): void;
@@ -0,0 +1,3 @@
1
+ export const __esModule: boolean;
2
+ export function isBoxCommand(command: any): boolean;
3
+ export function drawBox(ctx: any, command: any): void;
@@ -0,0 +1,2 @@
1
+ export const __esModule: boolean;
2
+ export function saveCTM(ctx: any, props: any): void;
@@ -0,0 +1,4 @@
1
+ export const __esModule: boolean;
2
+ export function isPushColorFilter(command: any): boolean;
3
+ export function composeColorFilters(ctx: any): void;
4
+ export function pushColorFilter(ctx: any, command: any): void;
@@ -0,0 +1,6 @@
1
+ export const __esModule: boolean;
2
+ export const MorphologyOperator: {};
3
+ export function composeImageFilters(ctx: any): void;
4
+ export function setBlurMaskFilter(ctx: any, props: any): void;
5
+ export function isPushImageFilter(command: any): boolean;
6
+ export function pushImageFilter(ctx: any, command: any): void;
@@ -0,0 +1,14 @@
1
+ export const __esModule: boolean;
2
+ export function processColor(Skia: any, color: any): any;
3
+ export function setPaintProperties(Skia: any, paint: any, { opacity, color, blendMode, strokeWidth, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither }: {
4
+ opacity: any;
5
+ color: any;
6
+ blendMode: any;
7
+ strokeWidth: any;
8
+ style: any;
9
+ strokeJoin: any;
10
+ strokeCap: any;
11
+ strokeMiter: any;
12
+ antiAlias: any;
13
+ dither: any;
14
+ }): void;
@@ -0,0 +1,4 @@
1
+ export const __esModule: boolean;
2
+ export function isPushPathEffect(command: any): boolean;
3
+ export function composePathEffects(ctx: any): void;
4
+ export function pushPathEffect(ctx: any, command: any): void;
@@ -0,0 +1,3 @@
1
+ export const __esModule: boolean;
2
+ export function isPushShader(command: any): boolean;
3
+ export function pushShader(ctx: any, command: any): void;
@@ -1,3 +1,4 @@
1
1
  export const __esModule: boolean;
2
2
  export function isSharedValue(value: any): boolean;
3
3
  export function materialize(props: any): any;
4
+ export function composeDeclarations(filters: any, composer: any): any;
@@ -1,5 +1,4 @@
1
1
  export * from "./useAnimatedImageValue";
2
- export * from "./useDerivedValueOnJS";
3
2
  export * from "./renderHelpers";
4
3
  export * from "./interpolators";
5
4
  export * from "./textures";
@@ -1,5 +1,4 @@
1
1
  export function extractReanimatedProps(props: any): any[];
2
2
  export function bindReanimatedProps(container: any, node: any, reanimatedProps: any): void;
3
- export let HAS_REANIMATED: boolean;
4
3
  export let HAS_REANIMATED_3: boolean;
5
4
  export function unbindReanimatedNode(node: any): void;
@@ -154,7 +154,7 @@ export function Mock(CanvasKit: any): {
154
154
  matchFont: (inputStyle?: {}, fontMgr?: import("../../..").SkFontMgr) => import("../../..").SkFont;
155
155
  listFontFamilies: (fontMgr?: import("../../..").SkFontMgr) => string[];
156
156
  makeImageFromView: (viewRef: any, callback?: null) => any;
157
- useAnimatedImage: (source: any, onError: any, managed?: boolean) => null;
157
+ useAnimatedImage: (source: any, onError: any) => null;
158
158
  createPicture: (cb: any, rect: any) => import("../../..").SkPicture;
159
159
  vec: (x: number | undefined, y: any) => import("../../..").SkPoint;
160
160
  point: (x: number | undefined, y: any) => import("../../..").SkPoint;
@@ -1 +1 @@
1
- export function useAnimatedImage(source: any, onError: any, managed?: boolean): null;
1
+ export function useAnimatedImage(source: any, onError: any): null;
@@ -1,4 +1,4 @@
1
1
  export function loadData(source: any, factory: any, onError: any): Promise<any>;
2
2
  export function useCollectionLoading(source: any, loader: any): null;
3
- export function useRawData(source: any, factory: any, onError: any, manage?: boolean): null;
3
+ export function useRawData(source: any, factory: any, onError: any): null;
4
4
  export function useData(source: any, onError: any): null;
@@ -1,6 +1,7 @@
1
1
  export class JsiSkPaint extends HostObject {
2
2
  constructor(CanvasKit: any, ref: any);
3
3
  copy(): JsiSkPaint;
4
+ assign(paint: any): void;
4
5
  reset(): void;
5
6
  getAlphaf(): any;
6
7
  getColor(): any;
@@ -6,6 +6,10 @@ export class Container {
6
6
  get root(): any;
7
7
  mapperId: any;
8
8
  _root: any;
9
+ _recording: {
10
+ commands: any;
11
+ paintPool: never[];
12
+ } | undefined;
9
13
  clear(): void;
10
14
  redraw(): void;
11
15
  getNativeId(): any;
@@ -11,9 +11,8 @@ export namespace sksgHostConfig {
11
11
  function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
12
12
  function shouldSetTextContent(_type: any, _props: any): boolean;
13
13
  function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
14
- function createInstance(type: any, props: any, container: any, _hostContext: any, _internalInstanceHandle: any): {
14
+ function createInstance(type: any, propsWithChildren: any, container: any, _hostContext: any, _internalInstanceHandle: any): {
15
15
  type: any;
16
- isDeclaration: boolean;
17
16
  props: any;
18
17
  children: never[];
19
18
  };
@@ -31,7 +30,6 @@ export namespace sksgHostConfig {
31
30
  type: any;
32
31
  props: any;
33
32
  children: any[];
34
- isDeclaration: any;
35
33
  };
36
34
  function createContainerChildSet(): never[];
37
35
  function appendChildToContainerChildSet(childSet: any, child: any): void;
@@ -0,0 +1,13 @@
1
+ export function isColorFilter(type: any): boolean;
2
+ export function isPathEffect(type: any): boolean;
3
+ export function isImageFilter(type: any): boolean;
4
+ export function isShader(type: any): boolean;
5
+ export function sortNodeChildren(parent: any): {
6
+ colorFilters: any[];
7
+ drawings: any[];
8
+ maskFilters: any[];
9
+ shaders: any[];
10
+ pathEffects: any[];
11
+ imageFilters: any[];
12
+ paints: any[];
13
+ };
@@ -0,0 +1,4 @@
1
+ export let CommandType: {};
2
+ export function materializeProps(command: any): void;
3
+ export function isCommand(command: any, type: any): boolean;
4
+ export function isDrawCommand(command: any, type: any): boolean;
@@ -0,0 +1,16 @@
1
+ export function createDrawingContext(Skia: any, paintPool: any, canvas: any): {
2
+ Skia: any;
3
+ canvas: any;
4
+ paints: any[];
5
+ colorFilters: any[];
6
+ shaders: any[];
7
+ imageFilters: any[];
8
+ pathEffects: any[];
9
+ paintDeclarations: any[];
10
+ paintPool: any;
11
+ savePaint: () => void;
12
+ saveBackdropFilter: () => void;
13
+ readonly paint: any;
14
+ restorePaint: () => any;
15
+ materializePaint: () => void;
16
+ };
@@ -0,0 +1 @@
1
+ export function replay(ctx: any, commands: any): void;
@@ -0,0 +1,44 @@
1
+ export class Recorder {
2
+ processProps(props: any): {
3
+ props: any;
4
+ animatedProps: {} | undefined;
5
+ };
6
+ add(command: any): void;
7
+ savePaint(props: any): void;
8
+ restorePaint(): void;
9
+ restorePaintDeclaration(): void;
10
+ materializePaint(): void;
11
+ pushPathEffect(pathEffectType: any, props: any): void;
12
+ pushImageFilter(imageFilterType: any, props: any): void;
13
+ pushColorFilter(colorFilterType: any, props: any): void;
14
+ pushShader(shaderType: any, props: any): void;
15
+ pushBlurMaskFilter(props: any): void;
16
+ composePathEffect(): void;
17
+ composeColorFilter(): void;
18
+ composeImageFilter(): void;
19
+ saveCTM(props: any): void;
20
+ restoreCTM(): void;
21
+ drawPaint(): void;
22
+ saveLayer(): void;
23
+ saveBackdropFilter(): void;
24
+ drawBox(boxProps: any, shadows: any): void;
25
+ drawImage(props: any): void;
26
+ drawCircle(props: any): void;
27
+ drawPoints(props: any): void;
28
+ drawPath(props: any): void;
29
+ drawRect(props: any): void;
30
+ drawRRect(props: any): void;
31
+ drawOval(props: any): void;
32
+ drawLine(props: any): void;
33
+ drawPatch(props: any): void;
34
+ drawVertices(props: any): void;
35
+ drawDiffRect(props: any): void;
36
+ drawText(props: any): void;
37
+ drawTextPath(props: any): void;
38
+ drawTextBlob(props: any): void;
39
+ drawGlyphs(props: any): void;
40
+ drawPicture(props: any): void;
41
+ drawImageSVG(props: any): void;
42
+ drawParagraph(props: any): void;
43
+ drawAtlas(props: any): void;
44
+ }
@@ -0,0 +1,4 @@
1
+ export function createRecording(commands: any): {
2
+ commands: any;
3
+ paintPool: never[];
4
+ };
@@ -0,0 +1,26 @@
1
+ export function processPaint({ opacity, color, strokeWidth, blendMode, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither, paint: paintRef }: {
2
+ opacity: any;
3
+ color: any;
4
+ strokeWidth: any;
5
+ blendMode: any;
6
+ style: any;
7
+ strokeJoin: any;
8
+ strokeCap: any;
9
+ strokeMiter: any;
10
+ antiAlias: any;
11
+ dither: any;
12
+ paint: any;
13
+ }): {
14
+ opacity: any;
15
+ color: any;
16
+ strokeWidth: any;
17
+ blendMode: any;
18
+ style: any;
19
+ strokeJoin: any;
20
+ strokeCap: any;
21
+ strokeMiter: any;
22
+ antiAlias: any;
23
+ dither: any;
24
+ paint: any;
25
+ } | null;
26
+ export function visit(recorder: any, root: any): void;
@@ -0,0 +1,2 @@
1
+ export function isBoxCommand(command: any): boolean;
2
+ export function drawBox(ctx: any, command: any): void;
@@ -0,0 +1 @@
1
+ export function saveCTM(ctx: any, props: any): void;
@@ -0,0 +1,3 @@
1
+ export function isPushColorFilter(command: any): boolean;
2
+ export function composeColorFilters(ctx: any): void;
3
+ export function pushColorFilter(ctx: any, command: any): void;
@@ -0,0 +1,5 @@
1
+ export let MorphologyOperator: {};
2
+ export function composeImageFilters(ctx: any): void;
3
+ export function setBlurMaskFilter(ctx: any, props: any): void;
4
+ export function isPushImageFilter(command: any): boolean;
5
+ export function pushImageFilter(ctx: any, command: any): void;
@@ -0,0 +1,13 @@
1
+ export function processColor(Skia: any, color: any): any;
2
+ export function setPaintProperties(Skia: any, paint: any, { opacity, color, blendMode, strokeWidth, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither }: {
3
+ opacity: any;
4
+ color: any;
5
+ blendMode: any;
6
+ strokeWidth: any;
7
+ style: any;
8
+ strokeJoin: any;
9
+ strokeCap: any;
10
+ strokeMiter: any;
11
+ antiAlias: any;
12
+ dither: any;
13
+ }): void;
@@ -0,0 +1,3 @@
1
+ export function isPushPathEffect(command: any): boolean;
2
+ export function composePathEffects(ctx: any): void;
3
+ export function pushPathEffect(ctx: any, command: any): void;
@@ -0,0 +1,2 @@
1
+ export function isPushShader(command: any): boolean;
2
+ export function pushShader(ctx: any, command: any): void;
@@ -1,2 +1,3 @@
1
1
  export function isSharedValue(value: any): boolean;
2
2
  export function materialize(props: any): any;
3
+ export function composeDeclarations(filters: any, composer: any): any;
@@ -38,6 +38,11 @@ export interface TransformProps {
38
38
  origin?: Vector;
39
39
  matrix?: InputMatrix;
40
40
  }
41
+ export interface CTMProps extends TransformProps {
42
+ clip?: ClipDef;
43
+ invertClip?: boolean;
44
+ layer?: SkPaint | boolean;
45
+ }
41
46
  export interface PaintProps extends ChildrenProps {
42
47
  color?: Color;
43
48
  strokeWidth?: number;
@@ -50,8 +55,5 @@ export interface PaintProps extends ChildrenProps {
50
55
  antiAlias?: boolean;
51
56
  dither?: boolean;
52
57
  }
53
- export interface GroupProps extends PaintProps, TransformProps {
54
- clip?: ClipDef;
55
- invertClip?: boolean;
56
- layer?: SkPaint | boolean;
58
+ export interface GroupProps extends PaintProps, CTMProps {
57
59
  }
@@ -13,7 +13,7 @@ export interface RuntimeShaderImageFilterProps extends ChildrenProps {
13
13
  uniforms?: Uniforms;
14
14
  }
15
15
  export interface BlendImageFilterProps extends ChildrenProps {
16
- mode: BlendMode;
16
+ mode: SkEnum<typeof BlendMode>;
17
17
  }
18
18
  export interface MorphologyImageFilterProps extends ChildrenProps {
19
19
  operator: "erode" | "dilate";
@@ -1,6 +1,5 @@
1
1
  import type { GroupProps } from "./Common";
2
2
  import type { NodeType } from "./NodeType";
3
- import type { DeclarationContext } from "../../sksg/DeclarationContext";
4
3
  export interface Node<P> {
5
4
  type: NodeType;
6
5
  setProps(props: P): void;
@@ -13,7 +12,6 @@ export interface Node<P> {
13
12
  }
14
13
  export type Invalidate = () => void;
15
14
  export interface DeclarationNode<P> extends Node<P> {
16
- decorate(ctx: DeclarationContext): void;
17
15
  setInvalidate(invalidate: Invalidate): void;
18
16
  }
19
17
  export type RenderNode<P extends GroupProps> = Node<P>;
@@ -1,5 +1,4 @@
1
1
  export * from "./useAnimatedImageValue";
2
- export * from "./useDerivedValueOnJS";
3
2
  export * from "./renderHelpers";
4
3
  export * from "./interpolators";
5
4
  export * from "./textures";
@@ -1,7 +1,6 @@
1
1
  import type { Container } from "../../renderer/Container";
2
2
  import type { AnimatedProps } from "../../renderer/processors";
3
3
  import type { Node } from "../../dom/types";
4
- export declare let HAS_REANIMATED: boolean;
5
4
  export declare let HAS_REANIMATED_3: boolean;
6
5
  export declare const unbindReanimatedNode: (node: Node<unknown>) => void;
7
6
  export declare function extractReanimatedProps(props: AnimatedProps<any>): AnimatedProps<any, never>[];
@@ -2,4 +2,4 @@ import type { DataSourceParam } from "../types";
2
2
  /**
3
3
  * Returns a Skia Animated Image object
4
4
  * */
5
- export declare const useAnimatedImage: (source: DataSourceParam, onError?: (err: Error) => void, managed?: boolean) => import("../types").SkAnimatedImage | null;
5
+ export declare const useAnimatedImage: (source: DataSourceParam, onError?: (err: Error) => void) => import("../types").SkAnimatedImage | null;
@@ -1,5 +1,5 @@
1
1
  import type { SkData, DataSourceParam, SkJSIInstance } from "../types";
2
2
  export declare const loadData: <T>(source: DataSourceParam, factory: (data: SkData) => T | null, onError?: (err: Error) => void) => Promise<T | null>;
3
3
  export declare const useCollectionLoading: <T extends SkJSIInstance<string>>(source: DataSourceParam[], loader: () => Promise<(T | null)[]>) => T[] | null;
4
- export declare const useRawData: <T extends SkJSIInstance<string>>(source: DataSourceParam, factory: (data: SkData) => T | null, onError?: (err: Error) => void, manage?: boolean) => T | null;
4
+ export declare const useRawData: <T extends SkJSIInstance<string>>(source: DataSourceParam, factory: (data: SkData) => T | null, onError?: (err: Error) => void) => T | null;
5
5
  export declare const useData: (source: DataSourceParam, onError?: (err: Error) => void) => SkData | null;
@@ -35,6 +35,7 @@ export interface SkPaint extends SkJSIInstance<"Paint"> {
35
35
  SkPaint with the result of SkPaint().
36
36
  */
37
37
  reset(): void;
38
+ assign(paint: SkPaint): void;
38
39
  /**
39
40
  * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values
40
41
  * (sRGB gamut, and encoded with the sRGB transfer function).
@@ -5,6 +5,7 @@ export declare class JsiSkPaint extends HostObject<Paint, "Paint"> implements Sk
5
5
  constructor(CanvasKit: CanvasKit, ref: Paint);
6
6
  dispose: () => void;
7
7
  copy(): JsiSkPaint;
8
+ assign(paint: JsiSkPaint): void;
8
9
  reset(): void;
9
10
  getAlphaf(): number;
10
11
  getColor(): Float32Array;
@@ -1,9 +1,10 @@
1
1
  import type { Skia, SkCanvas } from "../skia/types";
2
- import type { Node } from "./nodes";
2
+ import type { Node } from "./Node";
3
3
  export declare class Container {
4
4
  Skia: Skia;
5
5
  private nativeId;
6
- _root: Node[];
6
+ private _root;
7
+ private _recording;
7
8
  unmounted: boolean;
8
9
  private values;
9
10
  private mapperId;
@@ -1,6 +1,6 @@
1
1
  import type { HostConfig } from "react-reconciler";
2
- import { NodeType } from "../dom/types";
3
- import type { Node } from "./nodes/Node";
2
+ import type { NodeType } from "../dom/types";
3
+ import type { Node } from "./Node";
4
4
  import type { Container } from "./Container";
5
5
  export declare const debug: (message?: any, ...optionalParams: any[]) => void;
6
6
  type Instance = Node;
@@ -0,0 +1,19 @@
1
+ import { NodeType } from "../dom/types";
2
+ export interface Node<Props = unknown> {
3
+ type: NodeType;
4
+ props: Props;
5
+ children: Node[];
6
+ }
7
+ export declare const isColorFilter: (type: NodeType) => type is NodeType.MatrixColorFilter | NodeType.BlendColorFilter | NodeType.LinearToSRGBGammaColorFilter | NodeType.SRGBToLinearGammaColorFilter | NodeType.LumaColorFilter | NodeType.LerpColorFilter;
8
+ export declare const isPathEffect: (type: NodeType) => type is NodeType.DiscretePathEffect | NodeType.DashPathEffect | NodeType.Path1DPathEffect | NodeType.Path2DPathEffect | NodeType.CornerPathEffect | NodeType.SumPathEffect | NodeType.Line2DPathEffect;
9
+ export declare const isImageFilter: (type: NodeType) => type is NodeType.OffsetImageFilter | NodeType.DisplacementMapImageFilter | NodeType.BlurImageFilter | NodeType.DropShadowImageFilter | NodeType.MorphologyImageFilter | NodeType.BlendImageFilter | NodeType.RuntimeShaderImageFilter;
10
+ export declare const isShader: (type: NodeType) => type is NodeType.Shader | NodeType.ImageShader | NodeType.ColorShader | NodeType.Turbulence | NodeType.FractalNoise | NodeType.LinearGradient | NodeType.RadialGradient | NodeType.SweepGradient | NodeType.TwoPointConicalGradient;
11
+ export declare const sortNodeChildren: (parent: Node) => {
12
+ colorFilters: Node<unknown>[];
13
+ drawings: Node<unknown>[];
14
+ maskFilters: Node<unknown>[];
15
+ shaders: Node<unknown>[];
16
+ pathEffects: Node<unknown>[];
17
+ imageFilters: Node<unknown>[];
18
+ paints: Node<unknown>[];
19
+ };
@@ -9,7 +9,7 @@ export declare class SkiaSGRoot {
9
9
  get sg(): {
10
10
  type: NodeType;
11
11
  props: {};
12
- children: import("./nodes").Node<unknown>[];
12
+ children: import("./Node").Node<unknown>[];
13
13
  isDeclaration: boolean;
14
14
  };
15
15
  render(element: ReactNode): void;
@@ -0,0 +1,79 @@
1
+ import type { SharedValue } from "react-native-reanimated";
2
+ import type { BlurMaskFilterProps, CircleProps, CTMProps, ImageProps, PointsProps, PathProps, RectProps, RoundedRectProps, OvalProps, LineProps, PatchProps, VerticesProps, DiffRectProps, TextProps, TextPathProps, TextBlobProps, GlyphsProps, PictureProps, ImageSVGProps, ParagraphProps, AtlasProps, DrawingNodeProps } from "../../dom/types";
3
+ export declare enum CommandType {
4
+ SavePaint = 0,
5
+ RestorePaint = 1,
6
+ SaveCTM = 2,
7
+ RestoreCTM = 3,
8
+ PushColorFilter = 4,
9
+ PushBlurMaskFilter = 5,
10
+ PushImageFilter = 6,
11
+ PushPathEffect = 7,
12
+ PushShader = 8,
13
+ ComposeColorFilter = 9,
14
+ ComposeImageFilter = 10,
15
+ ComposePathEffect = 11,
16
+ MaterializePaint = 12,
17
+ SaveBackdropFilter = 13,
18
+ SaveLayer = 14,
19
+ RestorePaintDeclaration = 15,
20
+ DrawBox = 16,
21
+ DrawImage = 17,
22
+ DrawCircle = 18,
23
+ DrawPaint = 19,
24
+ DrawPoints = 20,
25
+ DrawPath = 21,
26
+ DrawRect = 22,
27
+ DrawRRect = 23,
28
+ DrawOval = 24,
29
+ DrawLine = 25,
30
+ DrawPatch = 26,
31
+ DrawVertices = 27,
32
+ DrawDiffRect = 28,
33
+ DrawText = 29,
34
+ DrawTextPath = 30,
35
+ DrawTextBlob = 31,
36
+ DrawGlyphs = 32,
37
+ DrawPicture = 33,
38
+ DrawImageSVG = 34,
39
+ DrawParagraph = 35,
40
+ DrawAtlas = 36
41
+ }
42
+ export type Command<T extends CommandType = CommandType> = {
43
+ type: T;
44
+ [key: string]: unknown;
45
+ };
46
+ export declare const materializeProps: (command: {
47
+ props: Record<string, unknown>;
48
+ animatedProps?: Record<string, SharedValue<unknown>>;
49
+ }) => void;
50
+ export declare const isCommand: <T extends CommandType>(command: Command, type: T) => command is Command<T>;
51
+ interface Props {
52
+ [CommandType.DrawImage]: ImageProps;
53
+ [CommandType.DrawCircle]: CircleProps;
54
+ [CommandType.SaveCTM]: CTMProps;
55
+ [CommandType.SavePaint]: DrawingNodeProps;
56
+ [CommandType.PushBlurMaskFilter]: BlurMaskFilterProps;
57
+ [CommandType.DrawPoints]: PointsProps;
58
+ [CommandType.DrawPath]: PathProps;
59
+ [CommandType.DrawRect]: RectProps;
60
+ [CommandType.DrawRRect]: RoundedRectProps;
61
+ [CommandType.DrawOval]: OvalProps;
62
+ [CommandType.DrawLine]: LineProps;
63
+ [CommandType.DrawPatch]: PatchProps;
64
+ [CommandType.DrawVertices]: VerticesProps;
65
+ [CommandType.DrawDiffRect]: DiffRectProps;
66
+ [CommandType.DrawText]: TextProps;
67
+ [CommandType.DrawTextPath]: TextPathProps;
68
+ [CommandType.DrawTextBlob]: TextBlobProps;
69
+ [CommandType.DrawGlyphs]: GlyphsProps;
70
+ [CommandType.DrawPicture]: PictureProps;
71
+ [CommandType.DrawImageSVG]: ImageSVGProps;
72
+ [CommandType.DrawParagraph]: ParagraphProps;
73
+ [CommandType.DrawAtlas]: AtlasProps;
74
+ }
75
+ interface DrawCommand<T extends CommandType> extends Command<T> {
76
+ props: T extends keyof Props ? Props[T] : never;
77
+ }
78
+ export declare const isDrawCommand: <T extends keyof Props>(command: Command, type: T) => command is DrawCommand<T>;
79
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { Skia, SkCanvas, SkColorFilter, SkPaint, SkShader, SkImageFilter, SkPathEffect } from "../../skia/types";
2
+ export declare const createDrawingContext: (Skia: Skia, paintPool: SkPaint[], canvas: SkCanvas) => {
3
+ Skia: Skia;
4
+ canvas: SkCanvas;
5
+ paints: SkPaint[];
6
+ colorFilters: SkColorFilter[];
7
+ shaders: SkShader[];
8
+ imageFilters: SkImageFilter[];
9
+ pathEffects: SkPathEffect[];
10
+ paintDeclarations: SkPaint[];
11
+ paintPool: SkPaint[];
12
+ savePaint: () => void;
13
+ saveBackdropFilter: () => void;
14
+ readonly paint: SkPaint;
15
+ restorePaint: () => SkPaint | undefined;
16
+ materializePaint: () => void;
17
+ };
18
+ export type DrawingContext = ReturnType<typeof createDrawingContext>;
@@ -0,0 +1,3 @@
1
+ import { type Command } from "./Core";
2
+ import type { DrawingContext } from "./DrawingContext";
3
+ export declare const replay: (ctx: DrawingContext, commands: Command[]) => void;