@shopify/react-native-skia 0.1.164 → 0.1.166

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +16 -5
  2. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseViewManager.java +34 -0
  3. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomViewManager.java +2 -47
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +2 -44
  5. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureViewManager.java +2 -47
  6. package/cpp/api/JsiSkRuntimeEffect.h +7 -2
  7. package/cpp/rnskia/RNSkDomView.cpp +1 -1
  8. package/cpp/rnskia/RNSkPlatformContext.h +2 -6
  9. package/cpp/rnskia/dom/base/DerivedNodeProp.h +4 -4
  10. package/cpp/rnskia/dom/base/DrawingContext.cpp +5 -38
  11. package/cpp/rnskia/dom/base/DrawingContext.h +3 -17
  12. package/cpp/rnskia/dom/nodes/JsiBoxNode.h +4 -4
  13. package/cpp/rnskia/dom/nodes/JsiCircleNode.h +0 -2
  14. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +1 -3
  15. package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +2 -2
  16. package/cpp/rnskia/dom/nodes/JsiPathNode.h +12 -5
  17. package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +17 -7
  18. package/cpp/rnskia/dom/props/CircleProp.h +2 -0
  19. package/cpp/rnskia/dom/props/ClipProp.h +6 -6
  20. package/cpp/rnskia/dom/props/ColorProp.h +9 -4
  21. package/cpp/rnskia/dom/props/ImageProps.h +6 -3
  22. package/cpp/rnskia/dom/props/PaintProps.h +15 -22
  23. package/cpp/rnskia/dom/props/RectProp.h +11 -4
  24. package/cpp/rnskia/dom/props/UniformsProp.h +86 -123
  25. package/cpp/rnskia/dom/props/VerticesProps.h +2 -2
  26. package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -6
  27. package/lib/commonjs/dom/nodes/datatypes/Circle.js +6 -1
  28. package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
  29. package/lib/commonjs/dom/nodes/datatypes/Rect.js +3 -3
  30. package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
  31. package/lib/commonjs/dom/nodes/drawings/Box.js +1 -1
  32. package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
  33. package/lib/commonjs/dom/nodes/drawings/ImageNode.js +2 -2
  34. package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
  35. package/lib/commonjs/dom/nodes/paint/ImageFilters.js +1 -1
  36. package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
  37. package/lib/commonjs/dom/nodes/paint/Shaders.js +5 -2
  38. package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
  39. package/lib/commonjs/dom/types/Common.js.map +1 -1
  40. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  41. package/lib/commonjs/renderer/components/Mask.js +2 -6
  42. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  43. package/lib/commonjs/renderer/components/image/Image.js +0 -5
  44. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  45. package/lib/commonjs/renderer/components/image/ImageShader.js +20 -10
  46. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  47. package/lib/commonjs/renderer/components/imageFilters/Blur.js +10 -5
  48. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  49. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +10 -5
  50. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  51. package/lib/commonjs/renderer/components/imageFilters/Offset.js +12 -6
  52. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  53. package/lib/commonjs/renderer/components/maskFilters/Blur.js +12 -6
  54. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  55. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +10 -5
  56. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  57. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +14 -7
  58. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  59. package/lib/commonjs/renderer/components/shaders/Shader.js +10 -5
  60. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  61. package/lib/commonjs/renderer/components/shaders/Turbulence.js +14 -7
  62. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  63. package/lib/commonjs/renderer/components/shapes/Circle.js +0 -6
  64. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  65. package/lib/commonjs/renderer/components/shapes/FitBox.js +1 -4
  66. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  67. package/lib/commonjs/renderer/components/shapes/Oval.js +0 -4
  68. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  69. package/lib/commonjs/renderer/components/shapes/Path.js +12 -6
  70. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  71. package/lib/commonjs/renderer/components/shapes/Points.js +10 -5
  72. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  73. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +0 -3
  74. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  75. package/lib/commonjs/renderer/components/shapes/Vertices.js +10 -5
  76. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  77. package/lib/commonjs/renderer/components/text/Glyphs.js +12 -6
  78. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  79. package/lib/commonjs/renderer/components/text/Text.js +12 -6
  80. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  81. package/lib/commonjs/renderer/components/text/TextBlob.js +12 -6
  82. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  83. package/lib/commonjs/renderer/components/text/TextPath.js +10 -5
  84. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  85. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  86. package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  87. package/lib/commonjs/skia/types/Shader/Shader.js +25 -25
  88. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  89. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -1
  90. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  91. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  92. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  93. package/lib/module/dom/nodes/datatypes/Circle.js +8 -1
  94. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  95. package/lib/module/dom/nodes/datatypes/Rect.js +7 -3
  96. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  97. package/lib/module/dom/nodes/drawings/Box.js +1 -1
  98. package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
  99. package/lib/module/dom/nodes/drawings/ImageNode.js +4 -2
  100. package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
  101. package/lib/module/dom/nodes/paint/ImageFilters.js +1 -1
  102. package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
  103. package/lib/module/dom/nodes/paint/Shaders.js +5 -4
  104. package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
  105. package/lib/module/dom/types/Common.js.map +1 -1
  106. package/lib/module/dom/types/Drawings.js.map +1 -1
  107. package/lib/module/renderer/components/Mask.js +2 -6
  108. package/lib/module/renderer/components/Mask.js.map +1 -1
  109. package/lib/module/renderer/components/image/Image.js +0 -5
  110. package/lib/module/renderer/components/image/Image.js.map +1 -1
  111. package/lib/module/renderer/components/image/ImageShader.js +20 -10
  112. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  113. package/lib/module/renderer/components/imageFilters/Blur.js +10 -5
  114. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  115. package/lib/module/renderer/components/imageFilters/Morphology.js +10 -5
  116. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  117. package/lib/module/renderer/components/imageFilters/Offset.js +12 -6
  118. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  119. package/lib/module/renderer/components/maskFilters/Blur.js +12 -6
  120. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  121. package/lib/module/renderer/components/pathEffects/Discrete.js +10 -5
  122. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  123. package/lib/module/renderer/components/shaders/FractalNoise.js +14 -7
  124. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  125. package/lib/module/renderer/components/shaders/Shader.js +10 -5
  126. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  127. package/lib/module/renderer/components/shaders/Turbulence.js +14 -7
  128. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  129. package/lib/module/renderer/components/shapes/Circle.js +0 -6
  130. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  131. package/lib/module/renderer/components/shapes/FitBox.js +1 -4
  132. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  133. package/lib/module/renderer/components/shapes/Oval.js +0 -4
  134. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  135. package/lib/module/renderer/components/shapes/Path.js +12 -6
  136. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  137. package/lib/module/renderer/components/shapes/Points.js +10 -5
  138. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  139. package/lib/module/renderer/components/shapes/RoundedRect.js +0 -3
  140. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  141. package/lib/module/renderer/components/shapes/Vertices.js +10 -5
  142. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  143. package/lib/module/renderer/components/text/Glyphs.js +12 -6
  144. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  145. package/lib/module/renderer/components/text/Text.js +12 -6
  146. package/lib/module/renderer/components/text/Text.js.map +1 -1
  147. package/lib/module/renderer/components/text/TextBlob.js +12 -6
  148. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  149. package/lib/module/renderer/components/text/TextPath.js +10 -5
  150. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  151. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  152. package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  153. package/lib/module/skia/types/Shader/Shader.js +25 -25
  154. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  155. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -1
  156. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  157. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  158. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  159. package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +4 -1
  160. package/lib/typescript/src/dom/types/Common.d.ts +4 -4
  161. package/lib/typescript/src/dom/types/Drawings.d.ts +1 -1
  162. package/lib/typescript/src/renderer/components/Mask.d.ts +3 -9
  163. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -8
  164. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -12
  165. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -7
  166. package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -7
  167. package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -8
  168. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -8
  169. package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -7
  170. package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -9
  171. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -7
  172. package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -9
  173. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +1 -9
  174. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -7
  175. package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +1 -7
  176. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -8
  177. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -7
  178. package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +1 -6
  179. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -7
  180. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -8
  181. package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -8
  182. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -8
  183. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -7
  184. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +5 -0
  185. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +4 -0
  186. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -2
  187. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +3 -1
  188. package/package.json +1 -1
  189. package/src/dom/nodes/datatypes/Circle.ts +1 -1
  190. package/src/dom/nodes/datatypes/Rect.ts +3 -3
  191. package/src/dom/nodes/drawings/Box.ts +1 -1
  192. package/src/dom/nodes/drawings/ImageNode.ts +2 -1
  193. package/src/dom/nodes/paint/ImageFilters.ts +1 -1
  194. package/src/dom/nodes/paint/Shaders.ts +5 -5
  195. package/src/dom/types/Common.ts +4 -4
  196. package/src/dom/types/Drawings.ts +1 -1
  197. package/src/renderer/components/Mask.tsx +8 -8
  198. package/src/renderer/components/image/Image.tsx +0 -6
  199. package/src/renderer/components/image/ImageShader.tsx +24 -12
  200. package/src/renderer/components/imageFilters/Blur.tsx +6 -7
  201. package/src/renderer/components/imageFilters/Morphology.tsx +6 -7
  202. package/src/renderer/components/imageFilters/Offset.tsx +7 -8
  203. package/src/renderer/components/maskFilters/Blur.tsx +7 -8
  204. package/src/renderer/components/pathEffects/Discrete.tsx +6 -9
  205. package/src/renderer/components/shaders/FractalNoise.tsx +18 -9
  206. package/src/renderer/components/shaders/Shader.tsx +6 -7
  207. package/src/renderer/components/shaders/Turbulence.tsx +15 -9
  208. package/src/renderer/components/shapes/Circle.tsx +0 -4
  209. package/src/renderer/components/shapes/FitBox.tsx +2 -6
  210. package/src/renderer/components/shapes/Oval.tsx +0 -5
  211. package/src/renderer/components/shapes/Path.tsx +7 -8
  212. package/src/renderer/components/shapes/Points.tsx +6 -7
  213. package/src/renderer/components/shapes/RoundedRect.tsx +0 -4
  214. package/src/renderer/components/shapes/Vertices.tsx +6 -7
  215. package/src/renderer/components/text/Glyphs.tsx +7 -8
  216. package/src/renderer/components/text/Text.tsx +7 -8
  217. package/src/renderer/components/text/TextBlob.tsx +7 -8
  218. package/src/renderer/components/text/TextPath.tsx +6 -7
  219. package/src/renderer/processors/Animations/Animations.ts +9 -3
  220. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -0
  221. package/src/skia/types/Shader/Shader.ts +30 -36
  222. package/src/skia/web/JsiSkRuntimeEffect.ts +5 -1
  223. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAAmC;EACvD,oBAAO,gCAAcA,KAAd,CAAP;AACD,CAFM;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,QAAQ,EAAE;AADU,CAAtB"}
1
+ {"version":3,"names":["React","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,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,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"}
@@ -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":[],"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":""}
@@ -4,41 +4,41 @@ const isVector = obj => // We have an issue to check property existence on JSI b
4
4
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
5
  obj.x !== undefined && obj.y !== undefined;
6
6
 
7
- const processValue = value => {
8
- if (isVector(value)) {
9
- return [value.x, value.y];
7
+ const processValue = (values, value) => {
8
+ if (typeof value === "number") {
9
+ values.push(value);
10
+ } else if (Array.isArray(value)) {
11
+ value.forEach(v => processValue(values, v));
12
+ } else if (isVector(value)) {
13
+ values.push(value.x, value.y);
14
+ } else if (value instanceof Float32Array) {
15
+ values.push(...value);
10
16
  }
11
-
12
- return value;
13
17
  };
14
18
 
15
19
  export const processUniforms = (source, uniforms, builder) => {
16
- const processed = new Array(source.getUniformCount()).fill(0).flatMap((_, i) => {
20
+ const result = [];
21
+ const uniformsCount = source.getUniformCount();
22
+
23
+ for (let i = 0; i < uniformsCount; i++) {
17
24
  const name = source.getUniformName(i);
18
25
  const value = uniforms[name];
19
26
 
20
- if (value === undefined) {
21
- throw new Error(`No value specified for uniform ${name}`);
27
+ if (!value === undefined) {
28
+ throw new Error( // eslint-disable-next-line max-len
29
+ `The runtime effect has the uniform value "${name}" declared, but it is missing from the uniforms property of the Runtime effect.`);
22
30
  }
23
31
 
24
- const result = Array.isArray(value) ? value.flatMap(processValue) : processValue(value);
25
- builder === null || builder === void 0 ? void 0 : builder.setUniform(name, typeof result === "number" ? [result] : result);
26
- return result;
27
- });
28
- const names = Object.keys(uniforms);
29
-
30
- if (names.length > source.getUniformCount()) {
31
- const usedUniforms = new Array(source.getUniformCount()).fill(0).map((_, i) => source.getUniformName(i));
32
- const unusedUniform = names.map(name => {
33
- if (usedUniforms.indexOf(name) === -1) {
34
- return name;
35
- }
36
-
37
- return null;
38
- }).filter(n => n !== null);
39
- console.warn("Unused uniforms were provided: " + unusedUniform.join(", "));
32
+ if (builder === undefined) {
33
+ processValue(result, value);
34
+ } else {
35
+ const uniformValue = [];
36
+ processValue(uniformValue, value);
37
+ builder.setUniform(name, uniformValue);
38
+ result.push(...uniformValue);
39
+ }
40
40
  }
41
41
 
42
- return processed;
42
+ return result;
43
43
  };
44
44
  //# sourceMappingURL=Shader.js.map
@@ -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","values","value","push","Array","isArray","forEach","v","Float32Array","processUniforms","source","uniforms","builder","result","uniformsCount","getUniformCount","i","name","getUniformName","Error","uniformValue","setUniform"],"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 Uniform = number | Vector | Float32Array | Uniform[];\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 = (values: number[], value: Uniform) => {\n if (typeof value === \"number\") {\n values.push(value);\n } else if (Array.isArray(value)) {\n value.forEach((v) => processValue(values, v));\n } else if (isVector(value)) {\n values.push(value.x, value.y);\n } else if (value instanceof Float32Array) {\n values.push(...value);\n }\n};\n\nexport const processUniforms = (\n source: SkRuntimeEffect,\n uniforms: Uniforms,\n builder?: SkRuntimeShaderBuilder\n) => {\n const result: number[] = [];\n const uniformsCount = source.getUniformCount();\n for (let i = 0; i < uniformsCount; i++) {\n const name = source.getUniformName(i);\n const value = uniforms[name];\n if (!value === undefined) {\n throw new Error(\n // eslint-disable-next-line max-len\n `The runtime effect has the uniform value \"${name}\" declared, but it is missing from the uniforms property of the Runtime effect.`\n );\n }\n if (builder === undefined) {\n processValue(result, value);\n } else {\n const uniformValue: number[] = [];\n processValue(uniformValue, value);\n builder.setUniform(name, uniformValue);\n result.push(...uniformValue);\n }\n }\n return result;\n};\n"],"mappings":"AAIA,OAAO,MAAMA,QAAQ,GAAIC,GAAD,IACtBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,QADhC;;AAWP,MAAMC,QAAQ,GAAIF,GAAD,IACf;AACA;AACCA,GAAD,CAAaG,CAAb,KAAmBC,SAAnB,IAAiCJ,GAAD,CAAaK,CAAb,KAAmBD,SAHrD;;AAKA,MAAME,YAAY,GAAG,CAACC,MAAD,EAAmBC,KAAnB,KAAsC;EACzD,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;IAC7BD,MAAM,CAACE,IAAP,CAAYD,KAAZ;EACD,CAFD,MAEO,IAAIE,KAAK,CAACC,OAAN,CAAcH,KAAd,CAAJ,EAA0B;IAC/BA,KAAK,CAACI,OAAN,CAAeC,CAAD,IAAOP,YAAY,CAACC,MAAD,EAASM,CAAT,CAAjC;EACD,CAFM,MAEA,IAAIX,QAAQ,CAACM,KAAD,CAAZ,EAAqB;IAC1BD,MAAM,CAACE,IAAP,CAAYD,KAAK,CAACL,CAAlB,EAAqBK,KAAK,CAACH,CAA3B;EACD,CAFM,MAEA,IAAIG,KAAK,YAAYM,YAArB,EAAmC;IACxCP,MAAM,CAACE,IAAP,CAAY,GAAGD,KAAf;EACD;AACF,CAVD;;AAYA,OAAO,MAAMO,eAAe,GAAG,CAC7BC,MAD6B,EAE7BC,QAF6B,EAG7BC,OAH6B,KAI1B;EACH,MAAMC,MAAgB,GAAG,EAAzB;EACA,MAAMC,aAAa,GAAGJ,MAAM,CAACK,eAAP,EAAtB;;EACA,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,aAApB,EAAmCE,CAAC,EAApC,EAAwC;IACtC,MAAMC,IAAI,GAAGP,MAAM,CAACQ,cAAP,CAAsBF,CAAtB,CAAb;IACA,MAAMd,KAAK,GAAGS,QAAQ,CAACM,IAAD,CAAtB;;IACA,IAAI,CAACf,KAAD,KAAWJ,SAAf,EAA0B;MACxB,MAAM,IAAIqB,KAAJ,EACJ;MACC,6CAA4CF,IAAK,iFAF9C,CAAN;IAID;;IACD,IAAIL,OAAO,KAAKd,SAAhB,EAA2B;MACzBE,YAAY,CAACa,MAAD,EAASX,KAAT,CAAZ;IACD,CAFD,MAEO;MACL,MAAMkB,YAAsB,GAAG,EAA/B;MACApB,YAAY,CAACoB,YAAD,EAAelB,KAAf,CAAZ;MACAU,OAAO,CAACS,UAAR,CAAmBJ,IAAnB,EAAyBG,YAAzB;MACAP,MAAM,CAACV,IAAP,CAAY,GAAGiB,YAAf;IACD;EACF;;EACD,OAAOP,MAAP;AACD,CA1BM"}
@@ -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,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
+ };
@@ -9,13 +9,13 @@ export interface ChildrenProps {
9
9
  children?: ReactNode | ReactNode[];
10
10
  }
11
11
  export interface RectCtor {
12
- x: number;
13
- y: number;
12
+ x?: number;
13
+ y?: number;
14
14
  width: number;
15
15
  height: number;
16
16
  }
17
17
  export interface RRectCtor extends RectCtor {
18
- r: Radius;
18
+ r?: Radius;
19
19
  }
20
20
  export declare type RectDef = RectCtor | {
21
21
  rect: SkRect;
@@ -24,7 +24,7 @@ export declare type RRectDef = RRectCtor | {
24
24
  rect: SkRRect;
25
25
  };
26
26
  export interface PointCircleDef {
27
- c: Vector;
27
+ c?: Vector;
28
28
  r: number;
29
29
  }
30
30
  export interface ScalarCircleDef {
@@ -5,7 +5,7 @@ export interface DrawingNodeProps extends GroupProps {
5
5
  paint?: SkPaint;
6
6
  }
7
7
  export declare type ImageProps = DrawingNodeProps & RectDef & {
8
- fit: Fit;
8
+ fit?: Fit;
9
9
  image: SkImage;
10
10
  };
11
11
  export declare type CircleProps = CircleDef & DrawingNodeProps;
@@ -1,15 +1,9 @@
1
1
  import type { ReactNode } from "react";
2
2
  interface MaskProps {
3
- mode: "luminance" | "alpha";
4
- clip: boolean;
3
+ mode?: "luminance" | "alpha";
4
+ clip?: boolean;
5
5
  mask: ReactNode | ReactNode[];
6
6
  children: ReactNode | ReactNode[];
7
7
  }
8
- export declare const Mask: {
9
- ({ children, mask, mode, clip }: MaskProps): JSX.Element;
10
- defaultProps: {
11
- mode: string;
12
- clip: boolean;
13
- };
14
- };
8
+ export declare const Mask: ({ children, mask, mode, clip, }: MaskProps) => JSX.Element;
15
9
  export {};