@shopify/react-native-skia 2.0.7 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/android/CMakeLists.txt +20 -1
  2. package/cpp/api/JsiSkApi.h +3 -0
  3. package/cpp/api/JsiSkImageFilterFactory.h +478 -39
  4. package/cpp/api/JsiSkSkottie.h +590 -0
  5. package/cpp/api/JsiSkottieFactory.h +65 -0
  6. package/cpp/api/recorder/Command.h +1 -0
  7. package/cpp/api/recorder/Convertor.h +32 -0
  8. package/cpp/api/recorder/Drawings.h +23 -0
  9. package/cpp/api/recorder/ImageFilters.h +20 -0
  10. package/cpp/api/recorder/JsiRecorder.h +6 -0
  11. package/cpp/api/recorder/RNRecorder.h +15 -0
  12. package/cpp/api/third_party/SkottieUtils.cpp +333 -0
  13. package/cpp/api/third_party/SkottieUtils.h +172 -0
  14. package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +980 -0
  15. package/cpp/skia/modules/jsonreader/SkJSONReader.h +389 -0
  16. package/cpp/skia/modules/skottie/include/ExternalLayer.h +56 -0
  17. package/cpp/skia/modules/skottie/include/Skottie.h +313 -0
  18. package/cpp/skia/modules/skottie/include/SkottieProperty.h +190 -0
  19. package/cpp/skia/modules/skottie/include/SlotManager.h +113 -0
  20. package/cpp/skia/modules/skottie/include/TextShaper.h +200 -0
  21. package/cpp/skia/modules/skottie/src/SkottieValue.h +56 -0
  22. package/cpp/skia/modules/skottie/src/animator/Animator.h +89 -0
  23. package/cpp/skia/modules/skottie/src/text/Font.h +82 -0
  24. package/cpp/skia/modules/skottie/src/text/TextAdapter.h +155 -0
  25. package/cpp/skia/modules/skottie/src/text/TextAnimator.h +121 -0
  26. package/cpp/skia/modules/skottie/src/text/TextValue.h +28 -0
  27. package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +61 -0
  28. package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +135 -0
  29. package/cpp/skia/modules/sksg/include/SkSGDraw.h +57 -0
  30. package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +50 -0
  31. package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +181 -0
  32. package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +54 -0
  33. package/cpp/skia/modules/sksg/include/SkSGGradient.h +108 -0
  34. package/cpp/skia/modules/sksg/include/SkSGGroup.h +65 -0
  35. package/cpp/skia/modules/sksg/include/SkSGImage.h +59 -0
  36. package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +46 -0
  37. package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +65 -0
  38. package/cpp/skia/modules/sksg/include/SkSGMerge.h +74 -0
  39. package/cpp/skia/modules/sksg/include/SkSGNode.h +128 -0
  40. package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +54 -0
  41. package/cpp/skia/modules/sksg/include/SkSGPaint.h +112 -0
  42. package/cpp/skia/modules/sksg/include/SkSGPath.h +68 -0
  43. package/cpp/skia/modules/sksg/include/SkSGPlane.h +47 -0
  44. package/cpp/skia/modules/sksg/include/SkSGRect.h +122 -0
  45. package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +283 -0
  46. package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +157 -0
  47. package/cpp/skia/modules/sksg/include/SkSGScene.h +47 -0
  48. package/cpp/skia/modules/sksg/include/SkSGText.h +82 -0
  49. package/cpp/skia/modules/sksg/include/SkSGTransform.h +127 -0
  50. package/cpp/skia/src/base/SkArenaAlloc.h +371 -0
  51. package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +15 -15
  52. package/lib/commonjs/dom/types/Drawings.d.ts +8 -1
  53. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  54. package/lib/commonjs/dom/types/NodeType.d.ts +3 -1
  55. package/lib/commonjs/dom/types/NodeType.js +4 -0
  56. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  57. package/lib/commonjs/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  58. package/lib/commonjs/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  59. package/lib/commonjs/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  60. package/lib/commonjs/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  61. package/lib/commonjs/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  62. package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -0
  63. package/lib/commonjs/renderer/components/ImageFilter.d.ts +4 -0
  64. package/lib/commonjs/renderer/components/ImageFilter.js +13 -0
  65. package/lib/commonjs/renderer/components/ImageFilter.js.map +1 -0
  66. package/lib/commonjs/renderer/components/Skottie.d.ts +4 -0
  67. package/lib/commonjs/renderer/components/Skottie.js +13 -0
  68. package/lib/commonjs/renderer/components/Skottie.js.map +1 -0
  69. package/lib/commonjs/renderer/components/index.d.ts +2 -0
  70. package/lib/commonjs/renderer/components/index.js +22 -0
  71. package/lib/commonjs/renderer/components/index.js.map +1 -1
  72. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  73. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  74. package/lib/commonjs/skia/types/Matrix4.d.ts +11 -2
  75. package/lib/commonjs/skia/types/Matrix4.js +42 -1
  76. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  77. package/lib/commonjs/skia/types/Recorder.d.ts +2 -1
  78. package/lib/commonjs/skia/types/Recorder.js.map +1 -1
  79. package/lib/commonjs/skia/types/Skia.d.ts +2 -0
  80. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  81. package/lib/commonjs/skia/types/Skottie.d.ts +223 -0
  82. package/lib/commonjs/skia/types/Skottie.js +73 -0
  83. package/lib/commonjs/skia/types/Skottie.js.map +1 -0
  84. package/lib/commonjs/skia/types/index.d.ts +1 -0
  85. package/lib/commonjs/skia/types/index.js +11 -0
  86. package/lib/commonjs/skia/types/index.js.map +1 -1
  87. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  88. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +88 -19
  89. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  90. package/lib/commonjs/skia/web/JsiSkia.js +2 -0
  91. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  92. package/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +59 -0
  93. package/lib/commonjs/skia/web/JsiSkottieAnimation.js +243 -0
  94. package/lib/commonjs/skia/web/JsiSkottieAnimation.js.map +1 -0
  95. package/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +9 -0
  96. package/lib/commonjs/skia/web/JsiSkottieFactory.js +26 -0
  97. package/lib/commonjs/skia/web/JsiSkottieFactory.js.map +1 -0
  98. package/lib/commonjs/sksg/Elements.d.ts +3 -1
  99. package/lib/commonjs/sksg/Elements.js.map +1 -1
  100. package/lib/commonjs/sksg/Node.d.ts +1 -1
  101. package/lib/commonjs/sksg/Node.js +1 -1
  102. package/lib/commonjs/sksg/Node.js.map +1 -1
  103. package/lib/commonjs/sksg/Recorder/Core.d.ts +4 -2
  104. package/lib/commonjs/sksg/Recorder/Core.js +1 -0
  105. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
  106. package/lib/commonjs/sksg/Recorder/Player.js +2 -0
  107. package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
  108. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  109. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +4 -0
  110. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  111. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +2 -1
  112. package/lib/commonjs/sksg/Recorder/Recorder.js +6 -0
  113. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
  114. package/lib/commonjs/sksg/Recorder/Visitor.js +3 -0
  115. package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -1
  116. package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +2 -2
  117. package/lib/commonjs/sksg/Recorder/commands/Drawing.js +11 -4
  118. package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
  119. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +12 -2
  120. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  121. package/lib/module/dom/nodes/datatypes/Gradient.d.ts +15 -15
  122. package/lib/module/dom/types/Drawings.d.ts +8 -1
  123. package/lib/module/dom/types/Drawings.js.map +1 -1
  124. package/lib/module/dom/types/NodeType.d.ts +3 -1
  125. package/lib/module/dom/types/NodeType.js +4 -0
  126. package/lib/module/dom/types/NodeType.js.map +1 -1
  127. package/lib/module/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  128. package/lib/module/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  129. package/lib/module/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  130. package/lib/module/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  131. package/lib/module/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  132. package/lib/module/renderer/__tests__/setup.d.ts +5 -0
  133. package/lib/module/renderer/components/ImageFilter.d.ts +4 -0
  134. package/lib/module/renderer/components/ImageFilter.js +5 -0
  135. package/lib/module/renderer/components/ImageFilter.js.map +1 -0
  136. package/lib/module/renderer/components/Skottie.d.ts +4 -0
  137. package/lib/module/renderer/components/Skottie.js +5 -0
  138. package/lib/module/renderer/components/Skottie.js.map +1 -0
  139. package/lib/module/renderer/components/index.d.ts +2 -0
  140. package/lib/module/renderer/components/index.js +2 -0
  141. package/lib/module/renderer/components/index.js.map +1 -1
  142. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  143. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  144. package/lib/module/skia/types/Matrix4.d.ts +11 -2
  145. package/lib/module/skia/types/Matrix4.js +40 -0
  146. package/lib/module/skia/types/Matrix4.js.map +1 -1
  147. package/lib/module/skia/types/Recorder.d.ts +2 -1
  148. package/lib/module/skia/types/Recorder.js.map +1 -1
  149. package/lib/module/skia/types/Skia.d.ts +2 -0
  150. package/lib/module/skia/types/Skia.js.map +1 -1
  151. package/lib/module/skia/types/Skottie.d.ts +223 -0
  152. package/lib/module/skia/types/Skottie.js +74 -0
  153. package/lib/module/skia/types/Skottie.js.map +1 -0
  154. package/lib/module/skia/types/index.d.ts +1 -0
  155. package/lib/module/skia/types/index.js +1 -0
  156. package/lib/module/skia/types/index.js.map +1 -1
  157. package/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  158. package/lib/module/skia/web/JsiSkImageFilterFactory.js +88 -19
  159. package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  160. package/lib/module/skia/web/JsiSkia.js +2 -0
  161. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkottieAnimation.d.ts +59 -0
  163. package/lib/module/skia/web/JsiSkottieAnimation.js +236 -0
  164. package/lib/module/skia/web/JsiSkottieAnimation.js.map +1 -0
  165. package/lib/module/skia/web/JsiSkottieFactory.d.ts +9 -0
  166. package/lib/module/skia/web/JsiSkottieFactory.js +19 -0
  167. package/lib/module/skia/web/JsiSkottieFactory.js.map +1 -0
  168. package/lib/module/sksg/Elements.d.ts +3 -1
  169. package/lib/module/sksg/Elements.js.map +1 -1
  170. package/lib/module/sksg/Node.d.ts +1 -1
  171. package/lib/module/sksg/Node.js +1 -1
  172. package/lib/module/sksg/Node.js.map +1 -1
  173. package/lib/module/sksg/Recorder/Core.d.ts +4 -2
  174. package/lib/module/sksg/Recorder/Core.js +1 -0
  175. package/lib/module/sksg/Recorder/Core.js.map +1 -1
  176. package/lib/module/sksg/Recorder/Player.js +3 -1
  177. package/lib/module/sksg/Recorder/Player.js.map +1 -1
  178. package/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  179. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +4 -0
  180. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  181. package/lib/module/sksg/Recorder/Recorder.d.ts +2 -1
  182. package/lib/module/sksg/Recorder/Recorder.js +6 -0
  183. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  184. package/lib/module/sksg/Recorder/Visitor.js +3 -0
  185. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  186. package/lib/module/sksg/Recorder/commands/Drawing.d.ts +2 -2
  187. package/lib/module/sksg/Recorder/commands/Drawing.js +9 -2
  188. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  189. package/lib/module/sksg/Recorder/commands/ImageFilters.js +12 -2
  190. package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  191. package/lib/typescript/lib/commonjs/renderer/components/ImageFilter.d.ts +2 -0
  192. package/lib/typescript/lib/commonjs/renderer/components/Skottie.d.ts +2 -0
  193. package/lib/typescript/lib/commonjs/skia/types/Matrix4.d.ts +1 -0
  194. package/lib/typescript/lib/commonjs/skia/types/Skottie.d.ts +6 -0
  195. package/lib/typescript/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
  196. package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +2 -0
  197. package/lib/typescript/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +48 -0
  198. package/lib/typescript/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +6 -0
  199. package/lib/typescript/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  200. package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -0
  201. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +1 -1
  202. package/lib/typescript/lib/module/mock/index.d.ts +8 -0
  203. package/lib/typescript/lib/module/renderer/components/ImageFilter.d.ts +2 -0
  204. package/lib/typescript/lib/module/renderer/components/Skottie.d.ts +2 -0
  205. package/lib/typescript/lib/module/renderer/components/index.d.ts +2 -0
  206. package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -0
  207. package/lib/typescript/lib/module/skia/types/Matrix4.d.ts +1 -0
  208. package/lib/typescript/lib/module/skia/types/Skottie.d.ts +5 -0
  209. package/lib/typescript/lib/module/skia/types/index.d.ts +1 -0
  210. package/lib/typescript/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
  211. package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +2 -0
  212. package/lib/typescript/lib/module/skia/web/JsiSkottieAnimation.d.ts +47 -0
  213. package/lib/typescript/lib/module/skia/web/JsiSkottieFactory.d.ts +5 -0
  214. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  215. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +1 -0
  216. package/lib/typescript/lib/module/sksg/Recorder/commands/Drawing.d.ts +1 -1
  217. package/lib/typescript/src/dom/nodes/datatypes/Gradient.d.ts +15 -15
  218. package/lib/typescript/src/dom/types/Drawings.d.ts +8 -1
  219. package/lib/typescript/src/dom/types/NodeType.d.ts +3 -1
  220. package/lib/typescript/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  221. package/lib/typescript/src/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  222. package/lib/typescript/src/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  223. package/lib/typescript/src/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  224. package/lib/typescript/src/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  225. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -0
  226. package/lib/typescript/src/renderer/components/ImageFilter.d.ts +4 -0
  227. package/lib/typescript/src/renderer/components/Skottie.d.ts +4 -0
  228. package/lib/typescript/src/renderer/components/index.d.ts +2 -0
  229. package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  230. package/lib/typescript/src/skia/types/Matrix4.d.ts +11 -2
  231. package/lib/typescript/src/skia/types/Recorder.d.ts +2 -1
  232. package/lib/typescript/src/skia/types/Skia.d.ts +2 -0
  233. package/lib/typescript/src/skia/types/Skottie.d.ts +223 -0
  234. package/lib/typescript/src/skia/types/index.d.ts +1 -0
  235. package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  236. package/lib/typescript/src/skia/web/JsiSkottieAnimation.d.ts +59 -0
  237. package/lib/typescript/src/skia/web/JsiSkottieFactory.d.ts +9 -0
  238. package/lib/typescript/src/sksg/Elements.d.ts +3 -1
  239. package/lib/typescript/src/sksg/Node.d.ts +1 -1
  240. package/lib/typescript/src/sksg/Recorder/Core.d.ts +4 -2
  241. package/lib/typescript/src/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  242. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +2 -1
  243. package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +2 -2
  244. package/libs/android/arm64-v8a/libjsonreader.a +0 -0
  245. package/libs/android/armeabi-v7a/libjsonreader.a +0 -0
  246. package/libs/android/x86/libjsonreader.a +0 -0
  247. package/libs/android/x86_64/libjsonreader.a +0 -0
  248. package/libs/apple/libpathops.xcframework/Info.plist +8 -8
  249. package/libs/apple/libskia.xcframework/Info.plist +14 -14
  250. package/libs/apple/libskottie.xcframework/Info.plist +14 -14
  251. package/libs/apple/libskparagraph.xcframework/Info.plist +16 -16
  252. package/libs/apple/libsksg.xcframework/Info.plist +5 -5
  253. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  254. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +14 -14
  255. package/libs/apple/libsvg.xcframework/Info.plist +14 -14
  256. package/package.json +1 -1
  257. package/react-native-skia.podspec +4 -2
  258. package/src/__tests__/snapshots/matrix4/camera-corner.png +0 -0
  259. package/src/__tests__/snapshots/matrix4/camera-offset.png +0 -0
  260. package/src/__tests__/snapshots/matrix4/camera-top-left-center.png +0 -0
  261. package/src/__tests__/snapshots/matrix4/camera-zoom-out.png +0 -0
  262. package/src/__tests__/snapshots/matrix4/full-rect.png +0 -0
  263. package/src/__tests__/snapshots/matrix4/rect.png +0 -0
  264. package/src/__tests__/snapshots/matrix4/scaled-rect.png +0 -0
  265. package/src/__tests__/snapshots/matrix4/test-perspective.png +0 -0
  266. package/src/__tests__/snapshots/matrix4/test-perspective2.png +0 -0
  267. package/src/dom/types/Drawings.ts +11 -0
  268. package/src/dom/types/NodeType.ts +4 -0
  269. package/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.tsx +492 -0
  270. package/src/renderer/__tests__/e2e/Camera.spec.tsx +475 -0
  271. package/src/renderer/__tests__/e2e/ImageFilter.spec.tsx +99 -0
  272. package/src/renderer/__tests__/e2e/LightingImageFilters.spec.tsx +1478 -0
  273. package/src/renderer/__tests__/e2e/Skottie.spec.tsx +440 -0
  274. package/src/renderer/__tests__/e2e/setup/skottie/basic_slots.json +1118 -0
  275. package/src/renderer/__tests__/e2e/setup/skottie/color-props.json +1 -0
  276. package/src/renderer/__tests__/e2e/setup/skottie/confetti.json +5899 -0
  277. package/src/renderer/__tests__/e2e/setup/skottie/drinks.json +43857 -0
  278. package/src/renderer/__tests__/e2e/setup/skottie/fingerprint.json +1 -0
  279. package/src/renderer/__tests__/e2e/setup/skottie/lego_loader.json +29540 -0
  280. package/src/renderer/__tests__/e2e/setup/skottie/new-drop.json +1 -0
  281. package/src/renderer/__tests__/e2e/setup/skottie/onboarding.json +1 -0
  282. package/src/renderer/__tests__/e2e/setup/skottie/text-layer.json +1 -0
  283. package/src/renderer/__tests__/setup.tsx +31 -0
  284. package/src/renderer/components/ImageFilter.tsx +8 -0
  285. package/src/renderer/components/Skottie.tsx +8 -0
  286. package/src/renderer/components/index.ts +2 -0
  287. package/src/skia/__tests__/assets/Avenir-Heavy.ttf +0 -0
  288. package/src/skia/types/ImageFilter/ImageFilterFactory.ts +391 -21
  289. package/src/skia/types/Matrix4.ts +108 -2
  290. package/src/skia/types/Recorder.ts +2 -0
  291. package/src/skia/types/Skia.ts +2 -0
  292. package/src/skia/types/Skottie.ts +266 -0
  293. package/src/skia/types/index.ts +1 -0
  294. package/src/skia/web/JsiSkImageFilterFactory.ts +266 -31
  295. package/src/skia/web/JsiSkia.ts +2 -0
  296. package/src/skia/web/JsiSkottieAnimation.ts +259 -0
  297. package/src/skia/web/JsiSkottieFactory.ts +25 -0
  298. package/src/sksg/Elements.tsx +4 -0
  299. package/src/sksg/Node.ts +1 -0
  300. package/src/sksg/Recorder/Core.ts +3 -0
  301. package/src/sksg/Recorder/Player.ts +3 -0
  302. package/src/sksg/Recorder/ReanimatedRecorder.ts +6 -0
  303. package/src/sksg/Recorder/Recorder.ts +5 -0
  304. package/src/sksg/Recorder/Visitor.ts +3 -0
  305. package/src/sksg/Recorder/commands/Drawing.ts +7 -3
  306. package/src/sksg/Recorder/commands/ImageFilters.ts +15 -2
@@ -8,22 +8,25 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libskshaper.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_arm64e</string>
11
+ <string>tvos-arm64_arm64e_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libskshaper.a</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
17
  <string>arm64e</string>
18
+ <string>x86_64</string>
18
19
  </array>
19
20
  <key>SupportedPlatform</key>
20
- <string>ios</string>
21
+ <string>tvos</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
21
24
  </dict>
22
25
  <dict>
23
26
  <key>BinaryPath</key>
24
27
  <string>libskshaper.a</string>
25
28
  <key>LibraryIdentifier</key>
26
- <string>tvos-arm64_arm64e_x86_64-simulator</string>
29
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
27
30
  <key>LibraryPath</key>
28
31
  <string>libskshaper.a</string>
29
32
  <key>SupportedArchitectures</key>
@@ -33,7 +36,7 @@
33
36
  <string>x86_64</string>
34
37
  </array>
35
38
  <key>SupportedPlatform</key>
36
- <string>tvos</string>
39
+ <string>ios</string>
37
40
  <key>SupportedPlatformVariant</key>
38
41
  <string>simulator</string>
39
42
  </dict>
@@ -41,40 +44,37 @@
41
44
  <key>BinaryPath</key>
42
45
  <string>libskshaper.a</string>
43
46
  <key>LibraryIdentifier</key>
44
- <string>macos-arm64_x86_64</string>
47
+ <string>tvos-arm64_arm64e</string>
45
48
  <key>LibraryPath</key>
46
49
  <string>libskshaper.a</string>
47
50
  <key>SupportedArchitectures</key>
48
51
  <array>
49
52
  <string>arm64</string>
50
- <string>x86_64</string>
53
+ <string>arm64e</string>
51
54
  </array>
52
55
  <key>SupportedPlatform</key>
53
- <string>macos</string>
56
+ <string>tvos</string>
54
57
  </dict>
55
58
  <dict>
56
59
  <key>BinaryPath</key>
57
60
  <string>libskshaper.a</string>
58
61
  <key>LibraryIdentifier</key>
59
- <string>ios-arm64_arm64e_x86_64-simulator</string>
62
+ <string>macos-arm64_x86_64</string>
60
63
  <key>LibraryPath</key>
61
64
  <string>libskshaper.a</string>
62
65
  <key>SupportedArchitectures</key>
63
66
  <array>
64
67
  <string>arm64</string>
65
- <string>arm64e</string>
66
68
  <string>x86_64</string>
67
69
  </array>
68
70
  <key>SupportedPlatform</key>
69
- <string>ios</string>
70
- <key>SupportedPlatformVariant</key>
71
- <string>simulator</string>
71
+ <string>macos</string>
72
72
  </dict>
73
73
  <dict>
74
74
  <key>BinaryPath</key>
75
75
  <string>libskshaper.a</string>
76
76
  <key>LibraryIdentifier</key>
77
- <string>tvos-arm64_arm64e</string>
77
+ <string>ios-arm64_arm64e</string>
78
78
  <key>LibraryPath</key>
79
79
  <string>libskshaper.a</string>
80
80
  <key>SupportedArchitectures</key>
@@ -83,7 +83,7 @@
83
83
  <string>arm64e</string>
84
84
  </array>
85
85
  <key>SupportedPlatform</key>
86
- <string>tvos</string>
86
+ <string>ios</string>
87
87
  </dict>
88
88
  </array>
89
89
  <key>CFBundlePackageType</key>
@@ -8,22 +8,25 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libskunicode_libgrapheme.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>tvos-arm64_arm64e</string>
11
+ <string>tvos-arm64_arm64e_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libskunicode_libgrapheme.a</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
17
  <string>arm64e</string>
18
+ <string>x86_64</string>
18
19
  </array>
19
20
  <key>SupportedPlatform</key>
20
21
  <string>tvos</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
21
24
  </dict>
22
25
  <dict>
23
26
  <key>BinaryPath</key>
24
27
  <string>libskunicode_libgrapheme.a</string>
25
28
  <key>LibraryIdentifier</key>
26
- <string>tvos-arm64_arm64e_x86_64-simulator</string>
29
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
27
30
  <key>LibraryPath</key>
28
31
  <string>libskunicode_libgrapheme.a</string>
29
32
  <key>SupportedArchitectures</key>
@@ -33,7 +36,7 @@
33
36
  <string>x86_64</string>
34
37
  </array>
35
38
  <key>SupportedPlatform</key>
36
- <string>tvos</string>
39
+ <string>ios</string>
37
40
  <key>SupportedPlatformVariant</key>
38
41
  <string>simulator</string>
39
42
  </dict>
@@ -41,49 +44,46 @@
41
44
  <key>BinaryPath</key>
42
45
  <string>libskunicode_libgrapheme.a</string>
43
46
  <key>LibraryIdentifier</key>
44
- <string>macos-arm64_x86_64</string>
47
+ <string>ios-arm64_arm64e</string>
45
48
  <key>LibraryPath</key>
46
49
  <string>libskunicode_libgrapheme.a</string>
47
50
  <key>SupportedArchitectures</key>
48
51
  <array>
49
52
  <string>arm64</string>
50
- <string>x86_64</string>
53
+ <string>arm64e</string>
51
54
  </array>
52
55
  <key>SupportedPlatform</key>
53
- <string>macos</string>
56
+ <string>ios</string>
54
57
  </dict>
55
58
  <dict>
56
59
  <key>BinaryPath</key>
57
60
  <string>libskunicode_libgrapheme.a</string>
58
61
  <key>LibraryIdentifier</key>
59
- <string>ios-arm64_arm64e</string>
62
+ <string>macos-arm64_x86_64</string>
60
63
  <key>LibraryPath</key>
61
64
  <string>libskunicode_libgrapheme.a</string>
62
65
  <key>SupportedArchitectures</key>
63
66
  <array>
64
67
  <string>arm64</string>
65
- <string>arm64e</string>
68
+ <string>x86_64</string>
66
69
  </array>
67
70
  <key>SupportedPlatform</key>
68
- <string>ios</string>
71
+ <string>macos</string>
69
72
  </dict>
70
73
  <dict>
71
74
  <key>BinaryPath</key>
72
75
  <string>libskunicode_libgrapheme.a</string>
73
76
  <key>LibraryIdentifier</key>
74
- <string>ios-arm64_arm64e_x86_64-simulator</string>
77
+ <string>tvos-arm64_arm64e</string>
75
78
  <key>LibraryPath</key>
76
79
  <string>libskunicode_libgrapheme.a</string>
77
80
  <key>SupportedArchitectures</key>
78
81
  <array>
79
82
  <string>arm64</string>
80
83
  <string>arm64e</string>
81
- <string>x86_64</string>
82
84
  </array>
83
85
  <key>SupportedPlatform</key>
84
- <string>ios</string>
85
- <key>SupportedPlatformVariant</key>
86
- <string>simulator</string>
86
+ <string>tvos</string>
87
87
  </dict>
88
88
  </array>
89
89
  <key>CFBundlePackageType</key>
@@ -8,7 +8,7 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libsvg.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_arm64e_x86_64-simulator</string>
11
+ <string>tvos-arm64_arm64e_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libsvg.a</string>
14
14
  <key>SupportedArchitectures</key>
@@ -18,7 +18,7 @@
18
18
  <string>x86_64</string>
19
19
  </array>
20
20
  <key>SupportedPlatform</key>
21
- <string>ios</string>
21
+ <string>tvos</string>
22
22
  <key>SupportedPlatformVariant</key>
23
23
  <string>simulator</string>
24
24
  </dict>
@@ -26,40 +26,40 @@
26
26
  <key>BinaryPath</key>
27
27
  <string>libsvg.a</string>
28
28
  <key>LibraryIdentifier</key>
29
- <string>tvos-arm64_arm64e_x86_64-simulator</string>
29
+ <string>ios-arm64_arm64e</string>
30
30
  <key>LibraryPath</key>
31
31
  <string>libsvg.a</string>
32
32
  <key>SupportedArchitectures</key>
33
33
  <array>
34
34
  <string>arm64</string>
35
35
  <string>arm64e</string>
36
- <string>x86_64</string>
37
36
  </array>
38
37
  <key>SupportedPlatform</key>
39
- <string>tvos</string>
40
- <key>SupportedPlatformVariant</key>
41
- <string>simulator</string>
38
+ <string>ios</string>
42
39
  </dict>
43
40
  <dict>
44
41
  <key>BinaryPath</key>
45
42
  <string>libsvg.a</string>
46
43
  <key>LibraryIdentifier</key>
47
- <string>macos-arm64_x86_64</string>
44
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
48
45
  <key>LibraryPath</key>
49
46
  <string>libsvg.a</string>
50
47
  <key>SupportedArchitectures</key>
51
48
  <array>
52
49
  <string>arm64</string>
50
+ <string>arm64e</string>
53
51
  <string>x86_64</string>
54
52
  </array>
55
53
  <key>SupportedPlatform</key>
56
- <string>macos</string>
54
+ <string>ios</string>
55
+ <key>SupportedPlatformVariant</key>
56
+ <string>simulator</string>
57
57
  </dict>
58
58
  <dict>
59
59
  <key>BinaryPath</key>
60
60
  <string>libsvg.a</string>
61
61
  <key>LibraryIdentifier</key>
62
- <string>ios-arm64_arm64e</string>
62
+ <string>tvos-arm64_arm64e</string>
63
63
  <key>LibraryPath</key>
64
64
  <string>libsvg.a</string>
65
65
  <key>SupportedArchitectures</key>
@@ -68,22 +68,22 @@
68
68
  <string>arm64e</string>
69
69
  </array>
70
70
  <key>SupportedPlatform</key>
71
- <string>ios</string>
71
+ <string>tvos</string>
72
72
  </dict>
73
73
  <dict>
74
74
  <key>BinaryPath</key>
75
75
  <string>libsvg.a</string>
76
76
  <key>LibraryIdentifier</key>
77
- <string>tvos-arm64_arm64e</string>
77
+ <string>macos-arm64_x86_64</string>
78
78
  <key>LibraryPath</key>
79
79
  <string>libsvg.a</string>
80
80
  <key>SupportedArchitectures</key>
81
81
  <array>
82
82
  <string>arm64</string>
83
- <string>arm64e</string>
83
+ <string>x86_64</string>
84
84
  </array>
85
85
  <key>SupportedPlatform</key>
86
- <string>tvos</string>
86
+ <string>macos</string>
87
87
  </dict>
88
88
  </array>
89
89
  <key>CFBundlePackageType</key>
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "setup-skia-web": "scripts/setup-canvaskit.js"
9
9
  },
10
10
  "title": "React Native Skia",
11
- "version": "2.0.7",
11
+ "version": "2.1.1",
12
12
  "description": "High-performance React Native Graphics using Skia",
13
13
  "main": "lib/module/index.js",
14
14
  "react-native": "src/index.ts",
@@ -49,8 +49,8 @@ end
49
49
 
50
50
  # Set preprocessor definitions based on GRAPHITE flag
51
51
  preprocessor_defs = use_graphite ?
52
- '$(inherited) SK_GRAPHITE=1 SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API=1' :
53
- '$(inherited) SK_METAL=1 SK_GANESH=1 SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API=1'
52
+ '$(inherited) SK_GRAPHITE=1 SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API=1 SK_DISABLE_LEGACY_SHAPER_FACTORY=1' :
53
+ '$(inherited) SK_METAL=1 SK_GANESH=1 SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API=1 SK_DISABLE_LEGACY_SHAPER_FACTORY=1'
54
54
 
55
55
  # Define base frameworks
56
56
  base_frameworks = ['libs/apple/libskia.xcframework',
@@ -59,6 +59,8 @@ base_frameworks = ['libs/apple/libskia.xcframework',
59
59
  'libs/apple/libskparagraph.xcframework',
60
60
  'libs/apple/libskunicode_core.xcframework',
61
61
  'libs/apple/libskunicode_libgrapheme.xcframework',
62
+ 'libs/apple/libskottie.xcframework',
63
+ 'libs/apple/libsksg.xcframework',
62
64
  'libs/apple/libpathops.xcframework',]
63
65
 
64
66
  Pod::Spec.new do |s|
@@ -18,6 +18,8 @@ import type {
18
18
  SkRSXform,
19
19
  SkColor,
20
20
  SamplingOptions,
21
+ SkSkottieAnimation,
22
+ SkImageFilter,
21
23
  } from "../../skia/types";
22
24
 
23
25
  import type {
@@ -106,6 +108,11 @@ export interface ImageSVGProps extends DrawingNodeProps {
106
108
  rect?: SkRect;
107
109
  }
108
110
 
111
+ export interface SkottieProps extends DrawingNodeProps {
112
+ animation: SkSkottieAnimation;
113
+ frame: number;
114
+ }
115
+
109
116
  export interface PictureProps extends DrawingNodeProps {
110
117
  picture: SkPicture;
111
118
  }
@@ -164,3 +171,7 @@ export interface BoxShadowProps {
164
171
  color?: Color;
165
172
  inner?: boolean;
166
173
  }
174
+
175
+ export interface ImageFilterProps extends GroupProps {
176
+ imageFilter: SkImageFilter;
177
+ }
@@ -71,4 +71,8 @@ export const enum NodeType {
71
71
 
72
72
  // Paragraph
73
73
  Paragraph = "skParagraph",
74
+ // Skottie
75
+ Skottie = "skSkottie",
76
+ // ImageFilter
77
+ ImageFilter = "skImageFilter",
74
78
  }