@shopify/react-native-skia 0.1.163 → 0.1.165

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. package/cpp/api/JsiSkPaint.h +6 -0
  2. package/cpp/api/JsiSkRuntimeEffect.h +7 -2
  3. package/cpp/jsi/JsiHostObject.h +25 -25
  4. package/cpp/rnskia/RNSkDomView.cpp +1 -1
  5. package/cpp/rnskia/RNSkPlatformContext.h +2 -6
  6. package/cpp/rnskia/dom/base/DrawingContext.cpp +23 -41
  7. package/cpp/rnskia/dom/base/DrawingContext.h +6 -19
  8. package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +12 -2
  9. package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +4 -4
  10. package/cpp/rnskia/dom/base/JsiDomNode.h +68 -10
  11. package/cpp/rnskia/dom/base/JsiDomRenderNode.h +26 -61
  12. package/cpp/rnskia/dom/base/NodeProp.h +2 -1
  13. package/cpp/rnskia/dom/base/NodePropsContainer.h +10 -0
  14. package/cpp/rnskia/dom/nodes/JsiBlendNode.h +1 -2
  15. package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +3 -6
  16. package/cpp/rnskia/dom/nodes/JsiBoxNode.h +2 -4
  17. package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +1 -2
  18. package/cpp/rnskia/dom/nodes/JsiCircleNode.h +2 -5
  19. package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +4 -8
  20. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +2 -5
  21. package/cpp/rnskia/dom/nodes/JsiDiffRectNode.h +2 -7
  22. package/cpp/rnskia/dom/nodes/JsiGlyphsNode.h +4 -8
  23. package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +20 -38
  24. package/cpp/rnskia/dom/nodes/JsiImageNode.h +1 -1
  25. package/cpp/rnskia/dom/nodes/JsiImageSvgNode.h +2 -4
  26. package/cpp/rnskia/dom/nodes/JsiLineNode.h +2 -7
  27. package/cpp/rnskia/dom/nodes/JsiOvalNode.h +1 -3
  28. package/cpp/rnskia/dom/nodes/JsiPaintNode.h +2 -3
  29. package/cpp/rnskia/dom/nodes/JsiPatchNode.h +4 -8
  30. package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +14 -28
  31. package/cpp/rnskia/dom/nodes/JsiPathNode.h +6 -16
  32. package/cpp/rnskia/dom/nodes/JsiPictureNode.h +1 -2
  33. package/cpp/rnskia/dom/nodes/JsiPointsNode.h +2 -5
  34. package/cpp/rnskia/dom/nodes/JsiRRectNode.h +1 -2
  35. package/cpp/rnskia/dom/nodes/JsiRectNode.h +1 -2
  36. package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +37 -69
  37. package/cpp/rnskia/dom/nodes/JsiTextBlobNode.h +3 -6
  38. package/cpp/rnskia/dom/nodes/JsiTextNode.h +4 -8
  39. package/cpp/rnskia/dom/nodes/JsiTextPathNode.h +1 -2
  40. package/cpp/rnskia/dom/nodes/JsiVerticesNode.h +2 -4
  41. package/cpp/rnskia/dom/props/CircleProp.h +2 -0
  42. package/cpp/rnskia/dom/props/ColorProp.h +9 -4
  43. package/cpp/rnskia/dom/props/ImageProps.h +3 -2
  44. package/cpp/rnskia/dom/props/PaintProps.h +15 -7
  45. package/cpp/rnskia/dom/props/RectProp.h +11 -4
  46. package/cpp/rnskia/dom/props/TransformProp.h +0 -2
  47. package/cpp/rnskia/dom/props/UniformsProp.h +86 -123
  48. package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -6
  49. package/cpp/utils/RNSkLog.h +1 -1
  50. package/lib/commonjs/dom/nodes/RenderNode.js +12 -16
  51. package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
  52. package/lib/commonjs/dom/nodes/datatypes/Circle.js +6 -1
  53. package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
  54. package/lib/commonjs/dom/nodes/datatypes/Rect.js +3 -3
  55. package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
  56. package/lib/commonjs/dom/nodes/datatypes/index.js +0 -13
  57. package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
  58. package/lib/commonjs/dom/nodes/drawings/Box.js +6 -6
  59. package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
  60. package/lib/commonjs/dom/nodes/drawings/ImageNode.js +2 -2
  61. package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
  62. package/lib/commonjs/dom/nodes/drawings/PatchNode.js +3 -7
  63. package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
  64. package/lib/commonjs/dom/nodes/drawings/VerticesNode.js +1 -1
  65. package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
  66. package/lib/commonjs/dom/nodes/paint/ColorFilters.js +1 -3
  67. package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
  68. package/lib/commonjs/dom/nodes/paint/ImageFilters.js +1 -1
  69. package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
  70. package/lib/commonjs/dom/nodes/paint/Shaders.js +1 -3
  71. package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
  72. package/lib/commonjs/dom/types/Common.js.map +1 -1
  73. package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
  74. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  75. package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
  76. package/lib/commonjs/renderer/components/Mask.js +2 -6
  77. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  78. package/lib/commonjs/renderer/components/image/Image.js +0 -5
  79. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  80. package/lib/commonjs/renderer/components/image/ImageShader.js +20 -10
  81. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  82. package/lib/commonjs/renderer/components/imageFilters/Blur.js +10 -5
  83. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  84. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +10 -5
  85. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  86. package/lib/commonjs/renderer/components/imageFilters/Offset.js +12 -6
  87. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  88. package/lib/commonjs/renderer/components/maskFilters/Blur.js +12 -6
  89. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  90. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +10 -5
  91. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  92. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +14 -7
  93. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  94. package/lib/commonjs/renderer/components/shaders/Shader.js +10 -5
  95. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  96. package/lib/commonjs/renderer/components/shaders/Turbulence.js +14 -7
  97. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  98. package/lib/commonjs/renderer/components/shapes/Circle.js +0 -6
  99. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  100. package/lib/commonjs/renderer/components/shapes/FitBox.js +1 -4
  101. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  102. package/lib/commonjs/renderer/components/shapes/Oval.js +0 -4
  103. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  104. package/lib/commonjs/renderer/components/shapes/Path.js +12 -6
  105. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  106. package/lib/commonjs/renderer/components/shapes/Points.js +10 -5
  107. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  108. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +0 -3
  109. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  110. package/lib/commonjs/renderer/components/shapes/Vertices.js +10 -5
  111. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  112. package/lib/commonjs/renderer/components/text/Glyphs.js +12 -6
  113. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  114. package/lib/commonjs/renderer/components/text/Text.js +12 -6
  115. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  116. package/lib/commonjs/renderer/components/text/TextBlob.js +12 -6
  117. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  118. package/lib/commonjs/renderer/components/text/TextPath.js +10 -5
  119. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  120. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  121. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  122. package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  123. package/lib/commonjs/skia/types/Shader/Shader.js +3 -2
  124. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  125. package/lib/commonjs/skia/web/JsiSkPaint.js +4 -0
  126. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  127. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -1
  128. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  129. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  130. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  131. package/lib/commonjs/web/LoadSkiaWeb.js +1 -1
  132. package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
  133. package/lib/module/dom/nodes/RenderNode.js +12 -16
  134. package/lib/module/dom/nodes/RenderNode.js.map +1 -1
  135. package/lib/module/dom/nodes/datatypes/Circle.js +8 -1
  136. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  137. package/lib/module/dom/nodes/datatypes/Rect.js +7 -3
  138. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  139. package/lib/module/dom/nodes/datatypes/index.js +0 -1
  140. package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
  141. package/lib/module/dom/nodes/drawings/Box.js +6 -5
  142. package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
  143. package/lib/module/dom/nodes/drawings/ImageNode.js +4 -2
  144. package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
  145. package/lib/module/dom/nodes/drawings/PatchNode.js +4 -8
  146. package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
  147. package/lib/module/dom/nodes/drawings/VerticesNode.js +2 -2
  148. package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
  149. package/lib/module/dom/nodes/paint/ColorFilters.js +1 -2
  150. package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
  151. package/lib/module/dom/nodes/paint/ImageFilters.js +2 -2
  152. package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
  153. package/lib/module/dom/nodes/paint/Shaders.js +1 -2
  154. package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
  155. package/lib/module/dom/types/Common.js.map +1 -1
  156. package/lib/module/dom/types/DrawingContext.js.map +1 -1
  157. package/lib/module/dom/types/Drawings.js.map +1 -1
  158. package/lib/module/renderer/DrawingContext.js.map +1 -1
  159. package/lib/module/renderer/components/Mask.js +2 -6
  160. package/lib/module/renderer/components/Mask.js.map +1 -1
  161. package/lib/module/renderer/components/image/Image.js +0 -5
  162. package/lib/module/renderer/components/image/Image.js.map +1 -1
  163. package/lib/module/renderer/components/image/ImageShader.js +20 -10
  164. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  165. package/lib/module/renderer/components/imageFilters/Blur.js +10 -5
  166. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  167. package/lib/module/renderer/components/imageFilters/Morphology.js +10 -5
  168. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  169. package/lib/module/renderer/components/imageFilters/Offset.js +12 -6
  170. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  171. package/lib/module/renderer/components/maskFilters/Blur.js +12 -6
  172. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  173. package/lib/module/renderer/components/pathEffects/Discrete.js +10 -5
  174. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  175. package/lib/module/renderer/components/shaders/FractalNoise.js +14 -7
  176. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  177. package/lib/module/renderer/components/shaders/Shader.js +10 -5
  178. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  179. package/lib/module/renderer/components/shaders/Turbulence.js +14 -7
  180. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  181. package/lib/module/renderer/components/shapes/Circle.js +0 -6
  182. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  183. package/lib/module/renderer/components/shapes/FitBox.js +1 -4
  184. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  185. package/lib/module/renderer/components/shapes/Oval.js +0 -4
  186. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  187. package/lib/module/renderer/components/shapes/Path.js +12 -6
  188. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  189. package/lib/module/renderer/components/shapes/Points.js +10 -5
  190. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  191. package/lib/module/renderer/components/shapes/RoundedRect.js +0 -3
  192. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  193. package/lib/module/renderer/components/shapes/Vertices.js +10 -5
  194. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  195. package/lib/module/renderer/components/text/Glyphs.js +12 -6
  196. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  197. package/lib/module/renderer/components/text/Text.js +12 -6
  198. package/lib/module/renderer/components/text/Text.js.map +1 -1
  199. package/lib/module/renderer/components/text/TextBlob.js +12 -6
  200. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  201. package/lib/module/renderer/components/text/TextPath.js +10 -5
  202. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  203. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  204. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  205. package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  206. package/lib/module/skia/types/Shader/Shader.js +3 -2
  207. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  208. package/lib/module/skia/web/JsiSkPaint.js +4 -0
  209. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  210. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -1
  211. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  212. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  213. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  214. package/lib/module/web/LoadSkiaWeb.js +1 -1
  215. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  216. package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +4 -1
  217. package/lib/typescript/src/dom/nodes/datatypes/index.d.ts +0 -1
  218. package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +1 -1
  219. package/lib/typescript/src/dom/nodes/drawings/PatchNode.d.ts +1 -1
  220. package/lib/typescript/src/dom/types/Common.d.ts +4 -4
  221. package/lib/typescript/src/dom/types/DrawingContext.d.ts +0 -1
  222. package/lib/typescript/src/dom/types/Drawings.d.ts +1 -1
  223. package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -5
  224. package/lib/typescript/src/renderer/components/Mask.d.ts +3 -9
  225. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -8
  226. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -12
  227. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -7
  228. package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -7
  229. package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -8
  230. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -8
  231. package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -7
  232. package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -9
  233. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -7
  234. package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -9
  235. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +1 -9
  236. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -7
  237. package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +1 -7
  238. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -8
  239. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -7
  240. package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +1 -6
  241. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -7
  242. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -8
  243. package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -8
  244. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -8
  245. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -7
  246. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +5 -0
  247. package/lib/typescript/src/skia/types/Paint/Paint.d.ts +4 -0
  248. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +4 -0
  249. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
  250. package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
  251. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +3 -1
  252. package/package.json +1 -1
  253. package/src/dom/nodes/RenderNode.ts +11 -21
  254. package/src/dom/nodes/datatypes/Circle.ts +1 -1
  255. package/src/dom/nodes/datatypes/Rect.ts +3 -3
  256. package/src/dom/nodes/datatypes/index.ts +0 -1
  257. package/src/dom/nodes/drawings/Box.ts +7 -4
  258. package/src/dom/nodes/drawings/ImageNode.ts +2 -1
  259. package/src/dom/nodes/drawings/PatchNode.ts +4 -18
  260. package/src/dom/nodes/drawings/VerticesNode.ts +2 -2
  261. package/src/dom/nodes/paint/ColorFilters.ts +1 -2
  262. package/src/dom/nodes/paint/ImageFilters.ts +2 -2
  263. package/src/dom/nodes/paint/Shaders.ts +1 -2
  264. package/src/dom/types/Common.ts +4 -4
  265. package/src/dom/types/DrawingContext.ts +0 -1
  266. package/src/dom/types/Drawings.ts +1 -1
  267. package/src/renderer/DrawingContext.ts +5 -5
  268. package/src/renderer/components/Mask.tsx +8 -8
  269. package/src/renderer/components/image/Image.tsx +0 -6
  270. package/src/renderer/components/image/ImageShader.tsx +24 -12
  271. package/src/renderer/components/imageFilters/Blur.tsx +6 -7
  272. package/src/renderer/components/imageFilters/Morphology.tsx +6 -7
  273. package/src/renderer/components/imageFilters/Offset.tsx +7 -8
  274. package/src/renderer/components/maskFilters/Blur.tsx +7 -8
  275. package/src/renderer/components/pathEffects/Discrete.tsx +6 -9
  276. package/src/renderer/components/shaders/FractalNoise.tsx +18 -9
  277. package/src/renderer/components/shaders/Shader.tsx +6 -7
  278. package/src/renderer/components/shaders/Turbulence.tsx +15 -9
  279. package/src/renderer/components/shapes/Circle.tsx +0 -4
  280. package/src/renderer/components/shapes/FitBox.tsx +2 -6
  281. package/src/renderer/components/shapes/Oval.tsx +0 -5
  282. package/src/renderer/components/shapes/Path.tsx +7 -8
  283. package/src/renderer/components/shapes/Points.tsx +6 -7
  284. package/src/renderer/components/shapes/RoundedRect.tsx +0 -4
  285. package/src/renderer/components/shapes/Vertices.tsx +6 -7
  286. package/src/renderer/components/text/Glyphs.tsx +7 -8
  287. package/src/renderer/components/text/Text.tsx +7 -8
  288. package/src/renderer/components/text/TextBlob.tsx +7 -8
  289. package/src/renderer/components/text/TextPath.tsx +6 -7
  290. package/src/renderer/processors/Animations/Animations.ts +9 -3
  291. package/src/skia/types/Paint/Paint.ts +5 -0
  292. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -0
  293. package/src/skia/types/Shader/Shader.ts +5 -3
  294. package/src/skia/web/JsiSkPaint.ts +4 -0
  295. package/src/skia/web/JsiSkRuntimeEffect.ts +5 -1
  296. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +1 -1
  297. package/src/web/LoadSkiaWeb.tsx +1 -1
  298. package/lib/commonjs/dom/nodes/datatypes/Color.js +0 -27
  299. package/lib/commonjs/dom/nodes/datatypes/Color.js.map +0 -1
  300. package/lib/module/dom/nodes/datatypes/Color.js +0 -11
  301. package/lib/module/dom/nodes/datatypes/Color.js.map +0 -1
  302. package/lib/typescript/src/dom/nodes/datatypes/Color.d.ts +0 -7
  303. package/src/dom/nodes/datatypes/Color.ts +0 -15
@@ -9,12 +9,17 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const DiscretePathEffect = props => {
13
- return /*#__PURE__*/_react.default.createElement("skDiscretePathEffect", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const DiscretePathEffect = _ref => {
15
+ let {
16
+ seed = 0,
17
+ ...props
18
+ } = _ref;
19
+ return /*#__PURE__*/_react.default.createElement("skDiscretePathEffect", _extends({
20
+ seed: seed
21
+ }, props));
14
22
  };
15
23
 
16
24
  exports.DiscretePathEffect = DiscretePathEffect;
17
- DiscretePathEffect.defaultProps = {
18
- seed: 0
19
- };
20
25
  //# sourceMappingURL=Discrete.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DiscretePathEffect","props","defaultProps","seed"],"sources":["Discrete.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\nimport type { DiscretePathEffectProps } from \"../../../dom/types\";\n\nexport const DiscretePathEffect = (\n props: SkiaProps<DiscretePathEffectProps>\n) => {\n return <skDiscretePathEffect {...props} />;\n};\n\nDiscretePathEffect.defaultProps = {\n seed: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,kBAAkB,GAC7BC,KADgC,IAE7B;EACH,oBAAO,qDAA0BA,KAA1B,CAAP;AACD,CAJM;;;AAMPD,kBAAkB,CAACE,YAAnB,GAAkC;EAChCC,IAAI,EAAE;AAD0B,CAAlC"}
1
+ {"version":3,"names":["DiscretePathEffect","seed","props"],"sources":["Discrete.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\nimport type { DiscretePathEffectProps } from \"../../../dom/types\";\n\nexport const DiscretePathEffect = ({\n seed = 0,\n ...props\n}: SkiaDefaultProps<DiscretePathEffectProps, \"seed\">) => {\n return <skDiscretePathEffect seed={seed} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,kBAAkB,GAAG,QAGuB;EAAA,IAHtB;IACjCC,IAAI,GAAG,CAD0B;IAEjC,GAAGC;EAF8B,CAGsB;EACvD,oBAAO;IAAsB,IAAI,EAAED;EAA5B,GAAsCC,KAAtC,EAAP;AACD,CALM"}
@@ -9,14 +9,21 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const FractalNoise = props => {
13
- return /*#__PURE__*/_react.default.createElement("skFractalNoise", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const FractalNoise = _ref => {
15
+ let {
16
+ seed = 0,
17
+ tileWidth = 0,
18
+ tileHeight = 0,
19
+ ...props
20
+ } = _ref;
21
+ return /*#__PURE__*/_react.default.createElement("skFractalNoise", _extends({
22
+ seed: seed,
23
+ tileWidth: tileWidth,
24
+ tileHeight: tileHeight
25
+ }, props));
14
26
  };
15
27
 
16
28
  exports.FractalNoise = FractalNoise;
17
- FractalNoise.defaultProps = {
18
- seed: 0,
19
- tileWidth: 0,
20
- tileHeight: 0
21
- };
22
29
  //# sourceMappingURL=FractalNoise.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FractalNoise","props","defaultProps","seed","tileWidth","tileHeight"],"sources":["FractalNoise.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { FractalNoiseProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\n\nexport const FractalNoise = (props: SkiaProps<FractalNoiseProps>) => {\n return <skFractalNoise {...props} />;\n};\n\nFractalNoise.defaultProps = {\n seed: 0,\n tileWidth: 0,\n tileHeight: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,YAAY,GAAIC,KAAD,IAAyC;EACnE,oBAAO,+CAAoBA,KAApB,CAAP;AACD,CAFM;;;AAIPD,YAAY,CAACE,YAAb,GAA4B;EAC1BC,IAAI,EAAE,CADoB;EAE1BC,SAAS,EAAE,CAFe;EAG1BC,UAAU,EAAE;AAHc,CAA5B"}
1
+ {"version":3,"names":["FractalNoise","seed","tileWidth","tileHeight","props"],"sources":["FractalNoise.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { FractalNoiseProps } from \"../../../dom/types\";\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\n\nexport const FractalNoise = ({\n seed = 0,\n tileWidth = 0,\n tileHeight = 0,\n ...props\n}: SkiaDefaultProps<\n FractalNoiseProps,\n \"seed\" | \"tileHeight\" | \"tileWidth\"\n>) => {\n return (\n <skFractalNoise\n seed={seed}\n tileWidth={tileWidth}\n tileHeight={tileHeight}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,YAAY,GAAG,QAQtB;EAAA,IARuB;IAC3BC,IAAI,GAAG,CADoB;IAE3BC,SAAS,GAAG,CAFe;IAG3BC,UAAU,GAAG,CAHc;IAI3B,GAAGC;EAJwB,CAQvB;EACJ,oBACE;IACE,IAAI,EAAEH,IADR;IAEE,SAAS,EAAEC,SAFb;IAGE,UAAU,EAAEC;EAHd,GAIMC,KAJN,EADF;AAQD,CAjBM"}
@@ -9,12 +9,17 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Shader = props => {
13
- return /*#__PURE__*/_react.default.createElement("skShader", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Shader = _ref => {
15
+ let {
16
+ uniforms = {},
17
+ ...props
18
+ } = _ref;
19
+ return /*#__PURE__*/_react.default.createElement("skShader", _extends({
20
+ uniforms: uniforms
21
+ }, props));
14
22
  };
15
23
 
16
24
  exports.Shader = Shader;
17
- Shader.defaultProps = {
18
- uniforms: []
19
- };
20
25
  //# sourceMappingURL=Shader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Shader","props","defaultProps","uniforms"],"sources":["Shader.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { ShaderProps } from \"../../../dom/types\";\n\nexport const Shader = (props: SkiaProps<ShaderProps>) => {\n return <skShader {...props} />;\n};\n\nShader.defaultProps = {\n uniforms: [],\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,yCAAcA,KAAd,CAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,QAAQ,EAAE;AADU,CAAtB"}
1
+ {"version":3,"names":["Shader","uniforms","props"],"sources":["Shader.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { ShaderProps } from \"../../../dom/types\";\n\nexport const Shader = ({\n uniforms = {},\n ...props\n}: SkiaDefaultProps<ShaderProps, \"uniforms\">) => {\n return <skShader uniforms={uniforms} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,MAAM,GAAG,QAG2B;EAAA,IAH1B;IACrBC,QAAQ,GAAG,EADU;IAErB,GAAGC;EAFkB,CAG0B;EAC/C,oBAAO;IAAU,QAAQ,EAAED;EAApB,GAAkCC,KAAlC,EAAP;AACD,CALM"}
@@ -9,14 +9,21 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Turbulence = props => {
13
- return /*#__PURE__*/_react.default.createElement("skTurbulence", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Turbulence = _ref => {
15
+ let {
16
+ seed = 0,
17
+ tileWidth = 0,
18
+ tileHeight = 0,
19
+ ...props
20
+ } = _ref;
21
+ return /*#__PURE__*/_react.default.createElement("skTurbulence", _extends({
22
+ seed: seed,
23
+ tileWidth: tileWidth,
24
+ tileHeight: tileHeight
25
+ }, props));
14
26
  };
15
27
 
16
28
  exports.Turbulence = Turbulence;
17
- Turbulence.defaultProps = {
18
- seed: 0,
19
- tileWidth: 0,
20
- tileHeight: 0
21
- };
22
29
  //# sourceMappingURL=Turbulence.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Turbulence","props","defaultProps","seed","tileWidth","tileHeight"],"sources":["Turbulence.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { TurbulenceProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\n\nexport const Turbulence = (props: SkiaProps<TurbulenceProps>) => {\n return <skTurbulence {...props} />;\n};\n\nTurbulence.defaultProps = {\n seed: 0,\n tileWidth: 0,\n tileHeight: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,UAAU,GAAIC,KAAD,IAAuC;EAC/D,oBAAO,6CAAkBA,KAAlB,CAAP;AACD,CAFM;;;AAIPD,UAAU,CAACE,YAAX,GAA0B;EACxBC,IAAI,EAAE,CADkB;EAExBC,SAAS,EAAE,CAFa;EAGxBC,UAAU,EAAE;AAHY,CAA1B"}
1
+ {"version":3,"names":["Turbulence","seed","tileWidth","tileHeight","props"],"sources":["Turbulence.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { TurbulenceProps } from \"../../../dom/types\";\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\n\nexport const Turbulence = ({\n seed = 0,\n tileWidth = 0,\n tileHeight = 0,\n ...props\n}: SkiaDefaultProps<TurbulenceProps, \"seed\" | \"tileWidth\" | \"tileHeight\">) => {\n return (\n <skTurbulence\n seed={seed}\n tileWidth={tileWidth}\n tileHeight={tileHeight}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,UAAU,GAAG,QAKoD;EAAA,IALnD;IACzBC,IAAI,GAAG,CADkB;IAEzBC,SAAS,GAAG,CAFa;IAGzBC,UAAU,GAAG,CAHY;IAIzB,GAAGC;EAJsB,CAKmD;EAC5E,oBACE;IACE,IAAI,EAAEH,IADR;IAEE,SAAS,EAAEC,SAFb;IAGE,UAAU,EAAEC;EAHd,GAIMC,KAJN,EADF;AAQD,CAdM"}
@@ -14,10 +14,4 @@ const Circle = props => {
14
14
  };
15
15
 
16
16
  exports.Circle = Circle;
17
- Circle.defaultProps = {
18
- c: {
19
- x: 0,
20
- y: 0
21
- }
22
- };
23
17
  //# sourceMappingURL=Circle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Circle","props","defaultProps","c","x","y"],"sources":["Circle.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { CircleProps } from \"../../../dom/types\";\n\nexport const Circle = (props: SkiaProps<CircleProps>) => {\n return <skCircle {...props} />;\n};\n\nCircle.defaultProps = {\n c: { x: 0, y: 0 },\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,yCAAcA,KAAd,CAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,CAAC,EAAE;IAAEC,CAAC,EAAE,CAAL;IAAQC,CAAC,EAAE;EAAX;AADiB,CAAtB"}
1
+ {"version":3,"names":["Circle","props"],"sources":["Circle.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { CircleProps } from \"../../../dom/types\";\n\nexport const Circle = (props: SkiaProps<CircleProps>) => {\n return <skCircle {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,yCAAcA,KAAd,CAAP;AACD,CAFM"}
@@ -24,7 +24,7 @@ exports.fitbox = fitbox;
24
24
 
25
25
  const FitBox = _ref => {
26
26
  let {
27
- fit,
27
+ fit = "contain",
28
28
  src,
29
29
  dst,
30
30
  children
@@ -36,7 +36,4 @@ const FitBox = _ref => {
36
36
  };
37
37
 
38
38
  exports.FitBox = FitBox;
39
- FitBox.defaultProps = {
40
- fit: "contain"
41
- };
42
39
  //# sourceMappingURL=FitBox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fitbox","fit","src","dst","rects","fitRects","rect2rect","FitBox","children","transform","useMemo","defaultProps"],"sources":["FitBox.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport type { Fit } from \"../../../dom/nodes\";\nimport { fitRects, rect2rect } from \"../../../dom/nodes\";\nimport type { SkRect } from \"../../../skia/types\";\nimport { Group } from \"../Group\";\n\ninterface FitProps {\n fit: Fit;\n src: SkRect;\n dst: SkRect;\n children: ReactNode | ReactNode[];\n}\n\nexport const fitbox = (fit: Fit, src: SkRect, dst: SkRect) => {\n const rects = fitRects(fit, src, dst);\n return rect2rect(rects.src, rects.dst);\n};\n\nexport const FitBox = ({ fit, src, dst, children }: FitProps) => {\n const transform = useMemo(() => fitbox(fit, src, dst), [dst, fit, src]);\n return <Group transform={transform}>{children}</Group>;\n};\n\nFitBox.defaultProps = {\n fit: \"contain\",\n};\n"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;;;;;AASO,MAAMA,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;EAC5D,MAAMC,KAAK,GAAG,IAAAC,eAAA,EAASJ,GAAT,EAAcC,GAAd,EAAmBC,GAAnB,CAAd;EACA,OAAO,IAAAG,gBAAA,EAAUF,KAAK,CAACF,GAAhB,EAAqBE,KAAK,CAACD,GAA3B,CAAP;AACD,CAHM;;;;AAKA,MAAMI,MAAM,GAAG,QAA2C;EAAA,IAA1C;IAAEN,GAAF;IAAOC,GAAP;IAAYC,GAAZ;IAAiBK;EAAjB,CAA0C;EAC/D,MAAMC,SAAS,GAAG,IAAAC,cAAA,EAAQ,MAAMV,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAApB,EAAqC,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAArC,CAAlB;EACA,oBAAO,6BAAC,YAAD;IAAO,SAAS,EAAEO;EAAlB,GAA8BD,QAA9B,CAAP;AACD,CAHM;;;AAKPD,MAAM,CAACI,YAAP,GAAsB;EACpBV,GAAG,EAAE;AADe,CAAtB"}
1
+ {"version":3,"names":["fitbox","fit","src","dst","rects","fitRects","rect2rect","FitBox","children","transform","useMemo"],"sources":["FitBox.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport type { Fit } from \"../../../dom/nodes\";\nimport { fitRects, rect2rect } from \"../../../dom/nodes\";\nimport type { SkRect } from \"../../../skia/types\";\nimport { Group } from \"../Group\";\n\ninterface FitProps {\n fit?: Fit;\n src: SkRect;\n dst: SkRect;\n children: ReactNode | ReactNode[];\n}\n\nexport const fitbox = (fit: Fit, src: SkRect, dst: SkRect) => {\n const rects = fitRects(fit, src, dst);\n return rect2rect(rects.src, rects.dst);\n};\n\nexport const FitBox = ({ fit = \"contain\", src, dst, children }: FitProps) => {\n const transform = useMemo(() => fitbox(fit, src, dst), [dst, fit, src]);\n return <Group transform={transform}>{children}</Group>;\n};\n"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;;;;;AASO,MAAMA,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;EAC5D,MAAMC,KAAK,GAAG,IAAAC,eAAA,EAASJ,GAAT,EAAcC,GAAd,EAAmBC,GAAnB,CAAd;EACA,OAAO,IAAAG,gBAAA,EAAUF,KAAK,CAACF,GAAhB,EAAqBE,KAAK,CAACD,GAA3B,CAAP;AACD,CAHM;;;;AAKA,MAAMI,MAAM,GAAG,QAAuD;EAAA,IAAtD;IAAEN,GAAG,GAAG,SAAR;IAAmBC,GAAnB;IAAwBC,GAAxB;IAA6BK;EAA7B,CAAsD;EAC3E,MAAMC,SAAS,GAAG,IAAAC,cAAA,EAAQ,MAAMV,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAApB,EAAqC,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAArC,CAAlB;EACA,oBAAO,6BAAC,YAAD;IAAO,SAAS,EAAEO;EAAlB,GAA8BD,QAA9B,CAAP;AACD,CAHM"}
@@ -14,8 +14,4 @@ const Oval = props => {
14
14
  };
15
15
 
16
16
  exports.Oval = Oval;
17
- Oval.defaultProps = {
18
- x: 0,
19
- y: 0
20
- };
21
17
  //# sourceMappingURL=Oval.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Oval","props","defaultProps","x","y"],"sources":["Oval.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { OvalProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors\";\n\nexport const Oval = (props: SkiaProps<OvalProps>) => {\n return <skOval {...props} />;\n};\n\nOval.defaultProps = {\n x: 0,\n y: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,uCAAYA,KAAZ,CAAP;AACD,CAFM;;;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,CAAC,EAAE,CADe;EAElBC,CAAC,EAAE;AAFe,CAApB"}
1
+ {"version":3,"names":["Oval","props"],"sources":["Oval.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { OvalProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors\";\n\nexport const Oval = (props: SkiaProps<OvalProps>) => {\n return <skOval {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,uCAAYA,KAAZ,CAAP;AACD,CAFM"}
@@ -9,13 +9,19 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Path = props => {
13
- return /*#__PURE__*/_react.default.createElement("skPath", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Path = _ref => {
15
+ let {
16
+ start = 0,
17
+ end = 1,
18
+ ...props
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("skPath", _extends({
21
+ start: start,
22
+ end: end
23
+ }, props));
14
24
  };
15
25
 
16
26
  exports.Path = Path;
17
- Path.defaultProps = {
18
- start: 0,
19
- end: 1
20
- };
21
27
  //# sourceMappingURL=Path.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Path","props","defaultProps","start","end"],"sources":["Path.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { PathProps } from \"../../../dom/types\";\n\nexport const Path = (props: SkiaProps<PathProps>) => {\n return <skPath {...props} />;\n};\n\nPath.defaultProps = {\n start: 0,\n end: 1,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,uCAAYA,KAAZ,CAAP;AACD,CAFM;;;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,KAAK,EAAE,CADW;EAElBC,GAAG,EAAE;AAFa,CAApB"}
1
+ {"version":3,"names":["Path","start","end","props"],"sources":["Path.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { PathProps } from \"../../../dom/types\";\n\nexport const Path = ({\n start = 0,\n end = 1,\n ...props\n}: SkiaDefaultProps<PathProps, \"start\" | \"end\">) => {\n return <skPath start={start} end={end} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,IAAI,GAAG,QAIgC;EAAA,IAJ/B;IACnBC,KAAK,GAAG,CADW;IAEnBC,GAAG,GAAG,CAFa;IAGnB,GAAGC;EAHgB,CAI+B;EAClD,oBAAO;IAAQ,KAAK,EAAEF,KAAf;IAAsB,GAAG,EAAEC;EAA3B,GAAoCC,KAApC,EAAP;AACD,CANM"}
@@ -9,12 +9,17 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Points = props => {
13
- return /*#__PURE__*/_react.default.createElement("skPoints", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Points = _ref => {
15
+ let {
16
+ mode = "points",
17
+ ...props
18
+ } = _ref;
19
+ return /*#__PURE__*/_react.default.createElement("skPoints", _extends({
20
+ mode: mode
21
+ }, props));
14
22
  };
15
23
 
16
24
  exports.Points = Points;
17
- Points.defaultProps = {
18
- mode: "points"
19
- };
20
25
  //# sourceMappingURL=Points.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Points","props","defaultProps","mode"],"sources":["Points.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\nimport type { PointsProps } from \"../../../dom/types\";\n\nexport const Points = (props: SkiaProps<PointsProps>) => {\n return <skPoints {...props} />;\n};\n\nPoints.defaultProps = {\n mode: \"points\",\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,yCAAcA,KAAd,CAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,IAAI,EAAE;AADc,CAAtB"}
1
+ {"version":3,"names":["Points","mode","props"],"sources":["Points.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\nimport type { PointsProps } from \"../../../dom/types\";\n\nexport const Points = ({\n mode = \"points\",\n ...props\n}: SkiaDefaultProps<PointsProps, \"mode\">) => {\n return <skPoints mode={mode} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,MAAM,GAAG,QAGuB;EAAA,IAHtB;IACrBC,IAAI,GAAG,QADc;IAErB,GAAGC;EAFkB,CAGsB;EAC3C,oBAAO;IAAU,IAAI,EAAED;EAAhB,GAA0BC,KAA1B,EAAP;AACD,CALM"}
@@ -14,7 +14,4 @@ const RoundedRect = props => {
14
14
  };
15
15
 
16
16
  exports.RoundedRect = RoundedRect;
17
- RoundedRect.defaultProps = {
18
- r: 0
19
- };
20
17
  //# sourceMappingURL=RoundedRect.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["RoundedRect","props","defaultProps","r"],"sources":["RoundedRect.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { RoundedRectProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors\";\n\nexport const RoundedRect = (props: SkiaProps<RoundedRectProps>) => {\n return <skRRect {...props} />;\n};\n\nRoundedRect.defaultProps = {\n r: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,WAAW,GAAIC,KAAD,IAAwC;EACjE,oBAAO,wCAAaA,KAAb,CAAP;AACD,CAFM;;;AAIPD,WAAW,CAACE,YAAZ,GAA2B;EACzBC,CAAC,EAAE;AADsB,CAA3B"}
1
+ {"version":3,"names":["RoundedRect","props"],"sources":["RoundedRect.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { RoundedRectProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors\";\n\nexport const RoundedRect = (props: SkiaProps<RoundedRectProps>) => {\n return <skRRect {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,WAAW,GAAIC,KAAD,IAAwC;EACjE,oBAAO,wCAAaA,KAAb,CAAP;AACD,CAFM"}
@@ -9,12 +9,17 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Vertices = props => {
13
- return /*#__PURE__*/_react.default.createElement("skVertices", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Vertices = _ref => {
15
+ let {
16
+ mode = "triangles",
17
+ ...props
18
+ } = _ref;
19
+ return /*#__PURE__*/_react.default.createElement("skVertices", _extends({
20
+ mode: mode
21
+ }, props));
14
22
  };
15
23
 
16
24
  exports.Vertices = Vertices;
17
- Vertices.defaultProps = {
18
- mode: "triangles"
19
- };
20
25
  //# sourceMappingURL=Vertices.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Vertices","props","defaultProps","mode"],"sources":["Vertices.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { VerticesProps } from \"../../../dom/types\";\n\nexport const Vertices = (props: SkiaProps<VerticesProps>) => {\n return <skVertices {...props} />;\n};\n\nVertices.defaultProps = {\n mode: \"triangles\",\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,2CAAgBA,KAAhB,CAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,IAAI,EAAE;AADgB,CAAxB"}
1
+ {"version":3,"names":["Vertices","mode","props"],"sources":["Vertices.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { VerticesProps } from \"../../../dom/types\";\n\nexport const Vertices = ({\n mode = \"triangles\",\n ...props\n}: SkiaDefaultProps<VerticesProps, \"mode\">) => {\n return <skVertices mode={mode} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,QAAQ,GAAG,QAGuB;EAAA,IAHtB;IACvBC,IAAI,GAAG,WADgB;IAEvB,GAAGC;EAFoB,CAGsB;EAC7C,oBAAO;IAAY,IAAI,EAAED;EAAlB,GAA4BC,KAA5B,EAAP;AACD,CALM"}
@@ -9,13 +9,19 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Glyphs = props => {
13
- return /*#__PURE__*/_react.default.createElement("skGlyphs", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Glyphs = _ref => {
15
+ let {
16
+ x = 0,
17
+ y = 0,
18
+ ...props
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("skGlyphs", _extends({
21
+ x: x,
22
+ y: y
23
+ }, props));
14
24
  };
15
25
 
16
26
  exports.Glyphs = Glyphs;
17
- Glyphs.defaultProps = {
18
- x: 0,
19
- y: 0
20
- };
21
27
  //# sourceMappingURL=Glyphs.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Glyphs","props","defaultProps","x","y"],"sources":["Glyphs.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { GlyphsProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\n\nexport const Glyphs = (props: SkiaProps<GlyphsProps>) => {\n return <skGlyphs {...props} />;\n};\n\nGlyphs.defaultProps = {\n x: 0,\n y: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,yCAAcA,KAAd,CAAP;AACD,CAFM;;;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,CAAC,EAAE,CADiB;EAEpBC,CAAC,EAAE;AAFiB,CAAtB"}
1
+ {"version":3,"names":["Glyphs","x","y","props"],"sources":["Glyphs.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { GlyphsProps } from \"../../../dom/types\";\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\n\nexport const Glyphs = ({\n x = 0,\n y = 0,\n ...props\n}: SkiaDefaultProps<GlyphsProps, \"x\" | \"y\">) => {\n return <skGlyphs x={x} y={y} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,MAAM,GAAG,QAI0B;EAAA,IAJzB;IACrBC,CAAC,GAAG,CADiB;IAErBC,CAAC,GAAG,CAFiB;IAGrB,GAAGC;EAHkB,CAIyB;EAC9C,oBAAO;IAAU,CAAC,EAAEF,CAAb;IAAgB,CAAC,EAAEC;EAAnB,GAA0BC,KAA1B,EAAP;AACD,CANM"}
@@ -9,13 +9,19 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const Text = props => {
13
- return /*#__PURE__*/_react.default.createElement("skText", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const Text = _ref => {
15
+ let {
16
+ x = 0,
17
+ y = 0,
18
+ ...props
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("skText", _extends({
21
+ x: x,
22
+ y: y
23
+ }, props));
14
24
  };
15
25
 
16
26
  exports.Text = Text;
17
- Text.defaultProps = {
18
- x: 0,
19
- y: 0
20
- };
21
27
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Text","props","defaultProps","x","y"],"sources":["Text.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { TextProps } from \"../../../dom/types\";\n\nexport const Text = (props: SkiaProps<TextProps>) => {\n return <skText {...props} />;\n};\n\nText.defaultProps = {\n x: 0,\n y: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,uCAAYA,KAAZ,CAAP;AACD,CAFM;;;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,CAAC,EAAE,CADe;EAElBC,CAAC,EAAE;AAFe,CAApB"}
1
+ {"version":3,"names":["Text","x","y","props"],"sources":["Text.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { TextProps } from \"../../../dom/types\";\n\nexport const Text = ({\n x = 0,\n y = 0,\n ...props\n}: SkiaDefaultProps<TextProps, \"x\" | \"y\">) => {\n return <skText x={x} y={y} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,IAAI,GAAG,QAI0B;EAAA,IAJzB;IACnBC,CAAC,GAAG,CADe;IAEnBC,CAAC,GAAG,CAFe;IAGnB,GAAGC;EAHgB,CAIyB;EAC5C,oBAAO;IAAQ,CAAC,EAAEF,CAAX;IAAc,CAAC,EAAEC;EAAjB,GAAwBC,KAAxB,EAAP;AACD,CANM"}
@@ -9,13 +9,19 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const TextBlob = props => {
13
- return /*#__PURE__*/_react.default.createElement("skTextBlob", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const TextBlob = _ref => {
15
+ let {
16
+ x = 0,
17
+ y = 0,
18
+ ...props
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("skTextBlob", _extends({
21
+ x: x,
22
+ y: y
23
+ }, props));
14
24
  };
15
25
 
16
26
  exports.TextBlob = TextBlob;
17
- TextBlob.defaultProps = {
18
- x: 0,
19
- y: 0
20
- };
21
27
  //# sourceMappingURL=TextBlob.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TextBlob","props","defaultProps","x","y"],"sources":["TextBlob.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { TextBlobProps } from \"../../../dom/types\";\n\nexport const TextBlob = (props: SkiaProps<TextBlobProps>) => {\n return <skTextBlob {...props} />;\n};\n\nTextBlob.defaultProps = {\n x: 0,\n y: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,2CAAgBA,KAAhB,CAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,CAAC,EAAE,CADmB;EAEtBC,CAAC,EAAE;AAFmB,CAAxB"}
1
+ {"version":3,"names":["TextBlob","x","y","props"],"sources":["TextBlob.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { TextBlobProps } from \"../../../dom/types\";\n\nexport const TextBlob = ({\n x = 0,\n y = 0,\n ...props\n}: SkiaDefaultProps<TextBlobProps, \"x\" | \"y\">) => {\n return <skTextBlob x={x} y={y} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,QAAQ,GAAG,QAI0B;EAAA,IAJzB;IACvBC,CAAC,GAAG,CADmB;IAEvBC,CAAC,GAAG,CAFmB;IAGvB,GAAGC;EAHoB,CAIyB;EAChD,oBAAO;IAAY,CAAC,EAAEF,CAAf;IAAkB,CAAC,EAAEC;EAArB,GAA4BC,KAA5B,EAAP;AACD,CANM"}
@@ -9,12 +9,17 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const TextPath = props => {
13
- return /*#__PURE__*/_react.default.createElement("skTextPath", props);
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+
14
+ const TextPath = _ref => {
15
+ let {
16
+ initialOffset = 0,
17
+ ...props
18
+ } = _ref;
19
+ return /*#__PURE__*/_react.default.createElement("skTextPath", _extends({
20
+ initialOffset: initialOffset
21
+ }, props));
14
22
  };
15
23
 
16
24
  exports.TextPath = TextPath;
17
- TextPath.defaultProps = {
18
- initialOffset: 0
19
- };
20
25
  //# sourceMappingURL=TextPath.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TextPath","props","defaultProps","initialOffset"],"sources":["TextPath.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors\";\nimport type { TextPathProps } from \"../../../dom/types\";\n\nexport const TextPath = (props: SkiaProps<TextPathProps>) => {\n return <skTextPath {...props} />;\n};\n\nTextPath.defaultProps = {\n initialOffset: 0,\n};\n"],"mappings":";;;;;;;AAAA;;;;AAKO,MAAMA,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,2CAAgBA,KAAhB,CAAP;AACD,CAFM;;;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,aAAa,EAAE;AADO,CAAxB"}
1
+ {"version":3,"names":["TextPath","initialOffset","props"],"sources":["TextPath.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors\";\nimport type { TextPathProps } from \"../../../dom/types\";\n\nexport const TextPath = ({\n initialOffset = 0,\n ...props\n}: SkiaDefaultProps<TextPathProps, \"initialOffset\">) => {\n return <skTextPath initialOffset={initialOffset} {...props} />;\n};\n"],"mappings":";;;;;;;AAAA;;;;;;AAKO,MAAMA,QAAQ,GAAG,QAGgC;EAAA,IAH/B;IACvBC,aAAa,GAAG,CADO;IAEvB,GAAGC;EAFoB,CAG+B;EACtD,oBAAO;IAAY,aAAa,EAAED;EAA3B,GAA8CC,KAA9C,EAAP;AACD,CALM"}
@@ -1 +1 @@
1
- {"version":3,"names":["isValue","value","undefined","__typename__","isSelector","selector","isAnimated","props","Object","values"],"sources":["Animations.ts"],"sourcesContent":["import type { SkiaSelector, SkiaValue } from \"../../../values\";\n\nexport const isValue = (value: unknown): value is SkiaValue<unknown> => {\n if (value === undefined || value === null) {\n return false;\n }\n try {\n if (\n typeof value === \"object\" &&\n \"__typename__\" in value &&\n (value as unknown as SkiaValue<unknown>).__typename__ === \"RNSkValue\"\n ) {\n return true;\n }\n } catch {}\n return false;\n};\n\nexport const isSelector = <T, R>(\n value: unknown\n): value is {\n selector: (v: T) => R;\n value: SkiaValue<T>;\n} => {\n if (value) {\n return (\n typeof value === \"object\" &&\n \"selector\" in value &&\n \"value\" in value &&\n (value as Record<string, unknown>).selector !== undefined &&\n (value as Record<string, unknown>).value !== undefined\n );\n }\n return false;\n};\n\nexport const isAnimated = <T>(props: AnimatedProps<T>) => {\n for (const value of Object.values(props)) {\n if (isValue(value) || isSelector(value)) {\n return true;\n }\n }\n return false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type AnimatedProp<T, P = any> = T | SkiaValue<T> | SkiaSelector<T, P>;\n\nexport type AnimatedProps<T, O extends keyof T | never = never> = {\n [K in keyof T]: K extends \"children\"\n ? T[K]\n : K extends O\n ? T[K]\n : AnimatedProp<T[K]>;\n};\n\n// TODO: switch to AnimatedProps<GroupProps> and remove duplicate properties.\n// For instance matrix in color filter becomes colorMatrix\n\nexport type SkiaProps<\n P = object,\n O extends keyof P | never = never\n> = AnimatedProps<P, O>;\n"],"mappings":";;;;;;;AAEO,MAAMA,OAAO,GAAIC,KAAD,IAAiD;EACtE,IAAIA,KAAK,KAAKC,SAAV,IAAuBD,KAAK,KAAK,IAArC,EAA2C;IACzC,OAAO,KAAP;EACD;;EACD,IAAI;IACF,IACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,kBAAkBA,KADlB,IAECA,KAAD,CAAyCE,YAAzC,KAA0D,WAH5D,EAIE;MACA,OAAO,IAAP;IACD;EACF,CARD,CAQE,MAAM,CAAE;;EACV,OAAO,KAAP;AACD,CAdM;;;;AAgBA,MAAMC,UAAU,GACrBH,KADwB,IAKrB;EACH,IAAIA,KAAJ,EAAW;IACT,OACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,cAAcA,KADd,IAEA,WAAWA,KAFX,IAGCA,KAAD,CAAmCI,QAAnC,KAAgDH,SAHhD,IAICD,KAAD,CAAmCA,KAAnC,KAA6CC,SAL/C;EAOD;;EACD,OAAO,KAAP;AACD,CAhBM;;;;AAkBA,MAAMI,UAAU,GAAOC,KAAJ,IAAgC;EACxD,KAAK,MAAMN,KAAX,IAAoBO,MAAM,CAACC,MAAP,CAAcF,KAAd,CAApB,EAA0C;IACxC,IAAIP,OAAO,CAACC,KAAD,CAAP,IAAkBG,UAAU,CAACH,KAAD,CAAhC,EAAyC;MACvC,OAAO,IAAP;IACD;EACF;;EACD,OAAO,KAAP;AACD,CAPM,C,CASP"}
1
+ {"version":3,"names":["isValue","value","undefined","__typename__","isSelector","selector","isAnimated","props","Object","values"],"sources":["Animations.ts"],"sourcesContent":["import type { SkiaSelector, SkiaValue } from \"../../../values\";\n\nexport const isValue = (value: unknown): value is SkiaValue<unknown> => {\n if (value === undefined || value === null) {\n return false;\n }\n try {\n if (\n typeof value === \"object\" &&\n \"__typename__\" in value &&\n (value as unknown as SkiaValue<unknown>).__typename__ === \"RNSkValue\"\n ) {\n return true;\n }\n } catch {}\n return false;\n};\n\nexport const isSelector = <T, R>(\n value: unknown\n): value is {\n selector: (v: T) => R;\n value: SkiaValue<T>;\n} => {\n if (value) {\n return (\n typeof value === \"object\" &&\n \"selector\" in value &&\n \"value\" in value &&\n (value as Record<string, unknown>).selector !== undefined &&\n (value as Record<string, unknown>).value !== undefined\n );\n }\n return false;\n};\n\nexport const isAnimated = <T>(props: AnimatedProps<T>) => {\n for (const value of Object.values(props)) {\n if (isValue(value) || isSelector(value)) {\n return true;\n }\n }\n return false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type AnimatedProp<T, P = any> = T | SkiaValue<T> | SkiaSelector<T, P>;\n\nexport type AnimatedProps<T, O extends keyof T | never = never> = {\n [K in keyof T]: K extends \"children\"\n ? T[K]\n : K extends O\n ? T[K]\n : AnimatedProp<T[K]>;\n};\n\nexport type SkiaProps<\n P = object,\n O extends keyof P | never = never\n> = AnimatedProps<P, O>;\n\ntype WithOptional<T extends object, N extends keyof T> = Omit<T, N> & {\n [K in N]?: T[K];\n};\n\nexport type SkiaDefaultProps<\n T extends object,\n N extends keyof T\n> = WithOptional<SkiaProps<T>, N>;\n"],"mappings":";;;;;;;AAEO,MAAMA,OAAO,GAAIC,KAAD,IAAiD;EACtE,IAAIA,KAAK,KAAKC,SAAV,IAAuBD,KAAK,KAAK,IAArC,EAA2C;IACzC,OAAO,KAAP;EACD;;EACD,IAAI;IACF,IACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,kBAAkBA,KADlB,IAECA,KAAD,CAAyCE,YAAzC,KAA0D,WAH5D,EAIE;MACA,OAAO,IAAP;IACD;EACF,CARD,CAQE,MAAM,CAAE;;EACV,OAAO,KAAP;AACD,CAdM;;;;AAgBA,MAAMC,UAAU,GACrBH,KADwB,IAKrB;EACH,IAAIA,KAAJ,EAAW;IACT,OACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,cAAcA,KADd,IAEA,WAAWA,KAFX,IAGCA,KAAD,CAAmCI,QAAnC,KAAgDH,SAHhD,IAICD,KAAD,CAAmCA,KAAnC,KAA6CC,SAL/C;EAOD;;EACD,OAAO,KAAP;AACD,CAhBM;;;;AAkBA,MAAMI,UAAU,GAAOC,KAAJ,IAAgC;EACxD,KAAK,MAAMN,KAAX,IAAoBO,MAAM,CAACC,MAAP,CAAcF,KAAd,CAApB,EAA0C;IACxC,IAAIP,OAAO,CAACC,KAAD,CAAP,IAAkBG,UAAU,CAACH,KAAD,CAAhC,EAAyC;MACvC,OAAO,IAAP;IACD;EACF;;EACD,OAAO,KAAP;AACD,CAPM,C,CASP"}
@@ -1 +1 @@
1
- {"version":3,"names":["PaintStyle","StrokeCap","StrokeJoin","isPaint","obj","__typename__"],"sources":["Paint.ts"],"sourcesContent":["import type { SkImageFilter } from \"../ImageFilter\";\nimport type { SkMaskFilter } from \"../MaskFilter\";\nimport type { SkColorFilter } from \"../ColorFilter\";\nimport type { SkColor } from \"../Color\";\nimport type { SkPathEffect } from \"../PathEffect\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkShader } from \"../Shader\";\n\nimport type { BlendMode } from \"./BlendMode\";\n\nexport enum PaintStyle {\n Fill,\n Stroke,\n}\n\nexport enum StrokeCap {\n Butt,\n Round,\n Square,\n}\n\nexport enum StrokeJoin {\n Miter,\n Round,\n Bevel,\n}\n\nexport const isPaint = (obj: SkJSIInstance<string> | null): obj is SkPaint =>\n obj !== null && obj.__typename__ === \"Paint\";\n\nexport interface SkPaint extends SkJSIInstance<\"Paint\"> {\n /**\n * Returns a copy of this paint.\n */\n copy(): SkPaint;\n\n /**\n * Sets all SkPaint contents to their initial values. This is equivalent to replacing\n SkPaint with the result of SkPaint().\n */\n reset(): void;\n\n /**\n * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values\n * (sRGB gamut, and encoded with the sRGB transfer function).\n */\n getColor(): SkColor;\n\n /**\n * Returns the geometry drawn at the beginning and end of strokes.\n */\n getStrokeCap(): StrokeCap;\n\n /**\n * Returns the geometry drawn at the corners of strokes.\n */\n getStrokeJoin(): StrokeJoin;\n\n /**\n * Returns the limit at which a sharp corner is drawn beveled.\n */\n getStrokeMiter(): number;\n\n /**\n * Returns the thickness of the pen used to outline the shape.\n */\n getStrokeWidth(): number;\n\n /**\n * Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.\n * @param alpha\n */\n setAlphaf(alpha: number): void;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with\n * partial transparency.\n * @param aa\n */\n setAntiAlias: (aa: boolean) => void;\n\n /**\n * Sets the blend mode that is, the mode used to combine source color\n * with destination color.\n * @param mode\n */\n setBlendMode: (blendMode: BlendMode) => void;\n\n /**\n * Sets alpha and RGB used when stroking and filling. The color is a 32-bit\n * value, unpremultiplied, packing 8-bit components for alpha, red, blue,\n * and green.\n *\n * @param color unpremultiplied ARGB\n *\n * example: https://fiddle.skia.org/c/@Paint_setColor\n */\n setColor(color: SkColor): void;\n\n /**\n * Sets the current color filter, replacing the existing one if there was one.\n * @param filter\n */\n setColorFilter(filter: SkColorFilter | null): void;\n\n /**\n * Sets the current image filter, replacing the existing one if there was one.\n * @param filter\n */\n setImageFilter(filter: SkImageFilter | null): void;\n\n /**\n * Sets the current mask filter, replacing the existing one if there was one.\n * @param filter\n */\n setMaskFilter(filter: SkMaskFilter | null): void;\n\n /**\n * Sets the current path effect, replacing the existing one if there was one.\n * @param effect\n */\n setPathEffect(effect: SkPathEffect | null): void;\n\n /**\n * Sets the current shader, replacing the existing one if there was one.\n * @param shader\n */\n setShader(shader: SkShader | null): void;\n\n /**\n * Sets the geometry drawn at the beginning and end of strokes.\n * @param cap\n */\n setStrokeCap(cap: StrokeCap): void;\n\n /**\n * Sets the geometry drawn at the corners of strokes.\n * @param join\n */\n setStrokeJoin(join: StrokeJoin): void;\n\n /**\n * Sets the limit at which a sharp corner is drawn beveled.\n * @param limit\n */\n setStrokeMiter(limit: number): void;\n\n /**\n * Sets the thickness of the pen used to outline the shape.\n * @param width\n */\n setStrokeWidth(width: number): void;\n\n /**\n * Sets whether the geometry is filled or stroked.\n * @param style\n */\n setStyle(style: PaintStyle): void;\n}\n"],"mappings":";;;;;;IAUYA,U;;;WAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAKAC,S;;;WAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAMAC,U;;;WAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;AAML,MAAMC,OAAO,GAAIC,GAAD,IACrBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,OADhC"}
1
+ {"version":3,"names":["PaintStyle","StrokeCap","StrokeJoin","isPaint","obj","__typename__"],"sources":["Paint.ts"],"sourcesContent":["import type { SkImageFilter } from \"../ImageFilter\";\nimport type { SkMaskFilter } from \"../MaskFilter\";\nimport type { SkColorFilter } from \"../ColorFilter\";\nimport type { SkColor } from \"../Color\";\nimport type { SkPathEffect } from \"../PathEffect\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkShader } from \"../Shader\";\n\nimport type { BlendMode } from \"./BlendMode\";\n\nexport enum PaintStyle {\n Fill,\n Stroke,\n}\n\nexport enum StrokeCap {\n Butt,\n Round,\n Square,\n}\n\nexport enum StrokeJoin {\n Miter,\n Round,\n Bevel,\n}\n\nexport const isPaint = (obj: SkJSIInstance<string> | null): obj is SkPaint =>\n obj !== null && obj.__typename__ === \"Paint\";\n\nexport interface SkPaint extends SkJSIInstance<\"Paint\"> {\n /**\n * Retrieves alpha from the color used when stroking and filling.\n */\n getAlphaf(): number;\n\n /**\n * Returns a copy of this paint.\n */\n copy(): SkPaint;\n\n /**\n * Sets all SkPaint contents to their initial values. This is equivalent to replacing\n SkPaint with the result of SkPaint().\n */\n reset(): void;\n\n /**\n * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values\n * (sRGB gamut, and encoded with the sRGB transfer function).\n */\n getColor(): SkColor;\n\n /**\n * Returns the geometry drawn at the beginning and end of strokes.\n */\n getStrokeCap(): StrokeCap;\n\n /**\n * Returns the geometry drawn at the corners of strokes.\n */\n getStrokeJoin(): StrokeJoin;\n\n /**\n * Returns the limit at which a sharp corner is drawn beveled.\n */\n getStrokeMiter(): number;\n\n /**\n * Returns the thickness of the pen used to outline the shape.\n */\n getStrokeWidth(): number;\n\n /**\n * Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.\n * @param alpha\n */\n setAlphaf(alpha: number): void;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with\n * partial transparency.\n * @param aa\n */\n setAntiAlias: (aa: boolean) => void;\n\n /**\n * Sets the blend mode that is, the mode used to combine source color\n * with destination color.\n * @param mode\n */\n setBlendMode: (blendMode: BlendMode) => void;\n\n /**\n * Sets alpha and RGB used when stroking and filling. The color is a 32-bit\n * value, unpremultiplied, packing 8-bit components for alpha, red, blue,\n * and green.\n *\n * @param color unpremultiplied ARGB\n *\n * example: https://fiddle.skia.org/c/@Paint_setColor\n */\n setColor(color: SkColor): void;\n\n /**\n * Sets the current color filter, replacing the existing one if there was one.\n * @param filter\n */\n setColorFilter(filter: SkColorFilter | null): void;\n\n /**\n * Sets the current image filter, replacing the existing one if there was one.\n * @param filter\n */\n setImageFilter(filter: SkImageFilter | null): void;\n\n /**\n * Sets the current mask filter, replacing the existing one if there was one.\n * @param filter\n */\n setMaskFilter(filter: SkMaskFilter | null): void;\n\n /**\n * Sets the current path effect, replacing the existing one if there was one.\n * @param effect\n */\n setPathEffect(effect: SkPathEffect | null): void;\n\n /**\n * Sets the current shader, replacing the existing one if there was one.\n * @param shader\n */\n setShader(shader: SkShader | null): void;\n\n /**\n * Sets the geometry drawn at the beginning and end of strokes.\n * @param cap\n */\n setStrokeCap(cap: StrokeCap): void;\n\n /**\n * Sets the geometry drawn at the corners of strokes.\n * @param join\n */\n setStrokeJoin(join: StrokeJoin): void;\n\n /**\n * Sets the limit at which a sharp corner is drawn beveled.\n * @param limit\n */\n setStrokeMiter(limit: number): void;\n\n /**\n * Sets the thickness of the pen used to outline the shape.\n * @param width\n */\n setStrokeWidth(width: number): void;\n\n /**\n * Sets whether the geometry is filled or stroked.\n * @param style\n */\n setStyle(style: PaintStyle): void;\n}\n"],"mappings":";;;;;;IAUYA,U;;;WAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAKAC,S;;;WAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAMAC,U;;;WAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;AAML,MAAMC,OAAO,GAAIC,GAAD,IACrBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,OADhC"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["RuntimeEffect.ts"],"sourcesContent":["import type { SkShader } from \"../Shader\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkMatrix } from \"../Matrix\";\n\nexport interface SkSLUniform {\n columns: number;\n rows: number;\n /** The index into the uniforms array that this uniform begins. */\n slot: number;\n isInteger: boolean;\n}\n\nexport interface SkRuntimeShaderBuilder\n extends SkJSIInstance<\"RuntimeShaderBuilder\"> {\n setUniform(name: string, value: readonly number[]): void;\n}\n\nexport interface SkRuntimeEffect extends SkJSIInstance<\"RuntimeEffect\"> {\n /**\n * Returns a shader executed using the given uniform data.\n * @param uniforms\n * @param localMatrix\n */\n makeShader(uniforms: number[], localMatrix?: SkMatrix): SkShader;\n\n /**\n * Returns a shader executed using the given uniform data and the children as inputs.\n * @param uniforms\n * @param children\n * @param localMatrix\n */\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ): SkShader;\n\n /**\n * Returns the nth uniform from the effect.\n * @param index\n */\n getUniform(index: number): SkSLUniform;\n\n /**\n * Returns the number of uniforms in the effect.\n */\n getUniformCount(): number;\n\n /**\n * Returns the total number of floats across all uniforms on the effect. This is the length\n * of the uniforms array expected by makeShader. For example, an effect with a single float3\n * uniform, would return 1 from `getUniformCount()`, but 3 from `getUniformFloatCount()`.\n */\n getUniformFloatCount(): number;\n\n /**\n * Returns the name of the nth effect uniform.\n * @param index\n */\n getUniformName(index: number): string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["RuntimeEffect.ts"],"sourcesContent":["import type { SkShader } from \"../Shader\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkMatrix } from \"../Matrix\";\n\nexport interface SkSLUniform {\n columns: number;\n rows: number;\n /** The index into the uniforms array that this uniform begins. */\n slot: number;\n isInteger: boolean;\n}\n\nexport interface SkRuntimeShaderBuilder\n extends SkJSIInstance<\"RuntimeShaderBuilder\"> {\n setUniform(name: string, value: readonly number[]): void;\n}\n\nexport interface SkRuntimeEffect extends SkJSIInstance<\"RuntimeEffect\"> {\n /**\n * Returns a shader executed using the given uniform data.\n * @param uniforms\n * @param localMatrix\n */\n makeShader(uniforms: number[], localMatrix?: SkMatrix): SkShader;\n\n /**\n * Returns a shader executed using the given uniform data and the children as inputs.\n * @param uniforms\n * @param children\n * @param localMatrix\n */\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ): SkShader;\n\n /**\n * Returns the nth uniform from the effect.\n * @param index\n */\n getUniform(index: number): SkSLUniform;\n\n /**\n * Returns the number of uniforms in the effect.\n */\n getUniformCount(): number;\n\n /**\n * Returns the total number of floats across all uniforms on the effect. This is the length\n * of the uniforms array expected by makeShader. For example, an effect with a single float3\n * uniform, would return 1 from `getUniformCount()`, but 3 from `getUniformFloatCount()`.\n */\n getUniformFloatCount(): number;\n\n /**\n * Returns the name of the nth effect uniform.\n * @param index\n */\n getUniformName(index: number): string;\n\n /**\n * Returns the SkSL source of the runtime effect shader.\n */\n source(): string;\n}\n"],"mappings":""}
@@ -24,12 +24,13 @@ const processValue = value => {
24
24
  const processUniforms = (source, uniforms, builder) => {
25
25
  const processed = new Array(source.getUniformCount()).fill(0).flatMap((_, i) => {
26
26
  const name = source.getUniformName(i);
27
- const value = uniforms[name];
27
+ const rawValue = uniforms[name];
28
28
 
29
- if (value === undefined) {
29
+ if (rawValue === undefined) {
30
30
  throw new Error(`No value specified for uniform ${name}`);
31
31
  }
32
32
 
33
+ const value = rawValue instanceof Float32Array ? Array.from(rawValue) : rawValue;
33
34
  const result = Array.isArray(value) ? value.flatMap(processValue) : processValue(value);
34
35
  builder === null || builder === void 0 ? void 0 : builder.setUniform(name, typeof result === "number" ? [result] : result);
35
36
  return result;
@@ -1 +1 @@
1
- {"version":3,"names":["isShader","obj","__typename__","isVector","x","undefined","y","processValue","value","processUniforms","source","uniforms","builder","processed","Array","getUniformCount","fill","flatMap","_","i","name","getUniformName","Error","result","isArray","setUniform","names","Object","keys","length","usedUniforms","map","unusedUniform","indexOf","filter","n","console","warn","join"],"sources":["Shader.ts"],"sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\nimport type { Vector } from \"../Point\";\nimport type { SkRuntimeEffect, SkRuntimeShaderBuilder } from \"../RuntimeEffect\";\n\nexport const isShader = (obj: SkJSIInstance<string> | null): obj is SkShader =>\n obj !== null && obj.__typename__ === \"Shader\";\n\nexport type SkShader = SkJSIInstance<\"Shader\">;\n\nexport type UniformValue = number | Vector | readonly number[];\n\nexport type Uniform = UniformValue | readonly UniformValue[];\n\nexport interface Uniforms {\n [name: string]: Uniform;\n}\n\nconst isVector = (obj: unknown): obj is Vector =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (obj as any).x !== undefined && (obj as any).y !== undefined;\n\nconst processValue = (value: UniformValue): number | readonly number[] => {\n if (isVector(value)) {\n return [value.x, value.y];\n }\n return value;\n};\n\nexport const processUniforms = (\n source: SkRuntimeEffect,\n uniforms: Uniforms,\n builder?: SkRuntimeShaderBuilder\n) => {\n const processed = new Array(source.getUniformCount())\n .fill(0)\n .flatMap((_, i) => {\n const name = source.getUniformName(i);\n const value = uniforms[name];\n if (value === undefined) {\n throw new Error(`No value specified for uniform ${name}`);\n }\n const result = Array.isArray(value)\n ? value.flatMap(processValue)\n : processValue(value as UniformValue);\n builder?.setUniform(name, typeof result === \"number\" ? [result] : result);\n return result;\n });\n const names = Object.keys(uniforms);\n if (names.length > source.getUniformCount()) {\n const usedUniforms = new Array(source.getUniformCount())\n .fill(0)\n .map((_, i) => source.getUniformName(i));\n const unusedUniform = names\n .map((name) => {\n if (usedUniforms.indexOf(name) === -1) {\n return name;\n }\n return null;\n })\n .filter((n) => n !== null);\n console.warn(\"Unused uniforms were provided: \" + unusedUniform.join(\", \"));\n }\n return processed;\n};\n"],"mappings":";;;;;;;AAIO,MAAMA,QAAQ,GAAIC,GAAD,IACtBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,QADhC;;;;AAaP,MAAMC,QAAQ,GAAIF,GAAD,IACf;AACA;AACCA,GAAD,CAAaG,CAAb,KAAmBC,SAAnB,IAAiCJ,GAAD,CAAaK,CAAb,KAAmBD,SAHrD;;AAKA,MAAME,YAAY,GAAIC,KAAD,IAAqD;EACxE,IAAIL,QAAQ,CAACK,KAAD,CAAZ,EAAqB;IACnB,OAAO,CAACA,KAAK,CAACJ,CAAP,EAAUI,KAAK,CAACF,CAAhB,CAAP;EACD;;EACD,OAAOE,KAAP;AACD,CALD;;AAOO,MAAMC,eAAe,GAAG,CAC7BC,MAD6B,EAE7BC,QAF6B,EAG7BC,OAH6B,KAI1B;EACH,MAAMC,SAAS,GAAG,IAAIC,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EACfC,IADe,CACV,CADU,EAEfC,OAFe,CAEP,CAACC,CAAD,EAAIC,CAAJ,KAAU;IACjB,MAAMC,IAAI,GAAGV,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAAb;IACA,MAAMX,KAAK,GAAGG,QAAQ,CAACS,IAAD,CAAtB;;IACA,IAAIZ,KAAK,KAAKH,SAAd,EAAyB;MACvB,MAAM,IAAIiB,KAAJ,CAAW,kCAAiCF,IAAK,EAAjD,CAAN;IACD;;IACD,MAAMG,MAAM,GAAGT,KAAK,CAACU,OAAN,CAAchB,KAAd,IACXA,KAAK,CAACS,OAAN,CAAcV,YAAd,CADW,GAEXA,YAAY,CAACC,KAAD,CAFhB;IAGAI,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEa,UAAT,CAAoBL,IAApB,EAA0B,OAAOG,MAAP,KAAkB,QAAlB,GAA6B,CAACA,MAAD,CAA7B,GAAwCA,MAAlE;IACA,OAAOA,MAAP;EACD,CAbe,CAAlB;EAcA,MAAMG,KAAK,GAAGC,MAAM,CAACC,IAAP,CAAYjB,QAAZ,CAAd;;EACA,IAAIe,KAAK,CAACG,MAAN,GAAenB,MAAM,CAACK,eAAP,EAAnB,EAA6C;IAC3C,MAAMe,YAAY,GAAG,IAAIhB,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EAClBC,IADkB,CACb,CADa,EAElBe,GAFkB,CAEd,CAACb,CAAD,EAAIC,CAAJ,KAAUT,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAFI,CAArB;IAGA,MAAMa,aAAa,GAAGN,KAAK,CACxBK,GADmB,CACdX,IAAD,IAAU;MACb,IAAIU,YAAY,CAACG,OAAb,CAAqBb,IAArB,MAA+B,CAAC,CAApC,EAAuC;QACrC,OAAOA,IAAP;MACD;;MACD,OAAO,IAAP;IACD,CANmB,EAOnBc,MAPmB,CAOXC,CAAD,IAAOA,CAAC,KAAK,IAPD,CAAtB;IAQAC,OAAO,CAACC,IAAR,CAAa,oCAAoCL,aAAa,CAACM,IAAd,CAAmB,IAAnB,CAAjD;EACD;;EACD,OAAOzB,SAAP;AACD,CAnCM"}
1
+ {"version":3,"names":["isShader","obj","__typename__","isVector","x","undefined","y","processValue","value","processUniforms","source","uniforms","builder","processed","Array","getUniformCount","fill","flatMap","_","i","name","getUniformName","rawValue","Error","Float32Array","from","result","isArray","setUniform","names","Object","keys","length","usedUniforms","map","unusedUniform","indexOf","filter","n","console","warn","join"],"sources":["Shader.ts"],"sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\nimport type { Vector } from \"../Point\";\nimport type { SkRuntimeEffect, SkRuntimeShaderBuilder } from \"../RuntimeEffect\";\n\nexport const isShader = (obj: SkJSIInstance<string> | null): obj is SkShader =>\n obj !== null && obj.__typename__ === \"Shader\";\n\nexport type SkShader = SkJSIInstance<\"Shader\">;\n\nexport type UniformValue = number | Vector | readonly number[];\n\nexport type Uniform = UniformValue | readonly UniformValue[] | Float32Array;\n\nexport interface Uniforms {\n [name: string]: Uniform;\n}\n\nconst isVector = (obj: unknown): obj is Vector =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (obj as any).x !== undefined && (obj as any).y !== undefined;\n\nconst processValue = (value: UniformValue): number | readonly number[] => {\n if (isVector(value)) {\n return [value.x, value.y];\n }\n return value;\n};\n\nexport const processUniforms = (\n source: SkRuntimeEffect,\n uniforms: Uniforms,\n builder?: SkRuntimeShaderBuilder\n) => {\n const processed = new Array(source.getUniformCount())\n .fill(0)\n .flatMap((_, i) => {\n const name = source.getUniformName(i);\n const rawValue = uniforms[name];\n if (rawValue === undefined) {\n throw new Error(`No value specified for uniform ${name}`);\n }\n const value =\n rawValue instanceof Float32Array ? Array.from(rawValue) : rawValue;\n const result = Array.isArray(value)\n ? value.flatMap(processValue)\n : processValue(value as UniformValue);\n builder?.setUniform(name, typeof result === \"number\" ? [result] : result);\n return result;\n });\n const names = Object.keys(uniforms);\n if (names.length > source.getUniformCount()) {\n const usedUniforms = new Array(source.getUniformCount())\n .fill(0)\n .map((_, i) => source.getUniformName(i));\n const unusedUniform = names\n .map((name) => {\n if (usedUniforms.indexOf(name) === -1) {\n return name;\n }\n return null;\n })\n .filter((n) => n !== null);\n console.warn(\"Unused uniforms were provided: \" + unusedUniform.join(\", \"));\n }\n return processed;\n};\n"],"mappings":";;;;;;;AAIO,MAAMA,QAAQ,GAAIC,GAAD,IACtBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,QADhC;;;;AAaP,MAAMC,QAAQ,GAAIF,GAAD,IACf;AACA;AACCA,GAAD,CAAaG,CAAb,KAAmBC,SAAnB,IAAiCJ,GAAD,CAAaK,CAAb,KAAmBD,SAHrD;;AAKA,MAAME,YAAY,GAAIC,KAAD,IAAqD;EACxE,IAAIL,QAAQ,CAACK,KAAD,CAAZ,EAAqB;IACnB,OAAO,CAACA,KAAK,CAACJ,CAAP,EAAUI,KAAK,CAACF,CAAhB,CAAP;EACD;;EACD,OAAOE,KAAP;AACD,CALD;;AAOO,MAAMC,eAAe,GAAG,CAC7BC,MAD6B,EAE7BC,QAF6B,EAG7BC,OAH6B,KAI1B;EACH,MAAMC,SAAS,GAAG,IAAIC,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EACfC,IADe,CACV,CADU,EAEfC,OAFe,CAEP,CAACC,CAAD,EAAIC,CAAJ,KAAU;IACjB,MAAMC,IAAI,GAAGV,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAAb;IACA,MAAMG,QAAQ,GAAGX,QAAQ,CAACS,IAAD,CAAzB;;IACA,IAAIE,QAAQ,KAAKjB,SAAjB,EAA4B;MAC1B,MAAM,IAAIkB,KAAJ,CAAW,kCAAiCH,IAAK,EAAjD,CAAN;IACD;;IACD,MAAMZ,KAAK,GACTc,QAAQ,YAAYE,YAApB,GAAmCV,KAAK,CAACW,IAAN,CAAWH,QAAX,CAAnC,GAA0DA,QAD5D;IAEA,MAAMI,MAAM,GAAGZ,KAAK,CAACa,OAAN,CAAcnB,KAAd,IACXA,KAAK,CAACS,OAAN,CAAcV,YAAd,CADW,GAEXA,YAAY,CAACC,KAAD,CAFhB;IAGAI,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEgB,UAAT,CAAoBR,IAApB,EAA0B,OAAOM,MAAP,KAAkB,QAAlB,GAA6B,CAACA,MAAD,CAA7B,GAAwCA,MAAlE;IACA,OAAOA,MAAP;EACD,CAfe,CAAlB;EAgBA,MAAMG,KAAK,GAAGC,MAAM,CAACC,IAAP,CAAYpB,QAAZ,CAAd;;EACA,IAAIkB,KAAK,CAACG,MAAN,GAAetB,MAAM,CAACK,eAAP,EAAnB,EAA6C;IAC3C,MAAMkB,YAAY,GAAG,IAAInB,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EAClBC,IADkB,CACb,CADa,EAElBkB,GAFkB,CAEd,CAAChB,CAAD,EAAIC,CAAJ,KAAUT,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAFI,CAArB;IAGA,MAAMgB,aAAa,GAAGN,KAAK,CACxBK,GADmB,CACdd,IAAD,IAAU;MACb,IAAIa,YAAY,CAACG,OAAb,CAAqBhB,IAArB,MAA+B,CAAC,CAApC,EAAuC;QACrC,OAAOA,IAAP;MACD;;MACD,OAAO,IAAP;IACD,CANmB,EAOnBiB,MAPmB,CAOXC,CAAD,IAAOA,CAAC,KAAK,IAPD,CAAtB;IAQAC,OAAO,CAACC,IAAR,CAAa,oCAAoCL,aAAa,CAACM,IAAd,CAAmB,IAAnB,CAAjD;EACD;;EACD,OAAO5B,SAAP;AACD,CArCM"}
@@ -30,6 +30,10 @@ class JsiSkPaint extends _Host.HostObject {
30
30
  this.ref = new this.CanvasKit.Paint();
31
31
  }
32
32
 
33
+ getAlphaf() {
34
+ return this.getColor()[3];
35
+ }
36
+
33
37
  getColor() {
34
38
  return this.ref.getColor();
35
39
  }