@shopify/react-native-skia 0.1.164 → 0.1.165

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. package/cpp/api/JsiSkRuntimeEffect.h +7 -2
  2. package/cpp/rnskia/RNSkDomView.cpp +1 -1
  3. package/cpp/rnskia/RNSkPlatformContext.h +2 -6
  4. package/cpp/rnskia/dom/base/DrawingContext.cpp +5 -38
  5. package/cpp/rnskia/dom/base/DrawingContext.h +3 -17
  6. package/cpp/rnskia/dom/nodes/JsiCircleNode.h +0 -2
  7. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +1 -3
  8. package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +2 -2
  9. package/cpp/rnskia/dom/props/CircleProp.h +2 -0
  10. package/cpp/rnskia/dom/props/ColorProp.h +9 -4
  11. package/cpp/rnskia/dom/props/ImageProps.h +3 -2
  12. package/cpp/rnskia/dom/props/PaintProps.h +15 -6
  13. package/cpp/rnskia/dom/props/RectProp.h +11 -4
  14. package/cpp/rnskia/dom/props/UniformsProp.h +86 -123
  15. package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -6
  16. package/lib/commonjs/dom/nodes/datatypes/Circle.js +6 -1
  17. package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
  18. package/lib/commonjs/dom/nodes/datatypes/Rect.js +3 -3
  19. package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
  20. package/lib/commonjs/dom/nodes/drawings/ImageNode.js +2 -2
  21. package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
  22. package/lib/commonjs/dom/types/Common.js.map +1 -1
  23. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  24. package/lib/commonjs/renderer/components/Mask.js +2 -6
  25. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  26. package/lib/commonjs/renderer/components/image/Image.js +0 -5
  27. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  28. package/lib/commonjs/renderer/components/image/ImageShader.js +20 -10
  29. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  30. package/lib/commonjs/renderer/components/imageFilters/Blur.js +10 -5
  31. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  32. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +10 -5
  33. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  34. package/lib/commonjs/renderer/components/imageFilters/Offset.js +12 -6
  35. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  36. package/lib/commonjs/renderer/components/maskFilters/Blur.js +12 -6
  37. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  38. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +10 -5
  39. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  40. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +14 -7
  41. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  42. package/lib/commonjs/renderer/components/shaders/Shader.js +10 -5
  43. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  44. package/lib/commonjs/renderer/components/shaders/Turbulence.js +14 -7
  45. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  46. package/lib/commonjs/renderer/components/shapes/Circle.js +0 -6
  47. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  48. package/lib/commonjs/renderer/components/shapes/FitBox.js +1 -4
  49. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  50. package/lib/commonjs/renderer/components/shapes/Oval.js +0 -4
  51. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  52. package/lib/commonjs/renderer/components/shapes/Path.js +12 -6
  53. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  54. package/lib/commonjs/renderer/components/shapes/Points.js +10 -5
  55. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  56. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +0 -3
  57. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  58. package/lib/commonjs/renderer/components/shapes/Vertices.js +10 -5
  59. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  60. package/lib/commonjs/renderer/components/text/Glyphs.js +12 -6
  61. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  62. package/lib/commonjs/renderer/components/text/Text.js +12 -6
  63. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  64. package/lib/commonjs/renderer/components/text/TextBlob.js +12 -6
  65. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  66. package/lib/commonjs/renderer/components/text/TextPath.js +10 -5
  67. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  68. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  69. package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  70. package/lib/commonjs/skia/types/Shader/Shader.js +3 -2
  71. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  72. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -1
  73. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  74. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  75. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  76. package/lib/module/dom/nodes/datatypes/Circle.js +8 -1
  77. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  78. package/lib/module/dom/nodes/datatypes/Rect.js +7 -3
  79. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  80. package/lib/module/dom/nodes/drawings/ImageNode.js +4 -2
  81. package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
  82. package/lib/module/dom/types/Common.js.map +1 -1
  83. package/lib/module/dom/types/Drawings.js.map +1 -1
  84. package/lib/module/renderer/components/Mask.js +2 -6
  85. package/lib/module/renderer/components/Mask.js.map +1 -1
  86. package/lib/module/renderer/components/image/Image.js +0 -5
  87. package/lib/module/renderer/components/image/Image.js.map +1 -1
  88. package/lib/module/renderer/components/image/ImageShader.js +20 -10
  89. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  90. package/lib/module/renderer/components/imageFilters/Blur.js +10 -5
  91. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  92. package/lib/module/renderer/components/imageFilters/Morphology.js +10 -5
  93. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  94. package/lib/module/renderer/components/imageFilters/Offset.js +12 -6
  95. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  96. package/lib/module/renderer/components/maskFilters/Blur.js +12 -6
  97. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  98. package/lib/module/renderer/components/pathEffects/Discrete.js +10 -5
  99. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  100. package/lib/module/renderer/components/shaders/FractalNoise.js +14 -7
  101. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  102. package/lib/module/renderer/components/shaders/Shader.js +10 -5
  103. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  104. package/lib/module/renderer/components/shaders/Turbulence.js +14 -7
  105. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  106. package/lib/module/renderer/components/shapes/Circle.js +0 -6
  107. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  108. package/lib/module/renderer/components/shapes/FitBox.js +1 -4
  109. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  110. package/lib/module/renderer/components/shapes/Oval.js +0 -4
  111. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  112. package/lib/module/renderer/components/shapes/Path.js +12 -6
  113. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  114. package/lib/module/renderer/components/shapes/Points.js +10 -5
  115. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  116. package/lib/module/renderer/components/shapes/RoundedRect.js +0 -3
  117. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  118. package/lib/module/renderer/components/shapes/Vertices.js +10 -5
  119. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  120. package/lib/module/renderer/components/text/Glyphs.js +12 -6
  121. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  122. package/lib/module/renderer/components/text/Text.js +12 -6
  123. package/lib/module/renderer/components/text/Text.js.map +1 -1
  124. package/lib/module/renderer/components/text/TextBlob.js +12 -6
  125. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  126. package/lib/module/renderer/components/text/TextPath.js +10 -5
  127. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  128. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  129. package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
  130. package/lib/module/skia/types/Shader/Shader.js +3 -2
  131. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  132. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -1
  133. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  134. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
  135. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  136. package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +4 -1
  137. package/lib/typescript/src/dom/types/Common.d.ts +4 -4
  138. package/lib/typescript/src/dom/types/Drawings.d.ts +1 -1
  139. package/lib/typescript/src/renderer/components/Mask.d.ts +3 -9
  140. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -8
  141. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -12
  142. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -7
  143. package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -7
  144. package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -8
  145. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -8
  146. package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -7
  147. package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -9
  148. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -7
  149. package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -9
  150. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +1 -9
  151. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -7
  152. package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +1 -7
  153. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -8
  154. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -7
  155. package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +1 -6
  156. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -7
  157. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -8
  158. package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -8
  159. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -8
  160. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -7
  161. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +5 -0
  162. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +4 -0
  163. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
  164. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +3 -1
  165. package/package.json +1 -1
  166. package/src/dom/nodes/datatypes/Circle.ts +1 -1
  167. package/src/dom/nodes/datatypes/Rect.ts +3 -3
  168. package/src/dom/nodes/drawings/ImageNode.ts +2 -1
  169. package/src/dom/types/Common.ts +4 -4
  170. package/src/dom/types/Drawings.ts +1 -1
  171. package/src/renderer/components/Mask.tsx +8 -8
  172. package/src/renderer/components/image/Image.tsx +0 -6
  173. package/src/renderer/components/image/ImageShader.tsx +24 -12
  174. package/src/renderer/components/imageFilters/Blur.tsx +6 -7
  175. package/src/renderer/components/imageFilters/Morphology.tsx +6 -7
  176. package/src/renderer/components/imageFilters/Offset.tsx +7 -8
  177. package/src/renderer/components/maskFilters/Blur.tsx +7 -8
  178. package/src/renderer/components/pathEffects/Discrete.tsx +6 -9
  179. package/src/renderer/components/shaders/FractalNoise.tsx +18 -9
  180. package/src/renderer/components/shaders/Shader.tsx +6 -7
  181. package/src/renderer/components/shaders/Turbulence.tsx +15 -9
  182. package/src/renderer/components/shapes/Circle.tsx +0 -4
  183. package/src/renderer/components/shapes/FitBox.tsx +2 -6
  184. package/src/renderer/components/shapes/Oval.tsx +0 -5
  185. package/src/renderer/components/shapes/Path.tsx +7 -8
  186. package/src/renderer/components/shapes/Points.tsx +6 -7
  187. package/src/renderer/components/shapes/RoundedRect.tsx +0 -4
  188. package/src/renderer/components/shapes/Vertices.tsx +6 -7
  189. package/src/renderer/components/text/Glyphs.tsx +7 -8
  190. package/src/renderer/components/text/Text.tsx +7 -8
  191. package/src/renderer/components/text/TextBlob.tsx +7 -8
  192. package/src/renderer/components/text/TextPath.tsx +6 -7
  193. package/src/renderer/processors/Animations/Animations.ts +9 -3
  194. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -0
  195. package/src/skia/types/Shader/Shader.ts +5 -3
  196. package/src/skia/web/JsiSkRuntimeEffect.ts +5 -1
  197. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +1 -1
@@ -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 Offset = props => {
3
- return /*#__PURE__*/React.createElement("skOffsetImageFilter", props);
4
- };
5
- Offset.defaultProps = {
6
- x: 0,
7
- y: 0
4
+ export const Offset = _ref => {
5
+ let {
6
+ x = 0,
7
+ y = 0,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skOffsetImageFilter", _extends({
11
+ x: x,
12
+ y: y
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=Offset.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Offset","props","defaultProps","x","y"],"sources":["Offset.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\nimport type { OffsetImageFilterProps } from \"../../../dom/types\";\n\nexport const Offset = (props: SkiaProps<OffsetImageFilterProps>) => {\n return <skOffsetImageFilter {...props} />;\n};\n\nOffset.defaultProps = {\n x: 0,\n y: 0,\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAIC,KAAD,IAA8C;EAClE,oBAAO,2CAAyBA,KAAzB,CAAP;AACD,CAFM;AAIPD,MAAM,CAACE,YAAP,GAAsB;EACpBC,CAAC,EAAE,CADiB;EAEpBC,CAAC,EAAE;AAFiB,CAAtB"}
1
+ {"version":3,"names":["React","Offset","x","y","props"],"sources":["Offset.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\nimport type { OffsetImageFilterProps } from \"../../../dom/types\";\n\nexport const Offset = ({\n x = 0,\n y = 0,\n ...props\n}: SkiaDefaultProps<OffsetImageFilterProps, \"x\" | \"y\">) => {\n return <skOffsetImageFilter x={x} y={y} {...props} />;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,MAAM,GAAG,QAIqC;EAAA,IAJpC;IACrBC,CAAC,GAAG,CADiB;IAErBC,CAAC,GAAG,CAFiB;IAGrB,GAAGC;EAHkB,CAIoC;EACzD,oBAAO;IAAqB,CAAC,EAAEF,CAAxB;IAA2B,CAAC,EAAEC;EAA9B,GAAqCC,KAArC,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 BlurMask = props => {
3
- return /*#__PURE__*/React.createElement("skBlurMaskFilter", props);
4
- };
5
- BlurMask.defaultProps = {
6
- style: "normal",
7
- respectCTM: true
4
+ export const BlurMask = _ref => {
5
+ let {
6
+ style = "normal",
7
+ respectCTM = true,
8
+ ...props
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement("skBlurMaskFilter", _extends({
11
+ style: style,
12
+ respectCTM: respectCTM
13
+ }, props));
8
14
  };
9
15
  //# sourceMappingURL=Blur.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","BlurMask","props","defaultProps","style","respectCTM"],"sources":["Blur.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { BlurMaskFilterProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\n\nexport const BlurMask = (props: SkiaProps<BlurMaskFilterProps>) => {\n return <skBlurMaskFilter {...props} />;\n};\n\nBlurMask.defaultProps = {\n style: \"normal\",\n respectCTM: true,\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAIC,KAAD,IAA2C;EACjE,oBAAO,wCAAsBA,KAAtB,CAAP;AACD,CAFM;AAIPD,QAAQ,CAACE,YAAT,GAAwB;EACtBC,KAAK,EAAE,QADe;EAEtBC,UAAU,EAAE;AAFU,CAAxB"}
1
+ {"version":3,"names":["React","BlurMask","style","respectCTM","props"],"sources":["Blur.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { BlurMaskFilterProps } from \"../../../dom/types\";\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\n\nexport const BlurMask = ({\n style = \"normal\",\n respectCTM = true,\n ...props\n}: SkiaDefaultProps<BlurMaskFilterProps, \"style\" | \"respectCTM\">) => {\n return <skBlurMaskFilter style={style} respectCTM={respectCTM} {...props} />;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,QAAQ,GAAG,QAI6C;EAAA,IAJ5C;IACvBC,KAAK,GAAG,QADe;IAEvBC,UAAU,GAAG,IAFU;IAGvB,GAAGC;EAHoB,CAI4C;EACnE,oBAAO;IAAkB,KAAK,EAAEF,KAAzB;IAAgC,UAAU,EAAEC;EAA5C,GAA4DC,KAA5D,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 DiscretePathEffect = props => {
3
- return /*#__PURE__*/React.createElement("skDiscretePathEffect", props);
4
- };
5
- DiscretePathEffect.defaultProps = {
6
- seed: 0
4
+ export const DiscretePathEffect = _ref => {
5
+ let {
6
+ seed = 0,
7
+ ...props
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("skDiscretePathEffect", _extends({
10
+ seed: seed
11
+ }, props));
7
12
  };
8
13
  //# sourceMappingURL=Discrete.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","DiscretePathEffect","props","defaultProps","seed"],"sources":["Discrete.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\nimport type { DiscretePathEffectProps } from \"../../../dom/types\";\n\nexport const DiscretePathEffect = (\n props: SkiaProps<DiscretePathEffectProps>\n) => {\n return <skDiscretePathEffect {...props} />;\n};\n\nDiscretePathEffect.defaultProps = {\n seed: 0,\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,kBAAkB,GAC7BC,KADgC,IAE7B;EACH,oBAAO,4CAA0BA,KAA1B,CAAP;AACD,CAJM;AAMPD,kBAAkB,CAACE,YAAnB,GAAkC;EAChCC,IAAI,EAAE;AAD0B,CAAlC"}
1
+ {"version":3,"names":["React","DiscretePathEffect","seed","props"],"sources":["Discrete.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\nimport type { DiscretePathEffectProps } from \"../../../dom/types\";\n\nexport const DiscretePathEffect = ({\n seed = 0,\n ...props\n}: SkiaDefaultProps<DiscretePathEffectProps, \"seed\">) => {\n return <skDiscretePathEffect seed={seed} {...props} />;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,kBAAkB,GAAG,QAGuB;EAAA,IAHtB;IACjCC,IAAI,GAAG,CAD0B;IAEjC,GAAGC;EAF8B,CAGsB;EACvD,oBAAO;IAAsB,IAAI,EAAED;EAA5B,GAAsCC,KAAtC,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 FractalNoise = props => {
3
- return /*#__PURE__*/React.createElement("skFractalNoise", props);
4
- };
5
- FractalNoise.defaultProps = {
6
- seed: 0,
7
- tileWidth: 0,
8
- tileHeight: 0
4
+ export const FractalNoise = _ref => {
5
+ let {
6
+ seed = 0,
7
+ tileWidth = 0,
8
+ tileHeight = 0,
9
+ ...props
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement("skFractalNoise", _extends({
12
+ seed: seed,
13
+ tileWidth: tileWidth,
14
+ tileHeight: tileHeight
15
+ }, props));
9
16
  };
10
17
  //# sourceMappingURL=FractalNoise.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","FractalNoise","props","defaultProps","seed","tileWidth","tileHeight"],"sources":["FractalNoise.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { FractalNoiseProps } from \"../../../dom/types\";\nimport type { SkiaProps } from \"../../processors/Animations/Animations\";\n\nexport const FractalNoise = (props: SkiaProps<FractalNoiseProps>) => {\n return <skFractalNoise {...props} />;\n};\n\nFractalNoise.defaultProps = {\n seed: 0,\n tileWidth: 0,\n tileHeight: 0,\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,YAAY,GAAIC,KAAD,IAAyC;EACnE,oBAAO,sCAAoBA,KAApB,CAAP;AACD,CAFM;AAIPD,YAAY,CAACE,YAAb,GAA4B;EAC1BC,IAAI,EAAE,CADoB;EAE1BC,SAAS,EAAE,CAFe;EAG1BC,UAAU,EAAE;AAHc,CAA5B"}
1
+ {"version":3,"names":["React","FractalNoise","seed","tileWidth","tileHeight","props"],"sources":["FractalNoise.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { FractalNoiseProps } from \"../../../dom/types\";\nimport type { SkiaDefaultProps } from \"../../processors/Animations/Animations\";\n\nexport const FractalNoise = ({\n seed = 0,\n tileWidth = 0,\n tileHeight = 0,\n ...props\n}: SkiaDefaultProps<\n FractalNoiseProps,\n \"seed\" | \"tileHeight\" | \"tileWidth\"\n>) => {\n return (\n <skFractalNoise\n seed={seed}\n tileWidth={tileWidth}\n tileHeight={tileHeight}\n {...props}\n />\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAO,MAAMC,YAAY,GAAG,QAQtB;EAAA,IARuB;IAC3BC,IAAI,GAAG,CADoB;IAE3BC,SAAS,GAAG,CAFe;IAG3BC,UAAU,GAAG,CAHc;IAI3B,GAAGC;EAJwB,CAQvB;EACJ,oBACE;IACE,IAAI,EAAEH,IADR;IAEE,SAAS,EAAEC,SAFb;IAGE,UAAU,EAAEC;EAHd,GAIMC,KAJN,EADF;AAQD,CAjBM"}
@@ -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 Shader = props => {
3
- return /*#__PURE__*/React.createElement("skShader", props);
4
- };
5
- Shader.defaultProps = {
6
- uniforms: []
4
+ export const Shader = _ref => {
5
+ let {
6
+ uniforms = {},
7
+ ...props
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("skShader", _extends({
10
+ uniforms: uniforms
11
+ }, props));
7
12
  };
8
13
  //# sourceMappingURL=Shader.js.map
@@ -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":""}
@@ -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"}
@@ -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"}