@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
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.drawVertices = exports.drawTextPath = exports.drawTextBlob = exports.drawText = exports.drawRect = exports.drawRRect = exports.drawPoints = exports.drawPicture = exports.drawPath = exports.drawPatch = exports.drawParagraph = exports.drawOval = exports.drawLine = exports.drawImageSVG = exports.drawImage = exports.drawGlyphs = exports.drawFill = exports.drawDiffRect = exports.drawCircle = exports.drawBox = exports.drawAtlas = void 0;
7
- var _nodes = require("../../dom/nodes");
8
- var _processors = require("../../renderer/processors");
9
- var _types = require("../../skia/types");
10
- var _utils = require("./utils");
7
+ var _nodes = require("../../../dom/nodes");
8
+ var _processors = require("../../../renderer/processors");
9
+ var _types = require("../../../skia/types");
10
+ var _utils = require("../../utils");
11
11
  const drawLine = (ctx, props) => {
12
12
  "worklet";
13
13
 
@@ -395,4 +395,4 @@ const drawFill = (ctx, _props) => {
395
395
  ctx.canvas.drawPaint(ctx.paint);
396
396
  };
397
397
  exports.drawFill = drawFill;
398
- //# sourceMappingURL=drawings.js.map
398
+ //# sourceMappingURL=Drawing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_nodes","require","_processors","_types","_utils","drawLine","ctx","props","p1","p2","canvas","x","y","paint","exports","drawOval","rect","processRect","Skia","drawBox","children","box","defaultBox","opacity","getAlphaf","isRRect","RRectXY","shadows","map","node","type","NodeType","BoxShadow","materialize","filter","n","shadow","inner","color","blur","spread","dx","dy","lPaint","Paint","setColor","Color","setAlphaf","setMaskFilter","MaskFilter","MakeBlur","BlurStyle","Normal","drawRRect","inflate","delta","Point","Math","abs","save","clipRRect","ClipOp","Intersect","deflate","outer","drawDRRect","restore","drawImage","image","_props$fit","fit","src","dst","fitRects","width","height","drawImageRect","drawPoints","points","mode","PointMode","enumKey","drawVertices","textures","colors","indices","blendMode","vertexMode","VertexMode","Triangles","vertices","MakeVertices","c","undefined","defaultBlendMode","BlendMode","DstOver","SrcOver","blend","drawDiffRect","drawTextPath","path","processPath","font","initialOffset","text","ids","getGlyphIDs","widths","getGlyphWidths","rsx","meas","ContourMeasureIter","cont","next","dist","i","length","substring","p","t","getPosTan","adjustedX","adjustedY","push","RSXform","derived","TextBlob","MakeFromRSXform","drawTextBlob","drawText","drawPatch","texture","patch","pos","c2","c1","drawPath","start","trimStart","end","trimEnd","fillType","stroke","pathProps","saturate","hasStartOffset","hasEndOffset","hasStrokeOptions","hasFillType","willMutatePath","pristinePath","copy","setFillType","FillType","trim","drawRect","processRRect","blob","drawGlyphs","glyphs","reduce","acc","glyph","id","positions","drawImageSVG","svg","translate","drawSvg","drawParagraph","paragraph","layout","drawPicture","picture","drawAtlas","sprites","transforms","drawCircle","processCircle","r","drawFill","_props","drawPaint"],"sources":["Drawing.ts"],"sourcesContent":["import {\n deflate,\n enumKey,\n fitRects,\n inflate,\n NodeType,\n processCircle,\n processPath,\n processRect,\n processRRect,\n} from \"../../../dom/nodes\";\nimport type {\n AtlasProps,\n BoxProps,\n BoxShadowProps,\n CircleProps,\n DiffRectProps,\n DrawingNodeProps,\n GlyphsProps,\n ImageProps,\n ImageSVGProps,\n LineProps,\n OvalProps,\n ParagraphProps,\n PatchProps,\n PathProps,\n PictureProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextBlobProps,\n TextPathProps,\n TextProps,\n VerticesProps,\n} from \"../../../dom/types\";\nimport { saturate } from \"../../../renderer/processors\";\nimport type { SkPoint, SkRSXform } from \"../../../skia/types\";\nimport {\n BlendMode,\n BlurStyle,\n ClipOp,\n FillType,\n isRRect,\n PointMode,\n VertexMode,\n} from \"../../../skia/types\";\nimport type { Node } from \"../../Node\";\nimport { materialize } from \"../../utils\";\nimport type { DrawingContext } from \"../DrawingContext\";\n\nexport const drawLine = (ctx: DrawingContext, props: LineProps) => {\n \"worklet\";\n const { p1, p2 } = props;\n ctx.canvas.drawLine(p1.x, p1.y, p2.x, p2.y, ctx.paint);\n};\n\nexport const drawOval = (ctx: DrawingContext, props: OvalProps) => {\n \"worklet\";\n const rect = processRect(ctx.Skia, props);\n ctx.canvas.drawOval(rect, ctx.paint);\n};\n\nexport const drawBox = (\n ctx: DrawingContext,\n props: BoxProps,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n children: Node<any>[]\n) => {\n \"worklet\";\n const { paint, Skia, canvas } = ctx;\n const { box: defaultBox } = props;\n const opacity = paint.getAlphaf();\n const box = isRRect(defaultBox) ? defaultBox : Skia.RRectXY(defaultBox, 0, 0);\n const shadows = children\n .map((node) => {\n if (node.type === NodeType.BoxShadow) {\n return materialize(node.props);\n }\n return null;\n })\n .filter((n): n is BoxShadowProps => n !== null);\n shadows\n .filter((shadow) => !shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const lPaint = Skia.Paint();\n lPaint.setColor(Skia.Color(color));\n lPaint.setAlphaf(paint.getAlphaf() * opacity);\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n canvas.drawRRect(inflate(Skia, box, spread, spread, dx, dy), lPaint);\n });\n\n canvas.drawRRect(box, paint);\n\n shadows\n .filter((shadow) => shadow.inner)\n .map((shadow) => {\n const { color = \"black\", blur, spread = 0, dx = 0, dy = 0 } = shadow;\n const delta = Skia.Point(10 + Math.abs(dx), 10 + Math.abs(dy));\n canvas.save();\n canvas.clipRRect(box, ClipOp.Intersect, false);\n const lPaint = Skia.Paint();\n lPaint.setColor(Skia.Color(color));\n lPaint.setAlphaf(paint.getAlphaf() * opacity);\n\n lPaint.setMaskFilter(\n Skia.MaskFilter.MakeBlur(BlurStyle.Normal, blur, true)\n );\n const inner = deflate(Skia, box, spread, spread, dx, dy);\n const outer = inflate(Skia, box, delta.x, delta.y);\n canvas.drawDRRect(outer, inner, lPaint);\n canvas.restore();\n });\n};\n\nexport const drawImage = (ctx: DrawingContext, props: ImageProps) => {\n \"worklet\";\n const { image } = props;\n if (image) {\n const fit = props.fit ?? \"contain\";\n const rect = processRect(ctx.Skia, props);\n const { src, dst } = fitRects(\n fit,\n {\n x: 0,\n y: 0,\n width: image.width(),\n height: image.height(),\n },\n rect\n );\n ctx.canvas.drawImageRect(image, src, dst, ctx.paint);\n }\n};\n\nexport const drawPoints = (ctx: DrawingContext, props: PointsProps) => {\n \"worklet\";\n const { points, mode } = props;\n ctx.canvas.drawPoints(PointMode[enumKey(mode)], points, ctx.paint);\n};\n\nexport const drawVertices = (ctx: DrawingContext, props: VerticesProps) => {\n \"worklet\";\n const { mode, textures, colors, indices, blendMode } = props;\n const vertexMode = mode ? VertexMode[enumKey(mode)] : VertexMode.Triangles;\n const vertices = ctx.Skia.MakeVertices(\n vertexMode,\n props.vertices,\n textures,\n colors ? colors.map((c) => ctx.Skia.Color(c)) : undefined,\n indices\n );\n const defaultBlendMode = colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const blend = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n\n ctx.canvas.drawVertices(vertices, blend, ctx.paint);\n};\n\nexport const drawDiffRect = (ctx: DrawingContext, props: DiffRectProps) => {\n \"worklet\";\n const { outer, inner } = props;\n ctx.canvas.drawDRRect(outer, inner, ctx.paint);\n};\n\nexport const drawTextPath = (ctx: DrawingContext, props: TextPathProps) => {\n \"worklet\";\n const path = processPath(ctx.Skia, props.path);\n const { font, initialOffset } = props;\n if (font) {\n let { text } = props;\n const ids = font.getGlyphIDs(text);\n const widths = font.getGlyphWidths(ids);\n const rsx: SkRSXform[] = [];\n const meas = ctx.Skia.ContourMeasureIter(path, false, 1);\n let cont = meas.next();\n let dist = initialOffset;\n for (let i = 0; i < text.length && cont; i++) {\n const width = widths[i];\n dist += width / 2;\n if (dist > cont.length()) {\n // jump to next contour\n cont = meas.next();\n if (!cont) {\n // We have come to the end of the path - terminate the string\n // right here.\n text = text.substring(0, i);\n break;\n }\n dist = width / 2;\n }\n // Gives us the (x, y) coordinates as well as the cos/sin of the tangent\n // line at that position.\n const [p, t] = cont.getPosTan(dist);\n const adjustedX = p.x - (width / 2) * t.x;\n const adjustedY = p.y - (width / 2) * t.y;\n rsx.push(ctx.Skia.RSXform(t.x, t.y, adjustedX, adjustedY));\n dist += width / 2;\n }\n const derived = ctx.Skia.TextBlob.MakeFromRSXform(text, rsx, font);\n ctx.canvas.drawTextBlob(derived, 0, 0, ctx.paint);\n }\n};\n\nexport const drawText = (ctx: DrawingContext, props: TextProps) => {\n \"worklet\";\n const { text, x, y, font } = props;\n if (font != null) {\n ctx.canvas.drawText(text, x, y, ctx.paint, font);\n }\n};\n\nexport const drawPatch = (ctx: DrawingContext, props: PatchProps) => {\n \"worklet\";\n const { texture, blendMode, patch } = props;\n const defaultBlendMode = props.colors ? BlendMode.DstOver : BlendMode.SrcOver;\n const mode = blendMode ? BlendMode[enumKey(blendMode)] : defaultBlendMode;\n // Patch requires a path with the following constraints:\n // M tl\n // C c1 c2 br\n // C c1 c2 bl\n // C c1 c2 tl (the redundant point in the last command is removed)\n\n const points = [\n patch[0].pos,\n patch[0].c2,\n patch[1].c1,\n patch[1].pos,\n patch[1].c2,\n patch[2].c1,\n patch[2].pos,\n patch[2].c2,\n patch[3].c1,\n patch[3].pos,\n patch[3].c2,\n patch[0].c1,\n ];\n const colors = props.colors\n ? props.colors.map((c) => ctx.Skia.Color(c))\n : undefined;\n ctx.canvas.drawPatch(points, colors, texture, mode, ctx.paint);\n};\n\nexport const drawPath = (ctx: DrawingContext, props: PathProps) => {\n \"worklet\";\n const {\n start: trimStart,\n end: trimEnd,\n fillType,\n stroke,\n ...pathProps\n } = props;\n const start = saturate(trimStart);\n const end = saturate(trimEnd);\n const hasStartOffset = start !== 0;\n const hasEndOffset = end !== 1;\n const hasStrokeOptions = stroke !== undefined;\n const hasFillType = !!fillType;\n const willMutatePath =\n hasStartOffset || hasEndOffset || hasStrokeOptions || hasFillType;\n const pristinePath = processPath(ctx.Skia, pathProps.path);\n const path = willMutatePath ? pristinePath.copy() : pristinePath;\n if (hasFillType) {\n path.setFillType(FillType[enumKey(fillType)]);\n }\n if (hasStrokeOptions) {\n path.stroke(stroke);\n }\n if (hasStartOffset || hasEndOffset) {\n path.trim(start, end, false);\n }\n ctx.canvas.drawPath(path, ctx.paint);\n};\n\nexport const drawRect = (ctx: DrawingContext, props: RectProps) => {\n \"worklet\";\n const derived = processRect(ctx.Skia, props);\n ctx.canvas.drawRect(derived, ctx.paint);\n};\n\nexport const drawRRect = (ctx: DrawingContext, props: RoundedRectProps) => {\n \"worklet\";\n const derived = processRRect(ctx.Skia, props);\n ctx.canvas.drawRRect(derived, ctx.paint);\n};\n\nexport const drawTextBlob = (ctx: DrawingContext, props: TextBlobProps) => {\n \"worklet\";\n const { blob, x, y } = props;\n ctx.canvas.drawTextBlob(blob, x, y, ctx.paint);\n};\n\ninterface ProcessedGlyphs {\n glyphs: number[];\n positions: SkPoint[];\n}\n\nexport const drawGlyphs = (ctx: DrawingContext, props: GlyphsProps) => {\n \"worklet\";\n const derived = props.glyphs.reduce<ProcessedGlyphs>(\n (acc, glyph) => {\n const { id, pos } = glyph;\n acc.glyphs.push(id);\n acc.positions.push(pos);\n return acc;\n },\n { glyphs: [], positions: [] }\n );\n const { glyphs, positions } = derived;\n const { x, y, font } = props;\n if (font) {\n ctx.canvas.drawGlyphs(glyphs, positions, x, y, font, ctx.paint);\n }\n};\n\nexport const drawImageSVG = (ctx: DrawingContext, props: ImageSVGProps) => {\n \"worklet\";\n const { canvas } = ctx;\n const { svg } = props;\n const { x, y, width, height } = props.rect\n ? props.rect\n : { x: props.x, y: props.y, width: props.width, height: props.height };\n if (svg === null) {\n return;\n }\n canvas.save();\n if (x && y) {\n canvas.translate(x, y);\n }\n canvas.drawSvg(svg, width, height);\n canvas.restore();\n};\n\nexport const drawParagraph = (ctx: DrawingContext, props: ParagraphProps) => {\n \"worklet\";\n const { paragraph, x, y, width } = props;\n if (paragraph) {\n paragraph.layout(width);\n paragraph.paint(ctx.canvas, x, y);\n }\n};\n\nexport const drawPicture = (ctx: DrawingContext, props: PictureProps) => {\n \"worklet\";\n const { picture } = props;\n ctx.canvas.drawPicture(picture);\n};\n\nexport const drawAtlas = (ctx: DrawingContext, props: AtlasProps) => {\n \"worklet\";\n const { image, sprites, transforms, colors, blendMode } = props;\n const blend = blendMode ? BlendMode[enumKey(blendMode)] : undefined;\n if (image) {\n ctx.canvas.drawAtlas(image, sprites, transforms, ctx.paint, blend, colors);\n }\n};\n\nexport const drawCircle = (ctx: DrawingContext, props: CircleProps) => {\n \"worklet\";\n const { c } = processCircle(props);\n const { r } = props;\n ctx.canvas.drawCircle(c.x, c.y, r, ctx.paint);\n};\n\nexport const drawFill = (ctx: DrawingContext, _props: DrawingNodeProps) => {\n \"worklet\";\n ctx.canvas.drawPaint(ctx.paint);\n};\n"],"mappings":";;;;;;AAAA,IA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,GAAG,CAACO,KAAK,CAAC;AAC/C,CAAC;AAACC,OAAA,CAAAoK,UAAA,GAAAA,UAAA;AAEK,MAAMG,QAAQ,GAAGA,CAAC/K,GAAmB,EAAEgL,MAAwB,KAAK;EACzE,SAAS;;EACThL,GAAG,CAACI,MAAM,CAAC6K,SAAS,CAACjL,GAAG,CAACO,KAAK,CAAC;AACjC,CAAC;AAACC,OAAA,CAAAuK,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import type { BlurMaskFilterProps } from "../../../dom/types";
2
+ import type { Command } from "../Core";
3
+ import { CommandType } from "../Core";
4
+ import type { DrawingContext } from "../DrawingContext";
5
+ export declare enum MorphologyOperator {
6
+ Erode = 0,
7
+ Dilate = 1
8
+ }
9
+ export declare const composeImageFilters: (ctx: DrawingContext) => void;
10
+ export declare const setBlurMaskFilter: (ctx: DrawingContext, props: BlurMaskFilterProps) => void;
11
+ export declare const isPushImageFilter: (command: Command) => command is Command<CommandType.PushImageFilter>;
12
+ export declare const pushImageFilter: (ctx: DrawingContext, command: Command<CommandType.PushImageFilter>) => void;
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setBlurMaskFilter = exports.pushImageFilter = exports.isPushImageFilter = exports.composeImageFilters = exports.MorphologyOperator = void 0;
7
+ var _nodes = require("../../../dom/nodes");
8
+ var _types = require("../../../dom/types");
9
+ var _types2 = require("../../../skia/types");
10
+ var _utils = require("../../utils");
11
+ var _Core = require("../Core");
12
+ let MorphologyOperator = exports.MorphologyOperator = /*#__PURE__*/function (MorphologyOperator) {
13
+ MorphologyOperator[MorphologyOperator["Erode"] = 0] = "Erode";
14
+ MorphologyOperator[MorphologyOperator["Dilate"] = 1] = "Dilate";
15
+ return MorphologyOperator;
16
+ }({});
17
+ const Black = Float32Array.of(0, 0, 0, 1);
18
+ const MakeInnerShadow = (Skia, shadowOnly, dx, dy, sigmaX, sigmaY, color, input) => {
19
+ "worklet";
20
+
21
+ const sourceGraphic = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(Black, _types2.BlendMode.Dst), null);
22
+ const sourceAlpha = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(Black, _types2.BlendMode.SrcIn), null);
23
+ const f1 = Skia.ImageFilter.MakeColorFilter(Skia.ColorFilter.MakeBlend(color, _types2.BlendMode.SrcOut), null);
24
+ const f2 = Skia.ImageFilter.MakeOffset(dx, dy, f1);
25
+ const f3 = Skia.ImageFilter.MakeBlur(sigmaX, sigmaY, _types2.TileMode.Decal, f2);
26
+ const f4 = Skia.ImageFilter.MakeBlend(_types2.BlendMode.SrcIn, sourceAlpha, f3);
27
+ if (shadowOnly) {
28
+ return f4;
29
+ }
30
+ return Skia.ImageFilter.MakeCompose(input, Skia.ImageFilter.MakeBlend(_types2.BlendMode.SrcOver, sourceGraphic, f4));
31
+ };
32
+ const declareBlurImageFilter = (ctx, props) => {
33
+ "worklet";
34
+
35
+ const {
36
+ mode,
37
+ blur
38
+ } = props;
39
+ const sigma = (0, _nodes.processRadius)(ctx.Skia, blur);
40
+ const imgf = ctx.Skia.ImageFilter.MakeBlur(sigma.x, sigma.y, _types2.TileMode[(0, _nodes.enumKey)(mode)], null);
41
+ ctx.imageFilters.push(imgf);
42
+ };
43
+ const declareMorphologyImageFilter = (ctx, props) => {
44
+ "worklet";
45
+
46
+ const {
47
+ operator
48
+ } = props;
49
+ const r = (0, _nodes.processRadius)(ctx.Skia, props.radius);
50
+ let imgf;
51
+ if (MorphologyOperator[(0, _nodes.enumKey)(operator)] === MorphologyOperator.Erode) {
52
+ imgf = ctx.Skia.ImageFilter.MakeErode(r.x, r.y, null);
53
+ } else {
54
+ imgf = ctx.Skia.ImageFilter.MakeDilate(r.x, r.y, null);
55
+ }
56
+ ctx.imageFilters.push(imgf);
57
+ };
58
+ const declareOffsetImageFilter = (ctx, props) => {
59
+ "worklet";
60
+
61
+ const {
62
+ x,
63
+ y
64
+ } = props;
65
+ const imgf = ctx.Skia.ImageFilter.MakeOffset(x, y, null);
66
+ ctx.imageFilters.push(imgf);
67
+ };
68
+ const declareDropShadowImageFilter = (ctx, props) => {
69
+ "worklet";
70
+
71
+ const {
72
+ dx,
73
+ dy,
74
+ blur,
75
+ shadowOnly,
76
+ color: cl,
77
+ inner
78
+ } = props;
79
+ const color = ctx.Skia.Color(cl);
80
+ let factory;
81
+ if (inner) {
82
+ factory = MakeInnerShadow.bind(null, ctx.Skia, shadowOnly);
83
+ } else {
84
+ factory = shadowOnly ? ctx.Skia.ImageFilter.MakeDropShadowOnly.bind(ctx.Skia.ImageFilter) : ctx.Skia.ImageFilter.MakeDropShadow.bind(ctx.Skia.ImageFilter);
85
+ }
86
+ const imgf = factory(dx, dy, blur, blur, color, null);
87
+ ctx.imageFilters.push(imgf);
88
+ };
89
+ const declareBlendImageFilter = (ctx, props) => {
90
+ "worklet";
91
+
92
+ const blend = _types2.BlendMode[(0, _nodes.enumKey)(props.mode)];
93
+ // Blend ImageFilters
94
+ const imageFilters = ctx.imageFilters.splice(0, ctx.imageFilters.length);
95
+ const composer = ctx.Skia.ImageFilter.MakeBlend.bind(ctx.Skia.ImageFilter, blend);
96
+ ctx.imageFilters.push((0, _utils.composeDeclarations)(imageFilters, composer));
97
+ };
98
+ const declareDisplacementMapImageFilter = (ctx, props) => {
99
+ "worklet";
100
+
101
+ const {
102
+ channelX,
103
+ channelY,
104
+ scale
105
+ } = props;
106
+ const shader = ctx.shaders.pop();
107
+ if (!shader) {
108
+ throw new Error("DisplacementMap expects a shader as child");
109
+ }
110
+ const map = ctx.Skia.ImageFilter.MakeShader(shader, null);
111
+ const imgf = ctx.Skia.ImageFilter.MakeDisplacementMap(_types2.ColorChannel[(0, _nodes.enumKey)(channelX)], _types2.ColorChannel[(0, _nodes.enumKey)(channelY)], scale, map, null);
112
+ ctx.imageFilters.push(imgf);
113
+ };
114
+ const declareRuntimeShaderImageFilter = (ctx, props) => {
115
+ "worklet";
116
+
117
+ const {
118
+ source,
119
+ uniforms
120
+ } = props;
121
+ const rtb = ctx.Skia.RuntimeShaderBuilder(source);
122
+ if (uniforms) {
123
+ (0, _types2.processUniforms)(source, uniforms, rtb);
124
+ }
125
+ const imgf = ctx.Skia.ImageFilter.MakeRuntimeShader(rtb, null, null);
126
+ ctx.imageFilters.push(imgf);
127
+ };
128
+ const composeImageFilters = ctx => {
129
+ "worklet";
130
+
131
+ if (ctx.imageFilters.length > 1) {
132
+ const outer = ctx.imageFilters.pop();
133
+ const inner = ctx.imageFilters.pop();
134
+ ctx.imageFilters.push(ctx.Skia.ImageFilter.MakeCompose(outer, inner));
135
+ }
136
+ };
137
+ exports.composeImageFilters = composeImageFilters;
138
+ const setBlurMaskFilter = (ctx, props) => {
139
+ "worklet";
140
+
141
+ const {
142
+ blur,
143
+ style,
144
+ respectCTM
145
+ } = props;
146
+ const mf = ctx.Skia.MaskFilter.MakeBlur(_types2.BlurStyle[(0, _nodes.enumKey)(style)], blur, respectCTM);
147
+ ctx.paint.setMaskFilter(mf);
148
+ };
149
+ exports.setBlurMaskFilter = setBlurMaskFilter;
150
+ const isPushImageFilter = command => {
151
+ "worklet";
152
+
153
+ return command.type === _Core.CommandType.PushImageFilter;
154
+ };
155
+ exports.isPushImageFilter = isPushImageFilter;
156
+ const isImageFilter = (command, type) => {
157
+ "worklet";
158
+
159
+ return command.imageFilterType === type;
160
+ };
161
+ const pushImageFilter = (ctx, command) => {
162
+ "worklet";
163
+
164
+ if (isImageFilter(command, _types.NodeType.BlurImageFilter)) {
165
+ declareBlurImageFilter(ctx, command.props);
166
+ } else if (isImageFilter(command, _types.NodeType.MorphologyImageFilter)) {
167
+ declareMorphologyImageFilter(ctx, command.props);
168
+ } else if (isImageFilter(command, _types.NodeType.BlendImageFilter)) {
169
+ declareBlendImageFilter(ctx, command.props);
170
+ } else if (isImageFilter(command, _types.NodeType.DisplacementMapImageFilter)) {
171
+ declareDisplacementMapImageFilter(ctx, command.props);
172
+ } else if (isImageFilter(command, _types.NodeType.DropShadowImageFilter)) {
173
+ declareDropShadowImageFilter(ctx, command.props);
174
+ } else if (isImageFilter(command, _types.NodeType.OffsetImageFilter)) {
175
+ declareOffsetImageFilter(ctx, command.props);
176
+ } else if (isImageFilter(command, _types.NodeType.RuntimeShaderImageFilter)) {
177
+ declareRuntimeShaderImageFilter(ctx, command.props);
178
+ } else {
179
+ throw new Error("Invalid image filter type: " + command.imageFilterType);
180
+ }
181
+ };
182
+ exports.pushImageFilter = pushImageFilter;
183
+ //# sourceMappingURL=ImageFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_nodes","require","_types","_types2","_utils","_Core","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","declareBlurImageFilter","ctx","props","mode","blur","sigma","processRadius","imgf","x","y","enumKey","imageFilters","push","declareMorphologyImageFilter","operator","r","radius","Erode","MakeErode","MakeDilate","declareOffsetImageFilter","declareDropShadowImageFilter","cl","inner","Color","factory","bind","MakeDropShadowOnly","MakeDropShadow","declareBlendImageFilter","blend","splice","length","composer","composeDeclarations","declareDisplacementMapImageFilter","channelX","channelY","scale","shader","shaders","pop","Error","map","MakeShader","MakeDisplacementMap","ColorChannel","declareRuntimeShaderImageFilter","source","uniforms","rtb","RuntimeShaderBuilder","processUniforms","MakeRuntimeShader","composeImageFilters","outer","setBlurMaskFilter","style","respectCTM","mf","MaskFilter","BlurStyle","paint","setMaskFilter","isPushImageFilter","command","type","CommandType","PushImageFilter","isImageFilter","imageFilterType","pushImageFilter","NodeType","BlurImageFilter","MorphologyImageFilter","BlendImageFilter","DisplacementMapImageFilter","DropShadowImageFilter","OffsetImageFilter","RuntimeShaderImageFilter"],"sources":["ImageFilters.ts"],"sourcesContent":["import { enumKey, processRadius } from \"../../../dom/nodes\";\nimport type {\n BlendImageFilterProps,\n BlurImageFilterProps,\n BlurMaskFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../../../dom/types\";\nimport { NodeType } from \"../../../dom/types\";\nimport type { SkColor, SkImageFilter, Skia } from \"../../../skia/types\";\nimport {\n BlendMode,\n BlurStyle,\n ColorChannel,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport { composeDeclarations } from \"../../utils\";\nimport type { Command } from \"../Core\";\nimport { CommandType } from \"../Core\";\nimport type { DrawingContext } from \"../DrawingContext\";\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\nconst declareBlurImageFilter = (\n ctx: DrawingContext,\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 null\n );\n ctx.imageFilters.push(imgf);\n};\n\nconst declareMorphologyImageFilter = (\n ctx: DrawingContext,\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, null);\n } else {\n imgf = ctx.Skia.ImageFilter.MakeDilate(r.x, r.y, null);\n }\n ctx.imageFilters.push(imgf);\n};\n\nconst declareOffsetImageFilter = (\n ctx: DrawingContext,\n props: OffsetImageFilterProps\n) => {\n \"worklet\";\n const { x, y } = props;\n const imgf = ctx.Skia.ImageFilter.MakeOffset(x, y, null);\n ctx.imageFilters.push(imgf);\n};\n\nconst declareDropShadowImageFilter = (\n ctx: DrawingContext,\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, null);\n ctx.imageFilters.push(imgf);\n};\n\nconst declareBlendImageFilter = (\n ctx: DrawingContext,\n props: BlendImageFilterProps\n) => {\n \"worklet\";\n const blend = BlendMode[enumKey(props.mode)];\n // Blend ImageFilters\n const imageFilters = ctx.imageFilters.splice(0, ctx.imageFilters.length);\n const composer = ctx.Skia.ImageFilter.MakeBlend.bind(\n ctx.Skia.ImageFilter,\n blend\n );\n ctx.imageFilters.push(composeDeclarations(imageFilters, composer));\n};\n\nconst declareDisplacementMapImageFilter = (\n ctx: DrawingContext,\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 null\n );\n ctx.imageFilters.push(imgf);\n};\n\nconst declareRuntimeShaderImageFilter = (\n ctx: DrawingContext,\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, null);\n ctx.imageFilters.push(imgf);\n};\n\nexport const composeImageFilters = (ctx: DrawingContext) => {\n \"worklet\";\n if (ctx.imageFilters.length > 1) {\n const outer = ctx.imageFilters.pop()!;\n const inner = ctx.imageFilters.pop()!;\n ctx.imageFilters.push(ctx.Skia.ImageFilter.MakeCompose(outer, inner));\n }\n};\n\nexport const setBlurMaskFilter = (\n ctx: DrawingContext,\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.paint.setMaskFilter(mf);\n};\n\nexport const isPushImageFilter = (\n command: Command\n): command is Command<CommandType.PushImageFilter> => {\n \"worklet\";\n return command.type === CommandType.PushImageFilter;\n};\n\ntype Props = {\n [NodeType.OffsetImageFilter]: OffsetImageFilterProps;\n [NodeType.DisplacementMapImageFilter]: DisplacementMapImageFilterProps;\n [NodeType.BlurImageFilter]: BlurImageFilterProps;\n [NodeType.DropShadowImageFilter]: DropShadowImageFilterProps;\n [NodeType.MorphologyImageFilter]: MorphologyImageFilterProps;\n [NodeType.BlendImageFilter]: BlendImageFilterProps;\n [NodeType.RuntimeShaderImageFilter]: RuntimeShaderImageFilterProps;\n};\n\ninterface PushImageFilter<T extends keyof Props>\n extends Command<CommandType.PushImageFilter> {\n imageFilterType: T;\n props: Props[T];\n}\n\nconst isImageFilter = <T extends keyof Props>(\n command: Command<CommandType.PushImageFilter>,\n type: T\n): command is PushImageFilter<T> => {\n \"worklet\";\n return command.imageFilterType === type;\n};\n\nexport const pushImageFilter = (\n ctx: DrawingContext,\n command: Command<CommandType.PushImageFilter>\n) => {\n \"worklet\";\n if (isImageFilter(command, NodeType.BlurImageFilter)) {\n declareBlurImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.MorphologyImageFilter)) {\n declareMorphologyImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.BlendImageFilter)) {\n declareBlendImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.DisplacementMapImageFilter)) {\n declareDisplacementMapImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.DropShadowImageFilter)) {\n declareDropShadowImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.OffsetImageFilter)) {\n declareOffsetImageFilter(ctx, command.props);\n } else if (isImageFilter(command, NodeType.RuntimeShaderImageFilter)) {\n declareRuntimeShaderImageFilter(ctx, command.props);\n } else {\n throw new Error(\"Invalid image filter type: \" + command.imageFilterType);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAAsC,IAG1BK,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA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AG,EAAEgE,OAAO,CAAC/D,KAAK,CAAC;EACvD,CAAC,MAAM,IAAImE,aAAa,CAACJ,OAAO,EAAEO,eAAQ,CAACK,qBAAqB,CAAC,EAAE;IACjExD,4BAA4B,CAACpB,GAAG,EAAEgE,OAAO,CAAC/D,KAAK,CAAC;EAClD,CAAC,MAAM,IAAImE,aAAa,CAACJ,OAAO,EAAEO,eAAQ,CAACM,iBAAiB,CAAC,EAAE;IAC7D1D,wBAAwB,CAACnB,GAAG,EAAEgE,OAAO,CAAC/D,KAAK,CAAC;EAC9C,CAAC,MAAM,IAAImE,aAAa,CAACJ,OAAO,EAAEO,eAAQ,CAACO,wBAAwB,CAAC,EAAE;IACpEhC,+BAA+B,CAAC9C,GAAG,EAAEgE,OAAO,CAAC/D,KAAK,CAAC;EACrD,CAAC,MAAM;IACL,MAAM,IAAIwC,KAAK,CAAC,6BAA6B,GAAGuB,OAAO,CAACK,eAAe,CAAC;EAC1E;AACF,CAAC;AAACvG,OAAA,CAAAwG,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import type { PaintProps } from "../../../dom/types";
2
+ import type { SkPaint, Skia } from "../../../skia/types";
3
+ export declare const processColor: (Skia: Skia, color: number | string | Float32Array | number[]) => Float32Array;
4
+ export declare const setPaintProperties: (Skia: Skia, paint: SkPaint, { opacity, color, blendMode, strokeWidth, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither, }: PaintProps) => void;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setPaintProperties = exports.processColor = void 0;
7
+ var _nodes = require("../../../dom/nodes");
8
+ var _types = require("../../../skia/types");
9
+ const processColor = (Skia, color) => {
10
+ "worklet";
11
+
12
+ if (typeof color === "string" || typeof color === "number") {
13
+ return Skia.Color(color);
14
+ } else if (Array.isArray(color) || color instanceof Float32Array) {
15
+ return color instanceof Float32Array ? color : new Float32Array(color);
16
+ } else {
17
+ throw new Error(`Invalid color type: ${typeof color}. Expected number, string, or array.`);
18
+ }
19
+ };
20
+ exports.processColor = processColor;
21
+ const setPaintProperties = (Skia, paint, {
22
+ opacity,
23
+ color,
24
+ blendMode,
25
+ strokeWidth,
26
+ style,
27
+ strokeJoin,
28
+ strokeCap,
29
+ strokeMiter,
30
+ antiAlias,
31
+ dither
32
+ }) => {
33
+ "worklet";
34
+
35
+ if (opacity !== undefined) {
36
+ paint.setAlphaf(paint.getAlphaf() * opacity);
37
+ }
38
+ if (color !== undefined) {
39
+ const currentOpacity = paint.getAlphaf();
40
+ paint.setShader(null);
41
+ paint.setColor(processColor(Skia, color));
42
+ paint.setAlphaf(currentOpacity * paint.getAlphaf());
43
+ }
44
+ if (blendMode !== undefined) {
45
+ paint.setBlendMode(_types.BlendMode[(0, _nodes.enumKey)(blendMode)]);
46
+ }
47
+ if (strokeWidth !== undefined) {
48
+ paint.setStrokeWidth(strokeWidth);
49
+ }
50
+ if (style !== undefined) {
51
+ paint.setStyle(_types.PaintStyle[(0, _nodes.enumKey)(style)]);
52
+ }
53
+ if (strokeJoin !== undefined) {
54
+ paint.setStrokeJoin(_types.StrokeJoin[(0, _nodes.enumKey)(strokeJoin)]);
55
+ }
56
+ if (strokeCap !== undefined) {
57
+ paint.setStrokeCap(_types.StrokeCap[(0, _nodes.enumKey)(strokeCap)]);
58
+ }
59
+ if (strokeMiter !== undefined) {
60
+ paint.setStrokeMiter(strokeMiter);
61
+ }
62
+ if (antiAlias !== undefined) {
63
+ paint.setAntiAlias(antiAlias);
64
+ }
65
+ if (dither !== undefined) {
66
+ paint.setDither(dither);
67
+ }
68
+ };
69
+ exports.setPaintProperties = setPaintProperties;
70
+ //# sourceMappingURL=Paint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_nodes","require","_types","processColor","Skia","color","Color","Array","isArray","Float32Array","Error","exports","setPaintProperties","paint","opacity","blendMode","strokeWidth","style","strokeJoin","strokeCap","strokeMiter","antiAlias","dither","undefined","setAlphaf","getAlphaf","currentOpacity","setShader","setColor","setBlendMode","BlendMode","enumKey","setStrokeWidth","setStyle","PaintStyle","setStrokeJoin","StrokeJoin","setStrokeCap","StrokeCap","setStrokeMiter","setAntiAlias","setDither"],"sources":["Paint.ts"],"sourcesContent":["import { enumKey } from \"../../../dom/nodes\";\nimport type { PaintProps } from \"../../../dom/types\";\nimport {\n BlendMode,\n PaintStyle,\n StrokeCap,\n StrokeJoin,\n} from \"../../../skia/types\";\nimport type { SkPaint, Skia } from \"../../../skia/types\";\n\nexport const processColor = (\n Skia: Skia,\n color: number | string | Float32Array | number[]\n) => {\n \"worklet\";\n if (typeof color === \"string\" || typeof color === \"number\") {\n return Skia.Color(color);\n } else if (Array.isArray(color) || color instanceof Float32Array) {\n return color instanceof Float32Array ? color : new Float32Array(color);\n } else {\n throw new Error(\n `Invalid color type: ${typeof color}. Expected number, string, or array.`\n );\n }\n};\n\nexport const setPaintProperties = (\n Skia: Skia,\n paint: SkPaint,\n {\n opacity,\n color,\n blendMode,\n strokeWidth,\n style,\n strokeJoin,\n strokeCap,\n strokeMiter,\n antiAlias,\n dither,\n }: PaintProps\n) => {\n \"worklet\";\n if (opacity !== undefined) {\n paint.setAlphaf(paint.getAlphaf() * opacity);\n }\n if (color !== undefined) {\n const currentOpacity = paint.getAlphaf();\n paint.setShader(null);\n paint.setColor(processColor(Skia, color));\n paint.setAlphaf(currentOpacity * paint.getAlphaf());\n }\n if (blendMode !== undefined) {\n paint.setBlendMode(BlendMode[enumKey(blendMode)]);\n }\n if (strokeWidth !== undefined) {\n paint.setStrokeWidth(strokeWidth);\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 (antiAlias !== undefined) {\n paint.setAntiAlias(antiAlias);\n }\n if (dither !== undefined) {\n paint.setDither(dither);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAQO,MAAME,YAAY,GAAGA,CAC1BC,IAAU,EACVC,KAAgD,KAC7C;EACH,SAAS;;EACT,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC1D,OAAOD,IAAI,CAACE,KAAK,CAACD,KAAK,CAAC;EAC1B,CAAC,MAAM,IAAIE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,IAAIA,KAAK,YAAYI,YAAY,EAAE;IAChE,OAAOJ,KAAK,YAAYI,YAAY,GAAGJ,KAAK,GAAG,IAAII,YAAY,CAACJ,KAAK,CAAC;EACxE,CAAC,MAAM;IACL,MAAM,IAAIK,KAAK,CACb,uBAAuB,OAAOL,KAAK,sCACrC,CAAC;EACH;AACF,CAAC;AAACM,OAAA,CAAAR,YAAA,GAAAA,YAAA;AAEK,MAAMS,kBAAkB,GAAGA,CAChCR,IAAU,EACVS,KAAc,EACd;EACEC,OAAO;EACPT,KAAK;EACLU,SAAS;EACTC,WAAW;EACXC,KAAK;EACLC,UAAU;EACVC,SAAS;EACTC,WAAW;EACXC,SAAS;EACTC;AACU,CAAC,KACV;EACH,SAAS;;EACT,IAAIR,OAAO,KAAKS,SAAS,EAAE;IACzBV,KAAK,CAACW,SAAS,CAACX,KAAK,CAACY,SAAS,CAAC,CAAC,GAAGX,OAAO,CAAC;EAC9C;EACA,IAAIT,KAAK,KAAKkB,SAAS,EAAE;IACvB,MAAMG,cAAc,GAAGb,KAAK,CAACY,SAAS,CAAC,CAAC;IACxCZ,KAAK,CAACc,SAAS,CAAC,IAAI,CAAC;IACrBd,KAAK,CAACe,QAAQ,CAACzB,YAAY,CAACC,IAAI,EAAEC,KAAK,CAAC,CAAC;IACzCQ,KAAK,CAACW,SAAS,CAACE,cAAc,GAAGb,KAAK,CAACY,SAAS,CAAC,CAAC,CAAC;EACrD;EACA,IAAIV,SAAS,KAAKQ,SAAS,EAAE;IAC3BV,KAAK,CAACgB,YAAY,CAACC,gBAAS,CAAC,IAAAC,cAAO,EAAChB,SAAS,CAAC,CAAC,CAAC;EACnD;EACA,IAAIC,WAAW,KAAKO,SAAS,EAAE;IAC7BV,KAAK,CAACmB,cAAc,CAAChB,WAAW,CAAC;EACnC;EACA,IAAIC,KAAK,KAAKM,SAAS,EAAE;IACvBV,KAAK,CAACoB,QAAQ,CAACC,iBAAU,CAAC,IAAAH,cAAO,EAACd,KAAK,CAAC,CAAC,CAAC;EAC5C;EACA,IAAIC,UAAU,KAAKK,SAAS,EAAE;IAC5BV,KAAK,CAACsB,aAAa,CAACC,iBAAU,CAAC,IAAAL,cAAO,EAACb,UAAU,CAAC,CAAC,CAAC;EACtD;EACA,IAAIC,SAAS,KAAKI,SAAS,EAAE;IAC3BV,KAAK,CAACwB,YAAY,CAACC,gBAAS,CAAC,IAAAP,cAAO,EAACZ,SAAS,CAAC,CAAC,CAAC;EACnD;EACA,IAAIC,WAAW,KAAKG,SAAS,EAAE;IAC7BV,KAAK,CAAC0B,cAAc,CAACnB,WAAW,CAAC;EACnC;EACA,IAAIC,SAAS,KAAKE,SAAS,EAAE;IAC3BV,KAAK,CAAC2B,YAAY,CAACnB,SAAS,CAAC;EAC/B;EACA,IAAIC,MAAM,KAAKC,SAAS,EAAE;IACxBV,KAAK,CAAC4B,SAAS,CAACnB,MAAM,CAAC;EACzB;AACF,CAAC;AAACX,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import type { Command } from "../Core";
2
+ import { CommandType } from "../Core";
3
+ import type { DrawingContext } from "../DrawingContext";
4
+ export declare const isPushPathEffect: (command: Command) => command is Command<CommandType.PushPathEffect>;
5
+ export declare const composePathEffects: (ctx: DrawingContext) => void;
6
+ export declare const pushPathEffect: (ctx: DrawingContext, command: Command<CommandType.PushPathEffect>) => void;
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pushPathEffect = exports.isPushPathEffect = exports.composePathEffects = void 0;
7
+ var _nodes = require("../../../dom/nodes");
8
+ var _types = require("../../../dom/types");
9
+ var _types2 = require("../../../skia/types");
10
+ var _utils = require("../../utils");
11
+ var _Core = require("../Core");
12
+ const declareDiscretePathEffect = (ctx, props) => {
13
+ "worklet";
14
+
15
+ const {
16
+ length,
17
+ deviation,
18
+ seed
19
+ } = props;
20
+ const pe = ctx.Skia.PathEffect.MakeDiscrete(length, deviation, seed);
21
+ ctx.pathEffects.push(pe);
22
+ };
23
+ const declarePath2DPathEffect = (ctx, props) => {
24
+ "worklet";
25
+
26
+ const {
27
+ matrix
28
+ } = props;
29
+ const path = (0, _nodes.processPath)(ctx.Skia, props.path);
30
+ const pe = ctx.Skia.PathEffect.MakePath2D(matrix, path);
31
+ if (pe === null) {
32
+ throw new Error("Path2DPathEffect: invalid path");
33
+ }
34
+ ctx.pathEffects.push(pe);
35
+ };
36
+ const declareDashPathEffect = (ctx, props) => {
37
+ "worklet";
38
+
39
+ const {
40
+ intervals,
41
+ phase
42
+ } = props;
43
+ const pe = ctx.Skia.PathEffect.MakeDash(intervals, phase);
44
+ ctx.pathEffects.push(pe);
45
+ };
46
+ const declareCornerPathEffect = (ctx, props) => {
47
+ "worklet";
48
+
49
+ const {
50
+ r
51
+ } = props;
52
+ const pe = ctx.Skia.PathEffect.MakeCorner(r);
53
+ if (pe === null) {
54
+ throw new Error("CornerPathEffect: couldn't create path effect");
55
+ }
56
+ ctx.pathEffects.push(pe);
57
+ };
58
+ const declareSumPathEffect = ctx => {
59
+ "worklet";
60
+
61
+ // Note: decorateChildren functionality needs to be handled differently
62
+ const pes = ctx.pathEffects.splice(0, ctx.pathEffects.length);
63
+ const pe = (0, _utils.composeDeclarations)(pes, ctx.Skia.PathEffect.MakeSum.bind(ctx.Skia.PathEffect));
64
+ ctx.pathEffects.push(pe);
65
+ };
66
+ const declareLine2DPathEffect = (ctx, props) => {
67
+ "worklet";
68
+
69
+ const {
70
+ width,
71
+ matrix
72
+ } = props;
73
+ const pe = ctx.Skia.PathEffect.MakeLine2D(width, matrix);
74
+ if (pe === null) {
75
+ throw new Error("Line2DPathEffect: could not create path effect");
76
+ }
77
+ ctx.pathEffects.push(pe);
78
+ };
79
+ const declarePath1DPathEffect = (ctx, props) => {
80
+ "worklet";
81
+
82
+ const {
83
+ advance,
84
+ phase,
85
+ style
86
+ } = props;
87
+ const path = (0, _nodes.processPath)(ctx.Skia, props.path);
88
+ const pe = ctx.Skia.PathEffect.MakePath1D(path, advance, phase, _types2.Path1DEffectStyle[(0, _nodes.enumKey)(style)]);
89
+ if (pe === null) {
90
+ throw new Error("Path1DPathEffect: could not create path effect");
91
+ }
92
+ ctx.pathEffects.push(pe);
93
+ };
94
+ const isPushPathEffect = command => {
95
+ "worklet";
96
+
97
+ return command.type === _Core.CommandType.PushPathEffect;
98
+ };
99
+ exports.isPushPathEffect = isPushPathEffect;
100
+ const isPathEffect = (command, type) => {
101
+ "worklet";
102
+
103
+ return command.pathEffectType === type;
104
+ };
105
+ const composePathEffects = ctx => {
106
+ "worklet";
107
+
108
+ if (ctx.pathEffects.length > 1) {
109
+ const outer = ctx.pathEffects.pop();
110
+ const inner = ctx.pathEffects.pop();
111
+ ctx.pathEffects.push(ctx.Skia.PathEffect.MakeCompose(outer, inner));
112
+ }
113
+ };
114
+ exports.composePathEffects = composePathEffects;
115
+ const pushPathEffect = (ctx, command) => {
116
+ "worklet";
117
+
118
+ if (isPathEffect(command, _types.NodeType.DiscretePathEffect)) {
119
+ declareDiscretePathEffect(ctx, command.props);
120
+ } else if (isPathEffect(command, _types.NodeType.DashPathEffect)) {
121
+ declareDashPathEffect(ctx, command.props);
122
+ } else if (isPathEffect(command, _types.NodeType.Path1DPathEffect)) {
123
+ declarePath1DPathEffect(ctx, command.props);
124
+ } else if (isPathEffect(command, _types.NodeType.Path2DPathEffect)) {
125
+ declarePath2DPathEffect(ctx, command.props);
126
+ } else if (isPathEffect(command, _types.NodeType.CornerPathEffect)) {
127
+ declareCornerPathEffect(ctx, command.props);
128
+ } else if (isPathEffect(command, _types.NodeType.SumPathEffect)) {
129
+ declareSumPathEffect(ctx);
130
+ } else if (isPathEffect(command, _types.NodeType.Line2DPathEffect)) {
131
+ declareLine2DPathEffect(ctx, command.props);
132
+ } else {
133
+ throw new Error("Invalid image filter type: " + command.imageFilterType);
134
+ }
135
+ };
136
+ exports.pushPathEffect = pushPathEffect;
137
+ //# sourceMappingURL=PathEffects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_nodes","require","_types","_types2","_utils","_Core","declareDiscretePathEffect","ctx","props","length","deviation","seed","pe","Skia","PathEffect","MakeDiscrete","pathEffects","push","declarePath2DPathEffect","matrix","path","processPath","MakePath2D","Error","declareDashPathEffect","intervals","phase","MakeDash","declareCornerPathEffect","r","MakeCorner","declareSumPathEffect","pes","splice","composeDeclarations","MakeSum","bind","declareLine2DPathEffect","width","MakeLine2D","declarePath1DPathEffect","advance","style","MakePath1D","Path1DEffectStyle","enumKey","isPushPathEffect","command","type","CommandType","PushPathEffect","exports","isPathEffect","pathEffectType","composePathEffects","outer","pop","inner","MakeCompose","pushPathEffect","NodeType","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","CornerPathEffect","SumPathEffect","Line2DPathEffect","imageFilterType"],"sources":["PathEffects.ts"],"sourcesContent":["import { enumKey, processPath } from \"../../../dom/nodes\";\nimport { NodeType } from \"../../../dom/types\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../../../dom/types\";\nimport { Path1DEffectStyle } from \"../../../skia/types\";\nimport { composeDeclarations } from \"../../utils\";\nimport type { Command } from \"../Core\";\nimport { CommandType } from \"../Core\";\nimport type { DrawingContext } from \"../DrawingContext\";\n\nconst declareDiscretePathEffect = (\n ctx: DrawingContext,\n props: DiscretePathEffectProps\n) => {\n \"worklet\";\n const { length, deviation, seed } = props;\n const pe = ctx.Skia.PathEffect.MakeDiscrete(length, deviation, seed);\n ctx.pathEffects.push(pe);\n};\n\nconst declarePath2DPathEffect = (\n ctx: DrawingContext,\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 ctx.pathEffects.push(pe);\n};\n\nconst declareDashPathEffect = (\n ctx: DrawingContext,\n props: DashPathEffectProps\n) => {\n \"worklet\";\n const { intervals, phase } = props;\n const pe = ctx.Skia.PathEffect.MakeDash(intervals, phase);\n ctx.pathEffects.push(pe);\n};\n\nconst declareCornerPathEffect = (\n ctx: DrawingContext,\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 ctx.pathEffects.push(pe);\n};\n\nconst declareSumPathEffect = (ctx: DrawingContext) => {\n \"worklet\";\n // Note: decorateChildren functionality needs to be handled differently\n const pes = ctx.pathEffects.splice(0, ctx.pathEffects.length);\n const pe = composeDeclarations(\n pes,\n ctx.Skia.PathEffect.MakeSum.bind(ctx.Skia.PathEffect)\n );\n ctx.pathEffects.push(pe);\n};\n\nconst declareLine2DPathEffect = (\n ctx: DrawingContext,\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 ctx.pathEffects.push(pe);\n};\n\nconst declarePath1DPathEffect = (\n ctx: DrawingContext,\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 ctx.pathEffects.push(pe);\n};\n\nexport const isPushPathEffect = (\n command: Command\n): command is Command<CommandType.PushPathEffect> => {\n \"worklet\";\n return command.type === CommandType.PushPathEffect;\n};\n\ntype Props = {\n [NodeType.DiscretePathEffect]: DiscretePathEffectProps;\n [NodeType.DashPathEffect]: DashPathEffectProps;\n [NodeType.Path1DPathEffect]: Path1DPathEffectProps;\n [NodeType.Path2DPathEffect]: Path2DPathEffectProps;\n [NodeType.CornerPathEffect]: CornerPathEffectProps;\n [NodeType.SumPathEffect]: Record<string, never>;\n [NodeType.Line2DPathEffect]: Line2DPathEffectProps;\n};\n\ninterface PushPathEffect<T extends keyof Props>\n extends Command<CommandType.PushPathEffect> {\n pathEffectType: T;\n props: Props[T];\n}\n\nconst isPathEffect = <T extends keyof Props>(\n command: Command<CommandType.PushPathEffect>,\n type: T\n): command is PushPathEffect<T> => {\n \"worklet\";\n return command.pathEffectType === type;\n};\n\nexport const composePathEffects = (ctx: DrawingContext) => {\n \"worklet\";\n if (ctx.pathEffects.length > 1) {\n const outer = ctx.pathEffects.pop()!;\n const inner = ctx.pathEffects.pop()!;\n ctx.pathEffects.push(ctx.Skia.PathEffect.MakeCompose(outer, inner));\n }\n};\n\nexport const pushPathEffect = (\n ctx: DrawingContext,\n command: Command<CommandType.PushPathEffect>\n) => {\n \"worklet\";\n if (isPathEffect(command, NodeType.DiscretePathEffect)) {\n declareDiscretePathEffect(ctx, command.props);\n } else if (isPathEffect(command, NodeType.DashPathEffect)) {\n declareDashPathEffect(ctx, command.props);\n } else if (isPathEffect(command, NodeType.Path1DPathEffect)) {\n declarePath1DPathEffect(ctx, command.props);\n } else if (isPathEffect(command, NodeType.Path2DPathEffect)) {\n declarePath2DPathEffect(ctx, command.props);\n } else if (isPathEffect(command, NodeType.CornerPathEffect)) {\n declareCornerPathEffect(ctx, command.props);\n } else if (isPathEffect(command, NodeType.SumPathEffect)) {\n declareSumPathEffect(ctx);\n } else if (isPathEffect(command, NodeType.Line2DPathEffect)) {\n declareLine2DPathEffect(ctx, command.props);\n } else {\n throw new Error(\"Invalid image filter type: \" + command.imageFilterType);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAGA,MAAMK,yBAAyB,GAAGA,CAChCC,GAAmB,EACnBC,KAA8B,KAC3B;EACH,SAAS;;EACT,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC;EAAK,CAAC,GAAGH,KAAK;EACzC,MAAMI,EAAE,GAAGL,GAAG,CAACM,IAAI,CAACC,UAAU,CAACC,YAAY,CAACN,MAAM,EAAEC,SAAS,EAAEC,IAAI,CAAC;EACpEJ,GAAG,CAACS,WAAW,CAACC,IAAI,CAACL,EAAE,CAAC;AAC1B,CAAC;AAED,MAAMM,uBAAuB,GAAGA,CAC9BX,GAAmB,EACnBC,KAA4B,KACzB;EACH,SAAS;;EACT,MAAM;IAAEW;EAAO,CAAC,GAAGX,KAAK;EACxB,MAAMY,IAAI,GAAG,IAAAC,kBAAW,EAACd,GAAG,CAACM,IAAI,EAAEL,KAAK,CAACY,IAAI,CAAC;EAC9C,MAAMR,EAAE,GAAGL,GAAG,CAACM,IAAI,CAACC,UAAU,CAACQ,UAAU,CAACH,MAAM,EAAEC,IAAI,CAAC;EACvD,IAAIR,EAAE,KAAK,IAAI,EAAE;IACf,MAAM,IAAIW,KAAK,CAAC,gCAAgC,CAAC;EACnD;EACAhB,GAAG,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AAM,IAAI4C,YAAY,CAACL,OAAO,EAAEa,eAAQ,CAACM,aAAa,CAAC,EAAE;IACxDnC,oBAAoB,CAACxB,GAAG,CAAC;EAC3B,CAAC,MAAM,IAAI6C,YAAY,CAACL,OAAO,EAAEa,eAAQ,CAACO,gBAAgB,CAAC,EAAE;IAC3D9B,uBAAuB,CAAC9B,GAAG,EAAEwC,OAAO,CAACvC,KAAK,CAAC;EAC7C,CAAC,MAAM;IACL,MAAM,IAAIe,KAAK,CAAC,6BAA6B,GAAGwB,OAAO,CAACqB,eAAe,CAAC;EAC1E;AACF,CAAC;AAACjB,OAAA,CAAAQ,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import type { Command } from "../Core";
2
+ import { CommandType } from "../Core";
3
+ import type { DrawingContext } from "../DrawingContext";
4
+ export declare const isPushShader: (command: Command) => command is Command<CommandType.PushShader>;
5
+ export declare const pushShader: (ctx: DrawingContext, command: Command<CommandType.PushShader>) => void;