@shopify/react-native-skia 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) 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/skia/types/Paint/Paint.d.ts +1 -0
  15. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  16. package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  17. package/lib/commonjs/skia/web/JsiSkPaint.js +3 -0
  18. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  19. package/lib/commonjs/sksg/Container.d.ts +3 -2
  20. package/lib/commonjs/sksg/Container.js +32 -26
  21. package/lib/commonjs/sksg/Container.js.map +1 -1
  22. package/lib/commonjs/sksg/HostConfig.d.ts +2 -2
  23. package/lib/commonjs/sksg/HostConfig.js +7 -25
  24. package/lib/commonjs/sksg/HostConfig.js.map +1 -1
  25. package/lib/commonjs/sksg/Node.d.ts +19 -0
  26. package/lib/commonjs/sksg/Node.js +78 -0
  27. package/lib/commonjs/sksg/Node.js.map +1 -0
  28. package/lib/commonjs/sksg/Reconciler.d.ts +1 -1
  29. package/lib/commonjs/sksg/Recorder/Core.d.ts +79 -0
  30. package/lib/commonjs/sksg/Recorder/Core.js +110 -0
  31. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -0
  32. package/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +18 -0
  33. package/lib/commonjs/sksg/Recorder/DrawingContext.js +105 -0
  34. package/lib/commonjs/sksg/Recorder/DrawingContext.js.map +1 -0
  35. package/lib/commonjs/sksg/Recorder/Player.d.ts +3 -0
  36. package/lib/commonjs/sksg/Recorder/Player.js +127 -0
  37. package/lib/commonjs/sksg/Recorder/Player.js.map +1 -0
  38. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +50 -0
  39. package/lib/commonjs/sksg/Recorder/Recorder.js +288 -0
  40. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -0
  41. package/lib/commonjs/sksg/Recorder/Recording.d.ts +7 -0
  42. package/lib/commonjs/sksg/Recorder/Recording.js +12 -0
  43. package/lib/commonjs/sksg/Recorder/Recording.js.map +1 -0
  44. package/lib/commonjs/sksg/Recorder/Visitor.d.ts +5 -0
  45. package/lib/commonjs/sksg/Recorder/Visitor.js +293 -0
  46. package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -0
  47. package/lib/commonjs/sksg/Recorder/commands/Box.d.ts +13 -0
  48. package/lib/commonjs/sksg/Recorder/commands/Box.js +71 -0
  49. package/lib/commonjs/sksg/Recorder/commands/Box.js.map +1 -0
  50. package/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +3 -0
  51. package/lib/commonjs/sksg/Recorder/commands/CTM.js +79 -0
  52. package/lib/commonjs/sksg/Recorder/commands/CTM.js.map +1 -0
  53. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  54. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js +76 -0
  55. package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js.map +1 -0
  56. package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +24 -0
  57. package/lib/commonjs/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
  58. package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -0
  59. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  60. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +183 -0
  61. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -0
  62. package/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +4 -0
  63. package/lib/commonjs/sksg/Recorder/commands/Paint.js +70 -0
  64. package/lib/commonjs/sksg/Recorder/commands/Paint.js.map +1 -0
  65. package/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  66. package/lib/commonjs/sksg/Recorder/commands/PathEffects.js +137 -0
  67. package/lib/commonjs/sksg/Recorder/commands/PathEffects.js.map +1 -0
  68. package/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +5 -0
  69. package/lib/commonjs/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +58 -15
  70. package/lib/commonjs/sksg/Recorder/commands/Shaders.js.map +1 -0
  71. package/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  72. package/lib/commonjs/sksg/{nodes/utils.js → utils.js} +12 -2
  73. package/lib/commonjs/sksg/utils.js.map +1 -0
  74. package/lib/module/dom/types/Common.d.ts +6 -4
  75. package/lib/module/dom/types/Common.js.map +1 -1
  76. package/lib/module/dom/types/ImageFilters.d.ts +1 -1
  77. package/lib/module/dom/types/ImageFilters.js.map +1 -1
  78. package/lib/module/dom/types/Node.d.ts +0 -2
  79. package/lib/module/dom/types/Node.js.map +1 -1
  80. package/lib/module/external/reanimated/index.d.ts +0 -1
  81. package/lib/module/external/reanimated/index.js +0 -1
  82. package/lib/module/external/reanimated/index.js.map +1 -1
  83. package/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
  84. package/lib/module/external/reanimated/renderHelpers.js +4 -42
  85. package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
  86. package/lib/module/skia/types/Paint/Paint.d.ts +1 -0
  87. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  88. package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  89. package/lib/module/skia/web/JsiSkPaint.js +3 -0
  90. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  91. package/lib/module/sksg/Container.d.ts +3 -2
  92. package/lib/module/sksg/Container.js +30 -24
  93. package/lib/module/sksg/Container.js.map +1 -1
  94. package/lib/module/sksg/HostConfig.d.ts +2 -2
  95. package/lib/module/sksg/HostConfig.js +7 -25
  96. package/lib/module/sksg/HostConfig.js.map +1 -1
  97. package/lib/module/sksg/Node.d.ts +19 -0
  98. package/lib/module/sksg/Node.js +67 -0
  99. package/lib/module/sksg/Node.js.map +1 -0
  100. package/lib/module/sksg/Reconciler.d.ts +1 -1
  101. package/lib/module/sksg/Recorder/Core.d.ts +79 -0
  102. package/lib/module/sksg/Recorder/Core.js +101 -0
  103. package/lib/module/sksg/Recorder/Core.js.map +1 -0
  104. package/lib/module/sksg/Recorder/DrawingContext.d.ts +18 -0
  105. package/lib/module/sksg/Recorder/DrawingContext.js +98 -0
  106. package/lib/module/sksg/Recorder/DrawingContext.js.map +1 -0
  107. package/lib/module/sksg/Recorder/Player.d.ts +3 -0
  108. package/lib/module/sksg/Recorder/Player.js +120 -0
  109. package/lib/module/sksg/Recorder/Player.js.map +1 -0
  110. package/lib/module/sksg/Recorder/Recorder.d.ts +50 -0
  111. package/lib/module/sksg/Recorder/Recorder.js +281 -0
  112. package/lib/module/sksg/Recorder/Recorder.js.map +1 -0
  113. package/lib/module/sksg/Recorder/Recording.d.ts +7 -0
  114. package/lib/module/sksg/Recorder/Recording.js +5 -0
  115. package/lib/module/sksg/Recorder/Recording.js.map +1 -0
  116. package/lib/module/sksg/Recorder/Visitor.d.ts +5 -0
  117. package/lib/module/sksg/Recorder/Visitor.js +285 -0
  118. package/lib/module/sksg/Recorder/Visitor.js.map +1 -0
  119. package/lib/module/sksg/Recorder/commands/Box.d.ts +13 -0
  120. package/lib/module/sksg/Recorder/commands/Box.js +63 -0
  121. package/lib/module/sksg/Recorder/commands/Box.js.map +1 -0
  122. package/lib/module/sksg/Recorder/commands/CTM.d.ts +3 -0
  123. package/lib/module/sksg/Recorder/commands/CTM.js +72 -0
  124. package/lib/module/sksg/Recorder/commands/CTM.js.map +1 -0
  125. package/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  126. package/lib/module/sksg/Recorder/commands/ColorFilters.js +67 -0
  127. package/lib/module/sksg/Recorder/commands/ColorFilters.js.map +1 -0
  128. package/lib/module/sksg/Recorder/commands/Drawing.d.ts +24 -0
  129. package/lib/module/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
  130. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -0
  131. package/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  132. package/lib/module/sksg/{nodes/imageFilters.js → Recorder/commands/ImageFilters.js} +87 -95
  133. package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -0
  134. package/lib/module/sksg/Recorder/commands/Paint.d.ts +4 -0
  135. package/lib/module/sksg/Recorder/commands/Paint.js +62 -0
  136. package/lib/module/sksg/Recorder/commands/Paint.js.map +1 -0
  137. package/lib/module/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  138. package/lib/module/sksg/Recorder/commands/PathEffects.js +128 -0
  139. package/lib/module/sksg/Recorder/commands/PathEffects.js.map +1 -0
  140. package/lib/module/sksg/Recorder/commands/Shaders.d.ts +5 -0
  141. package/lib/module/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +63 -13
  142. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -0
  143. package/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  144. package/lib/module/sksg/{nodes/utils.js → utils.js} +10 -1
  145. package/lib/module/sksg/utils.js.map +1 -0
  146. package/lib/typescript/lib/commonjs/external/reanimated/renderHelpers.d.ts +0 -1
  147. package/lib/typescript/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  148. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +4 -0
  149. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +1 -3
  150. package/lib/typescript/lib/commonjs/sksg/Node.d.ts +14 -0
  151. package/lib/typescript/lib/commonjs/sksg/Recorder/Core.d.ts +5 -0
  152. package/lib/typescript/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +17 -0
  153. package/lib/typescript/lib/commonjs/sksg/Recorder/Player.d.ts +2 -0
  154. package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +45 -0
  155. package/lib/typescript/lib/commonjs/sksg/Recorder/Recording.d.ts +5 -0
  156. package/lib/typescript/lib/commonjs/sksg/Recorder/Visitor.d.ts +27 -0
  157. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Box.d.ts +3 -0
  158. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +2 -0
  159. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +4 -0
  160. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +6 -0
  161. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +14 -0
  162. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +4 -0
  163. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +3 -0
  164. package/lib/typescript/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
  165. package/lib/typescript/lib/module/external/reanimated/index.d.ts +0 -1
  166. package/lib/typescript/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
  167. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  168. package/lib/typescript/lib/module/sksg/Container.d.ts +4 -0
  169. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +1 -3
  170. package/lib/typescript/lib/module/sksg/Node.d.ts +13 -0
  171. package/lib/typescript/lib/module/sksg/Recorder/Core.d.ts +4 -0
  172. package/lib/typescript/lib/module/sksg/Recorder/DrawingContext.d.ts +16 -0
  173. package/lib/typescript/lib/module/sksg/Recorder/Player.d.ts +1 -0
  174. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +44 -0
  175. package/lib/typescript/lib/module/sksg/Recorder/Recording.d.ts +4 -0
  176. package/lib/typescript/lib/module/sksg/Recorder/Visitor.d.ts +26 -0
  177. package/lib/typescript/lib/module/sksg/Recorder/commands/Box.d.ts +2 -0
  178. package/lib/typescript/lib/module/sksg/Recorder/commands/CTM.d.ts +1 -0
  179. package/lib/typescript/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +3 -0
  180. package/lib/typescript/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +5 -0
  181. package/lib/typescript/lib/module/sksg/Recorder/commands/Paint.d.ts +13 -0
  182. package/lib/typescript/lib/module/sksg/Recorder/commands/PathEffects.d.ts +3 -0
  183. package/lib/typescript/lib/module/sksg/Recorder/commands/Shaders.d.ts +2 -0
  184. package/lib/typescript/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
  185. package/lib/typescript/src/dom/types/Common.d.ts +6 -4
  186. package/lib/typescript/src/dom/types/ImageFilters.d.ts +1 -1
  187. package/lib/typescript/src/dom/types/Node.d.ts +0 -2
  188. package/lib/typescript/src/external/reanimated/index.d.ts +0 -1
  189. package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +0 -1
  190. package/lib/typescript/src/skia/types/Paint/Paint.d.ts +1 -0
  191. package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
  192. package/lib/typescript/src/sksg/Container.d.ts +3 -2
  193. package/lib/typescript/src/sksg/HostConfig.d.ts +2 -2
  194. package/lib/typescript/src/sksg/Node.d.ts +19 -0
  195. package/lib/typescript/src/sksg/Reconciler.d.ts +1 -1
  196. package/lib/typescript/src/sksg/Recorder/Core.d.ts +79 -0
  197. package/lib/typescript/src/sksg/Recorder/DrawingContext.d.ts +18 -0
  198. package/lib/typescript/src/sksg/Recorder/Player.d.ts +3 -0
  199. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +50 -0
  200. package/lib/typescript/src/sksg/Recorder/Recording.d.ts +7 -0
  201. package/lib/typescript/src/sksg/Recorder/Visitor.d.ts +5 -0
  202. package/lib/typescript/src/sksg/Recorder/commands/Box.d.ts +13 -0
  203. package/lib/typescript/src/sksg/Recorder/commands/CTM.d.ts +3 -0
  204. package/lib/typescript/src/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
  205. package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +24 -0
  206. package/lib/typescript/src/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
  207. package/lib/typescript/src/sksg/Recorder/commands/Paint.d.ts +4 -0
  208. package/lib/typescript/src/sksg/Recorder/commands/PathEffects.d.ts +6 -0
  209. package/lib/typescript/src/sksg/Recorder/commands/Shaders.d.ts +5 -0
  210. package/lib/typescript/src/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
  211. package/package.json +1 -1
  212. package/src/__tests__/snapshots/image-filter/test-shadow.png +0 -0
  213. package/src/dom/types/Common.ts +7 -5
  214. package/src/dom/types/ImageFilters.ts +2 -1
  215. package/src/dom/types/Node.ts +0 -4
  216. package/src/external/reanimated/index.ts +0 -1
  217. package/src/external/reanimated/renderHelpers.ts +4 -44
  218. package/src/renderer/__tests__/e2e/ColorFilters.spec.tsx +15 -0
  219. package/src/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.tsx +23 -2
  220. package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +91 -2
  221. package/src/renderer/__tests__/setup.tsx +1 -1
  222. package/src/skia/types/Paint/Paint.ts +2 -0
  223. package/src/skia/web/JsiSkPaint.ts +4 -0
  224. package/src/sksg/Container.ts +35 -29
  225. package/src/sksg/HostConfig.ts +5 -50
  226. package/src/sksg/Node.ts +105 -0
  227. package/src/sksg/Recorder/Core.ts +171 -0
  228. package/src/sksg/Recorder/DrawingContext.ts +130 -0
  229. package/src/sksg/Recorder/Player.ts +160 -0
  230. package/src/sksg/Recorder/Recorder.ts +259 -0
  231. package/src/sksg/Recorder/Recording.ts +13 -0
  232. package/src/sksg/Recorder/Visitor.ts +324 -0
  233. package/src/sksg/Recorder/commands/Box.ts +63 -0
  234. package/src/sksg/Recorder/commands/CTM.ts +72 -0
  235. package/src/sksg/Recorder/commands/ColorFilters.ts +87 -0
  236. package/src/sksg/{nodes/drawings.ts → Recorder/commands/Drawing.ts} +29 -65
  237. package/src/sksg/Recorder/commands/ImageFilters.ts +255 -0
  238. package/src/sksg/Recorder/commands/Paint.ts +77 -0
  239. package/src/sksg/Recorder/commands/PathEffects.ts +169 -0
  240. package/src/sksg/{nodes/shaders.ts → Recorder/commands/Shaders.ts} +100 -26
  241. package/src/sksg/{nodes/utils.ts → utils.ts} +14 -1
  242. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  243. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +0 -24
  244. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +0 -1
  245. package/lib/commonjs/sksg/DeclarationContext.d.ts +0 -56
  246. package/lib/commonjs/sksg/DeclarationContext.js +0 -77
  247. package/lib/commonjs/sksg/DeclarationContext.js.map +0 -1
  248. package/lib/commonjs/sksg/DrawingContext.d.ts +0 -13
  249. package/lib/commonjs/sksg/DrawingContext.js +0 -172
  250. package/lib/commonjs/sksg/DrawingContext.js.map +0 -1
  251. package/lib/commonjs/sksg/__tests__/Declarations.spec.d.ts +0 -1
  252. package/lib/commonjs/sksg/__tests__/MockDeclaration.d.ts +0 -57
  253. package/lib/commonjs/sksg/nodes/Node.d.ts +0 -7
  254. package/lib/commonjs/sksg/nodes/Node.js +0 -6
  255. package/lib/commonjs/sksg/nodes/Node.js.map +0 -1
  256. package/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -10
  257. package/lib/commonjs/sksg/nodes/colorFilters.js +0 -79
  258. package/lib/commonjs/sksg/nodes/colorFilters.js.map +0 -1
  259. package/lib/commonjs/sksg/nodes/context.d.ts +0 -3
  260. package/lib/commonjs/sksg/nodes/context.js +0 -394
  261. package/lib/commonjs/sksg/nodes/context.js.map +0 -1
  262. package/lib/commonjs/sksg/nodes/drawings.d.ts +0 -30
  263. package/lib/commonjs/sksg/nodes/drawings.js.map +0 -1
  264. package/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -17
  265. package/lib/commonjs/sksg/nodes/imageFilters.js +0 -197
  266. package/lib/commonjs/sksg/nodes/imageFilters.js.map +0 -1
  267. package/lib/commonjs/sksg/nodes/index.d.ts +0 -3
  268. package/lib/commonjs/sksg/nodes/index.js +0 -39
  269. package/lib/commonjs/sksg/nodes/index.js.map +0 -1
  270. package/lib/commonjs/sksg/nodes/paint.d.ts +0 -3
  271. package/lib/commonjs/sksg/nodes/paint.js +0 -81
  272. package/lib/commonjs/sksg/nodes/paint.js.map +0 -1
  273. package/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -11
  274. package/lib/commonjs/sksg/nodes/pathEffects.js +0 -111
  275. package/lib/commonjs/sksg/nodes/pathEffects.js.map +0 -1
  276. package/lib/commonjs/sksg/nodes/shaders.d.ts +0 -11
  277. package/lib/commonjs/sksg/nodes/shaders.js.map +0 -1
  278. package/lib/commonjs/sksg/nodes/utils.js.map +0 -1
  279. package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  280. package/lib/module/external/reanimated/useDerivedValueOnJS.js +0 -16
  281. package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +0 -1
  282. package/lib/module/sksg/DeclarationContext.d.ts +0 -56
  283. package/lib/module/sksg/DeclarationContext.js +0 -69
  284. package/lib/module/sksg/DeclarationContext.js.map +0 -1
  285. package/lib/module/sksg/DrawingContext.d.ts +0 -13
  286. package/lib/module/sksg/DrawingContext.js +0 -165
  287. package/lib/module/sksg/DrawingContext.js.map +0 -1
  288. package/lib/module/sksg/__tests__/Declarations.spec.d.ts +0 -1
  289. package/lib/module/sksg/__tests__/MockDeclaration.d.ts +0 -57
  290. package/lib/module/sksg/nodes/Node.d.ts +0 -7
  291. package/lib/module/sksg/nodes/Node.js +0 -2
  292. package/lib/module/sksg/nodes/Node.js.map +0 -1
  293. package/lib/module/sksg/nodes/colorFilters.d.ts +0 -10
  294. package/lib/module/sksg/nodes/colorFilters.js +0 -66
  295. package/lib/module/sksg/nodes/colorFilters.js.map +0 -1
  296. package/lib/module/sksg/nodes/context.d.ts +0 -3
  297. package/lib/module/sksg/nodes/context.js +0 -387
  298. package/lib/module/sksg/nodes/context.js.map +0 -1
  299. package/lib/module/sksg/nodes/drawings.d.ts +0 -30
  300. package/lib/module/sksg/nodes/drawings.js.map +0 -1
  301. package/lib/module/sksg/nodes/imageFilters.d.ts +0 -17
  302. package/lib/module/sksg/nodes/imageFilters.js.map +0 -1
  303. package/lib/module/sksg/nodes/index.d.ts +0 -3
  304. package/lib/module/sksg/nodes/index.js +0 -4
  305. package/lib/module/sksg/nodes/index.js.map +0 -1
  306. package/lib/module/sksg/nodes/paint.d.ts +0 -3
  307. package/lib/module/sksg/nodes/paint.js +0 -74
  308. package/lib/module/sksg/nodes/paint.js.map +0 -1
  309. package/lib/module/sksg/nodes/pathEffects.d.ts +0 -11
  310. package/lib/module/sksg/nodes/pathEffects.js +0 -97
  311. package/lib/module/sksg/nodes/pathEffects.js.map +0 -1
  312. package/lib/module/sksg/nodes/shaders.d.ts +0 -11
  313. package/lib/module/sksg/nodes/shaders.js.map +0 -1
  314. package/lib/module/sksg/nodes/utils.js.map +0 -1
  315. package/lib/typescript/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -2
  316. package/lib/typescript/lib/commonjs/sksg/DeclarationContext.d.ts +0 -53
  317. package/lib/typescript/lib/commonjs/sksg/DrawingContext.d.ts +0 -22
  318. package/lib/typescript/lib/commonjs/sksg/nodes/Node.d.ts +0 -1
  319. package/lib/typescript/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -8
  320. package/lib/typescript/lib/commonjs/sksg/nodes/context.d.ts +0 -2
  321. package/lib/typescript/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -12
  322. package/lib/typescript/lib/commonjs/sksg/nodes/index.d.ts +0 -1
  323. package/lib/typescript/lib/commonjs/sksg/nodes/paint.d.ts +0 -2
  324. package/lib/typescript/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -9
  325. package/lib/typescript/lib/commonjs/sksg/nodes/shaders.d.ts +0 -10
  326. package/lib/typescript/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  327. package/lib/typescript/lib/module/sksg/DeclarationContext.d.ts +0 -52
  328. package/lib/typescript/lib/module/sksg/DrawingContext.d.ts +0 -21
  329. package/lib/typescript/lib/module/sksg/nodes/Node.d.ts +0 -1
  330. package/lib/typescript/lib/module/sksg/nodes/colorFilters.d.ts +0 -7
  331. package/lib/typescript/lib/module/sksg/nodes/context.d.ts +0 -1
  332. package/lib/typescript/lib/module/sksg/nodes/imageFilters.d.ts +0 -11
  333. package/lib/typescript/lib/module/sksg/nodes/index.d.ts +0 -3
  334. package/lib/typescript/lib/module/sksg/nodes/paint.d.ts +0 -1
  335. package/lib/typescript/lib/module/sksg/nodes/pathEffects.d.ts +0 -8
  336. package/lib/typescript/lib/module/sksg/nodes/shaders.d.ts +0 -9
  337. package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
  338. package/lib/typescript/src/sksg/DeclarationContext.d.ts +0 -56
  339. package/lib/typescript/src/sksg/DrawingContext.d.ts +0 -13
  340. package/lib/typescript/src/sksg/__tests__/Declarations.spec.d.ts +0 -1
  341. package/lib/typescript/src/sksg/__tests__/MockDeclaration.d.ts +0 -57
  342. package/lib/typescript/src/sksg/nodes/Node.d.ts +0 -7
  343. package/lib/typescript/src/sksg/nodes/colorFilters.d.ts +0 -10
  344. package/lib/typescript/src/sksg/nodes/context.d.ts +0 -3
  345. package/lib/typescript/src/sksg/nodes/drawings.d.ts +0 -30
  346. package/lib/typescript/src/sksg/nodes/imageFilters.d.ts +0 -17
  347. package/lib/typescript/src/sksg/nodes/index.d.ts +0 -3
  348. package/lib/typescript/src/sksg/nodes/paint.d.ts +0 -3
  349. package/lib/typescript/src/sksg/nodes/pathEffects.d.ts +0 -11
  350. package/lib/typescript/src/sksg/nodes/shaders.d.ts +0 -11
  351. package/src/external/reanimated/useDerivedValueOnJS.ts +0 -20
  352. package/src/sksg/DeclarationContext.ts +0 -85
  353. package/src/sksg/DrawingContext.ts +0 -226
  354. package/src/sksg/__tests__/Declarations.spec.tsx +0 -235
  355. package/src/sksg/__tests__/MockDeclaration.ts +0 -138
  356. package/src/sksg/nodes/Node.ts +0 -8
  357. package/src/sksg/nodes/colorFilters.ts +0 -79
  358. package/src/sksg/nodes/context.ts +0 -412
  359. package/src/sksg/nodes/imageFilters.ts +0 -235
  360. package/src/sksg/nodes/index.ts +0 -3
  361. package/src/sksg/nodes/paint.ts +0 -75
  362. package/src/sksg/nodes/pathEffects.ts +0 -118
  363. /package/lib/typescript/lib/commonjs/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
  364. /package/lib/typescript/lib/module/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
@@ -1,197 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.makeRuntimeShaderImageFilter = exports.makeOffsetImageFilter = exports.makeMorphologyImageFilter = exports.makeDropShadowImageFilter = exports.makeBlurImageFilter = exports.declareDisplacementMapImageFilter = exports.declareBlurMaskFilter = exports.declareBlendImageFilter = exports.declareBlend = exports.composeImageFilters = exports.MorphologyOperator = void 0;
7
- var _nodes = require("../../dom/nodes");
8
- var _types = require("../../skia/types");
9
- var _DeclarationContext = require("../DeclarationContext");
10
- let MorphologyOperator = exports.MorphologyOperator = /*#__PURE__*/function (MorphologyOperator) {
11
- MorphologyOperator[MorphologyOperator["Erode"] = 0] = "Erode";
12
- MorphologyOperator[MorphologyOperator["Dilate"] = 1] = "Dilate";
13
- return MorphologyOperator;
14
- }({});
15
- const Black = Float32Array.of(0, 0, 0, 1);
16
- const MakeInnerShadow = (Skia, shadowOnly, dx, dy, sigmaX, sigmaY, color, input) => {
17
- "worklet";
18
-
19
- const sourceGraphic = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(Black, _types.BlendMode.Dst), null);
20
- const sourceAlpha = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(Black, _types.BlendMode.SrcIn), null);
21
- const f1 = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(color, _types.BlendMode.SrcOut), null);
22
- const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);
23
- const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, _types.TileMode.Decal, f2);
24
- const f4 = Skia.ImageFilter.MakeBlend(_types.BlendMode.SrcIn, sourceAlpha, f3);
25
- if (shadowOnly) {
26
- return f4;
27
- }
28
- return Skia.ImageFilter.MakeCompose(input, Skia.ImageFilter.MakeBlend(_types.BlendMode.SrcOver, sourceGraphic, f4));
29
- };
30
- const declareBlend = (ctx, props) => {
31
- "worklet";
32
-
33
- const {
34
- Skia
35
- } = ctx;
36
- const blend = _types.BlendMode[(0, _nodes.enumKey)(props.mode)];
37
- // Blend ImageFilters
38
- const imageFilters = ctx.imageFilters.popAll();
39
- if (imageFilters.length > 0) {
40
- const composer = Skia.ImageFilter.MakeBlend.bind(Skia.ImageFilter, blend);
41
- ctx.imageFilters.push((0, _DeclarationContext.composeDeclarations)(imageFilters, composer));
42
- }
43
- // Blend Shaders
44
- const shaders = ctx.shaders.popAll();
45
- if (shaders.length > 0) {
46
- const composer = Skia.Shader.MakeBlend.bind(Skia.Shader, blend);
47
- ctx.shaders.push((0, _DeclarationContext.composeDeclarations)(shaders, composer));
48
- }
49
- };
50
- exports.declareBlend = declareBlend;
51
- const composeImageFilters = (ctx, imgf1, processChildren) => {
52
- "worklet";
53
-
54
- const {
55
- Skia
56
- } = ctx;
57
- ctx.imageFilters.save();
58
- ctx.colorFilters.save();
59
- processChildren();
60
- let imgf2 = ctx.imageFilters.popAllAsOne();
61
- const cf = ctx.colorFilters.popAllAsOne();
62
- ctx.imageFilters.restore();
63
- ctx.colorFilters.restore();
64
- if (cf) {
65
- var _imgf;
66
- imgf2 = Skia.ImageFilter.MakeCompose((_imgf = imgf2) !== null && _imgf !== void 0 ? _imgf : null, Skia.ImageFilter.MakeColorFilter(cf, null));
67
- }
68
- const imgf = imgf2 ? Skia.ImageFilter.MakeCompose(imgf1, imgf2) : imgf1;
69
- ctx.imageFilters.push(imgf);
70
- };
71
- exports.composeImageFilters = composeImageFilters;
72
- const input = ctx => {
73
- "worklet";
74
-
75
- var _ctx$imageFilters$pop;
76
- return (_ctx$imageFilters$pop = ctx.imageFilters.pop()) !== null && _ctx$imageFilters$pop !== void 0 ? _ctx$imageFilters$pop : null;
77
- };
78
- const makeOffsetImageFilter = (ctx, props) => {
79
- "worklet";
80
-
81
- const {
82
- x,
83
- y
84
- } = props;
85
- return ctx.Skia.ImageFilter.MakeOffset(x, y, null);
86
- };
87
- exports.makeOffsetImageFilter = makeOffsetImageFilter;
88
- const declareDisplacementMapImageFilter = (ctx, props) => {
89
- "worklet";
90
-
91
- const {
92
- channelX,
93
- channelY,
94
- scale
95
- } = props;
96
- const shader = ctx.shaders.pop();
97
- if (!shader) {
98
- throw new Error("DisplacementMap expects a shader as child");
99
- }
100
- const map = ctx.Skia.ImageFilter.MakeShader(shader, null);
101
- const imgf = ctx.Skia.ImageFilter.MakeDisplacementMap(_types.ColorChannel[(0, _nodes.enumKey)(channelX)], _types.ColorChannel[(0, _nodes.enumKey)(channelY)], scale, map, input(ctx));
102
- ctx.imageFilters.push(imgf);
103
- };
104
- exports.declareDisplacementMapImageFilter = declareDisplacementMapImageFilter;
105
- const makeBlurImageFilter = (ctx, props) => {
106
- "worklet";
107
-
108
- const {
109
- mode,
110
- blur
111
- } = props;
112
- const sigma = (0, _nodes.processRadius)(ctx.Skia, blur);
113
- const imgf = ctx.Skia.ImageFilter.MakeBlur(sigma.x, sigma.y, _types.TileMode[(0, _nodes.enumKey)(mode)], input(ctx));
114
- return imgf;
115
- };
116
- exports.makeBlurImageFilter = makeBlurImageFilter;
117
- const makeDropShadowImageFilter = (ctx, props) => {
118
- "worklet";
119
-
120
- const {
121
- dx,
122
- dy,
123
- blur,
124
- shadowOnly,
125
- color: cl,
126
- inner
127
- } = props;
128
- const color = ctx.Skia.Color(cl);
129
- let factory;
130
- if (inner) {
131
- factory = MakeInnerShadow.bind(null, ctx.Skia, shadowOnly);
132
- } else {
133
- factory = shadowOnly ? ctx.Skia.ImageFilter.MakeDropShadowOnly.bind(ctx.Skia.ImageFilter) : ctx.Skia.ImageFilter.MakeDropShadow.bind(ctx.Skia.ImageFilter);
134
- }
135
- const imgf = factory(dx, dy, blur, blur, color, input(ctx));
136
- return imgf;
137
- };
138
- exports.makeDropShadowImageFilter = makeDropShadowImageFilter;
139
- const makeMorphologyImageFilter = (ctx, props) => {
140
- "worklet";
141
-
142
- const {
143
- operator
144
- } = props;
145
- const r = (0, _nodes.processRadius)(ctx.Skia, props.radius);
146
- let imgf;
147
- if (MorphologyOperator[(0, _nodes.enumKey)(operator)] === MorphologyOperator.Erode) {
148
- imgf = ctx.Skia.ImageFilter.MakeErode(r.x, r.y, input(ctx));
149
- } else {
150
- imgf = ctx.Skia.ImageFilter.MakeDilate(r.x, r.y, input(ctx));
151
- }
152
- return imgf;
153
- };
154
- exports.makeMorphologyImageFilter = makeMorphologyImageFilter;
155
- const makeRuntimeShaderImageFilter = (ctx, props) => {
156
- "worklet";
157
-
158
- const {
159
- source,
160
- uniforms
161
- } = props;
162
- const rtb = ctx.Skia.RuntimeShaderBuilder(source);
163
- if (uniforms) {
164
- (0, _types.processUniforms)(source, uniforms, rtb);
165
- }
166
- const imgf = ctx.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input(ctx));
167
- return imgf;
168
- };
169
- exports.makeRuntimeShaderImageFilter = makeRuntimeShaderImageFilter;
170
- const declareBlendImageFilter = (ctx, props) => {
171
- "worklet";
172
-
173
- const {
174
- mode
175
- } = props;
176
- const a = ctx.imageFilters.pop();
177
- const b = ctx.imageFilters.pop();
178
- if (!a || !b) {
179
- throw new Error("BlendImageFilter requires two image filters");
180
- }
181
- const imgf = ctx.Skia.ImageFilter.MakeBlend(mode, a, b);
182
- ctx.imageFilters.push(imgf);
183
- };
184
- exports.declareBlendImageFilter = declareBlendImageFilter;
185
- const declareBlurMaskFilter = (ctx, props) => {
186
- "worklet";
187
-
188
- const {
189
- blur,
190
- style,
191
- respectCTM
192
- } = props;
193
- const mf = ctx.Skia.MaskFilter.MakeBlur(_types.BlurStyle[(0, _nodes.enumKey)(style)], blur, respectCTM);
194
- ctx.maskFilters.push(mf);
195
- };
196
- exports.declareBlurMaskFilter = declareBlurMaskFilter;
197
- //# sourceMappingURL=imageFilters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nodes","require","_types","_DeclarationContext","MorphologyOperator","exports","Black","Float32Array","of","MakeInnerShadow","Skia","shadowOnly","dx","dy","sigmaX","sigmaY","color","input","sourceGraphic","ImageFilter","MakeColorFilter","ColorFilter","MakeBlend","BlendMode","Dst","sourceAlpha","SrcIn","f1","SrcOut","f2","MakeOffset","f3","MakeBlur","TileMode","Decal","f4","MakeCompose","SrcOver","declareBlend","ctx","props","blend","enumKey","mode","imageFilters","popAll","length","composer","bind","push","composeDeclarations","shaders","Shader","composeImageFilters","imgf1","processChildren","save","colorFilters","imgf2","popAllAsOne","cf","restore","_imgf","imgf","_ctx$imageFilters$pop","pop","makeOffsetImageFilter","x","y","declareDisplacementMapImageFilter","channelX","channelY","scale","shader","Error","map","MakeShader","MakeDisplacementMap","ColorChannel","makeBlurImageFilter","blur","sigma","processRadius","makeDropShadowImageFilter","cl","inner","Color","factory","MakeDropShadowOnly","MakeDropShadow","makeMorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","makeRuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","processUniforms","MakeRuntimeShader","declareBlendImageFilter","a","b","declareBlurMaskFilter","style","respectCTM","mf","MaskFilter","BlurStyle","maskFilters"],"sources":["imageFilters.ts"],"sourcesContent":["import { enumKey, processRadius } from \"../../dom/nodes\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n BlurImageFilterProps,\n BlurMaskFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../dom/types\";\nimport type { SkColor, Skia, SkImageFilter } from \"../../skia/types\";\nimport {\n BlendMode,\n BlurStyle,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../skia/types\";\nimport type { DeclarationContext } from \"../DeclarationContext\";\nimport { composeDeclarations } from \"../DeclarationContext\";\n\nexport enum MorphologyOperator {\n Erode,\n Dilate,\n}\n\nconst Black = Float32Array.of(0, 0, 0, 1);\n\nconst MakeInnerShadow = (\n Skia: Skia,\n shadowOnly: boolean | undefined,\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null\n) => {\n \"worklet\";\n const sourceGraphic = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.Dst),\n null\n );\n const sourceAlpha = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(Black, BlendMode.SrcIn),\n null\n );\n const f1 = Skia.ImageFilter.MakeColorFilter(\n Skia.ColorFilter.MakeBlend(color, BlendMode.SrcOut),\n null\n );\n const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);\n const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, TileMode.Decal, f2);\n const f4 = Skia.ImageFilter.MakeBlend(BlendMode.SrcIn, sourceAlpha, f3);\n if (shadowOnly) {\n return f4;\n }\n return Skia.ImageFilter.MakeCompose(\n input,\n Skia.ImageFilter.MakeBlend(BlendMode.SrcOver, sourceGraphic, f4)\n );\n};\n\nexport const declareBlend = (ctx: DeclarationContext, props: BlendProps) => {\n \"worklet\";\n const { Skia } = ctx;\n const blend = BlendMode[enumKey(props.mode as BlendProps[\"mode\"])];\n // Blend ImageFilters\n const imageFilters = ctx.imageFilters.popAll();\n if (imageFilters.length > 0) {\n const composer = Skia.ImageFilter.MakeBlend.bind(Skia.ImageFilter, blend);\n ctx.imageFilters.push(composeDeclarations(imageFilters, composer));\n }\n // Blend Shaders\n const shaders = ctx.shaders.popAll();\n if (shaders.length > 0) {\n const composer = Skia.Shader.MakeBlend.bind(Skia.Shader, blend);\n ctx.shaders.push(composeDeclarations(shaders, composer));\n }\n};\n\nexport const composeImageFilters = (\n ctx: DeclarationContext,\n imgf1: SkImageFilter,\n processChildren: () => void\n) => {\n \"worklet\";\n const { Skia } = ctx;\n ctx.imageFilters.save();\n ctx.colorFilters.save();\n processChildren();\n let imgf2 = ctx.imageFilters.popAllAsOne();\n const cf = ctx.colorFilters.popAllAsOne();\n ctx.imageFilters.restore();\n ctx.colorFilters.restore();\n if (cf) {\n imgf2 = Skia.ImageFilter.MakeCompose(\n imgf2 ?? null,\n Skia.ImageFilter.MakeColorFilter(cf, null)\n );\n }\n const imgf = imgf2 ? Skia.ImageFilter.MakeCompose(imgf1, imgf2) : imgf1;\n ctx.imageFilters.push(imgf);\n};\n\nconst input = (ctx: DeclarationContext) => {\n \"worklet\";\n return ctx.imageFilters.pop() ?? null;\n};\n\nexport const makeOffsetImageFilter = (\n ctx: DeclarationContext,\n props: OffsetImageFilterProps\n) => {\n \"worklet\";\n const { x, y } = props;\n return ctx.Skia.ImageFilter.MakeOffset(x, y, null);\n};\n\nexport const declareDisplacementMapImageFilter = (\n ctx: DeclarationContext,\n props: DisplacementMapImageFilterProps\n) => {\n \"worklet\";\n const { channelX, channelY, scale } = props;\n const shader = ctx.shaders.pop();\n if (!shader) {\n throw new Error(\"DisplacementMap expects a shader as child\");\n }\n const map = ctx.Skia.ImageFilter.MakeShader(shader, null);\n const imgf = ctx.Skia.ImageFilter.MakeDisplacementMap(\n ColorChannel[enumKey(channelX)],\n ColorChannel[enumKey(channelY)],\n scale,\n map,\n input(ctx)\n );\n ctx.imageFilters.push(imgf);\n};\n\nexport const makeBlurImageFilter = (\n ctx: DeclarationContext,\n props: BlurImageFilterProps\n) => {\n \"worklet\";\n const { mode, blur } = props;\n const sigma = processRadius(ctx.Skia, blur);\n const imgf = ctx.Skia.ImageFilter.MakeBlur(\n sigma.x,\n sigma.y,\n TileMode[enumKey(mode)],\n input(ctx)\n );\n return imgf;\n};\n\nexport const makeDropShadowImageFilter = (\n ctx: DeclarationContext,\n props: DropShadowImageFilterProps\n) => {\n \"worklet\";\n const { dx, dy, blur, shadowOnly, color: cl, inner } = props;\n const color = ctx.Skia.Color(cl);\n let factory;\n if (inner) {\n factory = MakeInnerShadow.bind(null, ctx.Skia, shadowOnly);\n } else {\n factory = shadowOnly\n ? ctx.Skia.ImageFilter.MakeDropShadowOnly.bind(ctx.Skia.ImageFilter)\n : ctx.Skia.ImageFilter.MakeDropShadow.bind(ctx.Skia.ImageFilter);\n }\n const imgf = factory(dx, dy, blur, blur, color, input(ctx));\n return imgf;\n};\n\nexport const makeMorphologyImageFilter = (\n ctx: DeclarationContext,\n props: MorphologyImageFilterProps\n) => {\n \"worklet\";\n const { operator } = props;\n const r = processRadius(ctx.Skia, props.radius);\n let imgf;\n if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {\n imgf = ctx.Skia.ImageFilter.MakeErode(r.x, r.y, input(ctx));\n } else {\n imgf = ctx.Skia.ImageFilter.MakeDilate(r.x, r.y, input(ctx));\n }\n return imgf;\n};\n\nexport const makeRuntimeShaderImageFilter = (\n ctx: DeclarationContext,\n props: RuntimeShaderImageFilterProps\n) => {\n \"worklet\";\n const { source, uniforms } = props;\n const rtb = ctx.Skia.RuntimeShaderBuilder(source);\n if (uniforms) {\n processUniforms(source, uniforms, rtb);\n }\n const imgf = ctx.Skia.ImageFilter.MakeRuntimeShader(rtb, null, input(ctx));\n return imgf;\n};\n\nexport const declareBlendImageFilter = (\n ctx: DeclarationContext,\n props: BlendImageFilterProps\n) => {\n \"worklet\";\n const { mode } = props;\n const a = ctx.imageFilters.pop();\n const b = ctx.imageFilters.pop();\n if (!a || !b) {\n throw new Error(\"BlendImageFilter requires two image filters\");\n }\n const imgf = ctx.Skia.ImageFilter.MakeBlend(mode, a, b);\n ctx.imageFilters.push(imgf);\n};\n\nexport const declareBlurMaskFilter = (\n ctx: DeclarationContext,\n props: BlurMaskFilterProps\n) => {\n \"worklet\";\n const { blur, style, respectCTM } = props;\n const mf = ctx.Skia.MaskFilter.MakeBlur(\n BlurStyle[enumKey(style)],\n blur,\n respectCTM\n );\n ctx.maskFilters.push(mf);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAaA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,mBAAA,GAAAF,OAAA;AAA4D,IAEhDG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAK9B,MAAME,KAAK,GAAGC,YAAY,CAACC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAEzC,MAAMC,eAAe,GAAGA,CACtBC,IAAU,EACVC,UAA+B,EAC/BC,EAAU,EACVC,EAAU,EACVC,MAAc,EACdC,MAAc,EACdC,KAAc,EACdC,KAA2B,KACxB;EACH,SAAS;;EACT,MAAMC,aAAa,GAAGR,IAAI,CAACS,WAAW,CAACC,eAAe,CACpDV,IAAI,CAACW,WAAW,CAACC,SAAS,CAAChB,KAAK,EAAEiB,gBAAS,CAACC,GAAG,CAAC,EAChD,IACF,CAAC;EACD,MAAMC,WAAW,GAAGf,IAAI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AI,CAAC;AAC7B,CAAC;AAAC1D,OAAA,CAAAmG,uBAAA,GAAAA,uBAAA;AAEK,MAAMG,qBAAqB,GAAGA,CACnCpE,GAAuB,EACvBC,KAA0B,KACvB;EACH,SAAS;;EACT,MAAM;IAAEwC,IAAI;IAAE4B,KAAK;IAAEC;EAAW,CAAC,GAAGrE,KAAK;EACzC,MAAMsE,EAAE,GAAGvE,GAAG,CAAC7B,IAAI,CAACqG,UAAU,CAAC/E,QAAQ,CACrCgF,gBAAS,CAAC,IAAAtE,cAAO,EAACkE,KAAK,CAAC,CAAC,EACzB5B,IAAI,EACJ6B,UACF,CAAC;EACDtE,GAAG,CAAC0E,WAAW,CAAChE,IAAI,CAAC6D,EAAE,CAAC;AAC1B,CAAC;AAACzG,OAAA,CAAAsG,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export * from "./Node";
2
- export * from "./context";
3
- export * from "./utils";
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Node = require("./Node");
7
- Object.keys(_Node).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _Node[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _Node[key];
14
- }
15
- });
16
- });
17
- var _context = require("./context");
18
- Object.keys(_context).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _context[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _context[key];
25
- }
26
- });
27
- });
28
- var _utils = require("./utils");
29
- Object.keys(_utils).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _utils[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _utils[key];
36
- }
37
- });
38
- });
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_Node","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_context","_utils"],"sources":["index.ts"],"sourcesContent":["export * from \"./Node\";\nexport * from \"./context\";\nexport * from \"./utils\";\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,QAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,QAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,QAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { PaintProps } from "../../dom/types";
2
- import type { DeclarationContext } from "../DeclarationContext";
3
- export declare const declarePaint: (ctx: DeclarationContext, props: PaintProps) => void;
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.declarePaint = void 0;
7
- var _nodes = require("../../dom/nodes");
8
- var _types = require("../../skia/types");
9
- const declarePaint = (ctx, props) => {
10
- "worklet";
11
-
12
- const {
13
- color,
14
- strokeWidth,
15
- blendMode,
16
- style,
17
- strokeJoin,
18
- strokeCap,
19
- strokeMiter,
20
- opacity,
21
- antiAlias,
22
- dither
23
- } = props;
24
- const paint = ctx.Skia.Paint();
25
- if (color !== undefined) {
26
- paint.setColor(ctx.Skia.Color(color));
27
- }
28
- if (strokeWidth !== undefined) {
29
- paint.setStrokeWidth(strokeWidth);
30
- }
31
- if (blendMode !== undefined) {
32
- paint.setBlendMode(_types.BlendMode[(0, _nodes.enumKey)(blendMode)]);
33
- }
34
- if (style !== undefined) {
35
- paint.setStyle(_types.PaintStyle[(0, _nodes.enumKey)(style)]);
36
- }
37
- if (strokeJoin !== undefined) {
38
- paint.setStrokeJoin(_types.StrokeJoin[(0, _nodes.enumKey)(strokeJoin)]);
39
- }
40
- if (strokeCap !== undefined) {
41
- paint.setStrokeCap(_types.StrokeCap[(0, _nodes.enumKey)(strokeCap)]);
42
- }
43
- if (strokeMiter !== undefined) {
44
- paint.setStrokeMiter(strokeMiter);
45
- }
46
- if (opacity !== undefined) {
47
- paint.setAlphaf(opacity);
48
- }
49
- if (antiAlias !== undefined) {
50
- paint.setAntiAlias(antiAlias);
51
- }
52
- if (dither !== undefined) {
53
- paint.setDither(dither);
54
- }
55
- //ctx.save();
56
-
57
- const colorFilter = ctx.colorFilters.popAllAsOne();
58
- const imageFilter = ctx.imageFilters.popAllAsOne();
59
- const shader = ctx.shaders.pop();
60
- const maskFilter = ctx.maskFilters.pop();
61
- const pathEffect = ctx.pathEffects.popAllAsOne();
62
- //ctx.restore();
63
- if (imageFilter) {
64
- paint.setImageFilter(imageFilter);
65
- }
66
- if (shader) {
67
- paint.setShader(shader);
68
- }
69
- if (pathEffect) {
70
- paint.setPathEffect(pathEffect);
71
- }
72
- if (colorFilter) {
73
- paint.setColorFilter(colorFilter);
74
- }
75
- if (maskFilter) {
76
- paint.setMaskFilter(maskFilter);
77
- }
78
- ctx.paints.push(paint);
79
- };
80
- exports.declarePaint = declarePaint;
81
- //# sourceMappingURL=paint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nodes","require","_types","declarePaint","ctx","props","color","strokeWidth","blendMode","style","strokeJoin","strokeCap","strokeMiter","opacity","antiAlias","dither","paint","Skia","Paint","undefined","setColor","Color","setStrokeWidth","setBlendMode","BlendMode","enumKey","setStyle","PaintStyle","setStrokeJoin","StrokeJoin","setStrokeCap","StrokeCap","setStrokeMiter","setAlphaf","setAntiAlias","setDither","colorFilter","colorFilters","popAllAsOne","imageFilter","imageFilters","shader","shaders","pop","maskFilter","maskFilters","pathEffect","pathEffects","setImageFilter","setShader","setPathEffect","setColorFilter","setMaskFilter","paints","push","exports"],"sources":["paint.ts"],"sourcesContent":["import { enumKey } from \"../../dom/nodes\";\nimport type { PaintProps } from \"../../dom/types\";\nimport { BlendMode, PaintStyle, StrokeCap, StrokeJoin } from \"../../skia/types\";\nimport type { DeclarationContext } from \"../DeclarationContext\";\n\nexport const declarePaint = (ctx: DeclarationContext, props: PaintProps) => {\n \"worklet\";\n const {\n color,\n strokeWidth,\n blendMode,\n style,\n strokeJoin,\n strokeCap,\n strokeMiter,\n opacity,\n antiAlias,\n dither,\n } = props;\n const paint = ctx.Skia.Paint();\n if (color !== undefined) {\n paint.setColor(ctx.Skia.Color(color));\n }\n if (strokeWidth !== undefined) {\n paint.setStrokeWidth(strokeWidth);\n }\n if (blendMode !== undefined) {\n paint.setBlendMode(BlendMode[enumKey(blendMode)]);\n }\n if (style !== undefined) {\n paint.setStyle(PaintStyle[enumKey(style)]);\n }\n if (strokeJoin !== undefined) {\n paint.setStrokeJoin(StrokeJoin[enumKey(strokeJoin)]);\n }\n if (strokeCap !== undefined) {\n paint.setStrokeCap(StrokeCap[enumKey(strokeCap)]);\n }\n if (strokeMiter !== undefined) {\n paint.setStrokeMiter(strokeMiter);\n }\n if (opacity !== undefined) {\n paint.setAlphaf(opacity);\n }\n if (antiAlias !== undefined) {\n paint.setAntiAlias(antiAlias);\n }\n if (dither !== undefined) {\n paint.setDither(dither);\n }\n //ctx.save();\n\n const colorFilter = ctx.colorFilters.popAllAsOne();\n const imageFilter = ctx.imageFilters.popAllAsOne();\n const shader = ctx.shaders.pop();\n const maskFilter = ctx.maskFilters.pop();\n const pathEffect = ctx.pathEffects.popAllAsOne();\n //ctx.restore();\n if (imageFilter) {\n paint.setImageFilter(imageFilter);\n }\n if (shader) {\n paint.setShader(shader);\n }\n if (pathEffect) {\n paint.setPathEffect(pathEffect);\n }\n if (colorFilter) {\n paint.setColorFilter(colorFilter);\n }\n if (maskFilter) {\n paint.setMaskFilter(maskFilter);\n }\n ctx.paints.push(paint);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAGO,MAAME,YAAY,GAAGA,CAACC,GAAuB,EAAEC,KAAiB,KAAK;EAC1E,SAAS;;EACT,MAAM;IACJC,KAAK;IACLC,WAAW;IACXC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,SAAS;IACTC,WAAW;IACXC,OAAO;IACPC,SAAS;IACTC;EACF,CAAC,GAAGV,KAAK;EACT,MAAMW,KAAK,GAAGZ,GAAG,CAACa,IAAI,CAACC,KAAK,CAAC,CAAC;EAC9B,IAAIZ,KAAK,KAAKa,SAAS,EAAE;IACvBH,KAAK,CAACI,QAAQ,CAAChB,GAAG,CAACa,IAAI,CAACI,KAAK,CAACf,KAAK,CAAC,CAAC;EACvC;EACA,IA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AACyC,WAAW,CAACF,GAAG,CAAC,CAAC;EACxC,MAAMG,UAAU,GAAG1C,GAAG,CAAC2C,WAAW,CAACT,WAAW,CAAC,CAAC;EAChD;EACA,IAAIC,WAAW,EAAE;IACfvB,KAAK,CAACgC,cAAc,CAACT,WAAW,CAAC;EACnC;EACA,IAAIE,MAAM,EAAE;IACVzB,KAAK,CAACiC,SAAS,CAACR,MAAM,CAAC;EACzB;EACA,IAAIK,UAAU,EAAE;IACd9B,KAAK,CAACkC,aAAa,CAACJ,UAAU,CAAC;EACjC;EACA,IAAIV,WAAW,EAAE;IACfpB,KAAK,CAACmC,cAAc,CAACf,WAAW,CAAC;EACnC;EACA,IAAIQ,UAAU,EAAE;IACd5B,KAAK,CAACoC,aAAa,CAACR,UAAU,CAAC;EACjC;EACAxC,GAAG,CAACiD,MAAM,CAACC,IAAI,CAACtC,KAAK,CAAC;AACxB,CAAC;AAACuC,OAAA,CAAApD,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "../../dom/types";
2
- import type { SkPathEffect } from "../../skia/types";
3
- import { type DeclarationContext } from "../DeclarationContext";
4
- export declare const composePathEffects: (ctx: DeclarationContext, pe: SkPathEffect, processChildren: () => void) => void;
5
- export declare const makeDiscretePathEffect: (ctx: DeclarationContext, props: DiscretePathEffectProps) => SkPathEffect;
6
- export declare const makePath2DPathEffect: (ctx: DeclarationContext, props: Path2DPathEffectProps) => SkPathEffect;
7
- export declare const makeDashPathEffect: (ctx: DeclarationContext, props: DashPathEffectProps) => SkPathEffect;
8
- export declare const makeCornerPathEffect: (ctx: DeclarationContext, props: CornerPathEffectProps) => SkPathEffect;
9
- export declare const declareSumPathEffect: (ctx: DeclarationContext) => void;
10
- export declare const makeLine2DPathEffect: (ctx: DeclarationContext, props: Line2DPathEffectProps) => SkPathEffect;
11
- export declare const makePath1DPathEffect: (ctx: DeclarationContext, props: Path1DPathEffectProps) => SkPathEffect;
@@ -1,111 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.makePath2DPathEffect = exports.makePath1DPathEffect = exports.makeLine2DPathEffect = exports.makeDiscretePathEffect = exports.makeDashPathEffect = exports.makeCornerPathEffect = exports.declareSumPathEffect = exports.composePathEffects = void 0;
7
- var _nodes = require("../../dom/nodes");
8
- var _types = require("../../skia/types");
9
- var _DeclarationContext = require("../DeclarationContext");
10
- const composePathEffects = (ctx, pe, processChildren) => {
11
- "worklet";
12
-
13
- const {
14
- Skia
15
- } = ctx;
16
- ctx.pathEffects.save();
17
- processChildren();
18
- const pe1 = ctx.pathEffects.popAllAsOne();
19
- ctx.pathEffects.restore();
20
- ctx.pathEffects.push(pe1 ? Skia.PathEffect.MakeCompose(pe, pe1) : pe);
21
- };
22
- exports.composePathEffects = composePathEffects;
23
- const makeDiscretePathEffect = (ctx, props) => {
24
- "worklet";
25
-
26
- const {
27
- length,
28
- deviation,
29
- seed
30
- } = props;
31
- return ctx.Skia.PathEffect.MakeDiscrete(length, deviation, seed);
32
- };
33
- exports.makeDiscretePathEffect = makeDiscretePathEffect;
34
- const makePath2DPathEffect = (ctx, props) => {
35
- "worklet";
36
-
37
- const {
38
- matrix
39
- } = props;
40
- const path = (0, _nodes.processPath)(ctx.Skia, props.path);
41
- const pe = ctx.Skia.PathEffect.MakePath2D(matrix, path);
42
- if (pe === null) {
43
- throw new Error("Path2DPathEffect: invalid path");
44
- }
45
- return pe;
46
- };
47
- exports.makePath2DPathEffect = makePath2DPathEffect;
48
- const makeDashPathEffect = (ctx, props) => {
49
- "worklet";
50
-
51
- const {
52
- intervals,
53
- phase
54
- } = props;
55
- const pe = ctx.Skia.PathEffect.MakeDash(intervals, phase);
56
- return pe;
57
- };
58
- exports.makeDashPathEffect = makeDashPathEffect;
59
- const makeCornerPathEffect = (ctx, props) => {
60
- "worklet";
61
-
62
- const {
63
- r
64
- } = props;
65
- const pe = ctx.Skia.PathEffect.MakeCorner(r);
66
- if (pe === null) {
67
- throw new Error("CornerPathEffect: couldn't create path effect");
68
- }
69
- return pe;
70
- };
71
- exports.makeCornerPathEffect = makeCornerPathEffect;
72
- const declareSumPathEffect = ctx => {
73
- "worklet";
74
-
75
- // Note: decorateChildren functionality needs to be handled differently
76
- const pes = ctx.pathEffects.popAll();
77
- const pe = (0, _DeclarationContext.composeDeclarations)(pes, ctx.Skia.PathEffect.MakeSum.bind(ctx.Skia.PathEffect));
78
- ctx.pathEffects.push(pe);
79
- };
80
- exports.declareSumPathEffect = declareSumPathEffect;
81
- const makeLine2DPathEffect = (ctx, props) => {
82
- "worklet";
83
-
84
- const {
85
- width,
86
- matrix
87
- } = props;
88
- const pe = ctx.Skia.PathEffect.MakeLine2D(width, matrix);
89
- if (pe === null) {
90
- throw new Error("Line2DPathEffect: could not create path effect");
91
- }
92
- return pe;
93
- };
94
- exports.makeLine2DPathEffect = makeLine2DPathEffect;
95
- const makePath1DPathEffect = (ctx, props) => {
96
- "worklet";
97
-
98
- const {
99
- advance,
100
- phase,
101
- style
102
- } = props;
103
- const path = (0, _nodes.processPath)(ctx.Skia, props.path);
104
- const pe = ctx.Skia.PathEffect.MakePath1D(path, advance, phase, _types.Path1DEffectStyle[(0, _nodes.enumKey)(style)]);
105
- if (pe === null) {
106
- throw new Error("Path1DPathEffect: could not create path effect");
107
- }
108
- return pe;
109
- };
110
- exports.makePath1DPathEffect = makePath1DPathEffect;
111
- //# sourceMappingURL=pathEffects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nodes","require","_types","_DeclarationContext","composePathEffects","ctx","pe","processChildren","Skia","pathEffects","save","pe1","popAllAsOne","restore","push","PathEffect","MakeCompose","exports","makeDiscretePathEffect","props","length","deviation","seed","MakeDiscrete","makePath2DPathEffect","matrix","path","processPath","MakePath2D","Error","makeDashPathEffect","intervals","phase","MakeDash","makeCornerPathEffect","r","MakeCorner","declareSumPathEffect","pes","popAll","composeDeclarations","MakeSum","bind","makeLine2DPathEffect","width","MakeLine2D","makePath1DPathEffect","advance","style","MakePath1D","Path1DEffectStyle","enumKey"],"sources":["pathEffects.ts"],"sourcesContent":["import { enumKey, processPath } from \"../../dom/nodes\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../dom/types\";\nimport type { SkPathEffect } from \"../../skia/types\";\nimport { Path1DEffectStyle } from \"../../skia/types\";\nimport {\n composeDeclarations,\n type DeclarationContext,\n} from \"../DeclarationContext\";\n\nexport const composePathEffects = (\n ctx: DeclarationContext,\n pe: SkPathEffect,\n processChildren: () => void\n) => {\n \"worklet\";\n const { Skia } = ctx;\n ctx.pathEffects.save();\n processChildren();\n const pe1 = ctx.pathEffects.popAllAsOne();\n ctx.pathEffects.restore();\n ctx.pathEffects.push(pe1 ? Skia.PathEffect.MakeCompose(pe, pe1) : pe);\n};\n\nexport const makeDiscretePathEffect = (\n ctx: DeclarationContext,\n props: DiscretePathEffectProps\n) => {\n \"worklet\";\n const { length, deviation, seed } = props;\n return ctx.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n};\n\nexport const makePath2DPathEffect = (\n ctx: DeclarationContext,\n props: Path2DPathEffectProps\n) => {\n \"worklet\";\n const { matrix } = props;\n const path = processPath(ctx.Skia, props.path);\n const pe = ctx.Skia.PathEffect.MakePath2D(matrix, path);\n if (pe === null) {\n throw new Error(\"Path2DPathEffect: invalid path\");\n }\n return pe;\n};\n\nexport const makeDashPathEffect = (\n ctx: DeclarationContext,\n props: DashPathEffectProps\n) => {\n \"worklet\";\n const { intervals, phase } = props;\n const pe = ctx.Skia.PathEffect.MakeDash(intervals, phase);\n return pe;\n};\n\nexport const makeCornerPathEffect = (\n ctx: DeclarationContext,\n props: CornerPathEffectProps\n) => {\n \"worklet\";\n const { r } = props;\n const pe = ctx.Skia.PathEffect.MakeCorner(r);\n if (pe === null) {\n throw new Error(\"CornerPathEffect: couldn't create path effect\");\n }\n return pe;\n};\n\nexport const declareSumPathEffect = (ctx: DeclarationContext) => {\n \"worklet\";\n // Note: decorateChildren functionality needs to be handled differently\n const pes = ctx.pathEffects.popAll();\n const pe = composeDeclarations(\n pes,\n ctx.Skia.PathEffect.MakeSum.bind(ctx.Skia.PathEffect)\n );\n ctx.pathEffects.push(pe);\n};\n\nexport const makeLine2DPathEffect = (\n ctx: DeclarationContext,\n props: Line2DPathEffectProps\n) => {\n \"worklet\";\n const { width, matrix } = props;\n const pe = ctx.Skia.PathEffect.MakeLine2D(width, matrix);\n if (pe === null) {\n throw new Error(\"Line2DPathEffect: could not create path effect\");\n }\n return pe;\n};\n\nexport const makePath1DPathEffect = (\n ctx: DeclarationContext,\n props: Path1DPathEffectProps\n) => {\n \"worklet\";\n const { advance, phase, style } = props;\n const path = processPath(ctx.Skia, props.path);\n const pe = ctx.Skia.PathEffect.MakePath1D(\n path,\n advance,\n phase,\n Path1DEffectStyle[enumKey(style)]\n );\n if (pe === null) {\n throw new Error(\"Path1DPathEffect: could not create path effect\");\n }\n return pe;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAKO,MAAMG,kBAAkB,GAAGA,CAChCC,GAAuB,EACvBC,EAAgB,EAChBC,eAA2B,KACxB;EACH,SAAS;;EACT,MAAM;IAAEC;EAAK,CAAC,GAAGH,GAAG;EACpBA,GAAG,CAACI,WAAW,CAACC,IAAI,CAAC,CAAC;EACtBH,eAAe,CAAC,CAAC;EACjB,MAAMI,GAAG,GAAGN,GAAG,CAACI,WAAW,CAACG,WAAW,CAAC,CAAC;EACzCP,GAAG,CAACI,WAAW,CAACI,OAAO,CAAC,CAAC;EACzBR,GAAG,CAACI,WAAW,CAACK,IAAI,CAACH,GAAG,GAA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vBc,KAA4B,KACzB;EACH,SAAS;;EACT,MAAM;IAAE4B,OAAO;IAAEf,KAAK;IAAEgB;EAAM,CAAC,GAAG7B,KAAK;EACvC,MAAMO,IAAI,GAAG,IAAAC,kBAAW,EAACtB,GAAG,CAACG,IAAI,EAAEW,KAAK,CAACO,IAAI,CAAC;EAC9C,MAAMpB,EAAE,GAAGD,GAAG,CAACG,IAAI,CAACO,UAAU,CAACkC,UAAU,CACvCvB,IAAI,EACJqB,OAAO,EACPf,KAAK,EACLkB,wBAAiB,CAAC,IAAAC,cAAO,EAACH,KAAK,CAAC,CAClC,CAAC;EACD,IAAI1C,EAAE,KAAK,IAAI,EAAE;IACf,MAAM,IAAIuB,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA,OAAOvB,EAAE;AACX,CAAC;AAACW,OAAA,CAAA6B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import type { ColorProps, FractalNoiseProps, ImageShaderProps, LinearGradientProps, RadialGradientProps, ShaderProps, SweepGradientProps, TurbulenceProps, TwoPointConicalGradientProps } from "../../dom/types";
2
- import type { DeclarationContext } from "../DeclarationContext";
3
- export declare const declareShader: (ctx: DeclarationContext, props: ShaderProps) => void;
4
- export declare const declareColorShader: (ctx: DeclarationContext, props: ColorProps) => void;
5
- export declare const declareFractalNoiseShader: (ctx: DeclarationContext, props: FractalNoiseProps) => void;
6
- export declare const declareTwoPointConicalGradientShader: (ctx: DeclarationContext, props: TwoPointConicalGradientProps) => void;
7
- export declare const declareRadialGradientShader: (ctx: DeclarationContext, props: RadialGradientProps) => void;
8
- export declare const declareSweepGradientShader: (ctx: DeclarationContext, props: SweepGradientProps) => void;
9
- export declare const declareLinearGradientShader: (ctx: DeclarationContext, props: LinearGradientProps) => void;
10
- export declare const declareTurbulenceShader: (ctx: DeclarationContext, props: TurbulenceProps) => void;
11
- export declare const declareImageShader: (ctx: DeclarationContext, props: ImageShaderProps) => void;
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nodes","require","_types","declareShader","ctx","props","source","uniforms","transform","m3","Skia","Matrix","processTransformProps","shader","makeShaderWithChildren","processUniforms","shaders","popAll","push","exports","declareColorShader","color","Shader","MakeColor","Color","declareFractalNoiseShader","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeFractalNoise","declareTwoPointConicalGradientShader","startR","endR","start","end","colors","positions","mode","localMatrix","flags","processGradientProps","MakeTwoPointConicalGradient","declareRadialGradientShader","c","r","MakeRadialGradient","declareSweepGradientShader","MakeSweepGradient","x","y","declareLinearGradientShader","MakeLinearGradient","declareTurbulenceShader","MakeTurbulence","declareImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","getRect","rects","fitRects","width","height","sx","sy","rect2rect","src","dst","translate","translateX","translateY","scale","scaleX","scaleY","lm","concat","makeShaderOptions","TileMode","enumKey","FilterMode","MipmapMode"],"sources":["shaders.ts"],"sourcesContent":["import {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../../dom/nodes\";\nimport type {\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../dom/types\";\nimport {\n FilterMode,\n MipmapMode,\n processUniforms,\n TileMode,\n} from \"../../skia/types\";\nimport type { DeclarationContext } from \"../DeclarationContext\";\n\nexport const declareShader = (ctx: DeclarationContext, props: ShaderProps) => {\n \"worklet\";\n const { source, uniforms, ...transform } = props;\n const m3 = ctx.Skia.Matrix();\n processTransformProps(m3, transform);\n const shader = source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n ctx.shaders.popAll(),\n m3\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareColorShader = (\n ctx: DeclarationContext,\n props: ColorProps\n) => {\n \"worklet\";\n const { color } = props;\n const shader = ctx.Skia.Shader.MakeColor(ctx.Skia.Color(color));\n ctx.shaders.push(shader);\n};\n\nexport const declareFractalNoiseShader = (\n ctx: DeclarationContext,\n props: FractalNoiseProps\n) => {\n \"worklet\";\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = props;\n const shader = ctx.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareTwoPointConicalGradientShader = (\n ctx: DeclarationContext,\n props: TwoPointConicalGradientProps\n) => {\n \"worklet\";\n const { startR, endR, start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareRadialGradientShader = (\n ctx: DeclarationContext,\n props: RadialGradientProps\n) => {\n \"worklet\";\n const { c, r } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareSweepGradientShader = (\n ctx: DeclarationContext,\n props: SweepGradientProps\n) => {\n \"worklet\";\n const { c, start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareLinearGradientShader = (\n ctx: DeclarationContext,\n props: LinearGradientProps\n) => {\n \"worklet\";\n const { start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareTurbulenceShader = (\n ctx: DeclarationContext,\n props: TurbulenceProps\n) => {\n \"worklet\";\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = props;\n const shader = ctx.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n ctx.shaders.push(shader);\n};\n\nexport const declareImageShader = (\n ctx: DeclarationContext,\n props: ImageShaderProps\n) => {\n \"worklet\";\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = props;\n if (!image) {\n return;\n }\n\n const rct = getRect(ctx.Skia, imageShaderProps);\n const m3 = ctx.Skia.Matrix();\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const [x, y, sx, sy] = rect2rect(rects.src, rects.dst);\n m3.translate(x.translateX, y.translateY);\n m3.scale(sx.scaleX, sy.scaleY);\n }\n const lm = ctx.Skia.Matrix();\n lm.concat(m3);\n processTransformProps(lm, imageShaderProps);\n const shader = image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n ctx.shaders.push(shader);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAmBA,IAAAC,MAAA,GAAAD,OAAA;AAQO,MAAME,aAAa,GAAGA,CAACC,GAAuB,EAAEC,KAAkB,KAAK;EAC5E,SAAS;;EACT,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EAChD,MAAMI,EAAE,GAAGL,GAAG,CAACM,IAAI,CAACC,MAAM,CAAC,CAAC;EAC5B,IAAAC,4BAAqB,EAACH,EAAE,EAAED,SAAS,CAAC;EACpC,MAAMK,MAAM,GAAGP,MAAM,CAACQ,sBAAsB,CAC1C,IAAAC,sBAAe,EAACT,MAAM,EAAEC,QAAQ,CAAC,EACjCH,GAAG,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EAAE,CAAC;EACb,IAAAG,4BAAqB,EAACsE,EAAE,EAAElB,gBAAgB,CAAC;EAC3C,MAAMnD,MAAM,GAAG8C,KAAK,CAACyB,iBAAiB,CACpCC,eAAQ,CAAC,IAAAC,cAAO,EAAC1B,EAAE,CAAC,CAAC,EACrByB,eAAQ,CAAC,IAAAC,cAAO,EAACzB,EAAE,CAAC,CAAC,EACrB0B,iBAAU,CAAC,IAAAD,cAAO,EAACxB,EAAE,CAAC,CAAC,EACvB0B,iBAAU,CAAC,IAAAF,cAAO,EAACvB,EAAE,CAAC,CAAC,EACvBmB,EACF,CAAC;EACD9E,GAAG,CAACY,OAAO,CAACE,IAAI,CAACL,MAAM,CAAC;AAC1B,CAAC;AAACM,OAAA,CAAAsC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_typeddash","require","isSharedValue","value","_isReanimatedSharedValue","exports","materialize","props","result","Object","assign","mapKeys","forEach","key"],"sources":["utils.ts"],"sourcesContent":["import type { SharedValue } from \"react-native-reanimated\";\n\nimport { mapKeys } from \"../../renderer/typeddash\";\n\nexport const isSharedValue = <T = unknown>(\n value: unknown\n): value is SharedValue<T> => {\n \"worklet\";\n // We cannot use `in` operator here because `value` could be a HostObject and therefore we cast.\n return (value as Record<string, unknown>)?._isReanimatedSharedValue === true;\n};\n\nexport const materialize = <T extends object>(props: T) => {\n \"worklet\";\n const result: T = Object.assign({}, props);\n mapKeys(result).forEach((key) => {\n const value = result[key];\n if (isSharedValue(value)) {\n result[key] = value.value as never;\n }\n });\n return result;\n};\n"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAEO,MAAMC,aAAa,GACxBC,KAAc,IACc;EAC5B,SAAS;;EACT;EACA,OAAO,CAACA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAA8BC,wBAAwB,MAAK,IAAI;AAC9E,CAAC;AAACC,OAAA,CAAAH,aAAA,GAAAA,aAAA;AAEK,MAAMI,WAAW,GAAsBC,KAAQ,IAAK;EACzD,SAAS;;EACT,MAAMC,MAAS,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEH,KAAK,CAAC;EAC1C,IAAAI,kBAAO,EAACH,MAAM,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAK;IAC/B,MAAMV,KAAK,GAAGK,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIX,aAAa,CAACC,KAAK,CAAC,EAAE;MACxBK,MAAM,CAACK,GAAG,CAAC,GAAGV,KAAK,CAACA,KAAc;IACpC;EACF,CAAC,CAAC;EACF,OAAOK,MAAM;AACf,CAAC;AAACH,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const useDerivedValueOnJS: (fn: () => any, deps: unknown[]) => import("react-native-reanimated").SharedValue<any>;
@@ -1,16 +0,0 @@
1
- import { useEffect, useMemo } from "react";
2
- import Rea from "./ReanimatedProxy";
3
- export const useDerivedValueOnJS = (fn, deps) => {
4
- const init = useMemo(() => fn(), [fn]);
5
- const value = Rea.useSharedValue(init);
6
- useEffect(() => {
7
- const mapperId = Rea.startMapper(() => {
8
- "worklet";
9
-
10
- Rea.runOnJS(fn)();
11
- }, deps);
12
- return () => Rea.stopMapper(mapperId);
13
- }, [deps, fn]);
14
- return value;
15
- };
16
- //# sourceMappingURL=useDerivedValueOnJS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useMemo","Rea","useDerivedValueOnJS","fn","deps","init","value","useSharedValue","mapperId","startMapper","runOnJS","stopMapper"],"sources":["useDerivedValueOnJS.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport Rea from \"./ReanimatedProxy\";\n\nexport const useDerivedValueOnJS = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fn: () => any,\n deps: unknown[]\n) => {\n const init = useMemo(() => fn(), [fn]);\n const value = Rea.useSharedValue(init);\n useEffect(() => {\n const mapperId = Rea.startMapper(() => {\n \"worklet\";\n Rea.runOnJS(fn)();\n }, deps);\n return () => Rea.stopMapper(mapperId);\n }, [deps, fn]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAE1C,OAAOC,GAAG,MAAM,mBAAmB;AAEnC,OAAO,MAAMC,mBAAmB,GAAGA,CAEjCC,EAAa,EACbC,IAAe,KACZ;EACH,MAAMC,IAAI,GAAGL,OAAO,CAAC,MAAMG,EAAE,CAAC,CAAC,EAAE,CAACA,EAAE,CAAC,CAAC;EACtC,MAAMG,KAAK,GAAGL,GAAG,CAACM,cAAc,CAACF,IAAI,CAAC;EACtCN,SAAS,CAAC,MAAM;IACd,MAAMS,QAAQ,GAAGP,GAAG,CAACQ,WAAW,CAAC,MAAM;MACrC,SAAS;;MACTR,GAAG,CAACS,OAAO,CAACP,EAAE,CAAC,CAAC,CAAC;IACnB,CAAC,EAAEC,IAAI,CAAC;IACR,OAAO,MAAMH,GAAG,CAACU,UAAU,CAACH,QAAQ,CAAC;EACvC,CAAC,EAAE,CAACJ,IAAI,EAAED,EAAE,CAAC,CAAC;EACd,OAAOG,KAAK;AACd,CAAC","ignoreList":[]}