react-native-image-editor-skia 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +202 -0
  3. package/lib/commonjs/ImageEditor.js +141 -0
  4. package/lib/commonjs/ImageEditor.js.map +1 -0
  5. package/lib/commonjs/annotations/AnnotationView.js +42 -0
  6. package/lib/commonjs/annotations/AnnotationView.js.map +1 -0
  7. package/lib/commonjs/annotations/ArrowAnnotation.js +29 -0
  8. package/lib/commonjs/annotations/ArrowAnnotation.js.map +1 -0
  9. package/lib/commonjs/annotations/CircleAnnotation.js +31 -0
  10. package/lib/commonjs/annotations/CircleAnnotation.js.map +1 -0
  11. package/lib/commonjs/annotations/FreehandAnnotation.js +29 -0
  12. package/lib/commonjs/annotations/FreehandAnnotation.js.map +1 -0
  13. package/lib/commonjs/annotations/MarkerAnnotation.js +27 -0
  14. package/lib/commonjs/annotations/MarkerAnnotation.js.map +1 -0
  15. package/lib/commonjs/annotations/RotatedGroup.js +34 -0
  16. package/lib/commonjs/annotations/RotatedGroup.js.map +1 -0
  17. package/lib/commonjs/annotations/TextAnnotation.js +40 -0
  18. package/lib/commonjs/annotations/TextAnnotation.js.map +1 -0
  19. package/lib/commonjs/annotations/geometry.js +73 -0
  20. package/lib/commonjs/annotations/geometry.js.map +1 -0
  21. package/lib/commonjs/annotations/geometryPure.js +104 -0
  22. package/lib/commonjs/annotations/geometryPure.js.map +1 -0
  23. package/lib/commonjs/canvas/AnnotationLayer.js +58 -0
  24. package/lib/commonjs/canvas/AnnotationLayer.js.map +1 -0
  25. package/lib/commonjs/canvas/BaseImageLayer.js +27 -0
  26. package/lib/commonjs/canvas/BaseImageLayer.js.map +1 -0
  27. package/lib/commonjs/canvas/CropOverlay.js +135 -0
  28. package/lib/commonjs/canvas/CropOverlay.js.map +1 -0
  29. package/lib/commonjs/canvas/EditorCanvas.js +91 -0
  30. package/lib/commonjs/canvas/EditorCanvas.js.map +1 -0
  31. package/lib/commonjs/canvas/InFlightLayer.js +152 -0
  32. package/lib/commonjs/canvas/InFlightLayer.js.map +1 -0
  33. package/lib/commonjs/canvas/SelectionOverlay.js +90 -0
  34. package/lib/commonjs/canvas/SelectionOverlay.js.map +1 -0
  35. package/lib/commonjs/constants.js +56 -0
  36. package/lib/commonjs/constants.js.map +1 -0
  37. package/lib/commonjs/context/EditorContext.js +132 -0
  38. package/lib/commonjs/context/EditorContext.js.map +1 -0
  39. package/lib/commonjs/export/drawScene.js +97 -0
  40. package/lib/commonjs/export/drawScene.js.map +1 -0
  41. package/lib/commonjs/export/exportImage.js +92 -0
  42. package/lib/commonjs/export/exportImage.js.map +1 -0
  43. package/lib/commonjs/gestures/applyTransform.js +79 -0
  44. package/lib/commonjs/gestures/applyTransform.js.map +1 -0
  45. package/lib/commonjs/gestures/createAnnotation.js +73 -0
  46. package/lib/commonjs/gestures/createAnnotation.js.map +1 -0
  47. package/lib/commonjs/gestures/handles.js +53 -0
  48. package/lib/commonjs/gestures/handles.js.map +1 -0
  49. package/lib/commonjs/gestures/hitTest.js +72 -0
  50. package/lib/commonjs/gestures/hitTest.js.map +1 -0
  51. package/lib/commonjs/gestures/useCropGesture.js +149 -0
  52. package/lib/commonjs/gestures/useCropGesture.js.map +1 -0
  53. package/lib/commonjs/gestures/useEditorGestures.js +289 -0
  54. package/lib/commonjs/gestures/useEditorGestures.js.map +1 -0
  55. package/lib/commonjs/image/disposeRegistry.js +63 -0
  56. package/lib/commonjs/image/disposeRegistry.js.map +1 -0
  57. package/lib/commonjs/image/useLoadedImage.js +121 -0
  58. package/lib/commonjs/image/useLoadedImage.js.map +1 -0
  59. package/lib/commonjs/index.js +52 -0
  60. package/lib/commonjs/index.js.map +1 -0
  61. package/lib/commonjs/package.json +1 -0
  62. package/lib/commonjs/state/history.js +85 -0
  63. package/lib/commonjs/state/history.js.map +1 -0
  64. package/lib/commonjs/state/selectors.js +19 -0
  65. package/lib/commonjs/state/selectors.js.map +1 -0
  66. package/lib/commonjs/state/useEditorReducer.js +83 -0
  67. package/lib/commonjs/state/useEditorReducer.js.map +1 -0
  68. package/lib/commonjs/toolbar/ColorPicker.js +84 -0
  69. package/lib/commonjs/toolbar/ColorPicker.js.map +1 -0
  70. package/lib/commonjs/toolbar/CropControls.js +65 -0
  71. package/lib/commonjs/toolbar/CropControls.js.map +1 -0
  72. package/lib/commonjs/toolbar/RotationSlider.js +73 -0
  73. package/lib/commonjs/toolbar/RotationSlider.js.map +1 -0
  74. package/lib/commonjs/toolbar/TextInputOverlay.js +108 -0
  75. package/lib/commonjs/toolbar/TextInputOverlay.js.map +1 -0
  76. package/lib/commonjs/toolbar/ToolButton.js +56 -0
  77. package/lib/commonjs/toolbar/ToolButton.js.map +1 -0
  78. package/lib/commonjs/toolbar/Toolbar.js +137 -0
  79. package/lib/commonjs/toolbar/Toolbar.js.map +1 -0
  80. package/lib/commonjs/types.js +47 -0
  81. package/lib/commonjs/types.js.map +1 -0
  82. package/lib/commonjs/utils/color.js +37 -0
  83. package/lib/commonjs/utils/color.js.map +1 -0
  84. package/lib/commonjs/utils/id.js +14 -0
  85. package/lib/commonjs/utils/id.js.map +1 -0
  86. package/lib/commonjs/utils/math.js +277 -0
  87. package/lib/commonjs/utils/math.js.map +1 -0
  88. package/lib/module/ImageEditor.js +138 -0
  89. package/lib/module/ImageEditor.js.map +1 -0
  90. package/lib/module/annotations/AnnotationView.js +39 -0
  91. package/lib/module/annotations/AnnotationView.js.map +1 -0
  92. package/lib/module/annotations/ArrowAnnotation.js +26 -0
  93. package/lib/module/annotations/ArrowAnnotation.js.map +1 -0
  94. package/lib/module/annotations/CircleAnnotation.js +27 -0
  95. package/lib/module/annotations/CircleAnnotation.js.map +1 -0
  96. package/lib/module/annotations/FreehandAnnotation.js +25 -0
  97. package/lib/module/annotations/FreehandAnnotation.js.map +1 -0
  98. package/lib/module/annotations/MarkerAnnotation.js +23 -0
  99. package/lib/module/annotations/MarkerAnnotation.js.map +1 -0
  100. package/lib/module/annotations/RotatedGroup.js +29 -0
  101. package/lib/module/annotations/RotatedGroup.js.map +1 -0
  102. package/lib/module/annotations/TextAnnotation.js +37 -0
  103. package/lib/module/annotations/TextAnnotation.js.map +1 -0
  104. package/lib/module/annotations/geometry.js +56 -0
  105. package/lib/module/annotations/geometry.js.map +1 -0
  106. package/lib/module/annotations/geometryPure.js +100 -0
  107. package/lib/module/annotations/geometryPure.js.map +1 -0
  108. package/lib/module/canvas/AnnotationLayer.js +55 -0
  109. package/lib/module/canvas/AnnotationLayer.js.map +1 -0
  110. package/lib/module/canvas/BaseImageLayer.js +23 -0
  111. package/lib/module/canvas/BaseImageLayer.js.map +1 -0
  112. package/lib/module/canvas/CropOverlay.js +131 -0
  113. package/lib/module/canvas/CropOverlay.js.map +1 -0
  114. package/lib/module/canvas/EditorCanvas.js +88 -0
  115. package/lib/module/canvas/EditorCanvas.js.map +1 -0
  116. package/lib/module/canvas/InFlightLayer.js +149 -0
  117. package/lib/module/canvas/InFlightLayer.js.map +1 -0
  118. package/lib/module/canvas/SelectionOverlay.js +85 -0
  119. package/lib/module/canvas/SelectionOverlay.js.map +1 -0
  120. package/lib/module/constants.js +52 -0
  121. package/lib/module/constants.js.map +1 -0
  122. package/lib/module/context/EditorContext.js +126 -0
  123. package/lib/module/context/EditorContext.js.map +1 -0
  124. package/lib/module/export/drawScene.js +93 -0
  125. package/lib/module/export/drawScene.js.map +1 -0
  126. package/lib/module/export/exportImage.js +88 -0
  127. package/lib/module/export/exportImage.js.map +1 -0
  128. package/lib/module/gestures/applyTransform.js +75 -0
  129. package/lib/module/gestures/applyTransform.js.map +1 -0
  130. package/lib/module/gestures/createAnnotation.js +65 -0
  131. package/lib/module/gestures/createAnnotation.js.map +1 -0
  132. package/lib/module/gestures/handles.js +49 -0
  133. package/lib/module/gestures/handles.js.map +1 -0
  134. package/lib/module/gestures/hitTest.js +69 -0
  135. package/lib/module/gestures/hitTest.js.map +1 -0
  136. package/lib/module/gestures/useCropGesture.js +145 -0
  137. package/lib/module/gestures/useCropGesture.js.map +1 -0
  138. package/lib/module/gestures/useEditorGestures.js +285 -0
  139. package/lib/module/gestures/useEditorGestures.js.map +1 -0
  140. package/lib/module/image/disposeRegistry.js +57 -0
  141. package/lib/module/image/disposeRegistry.js.map +1 -0
  142. package/lib/module/image/useLoadedImage.js +117 -0
  143. package/lib/module/image/useLoadedImage.js.map +1 -0
  144. package/lib/module/index.js +8 -0
  145. package/lib/module/index.js.map +1 -0
  146. package/lib/module/package.json +1 -0
  147. package/lib/module/state/history.js +76 -0
  148. package/lib/module/state/history.js.map +1 -0
  149. package/lib/module/state/selectors.js +14 -0
  150. package/lib/module/state/selectors.js.map +1 -0
  151. package/lib/module/state/useEditorReducer.js +79 -0
  152. package/lib/module/state/useEditorReducer.js.map +1 -0
  153. package/lib/module/toolbar/ColorPicker.js +80 -0
  154. package/lib/module/toolbar/ColorPicker.js.map +1 -0
  155. package/lib/module/toolbar/CropControls.js +62 -0
  156. package/lib/module/toolbar/CropControls.js.map +1 -0
  157. package/lib/module/toolbar/RotationSlider.js +69 -0
  158. package/lib/module/toolbar/RotationSlider.js.map +1 -0
  159. package/lib/module/toolbar/TextInputOverlay.js +105 -0
  160. package/lib/module/toolbar/TextInputOverlay.js.map +1 -0
  161. package/lib/module/toolbar/ToolButton.js +52 -0
  162. package/lib/module/toolbar/ToolButton.js.map +1 -0
  163. package/lib/module/toolbar/Toolbar.js +133 -0
  164. package/lib/module/toolbar/Toolbar.js.map +1 -0
  165. package/lib/module/types.js +43 -0
  166. package/lib/module/types.js.map +1 -0
  167. package/lib/module/utils/color.js +33 -0
  168. package/lib/module/utils/color.js.map +1 -0
  169. package/lib/module/utils/id.js +10 -0
  170. package/lib/module/utils/id.js.map +1 -0
  171. package/lib/module/utils/math.js +258 -0
  172. package/lib/module/utils/math.js.map +1 -0
  173. package/lib/typescript/src/ImageEditor.d.ts +9 -0
  174. package/lib/typescript/src/ImageEditor.d.ts.map +1 -0
  175. package/lib/typescript/src/annotations/AnnotationView.d.ts +6 -0
  176. package/lib/typescript/src/annotations/AnnotationView.d.ts.map +1 -0
  177. package/lib/typescript/src/annotations/ArrowAnnotation.d.ts +5 -0
  178. package/lib/typescript/src/annotations/ArrowAnnotation.d.ts.map +1 -0
  179. package/lib/typescript/src/annotations/CircleAnnotation.d.ts +5 -0
  180. package/lib/typescript/src/annotations/CircleAnnotation.d.ts.map +1 -0
  181. package/lib/typescript/src/annotations/FreehandAnnotation.d.ts +5 -0
  182. package/lib/typescript/src/annotations/FreehandAnnotation.d.ts.map +1 -0
  183. package/lib/typescript/src/annotations/MarkerAnnotation.d.ts +5 -0
  184. package/lib/typescript/src/annotations/MarkerAnnotation.d.ts.map +1 -0
  185. package/lib/typescript/src/annotations/RotatedGroup.d.ts +13 -0
  186. package/lib/typescript/src/annotations/RotatedGroup.d.ts.map +1 -0
  187. package/lib/typescript/src/annotations/TextAnnotation.d.ts +10 -0
  188. package/lib/typescript/src/annotations/TextAnnotation.d.ts.map +1 -0
  189. package/lib/typescript/src/annotations/geometry.d.ts +11 -0
  190. package/lib/typescript/src/annotations/geometry.d.ts.map +1 -0
  191. package/lib/typescript/src/annotations/geometryPure.d.ts +14 -0
  192. package/lib/typescript/src/annotations/geometryPure.d.ts.map +1 -0
  193. package/lib/typescript/src/canvas/AnnotationLayer.d.ts +11 -0
  194. package/lib/typescript/src/canvas/AnnotationLayer.d.ts.map +1 -0
  195. package/lib/typescript/src/canvas/BaseImageLayer.d.ts +12 -0
  196. package/lib/typescript/src/canvas/BaseImageLayer.d.ts.map +1 -0
  197. package/lib/typescript/src/canvas/CropOverlay.d.ts +10 -0
  198. package/lib/typescript/src/canvas/CropOverlay.d.ts.map +1 -0
  199. package/lib/typescript/src/canvas/EditorCanvas.d.ts +18 -0
  200. package/lib/typescript/src/canvas/EditorCanvas.d.ts.map +1 -0
  201. package/lib/typescript/src/canvas/InFlightLayer.d.ts +12 -0
  202. package/lib/typescript/src/canvas/InFlightLayer.d.ts.map +1 -0
  203. package/lib/typescript/src/canvas/SelectionOverlay.d.ts +11 -0
  204. package/lib/typescript/src/canvas/SelectionOverlay.d.ts.map +1 -0
  205. package/lib/typescript/src/constants.d.ts +25 -0
  206. package/lib/typescript/src/constants.d.ts.map +1 -0
  207. package/lib/typescript/src/context/EditorContext.d.ts +66 -0
  208. package/lib/typescript/src/context/EditorContext.d.ts.map +1 -0
  209. package/lib/typescript/src/export/drawScene.d.ts +10 -0
  210. package/lib/typescript/src/export/drawScene.d.ts.map +1 -0
  211. package/lib/typescript/src/export/exportImage.d.ts +23 -0
  212. package/lib/typescript/src/export/exportImage.d.ts.map +1 -0
  213. package/lib/typescript/src/gestures/applyTransform.d.ts +17 -0
  214. package/lib/typescript/src/gestures/applyTransform.d.ts.map +1 -0
  215. package/lib/typescript/src/gestures/createAnnotation.d.ts +11 -0
  216. package/lib/typescript/src/gestures/createAnnotation.d.ts.map +1 -0
  217. package/lib/typescript/src/gestures/handles.d.ts +17 -0
  218. package/lib/typescript/src/gestures/handles.d.ts.map +1 -0
  219. package/lib/typescript/src/gestures/hitTest.d.ts +9 -0
  220. package/lib/typescript/src/gestures/hitTest.d.ts.map +1 -0
  221. package/lib/typescript/src/gestures/useCropGesture.d.ts +7 -0
  222. package/lib/typescript/src/gestures/useCropGesture.d.ts.map +1 -0
  223. package/lib/typescript/src/gestures/useEditorGestures.d.ts +8 -0
  224. package/lib/typescript/src/gestures/useEditorGestures.d.ts.map +1 -0
  225. package/lib/typescript/src/image/disposeRegistry.d.ts +25 -0
  226. package/lib/typescript/src/image/disposeRegistry.d.ts.map +1 -0
  227. package/lib/typescript/src/image/useLoadedImage.d.ts +23 -0
  228. package/lib/typescript/src/image/useLoadedImage.d.ts.map +1 -0
  229. package/lib/typescript/src/index.d.ts +6 -0
  230. package/lib/typescript/src/index.d.ts.map +1 -0
  231. package/lib/typescript/src/state/history.d.ts +23 -0
  232. package/lib/typescript/src/state/history.d.ts.map +1 -0
  233. package/lib/typescript/src/state/selectors.d.ts +5 -0
  234. package/lib/typescript/src/state/selectors.d.ts.map +1 -0
  235. package/lib/typescript/src/state/useEditorReducer.d.ts +32 -0
  236. package/lib/typescript/src/state/useEditorReducer.d.ts.map +1 -0
  237. package/lib/typescript/src/toolbar/ColorPicker.d.ts +7 -0
  238. package/lib/typescript/src/toolbar/ColorPicker.d.ts.map +1 -0
  239. package/lib/typescript/src/toolbar/CropControls.d.ts +3 -0
  240. package/lib/typescript/src/toolbar/CropControls.d.ts.map +1 -0
  241. package/lib/typescript/src/toolbar/RotationSlider.d.ts +8 -0
  242. package/lib/typescript/src/toolbar/RotationSlider.d.ts.map +1 -0
  243. package/lib/typescript/src/toolbar/TextInputOverlay.d.ts +9 -0
  244. package/lib/typescript/src/toolbar/TextInputOverlay.d.ts.map +1 -0
  245. package/lib/typescript/src/toolbar/ToolButton.d.ts +7 -0
  246. package/lib/typescript/src/toolbar/ToolButton.d.ts.map +1 -0
  247. package/lib/typescript/src/toolbar/Toolbar.d.ts +4 -0
  248. package/lib/typescript/src/toolbar/Toolbar.d.ts.map +1 -0
  249. package/lib/typescript/src/types.d.ts +170 -0
  250. package/lib/typescript/src/types.d.ts.map +1 -0
  251. package/lib/typescript/src/utils/color.d.ts +8 -0
  252. package/lib/typescript/src/utils/color.d.ts.map +1 -0
  253. package/lib/typescript/src/utils/id.d.ts +3 -0
  254. package/lib/typescript/src/utils/id.d.ts.map +1 -0
  255. package/lib/typescript/src/utils/math.d.ts +68 -0
  256. package/lib/typescript/src/utils/math.d.ts.map +1 -0
  257. package/package.json +90 -0
  258. package/src/ImageEditor.tsx +133 -0
  259. package/src/annotations/AnnotationView.tsx +24 -0
  260. package/src/annotations/ArrowAnnotation.tsx +26 -0
  261. package/src/annotations/CircleAnnotation.tsx +22 -0
  262. package/src/annotations/FreehandAnnotation.tsx +22 -0
  263. package/src/annotations/MarkerAnnotation.tsx +20 -0
  264. package/src/annotations/RotatedGroup.tsx +28 -0
  265. package/src/annotations/TextAnnotation.tsx +42 -0
  266. package/src/annotations/geometry.ts +62 -0
  267. package/src/annotations/geometryPure.ts +73 -0
  268. package/src/canvas/AnnotationLayer.tsx +43 -0
  269. package/src/canvas/BaseImageLayer.tsx +28 -0
  270. package/src/canvas/CropOverlay.tsx +92 -0
  271. package/src/canvas/EditorCanvas.tsx +70 -0
  272. package/src/canvas/InFlightLayer.tsx +140 -0
  273. package/src/canvas/SelectionOverlay.tsx +92 -0
  274. package/src/constants.ts +46 -0
  275. package/src/context/EditorContext.tsx +229 -0
  276. package/src/export/drawScene.ts +120 -0
  277. package/src/export/exportImage.ts +111 -0
  278. package/src/gestures/applyTransform.ts +76 -0
  279. package/src/gestures/createAnnotation.ts +92 -0
  280. package/src/gestures/handles.ts +50 -0
  281. package/src/gestures/hitTest.ts +79 -0
  282. package/src/gestures/useCropGesture.ts +123 -0
  283. package/src/gestures/useEditorGestures.ts +308 -0
  284. package/src/image/disposeRegistry.ts +59 -0
  285. package/src/image/useLoadedImage.ts +131 -0
  286. package/src/index.ts +32 -0
  287. package/src/state/history.ts +71 -0
  288. package/src/state/selectors.ts +16 -0
  289. package/src/state/useEditorReducer.ts +93 -0
  290. package/src/toolbar/ColorPicker.tsx +72 -0
  291. package/src/toolbar/CropControls.tsx +46 -0
  292. package/src/toolbar/RotationSlider.tsx +56 -0
  293. package/src/toolbar/TextInputOverlay.tsx +104 -0
  294. package/src/toolbar/ToolButton.tsx +46 -0
  295. package/src/toolbar/Toolbar.tsx +110 -0
  296. package/src/types.ts +203 -0
  297. package/src/utils/color.ts +34 -0
  298. package/src/utils/id.ts +7 -0
  299. package/src/utils/math.ts +222 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NG JUN KAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,202 @@
1
+ # react-native-image-editor-skia
2
+
3
+ A Skia-powered image annotation & editing component for React Native. Import an
4
+ image from **base64 or a file/remote URI**, let the user annotate and transform
5
+ it, then export **full-resolution base64**.
6
+
7
+ Features:
8
+
9
+ - ✏️ Draw **circles, arrows, markers (highlight), freehand, and text**
10
+ - 🎨 Change **stroke color and text color**
11
+ - ✋ **Select / move / resize / rotate / delete** any annotation
12
+ - 🖼️ **Crop, resize, and free-angle rotate** the image (non-destructive)
13
+ - ↩️ **Undo / redo**
14
+ - 📤 Export to **base64** (PNG or JPEG), at the image's native resolution
15
+ - 🧠 Careful **Skia memory management** (explicit `dispose()` — no leaks from
16
+ large base64 payloads)
17
+
18
+ > Built on [`@shopify/react-native-skia`](https://shopify.github.io/react-native-skia/).
19
+ > **Requires the React Native New Architecture** (Skia v2).
20
+
21
+ ## Compatibility
22
+
23
+ **React Native New Architecture is required** (Skia v2 dropped the old
24
+ architecture). Supported RN range: **0.79 → 0.82+**. **Verified on RN 0.81.0.**
25
+
26
+ The exact Reanimated + Worklets versions depend on your RN version (Reanimated
27
+ enforces this at build time). Pick a matching row:
28
+
29
+ | React Native | react-native-reanimated | react-native-worklets |
30
+ | --- | --- | --- |
31
+ | 0.79 – 0.81 | 4.0.x | 0.4.x |
32
+ | 0.78 – 0.82 | 4.1.x | 0.5.x – 0.8.x |
33
+ | 0.80 – 0.84 | 4.2.x | 0.7.x – 0.8.x |
34
+ | **0.81 – 0.85** | **4.3.x** | **0.8.x** |
35
+ | 0.83 – 0.86 | 4.4.x – 4.5.x | 0.9.x – 0.10.x |
36
+
37
+ Other peers: `@shopify/react-native-skia` **>= 2.6.0**,
38
+ `react-native-gesture-handler` **>= 2.x**, `react`/`react-native` any (subject
39
+ to the New Architecture + table above).
40
+
41
+ ### Current versions (this release)
42
+
43
+ | Package | Version |
44
+ | --- | --- |
45
+ | react-native-image-editor-skia | 0.1.0 |
46
+ | @shopify/react-native-skia | 2.6.9 |
47
+ | react-native-reanimated | 4.3.2 |
48
+ | react-native-worklets | 0.8.3 |
49
+ | react-native-gesture-handler | 2.32.0 |
50
+ | react / react-native (example) | 19.1.0 / 0.81.0 |
51
+
52
+ ## Installation
53
+
54
+ ```sh
55
+ npm install react-native-image-editor-skia
56
+ # peer dependencies:
57
+ npm install @shopify/react-native-skia react-native-gesture-handler \
58
+ react-native-reanimated react-native-worklets
59
+ cd ios && pod install
60
+ ```
61
+
62
+ Then:
63
+
64
+ 1. Enable the **New Architecture** (required by Skia v2).
65
+ 2. Add the Reanimated/Worklets Babel plugin **last** in `babel.config.js`:
66
+ ```js
67
+ module.exports = {
68
+ presets: ['module:@react-native/babel-preset'],
69
+ plugins: ['react-native-worklets/plugin'],
70
+ };
71
+ ```
72
+ 3. The editor wraps itself in a `GestureHandlerRootView`, but if you compose it
73
+ with other gesture-handler components, ensure your app root is wrapped too.
74
+
75
+ > Pin `@shopify/react-native-skia`, `react-native-reanimated`, and
76
+ > `react-native-worklets` to compatible versions — the matrix is strict.
77
+
78
+ ## Usage
79
+
80
+ ```tsx
81
+ import { useRef } from 'react';
82
+ import { ImageEditor, type ImageEditorRef } from 'react-native-image-editor-skia';
83
+
84
+ function Screen() {
85
+ const ref = useRef<ImageEditorRef>(null);
86
+
87
+ return (
88
+ <ImageEditor
89
+ ref={ref}
90
+ source={{ uri: 'https://example.com/photo.jpg' }}
91
+ // or: source={{ base64: 'data:image/png;base64,iVBORw0...' }}
92
+ onExport={(base64) => {
93
+ // `base64` is a data URI by default — usable directly in <Image>.
94
+ }}
95
+ />
96
+ );
97
+ }
98
+ ```
99
+
100
+ ### Input: base64 **or** file/URI
101
+
102
+ ```tsx
103
+ <ImageEditor source={{ base64: 'data:image/png;base64,iVBOR...' }} />
104
+ <ImageEditor source={{ uri: 'file:///storage/emulated/0/photo.jpg' }} />
105
+ <ImageEditor source={{ uri: 'https://example.com/photo.jpg' }} />
106
+ ```
107
+
108
+ ### Output: base64 (default)
109
+
110
+ ```ts
111
+ const base64 = await ref.current?.export({
112
+ format: 'jpeg', // 'png' | 'jpeg'
113
+ quality: 90, // JPEG quality 0..100
114
+ maxExportSize: 2000, // clamp the longest edge (guards against OOM)
115
+ dataUri: true, // false → raw base64 with no prefix
116
+ });
117
+ ```
118
+
119
+ ### Output: file location
120
+
121
+ React Native has no built-in filesystem, so you supply a one-line `writeFile`
122
+ from whatever fs module you use (react-native-fs, expo-file-system, …). The
123
+ library encodes the image and hands you the raw base64 to persist; `export()`
124
+ resolves to the written path.
125
+
126
+ ```ts
127
+ import RNFS from 'react-native-fs';
128
+
129
+ const path = await ref.current?.export({
130
+ output: 'file',
131
+ filePath: `${RNFS.CachesDirectoryPath}/edited.png`,
132
+ writeFile: (p, base64) => RNFS.writeFile(p, base64, 'base64'),
133
+ });
134
+ // path === `${RNFS.CachesDirectoryPath}/edited.png`
135
+ ```
136
+
137
+ ```ts
138
+ // expo-file-system variant
139
+ import * as FileSystem from 'expo-file-system';
140
+
141
+ await ref.current?.export({
142
+ output: 'file',
143
+ filePath: FileSystem.cacheDirectory + 'edited.jpg',
144
+ format: 'jpeg',
145
+ writeFile: (p, base64) =>
146
+ FileSystem.writeAsStringAsync(p, base64, { encoding: 'base64' }),
147
+ });
148
+ ```
149
+
150
+ Ref API: `export(options?)`, `undo()`, `redo()`, `canUndo()`, `canRedo()`,
151
+ `reset()`.
152
+
153
+ ## Props
154
+
155
+ | Prop | Type | Description |
156
+ | --- | --- | --- |
157
+ | `source` | `{ base64 } \| { uri }` | Image to edit (base64 raw/data-URI, or file/remote URI). |
158
+ | `onExport` | `(base64: string) => void` | Fired when the built-in **Done** button exports. |
159
+ | `exportOptions` | `ExportOptions` | Defaults for the Done button. |
160
+ | `initialStrokeColor` | `string` | Default shape color. |
161
+ | `initialTextColor` | `string` | Default text color. |
162
+ | `palette` | `string[]` | Colors shown in the picker. |
163
+ | `hideToolbar` | `boolean` | Hide the built-in toolbar and drive tools via `useEditor()`. |
164
+ | `onError` | `(error: Error) => void` | Called if the image fails to decode. |
165
+
166
+ ## How it works
167
+
168
+ - **Coordinate space** — all annotations are stored in the base image's
169
+ full-resolution pixel space. A single affine matrix maps to the on-screen
170
+ canvas; gestures invert it. Export renders the exact same numbers off-screen at
171
+ native resolution, so output is never the downscaled on-screen size.
172
+ - **Performance** — committed annotations live in React state; the in-flight
173
+ gesture (drawing / moving / resizing / rotating) is driven by Reanimated shared
174
+ values on the UI thread, so there are **zero React re-renders mid-gesture**.
175
+ - **Export** — uses `Skia.Surface.MakeOffscreen(...)`, draws the (optionally
176
+ cropped) image + annotations with the scene rotation/scale, encodes to base64,
177
+ and **disposes the surface + snapshot** immediately.
178
+
179
+ ## Memory management
180
+
181
+ Skia `SkImage`/`SkData`/`SkSurface` are JSI HostObjects; Hermes' GC under-counts
182
+ their native footprint. This library:
183
+
184
+ - disposes the encoded `SkData` immediately after decoding an image,
185
+ - disposes the previous `SkImage` when `source` changes or on unmount,
186
+ - never stores the input base64 in React state or undo history,
187
+ - disposes the export surface + snapshot in a `finally` block,
188
+ - optionally clamps export size (`maxExportSize`) to avoid transient OOM on very
189
+ large images.
190
+
191
+ ## Caveats
192
+
193
+ - **New Architecture only** (Skia v2).
194
+ - Text uses a system font via `matchFont`; explicit `\n` newlines are honored,
195
+ automatic width-wrapping is not (v1).
196
+ - If `Skia.Surface.MakeOffscreen` is unavailable on a given device/version,
197
+ `export()` throws — fall back to snapshotting an off-screen `<Canvas>` with
198
+ `makeImageSnapshotAsync`.
199
+
200
+ ## License
201
+
202
+ MIT
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImageEditor = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
10
+ var _EditorContext = require("./context/EditorContext");
11
+ var _useLoadedImage = require("./image/useLoadedImage");
12
+ var _EditorCanvas = require("./canvas/EditorCanvas");
13
+ var _TextInputOverlay = require("./toolbar/TextInputOverlay");
14
+ var _Toolbar = require("./toolbar/Toolbar");
15
+ var _exportImage = require("./export/exportImage");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ /**
18
+ * Interactive Skia image editor. Loads a base64/URI image, lets the user draw
19
+ * circles/arrows/markers/freehand/text, crop, free-rotate and resize, then
20
+ * exports full-resolution base64 (via ref `export()` or the built-in Done
21
+ * button + `onExport`).
22
+ */
23
+ const ImageEditor = exports.ImageEditor = /*#__PURE__*/(0, _react.forwardRef)(function ImageEditor(props, ref) {
24
+ const {
25
+ source,
26
+ onError,
27
+ style
28
+ } = props;
29
+ const {
30
+ image,
31
+ width,
32
+ height,
33
+ loading,
34
+ error
35
+ } = (0, _useLoadedImage.useLoadedImage)(source);
36
+ (0, _react.useEffect)(() => {
37
+ if (error) {
38
+ onError?.(error);
39
+ }
40
+ }, [error, onError]);
41
+ if (error) {
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
43
+ style: [styles.center, style],
44
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
45
+ style: styles.errorText,
46
+ children: "Failed to load image"
47
+ })
48
+ });
49
+ }
50
+ if (loading || !image) {
51
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
52
+ style: [styles.center, style],
53
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
54
+ color: "#FFFFFF"
55
+ })
56
+ });
57
+ }
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
59
+ style: [styles.root, style],
60
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EditorContext.EditorProvider, {
61
+ imageSize: {
62
+ width,
63
+ height
64
+ },
65
+ initialStrokeColor: props.initialStrokeColor,
66
+ initialTextColor: props.initialTextColor,
67
+ palette: props.palette,
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(EditorBody, {
69
+ ref: ref,
70
+ image: image,
71
+ ...props
72
+ })
73
+ })
74
+ });
75
+ });
76
+ const EditorBody = /*#__PURE__*/(0, _react.forwardRef)(function EditorBody({
77
+ image,
78
+ onExport,
79
+ exportOptions,
80
+ hideToolbar
81
+ }, ref) {
82
+ const editor = (0, _EditorContext.useEditor)();
83
+ const runExport = (0, _react.useCallback)(options => (0, _exportImage.exportImage)({
84
+ image,
85
+ annotations: editor.doc.annotations,
86
+ scene: editor.doc.scene,
87
+ imageWidth: editor.imageSize.width,
88
+ imageHeight: editor.imageSize.height,
89
+ options: options ?? exportOptions
90
+ }), [image, editor.doc, editor.imageSize, exportOptions]);
91
+ (0, _react.useImperativeHandle)(ref, () => ({
92
+ export: runExport,
93
+ undo: () => editor.dispatch({
94
+ type: 'UNDO'
95
+ }),
96
+ redo: () => editor.dispatch({
97
+ type: 'REDO'
98
+ }),
99
+ canUndo: () => editor.canUndo,
100
+ canRedo: () => editor.canRedo,
101
+ reset: () => editor.dispatch({
102
+ type: 'RESET'
103
+ })
104
+ }), [runExport, editor]);
105
+ const onDone = (0, _react.useCallback)(async () => {
106
+ const base64 = await runExport();
107
+ onExport?.(base64);
108
+ }, [runExport, onExport]);
109
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
110
+ style: styles.root,
111
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
112
+ style: styles.canvasWrap,
113
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_EditorCanvas.EditorCanvas, {
114
+ image: image
115
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextInputOverlay.TextInputOverlay, {})]
116
+ }), hideToolbar ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toolbar.Toolbar, {
117
+ onDone: onExport ? onDone : undefined
118
+ })]
119
+ });
120
+ });
121
+ const styles = _reactNative.StyleSheet.create({
122
+ root: {
123
+ flex: 1,
124
+ backgroundColor: '#000000'
125
+ },
126
+ canvasWrap: {
127
+ flex: 1,
128
+ position: 'relative'
129
+ },
130
+ center: {
131
+ flex: 1,
132
+ alignItems: 'center',
133
+ justifyContent: 'center',
134
+ backgroundColor: '#000000'
135
+ },
136
+ errorText: {
137
+ color: '#FF6B6B',
138
+ fontSize: 16
139
+ }
140
+ });
141
+ //# sourceMappingURL=ImageEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_EditorContext","_useLoadedImage","_EditorCanvas","_TextInputOverlay","_Toolbar","_exportImage","_jsxRuntime","ImageEditor","exports","forwardRef","props","ref","source","onError","style","image","width","height","loading","error","useLoadedImage","useEffect","jsx","View","styles","center","children","Text","errorText","ActivityIndicator","color","GestureHandlerRootView","root","EditorProvider","imageSize","initialStrokeColor","initialTextColor","palette","EditorBody","onExport","exportOptions","hideToolbar","editor","useEditor","runExport","useCallback","options","exportImage","annotations","doc","scene","imageWidth","imageHeight","useImperativeHandle","export","undo","dispatch","type","redo","canUndo","canRedo","reset","onDone","base64","jsxs","canvasWrap","EditorCanvas","TextInputOverlay","Toolbar","undefined","StyleSheet","create","flex","backgroundColor","position","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,MAAM,CAACyC,UAAW;MAAAvC,QAAA,gBAC7B,IAAApB,WAAA,CAAAgB,GAAA,EAACpB,aAAA,CAAAgE,YAAY;QAACnD,KAAK,EAAEA;MAAM,CAAE,CAAC,eAC9B,IAAAT,WAAA,CAAAgB,GAAA,EAACnB,iBAAA,CAAAgE,gBAAgB,IAAE,CAAC;IAAA,CAChB,CAAC,EACN1B,WAAW,GAAG,IAAI,gBAAG,IAAAnC,WAAA,CAAAgB,GAAA,EAAClB,QAAA,CAAAgE,OAAO;MAACN,MAAM,EAAEvB,QAAQ,GAAGuB,MAAM,GAAGO;IAAU,CAAE,CAAC;EAAA,CACpE,CAAC;AAEX,CACF,CAAC;AAED,MAAM7C,MAAM,GAAG8C,uBAAU,CAACC,MAAM,CAAC;EAC/BvC,IAAI,EAAE;IAAEwC,IAAI,EAAE,CAAC;IAAEC,eAAe,EAAE;EAAU,CAAC;EAC7CR,UAAU,EAAE;IAAEO,IAAI,EAAE,CAAC;IAAEE,QAAQ,EAAE;EAAW,CAAC;EAC7CjD,MAAM,EAAE;IACN+C,IAAI,EAAE,CAAC;IACPG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBH,eAAe,EAAE;EACnB,CAAC;EACD7C,SAAS,EAAE;IAAEE,KAAK,EAAE,SAAS;IAAE+C,QAAQ,EAAE;EAAG;AAC9C,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AnnotationView = AnnotationView;
7
+ var _CircleAnnotation = require("./CircleAnnotation");
8
+ var _ArrowAnnotation = require("./ArrowAnnotation");
9
+ var _MarkerAnnotation = require("./MarkerAnnotation");
10
+ var _FreehandAnnotation = require("./FreehandAnnotation");
11
+ var _TextAnnotation = require("./TextAnnotation");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ /** Render any annotation by dispatching on its discriminant. */
14
+ function AnnotationView({
15
+ a
16
+ }) {
17
+ switch (a.type) {
18
+ case 'circle':
19
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircleAnnotation.CircleAnnotationView, {
20
+ a: a
21
+ });
22
+ case 'arrow':
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowAnnotation.ArrowAnnotationView, {
24
+ a: a
25
+ });
26
+ case 'marker':
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MarkerAnnotation.MarkerAnnotationView, {
28
+ a: a
29
+ });
30
+ case 'freehand':
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreehandAnnotation.FreehandAnnotationView, {
32
+ a: a
33
+ });
34
+ case 'text':
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextAnnotation.TextAnnotationView, {
36
+ a: a
37
+ });
38
+ default:
39
+ return null;
40
+ }
41
+ }
42
+ //# sourceMappingURL=AnnotationView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CircleAnnotation","require","_ArrowAnnotation","_MarkerAnnotation","_FreehandAnnotation","_TextAnnotation","_jsxRuntime","AnnotationView","a","type","jsx","CircleAnnotationView","ArrowAnnotationView","MarkerAnnotationView","FreehandAnnotationView","TextAnnotationView"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/AnnotationView.tsx"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAAsD,IAAAK,WAAA,GAAAL,OAAA;AAEtD;AACO,SAASM,cAAcA,CAAC;EAAEC;AAAqB,CAAC,EAAE;EACvD,QAAQA,CAAC,CAACC,IAAI;IACZ,KAAK,QAAQ;MACX,oBAAO,IAAAH,WAAA,CAAAI,GAAA,EAACV,iBAAA,CAAAW,oBAAoB;QAACH,CAAC,EAAEA;MAAE,CAAE,CAAC;IACvC,KAAK,OAAO;MACV,oBAAO,IAAAF,WAAA,CAAAI,GAAA,EAACR,gBAAA,CAAAU,mBAAmB;QAACJ,CAAC,EAAEA;MAAE,CAAE,CAAC;IACtC,KAAK,QAAQ;MACX,oBAAO,IAAAF,WAAA,CAAAI,GAAA,EAACP,iBAAA,CAAAU,oBAAoB;QAACL,CAAC,EAAEA;MAAE,CAAE,CAAC;IACvC,KAAK,UAAU;MACb,oBAAO,IAAAF,WAAA,CAAAI,GAAA,EAACN,mBAAA,CAAAU,sBAAsB;QAACN,CAAC,EAAEA;MAAE,CAAE,CAAC;IACzC,KAAK,MAAM;MACT,oBAAO,IAAAF,WAAA,CAAAI,GAAA,EAACL,eAAA,CAAAU,kBAAkB;QAACP,CAAC,EAAEA;MAAE,CAAE,CAAC;IACrC;MACE,OAAO,IAAI;EACf;AACF","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ArrowAnnotationView = ArrowAnnotationView;
7
+ var _react = require("react");
8
+ var _reactNativeSkia = require("@shopify/react-native-skia");
9
+ var _geometry = require("./geometry");
10
+ var _RotatedGroup = require("./RotatedGroup");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function ArrowAnnotationView({
13
+ a
14
+ }) {
15
+ const path = (0, _react.useMemo)(() => (0, _geometry.buildArrowPath)(a.start, a.end, a.headSize), [a.start, a.end, a.headSize]);
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RotatedGroup.RotatedGroup, {
17
+ center: (0, _geometry.annotationCenter)(a),
18
+ rotation: a.rotation,
19
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Path, {
20
+ path: path,
21
+ color: a.strokeColor,
22
+ style: "stroke",
23
+ strokeWidth: a.strokeWidth,
24
+ strokeCap: "round",
25
+ strokeJoin: "round"
26
+ })
27
+ });
28
+ }
29
+ //# sourceMappingURL=ArrowAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeSkia","_geometry","_RotatedGroup","_jsxRuntime","ArrowAnnotationView","a","path","useMemo","buildArrowPath","start","end","headSize","jsx","RotatedGroup","center","annotationCenter","rotation","children","Path","color","strokeColor","style","strokeWidth","strokeCap","strokeJoin"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/ArrowAnnotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAEvC,SAASK,mBAAmBA,CAAC;EAAEC;AAA8B,CAAC,EAAE;EACrE,MAAMC,IAAI,GAAG,IAAAC,cAAO,EAClB,MAAM,IAAAC,wBAAc,EAACH,CAAC,CAACI,KAAK,EAAEJ,CAAC,CAACK,GAAG,EAAEL,CAAC,CAACM,QAAQ,CAAC,EAChD,CAACN,CAAC,CAACI,KAAK,EAAEJ,CAAC,CAACK,GAAG,EAAEL,CAAC,CAACM,QAAQ,CAC7B,CAAC;EACD,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACV,aAAA,CAAAW,YAAY;IAACC,MAAM,EAAE,IAAAC,0BAAgB,EAACV,CAAC,CAAE;IAACW,QAAQ,EAAEX,CAAC,CAACW,QAAS;IAAAC,QAAA,eAC9D,IAAAd,WAAA,CAAAS,GAAA,EAACZ,gBAAA,CAAAkB,IAAI;MACHZ,IAAI,EAAEA,IAAK;MACXa,KAAK,EAAEd,CAAC,CAACe,WAAY;MACrBC,KAAK,EAAC,QAAQ;MACdC,WAAW,EAAEjB,CAAC,CAACiB,WAAY;MAC3BC,SAAS,EAAC,OAAO;MACjBC,UAAU,EAAC;IAAO,CACnB;EAAC,CACU,CAAC;AAEnB","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CircleAnnotationView = CircleAnnotationView;
7
+ var _reactNativeSkia = require("@shopify/react-native-skia");
8
+ var _RotatedGroup = require("./RotatedGroup");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function CircleAnnotationView({
11
+ a
12
+ }) {
13
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_RotatedGroup.RotatedGroup, {
14
+ center: a.center,
15
+ rotation: a.rotation,
16
+ children: [a.fill ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Circle, {
17
+ cx: a.center.x,
18
+ cy: a.center.y,
19
+ r: a.radius,
20
+ color: a.fill
21
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Circle, {
22
+ cx: a.center.x,
23
+ cy: a.center.y,
24
+ r: a.radius,
25
+ color: a.strokeColor,
26
+ style: "stroke",
27
+ strokeWidth: a.strokeWidth
28
+ })]
29
+ });
30
+ }
31
+ //# sourceMappingURL=CircleAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeSkia","require","_RotatedGroup","_jsxRuntime","CircleAnnotationView","a","jsxs","RotatedGroup","center","rotation","children","fill","jsx","Circle","cx","x","cy","y","r","radius","color","strokeColor","style","strokeWidth"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/CircleAnnotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AAA8C,IAAAE,WAAA,GAAAF,OAAA;AAEvC,SAASG,oBAAoBA,CAAC;EAAEC;AAA+B,CAAC,EAAE;EACvE,oBACE,IAAAF,WAAA,CAAAG,IAAA,EAACJ,aAAA,CAAAK,YAAY;IAACC,MAAM,EAAEH,CAAC,CAACG,MAAO;IAACC,QAAQ,EAAEJ,CAAC,CAACI,QAAS;IAAAC,QAAA,GAClDL,CAAC,CAACM,IAAI,gBACL,IAAAR,WAAA,CAAAS,GAAA,EAACZ,gBAAA,CAAAa,MAAM;MAACC,EAAE,EAAET,CAAC,CAACG,MAAM,CAACO,CAAE;MAACC,EAAE,EAAEX,CAAC,CAACG,MAAM,CAACS,CAAE;MAACC,CAAC,EAAEb,CAAC,CAACc,MAAO;MAACC,KAAK,EAAEf,CAAC,CAACM;IAAK,CAAE,CAAC,GACpE,IAAI,eACR,IAAAR,WAAA,CAAAS,GAAA,EAACZ,gBAAA,CAAAa,MAAM;MACLC,EAAE,EAAET,CAAC,CAACG,MAAM,CAACO,CAAE;MACfC,EAAE,EAAEX,CAAC,CAACG,MAAM,CAACS,CAAE;MACfC,CAAC,EAAEb,CAAC,CAACc,MAAO;MACZC,KAAK,EAAEf,CAAC,CAACgB,WAAY;MACrBC,KAAK,EAAC,QAAQ;MACdC,WAAW,EAAElB,CAAC,CAACkB;IAAY,CAC5B,CAAC;EAAA,CACU,CAAC;AAEnB","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FreehandAnnotationView = FreehandAnnotationView;
7
+ var _react = require("react");
8
+ var _reactNativeSkia = require("@shopify/react-native-skia");
9
+ var _geometry = require("./geometry");
10
+ var _RotatedGroup = require("./RotatedGroup");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function FreehandAnnotationView({
13
+ a
14
+ }) {
15
+ const path = (0, _react.useMemo)(() => (0, _geometry.buildFreehandPath)(a.points), [a.points]);
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RotatedGroup.RotatedGroup, {
17
+ center: (0, _geometry.annotationCenter)(a),
18
+ rotation: a.rotation,
19
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Path, {
20
+ path: path,
21
+ color: a.strokeColor,
22
+ style: "stroke",
23
+ strokeWidth: a.strokeWidth,
24
+ strokeCap: "round",
25
+ strokeJoin: "round"
26
+ })
27
+ });
28
+ }
29
+ //# sourceMappingURL=FreehandAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeSkia","_geometry","_RotatedGroup","_jsxRuntime","FreehandAnnotationView","a","path","useMemo","buildFreehandPath","points","jsx","RotatedGroup","center","annotationCenter","rotation","children","Path","color","strokeColor","style","strokeWidth","strokeCap","strokeJoin"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/FreehandAnnotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAEvC,SAASK,sBAAsBA,CAAC;EAAEC;AAAiC,CAAC,EAAE;EAC3E,MAAMC,IAAI,GAAG,IAAAC,cAAO,EAAC,MAAM,IAAAC,2BAAiB,EAACH,CAAC,CAACI,MAAM,CAAC,EAAE,CAACJ,CAAC,CAACI,MAAM,CAAC,CAAC;EACnE,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACR,aAAA,CAAAS,YAAY;IAACC,MAAM,EAAE,IAAAC,0BAAgB,EAACR,CAAC,CAAE;IAACS,QAAQ,EAAET,CAAC,CAACS,QAAS;IAAAC,QAAA,eAC9D,IAAAZ,WAAA,CAAAO,GAAA,EAACV,gBAAA,CAAAgB,IAAI;MACHV,IAAI,EAAEA,IAAK;MACXW,KAAK,EAAEZ,CAAC,CAACa,WAAY;MACrBC,KAAK,EAAC,QAAQ;MACdC,WAAW,EAAEf,CAAC,CAACe,WAAY;MAC3BC,SAAS,EAAC,OAAO;MACjBC,UAAU,EAAC;IAAO,CACnB;EAAC,CACU,CAAC;AAEnB","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MarkerAnnotationView = MarkerAnnotationView;
7
+ var _reactNativeSkia = require("@shopify/react-native-skia");
8
+ var _geometry = require("./geometry");
9
+ var _RotatedGroup = require("./RotatedGroup");
10
+ var _color = require("../utils/color");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function MarkerAnnotationView({
13
+ a
14
+ }) {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RotatedGroup.RotatedGroup, {
16
+ center: (0, _geometry.annotationCenter)(a),
17
+ rotation: a.rotation,
18
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Rect, {
19
+ x: a.rect.x,
20
+ y: a.rect.y,
21
+ width: a.rect.width,
22
+ height: a.rect.height,
23
+ color: (0, _color.withOpacity)(a.color, a.opacity)
24
+ })
25
+ });
26
+ }
27
+ //# sourceMappingURL=MarkerAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeSkia","require","_geometry","_RotatedGroup","_color","_jsxRuntime","MarkerAnnotationView","a","jsx","RotatedGroup","center","annotationCenter","rotation","children","Rect","x","rect","y","width","height","color","withOpacity","opacity"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/MarkerAnnotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA6C,IAAAI,WAAA,GAAAJ,OAAA;AAEtC,SAASK,oBAAoBA,CAAC;EAAEC;AAA+B,CAAC,EAAE;EACvE,oBACE,IAAAF,WAAA,CAAAG,GAAA,EAACL,aAAA,CAAAM,YAAY;IAACC,MAAM,EAAE,IAAAC,0BAAgB,EAACJ,CAAC,CAAE;IAACK,QAAQ,EAAEL,CAAC,CAACK,QAAS;IAAAC,QAAA,eAC9D,IAAAR,WAAA,CAAAG,GAAA,EAACR,gBAAA,CAAAc,IAAI;MACHC,CAAC,EAAER,CAAC,CAACS,IAAI,CAACD,CAAE;MACZE,CAAC,EAAEV,CAAC,CAACS,IAAI,CAACC,CAAE;MACZC,KAAK,EAAEX,CAAC,CAACS,IAAI,CAACE,KAAM;MACpBC,MAAM,EAAEZ,CAAC,CAACS,IAAI,CAACG,MAAO;MACtBC,KAAK,EAAE,IAAAC,kBAAW,EAACd,CAAC,CAACa,KAAK,EAAEb,CAAC,CAACe,OAAO;IAAE,CACxC;EAAC,CACU,CAAC;AAEnB","ignoreList":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RotatedGroup = RotatedGroup;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeSkia = require("@shopify/react-native-skia");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ /**
12
+ * Wraps children in a Skia Group rotated by `rotation` radians about `center`.
13
+ * Every annotation renderer uses this so its stored `rotation` is applied
14
+ * consistently (and identically in the off-screen export path).
15
+ */
16
+ function RotatedGroup({
17
+ center,
18
+ rotation,
19
+ children
20
+ }) {
21
+ if (!rotation) {
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
23
+ children: children
24
+ });
25
+ }
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Group, {
27
+ origin: center,
28
+ transform: [{
29
+ rotate: rotation
30
+ }],
31
+ children: children
32
+ });
33
+ }
34
+ //# sourceMappingURL=RotatedGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSkia","_jsxRuntime","e","__esModule","default","RotatedGroup","center","rotation","children","jsx","Fragment","Group","origin","transform","rotate"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/RotatedGroup.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAAmD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAInD;AACA;AACA;AACA;AACA;AACO,SAASG,YAAYA,CAAC;EAC3BC,MAAM;EACNC,QAAQ;EACRC;AAKF,CAAC,EAAE;EACD,IAAI,CAACD,QAAQ,EAAE;IACb,oBAAO,IAAAN,WAAA,CAAAQ,GAAA,EAAAR,WAAA,CAAAS,QAAA;MAAAF,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACxB;EACA,oBACE,IAAAP,WAAA,CAAAQ,GAAA,EAACT,gBAAA,CAAAW,KAAK;IAACC,MAAM,EAAEN,MAAO;IAACO,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAEP;IAAS,CAAC,CAAE;IAAAC,QAAA,EACtDA;EAAQ,CACJ,CAAC;AAEZ","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TextAnnotationView = TextAnnotationView;
7
+ var _react = require("react");
8
+ var _reactNativeSkia = require("@shopify/react-native-skia");
9
+ var _geometry = require("./geometry");
10
+ var _RotatedGroup = require("./RotatedGroup");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Renders text using a system font via `matchFont` (no bundled font file
14
+ * required). Honors explicit newlines; automatic width-wrapping is intentionally
15
+ * out of scope for v1 (would require SkParagraph + a shared FontMgr).
16
+ */
17
+ function TextAnnotationView({
18
+ a
19
+ }) {
20
+ const font = (0, _react.useMemo)(() => (0, _reactNativeSkia.matchFont)({
21
+ fontFamily: 'sans-serif',
22
+ fontSize: a.fontSize,
23
+ fontStyle: 'normal',
24
+ fontWeight: 'normal'
25
+ }), [a.fontSize]);
26
+ const lines = a.text.split('\n');
27
+ const lineHeight = a.fontSize * 1.2;
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RotatedGroup.RotatedGroup, {
29
+ center: (0, _geometry.annotationCenter)(a),
30
+ rotation: a.rotation,
31
+ children: lines.map((line, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Text, {
32
+ x: a.origin.x,
33
+ y: a.origin.y + a.fontSize + i * lineHeight,
34
+ text: line,
35
+ font: font,
36
+ color: a.color
37
+ }, i))
38
+ });
39
+ }
40
+ //# sourceMappingURL=TextAnnotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeSkia","_geometry","_RotatedGroup","_jsxRuntime","TextAnnotationView","a","font","useMemo","matchFont","fontFamily","fontSize","fontStyle","fontWeight","lines","text","split","lineHeight","jsx","RotatedGroup","center","annotationCenter","rotation","children","map","line","i","Text","x","origin","y","color"],"sourceRoot":"..\\..\\..\\src","sources":["annotations/TextAnnotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAE9C;AACA;AACA;AACA;AACA;AACO,SAASK,kBAAkBA,CAAC;EAAEC;AAA6B,CAAC,EAAE;EACnE,MAAMC,IAAI,GAAG,IAAAC,cAAO,EAClB,MACE,IAAAC,0BAAS,EAAC;IACRC,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAEL,CAAC,CAACK,QAAQ;IACpBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC,CAAC,EACJ,CAACP,CAAC,CAACK,QAAQ,CACb,CAAC;EAED,MAAMG,KAAK,GAAGR,CAAC,CAACS,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC;EAChC,MAAMC,UAAU,GAAGX,CAAC,CAACK,QAAQ,GAAG,GAAG;EAEnC,oBACE,IAAAP,WAAA,CAAAc,GAAA,EAACf,aAAA,CAAAgB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