@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
@@ -1,10 +1,17 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Turbulence = props => {
3
- return /*#__PURE__*/React.createElement("skTurbulence", props);
4
- };
5
- Turbulence.defaultProps = {
6
- seed: 0,
7
- tileWidth: 0,
8
- tileHeight: 0
4
+ export const Turbulence = _ref => {
5
+ let {
6
+ seed = 0,
7
+ tileWidth = 0,
8
+ tileHeight = 0,
9
+ ...props
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement("skTurbulence", _extends({
12
+ seed: seed,
13
+ tileWidth: tileWidth,
14
+ tileHeight: tileHeight
15
+ }, props));
9
16
  };
10
17
  //# sourceMappingURL=Turbulence.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,UAAU,GAAIC,KAAD,IAAuC;EAC/D,oBAAO,oCAAkBA,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":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -2,10 +2,4 @@ import React from "react";
2
2
  export const Circle = props => {
3
3
  return /*#__PURE__*/React.createElement("skCircle", props);
4
4
  };
5
- Circle.defaultProps = {
6
- c: {
7
- x: 0,
8
- y: 0
9
- }
10
- };
11
5
  //# sourceMappingURL=Circle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,gCAAcA,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":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,gCAAcA,KAAd,CAAP;AACD,CAFM"}
@@ -7,7 +7,7 @@ export const fitbox = (fit, src, dst) => {
7
7
  };
8
8
  export const FitBox = _ref => {
9
9
  let {
10
- fit,
10
+ fit = "contain",
11
11
  src,
12
12
  dst,
13
13
  children
@@ -17,7 +17,4 @@ export const FitBox = _ref => {
17
17
  transform: transform
18
18
  }, children);
19
19
  };
20
- FitBox.defaultProps = {
21
- fit: "contain"
22
- };
23
20
  //# sourceMappingURL=FitBox.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","fitRects","rect2rect","Group","fitbox","fit","src","dst","rects","FitBox","children","transform","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,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AAGA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,oBAApC;AAEA,SAASC,KAAT,QAAsB,UAAtB;AASA,OAAO,MAAMC,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;EAC5D,MAAMC,KAAK,GAAGP,QAAQ,CAACI,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAAtB;EACA,OAAOL,SAAS,CAACM,KAAK,CAACF,GAAP,EAAYE,KAAK,CAACD,GAAlB,CAAhB;AACD,CAHM;AAKP,OAAO,MAAME,MAAM,GAAG,QAA2C;EAAA,IAA1C;IAAEJ,GAAF;IAAOC,GAAP;IAAYC,GAAZ;IAAiBG;EAAjB,CAA0C;EAC/D,MAAMC,SAAS,GAAGX,OAAO,CAAC,MAAMI,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAAb,EAA8B,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAA9B,CAAzB;EACA,oBAAO,oBAAC,KAAD;IAAO,SAAS,EAAEK;EAAlB,GAA8BD,QAA9B,CAAP;AACD,CAHM;AAKPD,MAAM,CAACG,YAAP,GAAsB;EACpBP,GAAG,EAAE;AADe,CAAtB"}
1
+ {"version":3,"names":["React","useMemo","fitRects","rect2rect","Group","fitbox","fit","src","dst","rects","FitBox","children","transform"],"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,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AAGA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,oBAApC;AAEA,SAASC,KAAT,QAAsB,UAAtB;AASA,OAAO,MAAMC,MAAM,GAAG,CAACC,GAAD,EAAWC,GAAX,EAAwBC,GAAxB,KAAwC;EAC5D,MAAMC,KAAK,GAAGP,QAAQ,CAACI,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAAtB;EACA,OAAOL,SAAS,CAACM,KAAK,CAACF,GAAP,EAAYE,KAAK,CAACD,GAAlB,CAAhB;AACD,CAHM;AAKP,OAAO,MAAME,MAAM,GAAG,QAAuD;EAAA,IAAtD;IAAEJ,GAAG,GAAG,SAAR;IAAmBC,GAAnB;IAAwBC,GAAxB;IAA6BG;EAA7B,CAAsD;EAC3E,MAAMC,SAAS,GAAGX,OAAO,CAAC,MAAMI,MAAM,CAACC,GAAD,EAAMC,GAAN,EAAWC,GAAX,CAAb,EAA8B,CAACA,GAAD,EAAMF,GAAN,EAAWC,GAAX,CAA9B,CAAzB;EACA,oBAAO,oBAAC,KAAD;IAAO,SAAS,EAAEK;EAAlB,GAA8BD,QAA9B,CAAP;AACD,CAHM"}
@@ -2,8 +2,4 @@ import React from "react";
2
2
  export const Oval = props => {
3
3
  return /*#__PURE__*/React.createElement("skOval", props);
4
4
  };
5
- Oval.defaultProps = {
6
- x: 0,
7
- y: 0
8
- };
9
5
  //# sourceMappingURL=Oval.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,8BAAYA,KAAZ,CAAP;AACD,CAFM;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,CAAC,EAAE,CADe;EAElBC,CAAC,EAAE;AAFe,CAApB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,8BAAYA,KAAZ,CAAP;AACD,CAFM"}
@@ -1,9 +1,15 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Path = props => {
3
- return /*#__PURE__*/React.createElement("skPath", props);
4
- };
5
- Path.defaultProps = {
6
- start: 0,
7
- end: 1
4
+ export const Path = _ref => {
5
+ let {
6
+ start = 0,
7
+ end = 1,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skPath", _extends({
11
+ start: start,
12
+ end: end
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=Path.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,8BAAYA,KAAZ,CAAP;AACD,CAFM;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,KAAK,EAAE,CADW;EAElBC,GAAG,EAAE;AAFa,CAApB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -1,8 +1,13 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Points = props => {
3
- return /*#__PURE__*/React.createElement("skPoints", props);
4
- };
5
- Points.defaultProps = {
6
- mode: "points"
4
+ export const Points = _ref => {
5
+ let {
6
+ mode = "points",
7
+ ...props
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("skPoints", _extends({
10
+ mode: mode
11
+ }, props));
7
12
  };
8
13
  //# sourceMappingURL=Points.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,gCAAcA,KAAd,CAAP;AACD,CAFM;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,IAAI,EAAE;AADc,CAAtB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAG,QAGuB;EAAA,IAHtB;IACrBC,IAAI,GAAG,QADc;IAErB,GAAGC;EAFkB,CAGsB;EAC3C,oBAAO;IAAU,IAAI,EAAED;EAAhB,GAA0BC,KAA1B,EAAP;AACD,CALM"}
@@ -2,7 +2,4 @@ import React from "react";
2
2
  export const RoundedRect = props => {
3
3
  return /*#__PURE__*/React.createElement("skRRect", props);
4
4
  };
5
- RoundedRect.defaultProps = {
6
- r: 0
7
- };
8
5
  //# sourceMappingURL=RoundedRect.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,WAAW,GAAIC,KAAD,IAAwC;EACjE,oBAAO,+BAAaA,KAAb,CAAP;AACD,CAFM;AAIPD,WAAW,CAACE,YAAZ,GAA2B;EACzBC,CAAC,EAAE;AADsB,CAA3B"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,WAAW,GAAIC,KAAD,IAAwC;EACjE,oBAAO,+BAAaA,KAAb,CAAP;AACD,CAFM"}
@@ -1,8 +1,13 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Vertices = props => {
3
- return /*#__PURE__*/React.createElement("skVertices", props);
4
- };
5
- Vertices.defaultProps = {
6
- mode: "triangles"
4
+ export const Vertices = _ref => {
5
+ let {
6
+ mode = "triangles",
7
+ ...props
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("skVertices", _extends({
10
+ mode: mode
11
+ }, props));
7
12
  };
8
13
  //# sourceMappingURL=Vertices.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,kCAAgBA,KAAhB,CAAP;AACD,CAFM;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,IAAI,EAAE;AADgB,CAAxB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAG,QAGuB;EAAA,IAHtB;IACvBC,IAAI,GAAG,WADgB;IAEvB,GAAGC;EAFoB,CAGsB;EAC7C,oBAAO;IAAY,IAAI,EAAED;EAAlB,GAA4BC,KAA5B,EAAP;AACD,CALM"}
@@ -1,9 +1,15 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Glyphs = props => {
3
- return /*#__PURE__*/React.createElement("skGlyphs", props);
4
- };
5
- Glyphs.defaultProps = {
6
- x: 0,
7
- y: 0
4
+ export const Glyphs = _ref => {
5
+ let {
6
+ x = 0,
7
+ y = 0,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skGlyphs", _extends({
11
+ x: x,
12
+ y: y
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=Glyphs.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,gCAAcA,KAAd,CAAP;AACD,CAFM;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,CAAC,EAAE,CADiB;EAEpBC,CAAC,EAAE;AAFiB,CAAtB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -1,9 +1,15 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const Text = props => {
3
- return /*#__PURE__*/React.createElement("skText", props);
4
- };
5
- Text.defaultProps = {
6
- x: 0,
7
- y: 0
4
+ export const Text = _ref => {
5
+ let {
6
+ x = 0,
7
+ y = 0,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skText", _extends({
11
+ x: x,
12
+ y: y
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,IAAI,GAAIC,KAAD,IAAiC;EACnD,oBAAO,8BAAYA,KAAZ,CAAP;AACD,CAFM;AAIPD,IAAI,CAACE,YAAL,GAAoB;EAClBC,CAAC,EAAE,CADe;EAElBC,CAAC,EAAE;AAFe,CAApB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -1,9 +1,15 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const TextBlob = props => {
3
- return /*#__PURE__*/React.createElement("skTextBlob", props);
4
- };
5
- TextBlob.defaultProps = {
6
- x: 0,
7
- y: 0
4
+ export const TextBlob = _ref => {
5
+ let {
6
+ x = 0,
7
+ y = 0,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skTextBlob", _extends({
11
+ x: x,
12
+ y: y
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=TextBlob.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,kCAAgBA,KAAhB,CAAP;AACD,CAFM;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,CAAC,EAAE,CADmB;EAEtBC,CAAC,EAAE;AAFmB,CAAxB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -1,8 +1,13 @@
1
+ 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); }
2
+
1
3
  import React from "react";
2
- export const TextPath = props => {
3
- return /*#__PURE__*/React.createElement("skTextPath", props);
4
- };
5
- TextPath.defaultProps = {
6
- initialOffset: 0
4
+ export const TextPath = _ref => {
5
+ let {
6
+ initialOffset = 0,
7
+ ...props
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("skTextPath", _extends({
10
+ initialOffset: initialOffset
11
+ }, props));
7
12
  };
8
13
  //# sourceMappingURL=TextPath.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAIC,KAAD,IAAqC;EAC3D,oBAAO,kCAAgBA,KAAhB,CAAP;AACD,CAFM;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,aAAa,EAAE;AADO,CAAxB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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":"AAEA,OAAO,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;AAgBP,OAAO,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;AAkBP,OAAO,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":"AAEA,OAAO,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;AAgBP,OAAO,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;AAkBP,OAAO,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":"AAUA,WAAYA,UAAZ;;WAAYA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAKZ,WAAYC,SAAZ;;WAAYA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,KAAAA,S;;AAMZ,WAAYC,UAAZ;;WAAYA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAMZ,OAAO,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":"AAUA,WAAYA,UAAZ;;WAAYA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAKZ,WAAYC,SAAZ;;WAAYA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,KAAAA,S;;AAMZ,WAAYC,UAAZ;;WAAYA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAMZ,OAAO,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":""}
@@ -15,12 +15,13 @@ const processValue = value => {
15
15
  export const processUniforms = (source, uniforms, builder) => {
16
16
  const processed = new Array(source.getUniformCount()).fill(0).flatMap((_, i) => {
17
17
  const name = source.getUniformName(i);
18
- const value = uniforms[name];
18
+ const rawValue = uniforms[name];
19
19
 
20
- if (value === undefined) {
20
+ if (rawValue === undefined) {
21
21
  throw new Error(`No value specified for uniform ${name}`);
22
22
  }
23
23
 
24
+ const value = rawValue instanceof Float32Array ? Array.from(rawValue) : rawValue;
24
25
  const result = Array.isArray(value) ? value.flatMap(processValue) : processValue(value);
25
26
  builder === null || builder === void 0 ? void 0 : builder.setUniform(name, typeof result === "number" ? [result] : result);
26
27
  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":"AAIA,OAAO,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;;AAOA,OAAO,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":"AAIA,OAAO,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;;AAOA,OAAO,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"}
@@ -17,6 +17,10 @@ export class JsiSkPaint extends HostObject {
17
17
  this.ref = new this.CanvasKit.Paint();
18
18
  }
19
19
 
20
+ getAlphaf() {
21
+ return this.getColor()[3];
22
+ }
23
+
20
24
  getColor() {
21
25
  return this.ref.getColor();
22
26
  }
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","ckEnum","JsiSkColorFilter","JsiSkImageFilter","JsiSkMaskFilter","JsiSkPathEffect","JsiSkShader","JsiSkPaint","constructor","CanvasKit","ref","copy","reset","Paint","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","setColor","color","setColorFilter","filter","fromValue","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(ckEnum(blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(ckEnum(cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(ckEnum(join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["HostObject","ckEnum","JsiSkColorFilter","JsiSkImageFilter","JsiSkMaskFilter","JsiSkPathEffect","JsiSkShader","JsiSkPaint","constructor","CanvasKit","ref","copy","reset","Paint","getAlphaf","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","setColor","color","setColorFilter","filter","fromValue","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getAlphaf() {\n return this.getColor()[3];\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(ckEnum(blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(ckEnum(cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(ckEnum(join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":"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"}
@@ -2,8 +2,13 @@ import { HostObject } from "./Host";
2
2
  import { JsiSkMatrix } from "./JsiSkMatrix";
3
3
  import { JsiSkShader } from "./JsiSkShader";
4
4
  export class JsiSkRuntimeEffect extends HostObject {
5
- constructor(CanvasKit, ref) {
5
+ constructor(CanvasKit, ref, sksl) {
6
6
  super(CanvasKit, ref, "RuntimeEffect");
7
+ this.sksl = sksl;
8
+ }
9
+
10
+ source() {
11
+ return this.sksl;
7
12
  }
8
13
 
9
14
  makeShader(uniforms, localMatrix) {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","makeShader","uniforms","localMatrix","undefined","fromValue","makeShaderWithChildren","children","map","child","getUniform","index","getUniformCount","getUniformFloatCount","getUniformName"],"sources":["JsiSkRuntimeEffect.ts"],"sourcesContent":["import type { CanvasKit, RuntimeEffect } from \"canvaskit-wasm\";\n\nimport type { SkMatrix, SkShader } from \"../types\";\nimport type { SkRuntimeEffect } from \"../types/RuntimeEffect/RuntimeEffect\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkRuntimeEffect\n extends HostObject<RuntimeEffect, \"RuntimeEffect\">\n implements SkRuntimeEffect\n{\n constructor(CanvasKit: CanvasKit, ref: RuntimeEffect) {\n super(CanvasKit, ref, \"RuntimeEffect\");\n }\n\n makeShader(uniforms: number[], localMatrix?: SkMatrix) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n uniforms,\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderWithChildren(\n uniforms,\n children?.map((child) => JsiSkShader.fromValue(child)),\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n getUniform(index: number) {\n return this.ref.getUniform(index);\n }\n\n getUniformCount() {\n return this.ref.getUniformCount();\n }\n\n getUniformFloatCount() {\n return this.ref.getUniformFloatCount();\n }\n\n getUniformName(index: number) {\n return this.ref.getUniformName(index);\n }\n}\n"],"mappings":"AAKA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,OAAO,MAAMC,kBAAN,SACGH,UADH,CAGP;EACEI,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA2C;IACpD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,eAAtB;EACD;;EAEDC,UAAU,CAACC,QAAD,EAAqBC,WAArB,EAA6C;IACrD,OAAO,IAAIP,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASC,UAAT,CACEC,QADF,EAEEC,WAAW,KAAKC,SAAhB,GACIT,WAAW,CAACU,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WAJN,CAFK,CAAP;EASD;;EAEDG,sBAAsB,CACpBJ,QADoB,EAEpBK,QAFoB,EAGpBJ,WAHoB,EAIpB;IACA,OAAO,IAAIP,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASM,sBAAT,CACEJ,QADF,EAEEK,QAFF,aAEEA,QAFF,uBAEEA,QAAQ,CAAEC,GAAV,CAAeC,KAAD,IAAWb,WAAW,CAACS,SAAZ,CAAsBI,KAAtB,CAAzB,CAFF,EAGEN,WAAW,KAAKC,SAAhB,GACIT,WAAW,CAACU,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WALN,CAFK,CAAP;EAUD;;EAEDO,UAAU,CAACC,KAAD,EAAgB;IACxB,OAAO,KAAKX,GAAL,CAASU,UAAT,CAAoBC,KAApB,CAAP;EACD;;EAEDC,eAAe,GAAG;IAChB,OAAO,KAAKZ,GAAL,CAASY,eAAT,EAAP;EACD;;EAEDC,oBAAoB,GAAG;IACrB,OAAO,KAAKb,GAAL,CAASa,oBAAT,EAAP;EACD;;EAEDC,cAAc,CAACH,KAAD,EAAgB;IAC5B,OAAO,KAAKX,GAAL,CAASc,cAAT,CAAwBH,KAAxB,CAAP;EACD;;AAhDH"}
1
+ {"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","sksl","source","makeShader","uniforms","localMatrix","undefined","fromValue","makeShaderWithChildren","children","map","child","getUniform","index","getUniformCount","getUniformFloatCount","getUniformName"],"sources":["JsiSkRuntimeEffect.ts"],"sourcesContent":["import type { CanvasKit, RuntimeEffect } from \"canvaskit-wasm\";\n\nimport type { SkMatrix, SkShader } from \"../types\";\nimport type { SkRuntimeEffect } from \"../types/RuntimeEffect/RuntimeEffect\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkRuntimeEffect\n extends HostObject<RuntimeEffect, \"RuntimeEffect\">\n implements SkRuntimeEffect\n{\n constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, private sksl: string) {\n super(CanvasKit, ref, \"RuntimeEffect\");\n }\n\n source() {\n return this.sksl;\n }\n\n makeShader(uniforms: number[], localMatrix?: SkMatrix) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n uniforms,\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderWithChildren(\n uniforms,\n children?.map((child) => JsiSkShader.fromValue(child)),\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n getUniform(index: number) {\n return this.ref.getUniform(index);\n }\n\n getUniformCount() {\n return this.ref.getUniformCount();\n }\n\n getUniformFloatCount() {\n return this.ref.getUniformFloatCount();\n }\n\n getUniformName(index: number) {\n return this.ref.getUniformName(index);\n }\n}\n"],"mappings":"AAKA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,OAAO,MAAMC,kBAAN,SACGH,UADH,CAGP;EACEI,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmDC,IAAnD,EAAiE;IAC1E,MAAMF,SAAN,EAAiBC,GAAjB,EAAsB,eAAtB;IAD0E,KAAdC,IAAc,GAAdA,IAAc;EAE3E;;EAEDC,MAAM,GAAG;IACP,OAAO,KAAKD,IAAZ;EACD;;EAEDE,UAAU,CAACC,QAAD,EAAqBC,WAArB,EAA6C;IACrD,OAAO,IAAIT,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASG,UAAT,CACEC,QADF,EAEEC,WAAW,KAAKC,SAAhB,GACIX,WAAW,CAACY,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WAJN,CAFK,CAAP;EASD;;EAEDG,sBAAsB,CACpBJ,QADoB,EAEpBK,QAFoB,EAGpBJ,WAHoB,EAIpB;IACA,OAAO,IAAIT,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASQ,sBAAT,CACEJ,QADF,EAEEK,QAFF,aAEEA,QAFF,uBAEEA,QAAQ,CAAEC,GAAV,CAAeC,KAAD,IAAWf,WAAW,CAACW,SAAZ,CAAsBI,KAAtB,CAAzB,CAFF,EAGEN,WAAW,KAAKC,SAAhB,GACIX,WAAW,CAACY,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WALN,CAFK,CAAP;EAUD;;EAEDO,UAAU,CAACC,KAAD,EAAgB;IACxB,OAAO,KAAKb,GAAL,CAASY,UAAT,CAAoBC,KAApB,CAAP;EACD;;EAEDC,eAAe,GAAG;IAChB,OAAO,KAAKd,GAAL,CAASc,eAAT,EAAP;EACD;;EAEDC,oBAAoB,GAAG;IACrB,OAAO,KAAKf,GAAL,CAASe,oBAAT,EAAP;EACD;;EAEDC,cAAc,CAACH,KAAD,EAAgB;IAC5B,OAAO,KAAKb,GAAL,CAASgB,cAAT,CAAwBH,KAAxB,CAAP;EACD;;AApDH"}
@@ -12,7 +12,7 @@ export class JsiSkRuntimeEffectFactory extends Host {
12
12
  return null;
13
13
  }
14
14
 
15
- return new JsiSkRuntimeEffect(this.CanvasKit, re);
15
+ return new JsiSkRuntimeEffect(this.CanvasKit, re, sksl);
16
16
  }
17
17
 
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"names":["Host","JsiSkRuntimeEffect","JsiSkRuntimeEffectFactory","constructor","CanvasKit","Make","sksl","re","RuntimeEffect"],"sources":["JsiSkRuntimeEffectFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { RuntimeEffectFactory } from \"../types/RuntimeEffect/RuntimeEffectFactory\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkRuntimeEffect } from \"./JsiSkRuntimeEffect\";\n\nexport class JsiSkRuntimeEffectFactory\n extends Host\n implements RuntimeEffectFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(sksl: string) {\n const re = this.CanvasKit.RuntimeEffect.Make(sksl);\n if (re === null) {\n return null;\n }\n return new JsiSkRuntimeEffect(this.CanvasKit, re);\n }\n}\n"],"mappings":"AAIA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AAEA,OAAO,MAAMC,yBAAN,SACGF,IADH,CAGP;EACEG,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CAACC,IAAD,EAAe;IACjB,MAAMC,EAAE,GAAG,KAAKH,SAAL,CAAeI,aAAf,CAA6BH,IAA7B,CAAkCC,IAAlC,CAAX;;IACA,IAAIC,EAAE,KAAK,IAAX,EAAiB;MACf,OAAO,IAAP;IACD;;IACD,OAAO,IAAIN,kBAAJ,CAAuB,KAAKG,SAA5B,EAAuCG,EAAvC,CAAP;EACD;;AAXH"}
1
+ {"version":3,"names":["Host","JsiSkRuntimeEffect","JsiSkRuntimeEffectFactory","constructor","CanvasKit","Make","sksl","re","RuntimeEffect"],"sources":["JsiSkRuntimeEffectFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { RuntimeEffectFactory } from \"../types/RuntimeEffect/RuntimeEffectFactory\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkRuntimeEffect } from \"./JsiSkRuntimeEffect\";\n\nexport class JsiSkRuntimeEffectFactory\n extends Host\n implements RuntimeEffectFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(sksl: string) {\n const re = this.CanvasKit.RuntimeEffect.Make(sksl);\n if (re === null) {\n return null;\n }\n return new JsiSkRuntimeEffect(this.CanvasKit, re, sksl);\n }\n}\n"],"mappings":"AAIA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AAEA,OAAO,MAAMC,yBAAN,SACGF,IADH,CAGP;EACEG,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CAACC,IAAD,EAAe;IACjB,MAAMC,EAAE,GAAG,KAAKH,SAAL,CAAeI,aAAf,CAA6BH,IAA7B,CAAkCC,IAAlC,CAAX;;IACA,IAAIC,EAAE,KAAK,IAAX,EAAiB;MACf,OAAO,IAAP;IACD;;IACD,OAAO,IAAIN,kBAAJ,CAAuB,KAAKG,SAA5B,EAAuCG,EAAvC,EAA2CD,IAA3C,CAAP;EACD;;AAXH"}
@@ -1,5 +1,5 @@
1
1
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
- // @ts-expect-error
2
+ // @ts-ignore
3
3
  import CanvasKitInit from "canvaskit-wasm/bin/full/canvaskit";
4
4
  export const LoadSkiaWeb = async opts => {
5
5
  if (global.CanvasKit !== undefined) {
@@ -1 +1 @@
1
- {"version":3,"names":["CanvasKitInit","LoadSkiaWeb","opts","global","CanvasKit","undefined","LoadSkia"],"sources":["LoadSkiaWeb.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-expect-error\nimport CanvasKitInit from \"canvaskit-wasm/bin/full/canvaskit\";\nimport type {\n CanvasKit as CanvasKitType,\n CanvasKitInitOptions,\n} from \"canvaskit-wasm\";\n\ndeclare global {\n var CanvasKit: CanvasKitType;\n}\n\nexport const LoadSkiaWeb = async (opts?: CanvasKitInitOptions) => {\n if (global.CanvasKit !== undefined) {\n return;\n }\n const CanvasKit = await CanvasKitInit(opts);\n // The CanvasKit API is stored on the global object and used\n // to create the JsiSKApi in the Skia.web.ts file.\n global.CanvasKit = CanvasKit;\n};\n\n// We keep this function for backward compatibility\nexport const LoadSkia = LoadSkiaWeb;\n"],"mappings":"AAAA;AACA;AACA,OAAOA,aAAP,MAA0B,mCAA1B;AAUA,OAAO,MAAMC,WAAW,GAAG,MAAOC,IAAP,IAAuC;EAChE,IAAIC,MAAM,CAACC,SAAP,KAAqBC,SAAzB,EAAoC;IAClC;EACD;;EACD,MAAMD,SAAS,GAAG,MAAMJ,aAAa,CAACE,IAAD,CAArC,CAJgE,CAKhE;EACA;;EACAC,MAAM,CAACC,SAAP,GAAmBA,SAAnB;AACD,CARM,C,CAUP;;AACA,OAAO,MAAME,QAAQ,GAAGL,WAAjB"}
1
+ {"version":3,"names":["CanvasKitInit","LoadSkiaWeb","opts","global","CanvasKit","undefined","LoadSkia"],"sources":["LoadSkiaWeb.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport CanvasKitInit from \"canvaskit-wasm/bin/full/canvaskit\";\nimport type {\n CanvasKit as CanvasKitType,\n CanvasKitInitOptions,\n} from \"canvaskit-wasm\";\n\ndeclare global {\n var CanvasKit: CanvasKitType;\n}\n\nexport const LoadSkiaWeb = async (opts?: CanvasKitInitOptions) => {\n if (global.CanvasKit !== undefined) {\n return;\n }\n const CanvasKit = await CanvasKitInit(opts);\n // The CanvasKit API is stored on the global object and used\n // to create the JsiSKApi in the Skia.web.ts file.\n global.CanvasKit = CanvasKit;\n};\n\n// We keep this function for backward compatibility\nexport const LoadSkia = LoadSkiaWeb;\n"],"mappings":"AAAA;AACA;AACA,OAAOA,aAAP,MAA0B,mCAA1B;AAUA,OAAO,MAAMC,WAAW,GAAG,MAAOC,IAAP,IAAuC;EAChE,IAAIC,MAAM,CAACC,SAAP,KAAqBC,SAAzB,EAAoC;IAClC;EACD;;EACD,MAAMD,SAAS,GAAG,MAAMJ,aAAa,CAACE,IAAD,CAArC,CAJgE,CAKhE;EACA;;EACAC,MAAM,CAACC,SAAP,GAAmBA,SAAnB;AACD,CARM,C,CAUP;;AACA,OAAO,MAAME,QAAQ,GAAGL,WAAjB"}
@@ -1,4 +1,7 @@
1
1
  import type { Skia } from "../../../skia/types";
2
2
  import type { CircleDef, ScalarCircleDef } from "../../types";
3
3
  export declare const isCircleScalarDef: (def: CircleDef) => def is ScalarCircleDef;
4
- export declare const processCircle: (Skia: Skia, def: CircleDef) => import("../../types").PointCircleDef;
4
+ export declare const processCircle: (Skia: Skia, def: CircleDef) => {
5
+ c: import("../../../skia/types").SkPoint;
6
+ r: number;
7
+ };
@@ -1,7 +1,6 @@
1
1
  export * from "./Enum";
2
2
  export * from "./Path";
3
3
  export * from "./Fitting";
4
- export * from "./Color";
5
4
  export * from "./Rect";
6
5
  export * from "./Radius";
7
6
  export * from "./Circle";
@@ -9,5 +9,5 @@ export declare class BoxShadowNode extends JsiDeclarationNode<BoxShadowProps, Bo
9
9
  }
10
10
  export declare class BoxNode extends JsiRenderNode<BoxProps> {
11
11
  constructor(ctx: NodeContext, props: BoxProps);
12
- renderNode({ canvas, paint, opacity }: DrawingContext): void;
12
+ renderNode({ canvas, paint }: DrawingContext): void;
13
13
  }
@@ -14,5 +14,5 @@ export declare class PatchNode extends JsiDrawingNode<PatchProps, {
14
14
  points: SkPoint[];
15
15
  colors: Float32Array[] | undefined;
16
16
  };
17
- draw({ canvas, paint, opacity }: DrawingContext): void;
17
+ draw({ canvas, paint }: DrawingContext): void;
18
18
  }