reanimated-color-picker 4.3.0 → 5.0.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 (349) hide show
  1. package/README.md +5 -3
  2. package/lib/commonjs/AppContext.js.map +2 -2
  3. package/lib/commonjs/ColorPicker.js +185 -160
  4. package/lib/commonjs/ColorPicker.js.map +13 -6
  5. package/lib/commonjs/colorKit/index.js +118 -105
  6. package/lib/commonjs/colorKit/index.js.map +2 -2
  7. package/lib/commonjs/colorKit/types.js.map +1 -1
  8. package/lib/commonjs/components/InputWidget/InputWidget.js +26 -14
  9. package/lib/commonjs/components/InputWidget/InputWidget.js.map +11 -3
  10. package/lib/commonjs/components/InputWidget/Widgets/HexWidget.js +27 -20
  11. package/lib/commonjs/components/InputWidget/Widgets/HexWidget.js.map +11 -4
  12. package/lib/commonjs/components/InputWidget/Widgets/HslWidget.js +32 -21
  13. package/lib/commonjs/components/InputWidget/Widgets/HslWidget.js.map +8 -4
  14. package/lib/commonjs/components/InputWidget/Widgets/HsvWidget.js +32 -21
  15. package/lib/commonjs/components/InputWidget/Widgets/HsvWidget.js.map +7 -4
  16. package/lib/commonjs/components/InputWidget/Widgets/HwbWidget.js +32 -21
  17. package/lib/commonjs/components/InputWidget/Widgets/HwbWidget.js.map +9 -4
  18. package/lib/commonjs/components/InputWidget/Widgets/RgbWidget.js +31 -19
  19. package/lib/commonjs/components/InputWidget/Widgets/RgbWidget.js.map +10 -4
  20. package/lib/commonjs/components/InputWidget/Widgets/WidgetTextInput.js +24 -17
  21. package/lib/commonjs/components/InputWidget/Widgets/WidgetTextInput.js.map +6 -3
  22. package/lib/commonjs/components/Panels/Panel1.js +102 -98
  23. package/lib/commonjs/components/Panels/Panel1.js.map +29 -37
  24. package/lib/commonjs/components/Panels/Panel2.js +180 -129
  25. package/lib/commonjs/components/Panels/Panel2.js.map +33 -40
  26. package/lib/commonjs/components/Panels/Panel3/ExtraThumb.js +92 -48
  27. package/lib/commonjs/components/Panels/Panel3/ExtraThumb.js.map +12 -6
  28. package/lib/commonjs/components/Panels/Panel3/Panel3.js +206 -165
  29. package/lib/commonjs/components/Panels/Panel3/Panel3.js.map +35 -43
  30. package/lib/commonjs/components/Panels/Panel3/Panel3Context.js.map +2 -2
  31. package/lib/commonjs/components/Panels/Panel4.js +152 -125
  32. package/lib/commonjs/components/Panels/Panel4.js.map +41 -41
  33. package/lib/commonjs/components/Panels/Panel5.js +91 -72
  34. package/lib/commonjs/components/Panels/Panel5.js.map +38 -43
  35. package/lib/commonjs/components/Panels/PanelCore.js +241 -0
  36. package/lib/commonjs/components/Panels/PanelCore.js.map +143 -0
  37. package/lib/commonjs/components/Preview.js +42 -58
  38. package/lib/commonjs/components/Preview.js.map +18 -19
  39. package/lib/commonjs/components/PreviewText.js +28 -10
  40. package/lib/commonjs/components/PreviewText.js.map +22 -4
  41. package/lib/commonjs/components/Sliders/CircularSliderCore.js +202 -0
  42. package/lib/commonjs/components/Sliders/CircularSliderCore.js.map +122 -0
  43. package/lib/commonjs/components/Sliders/HSB/BrightnessSlider.js +95 -103
  44. package/lib/commonjs/components/Sliders/HSB/BrightnessSlider.js.map +19 -33
  45. package/lib/commonjs/components/Sliders/HSB/SaturationSlider.js +110 -115
  46. package/lib/commonjs/components/Sliders/HSB/SaturationSlider.js.map +19 -33
  47. package/lib/commonjs/components/Sliders/HSL/HSLSaturationSlider.js +129 -126
  48. package/lib/commonjs/components/Sliders/HSL/HSLSaturationSlider.js.map +17 -33
  49. package/lib/commonjs/components/Sliders/HSL/LuminanceCircular.js +156 -145
  50. package/lib/commonjs/components/Sliders/HSL/LuminanceCircular.js.map +30 -42
  51. package/lib/commonjs/components/Sliders/HSL/LuminanceSlider.js +119 -121
  52. package/lib/commonjs/components/Sliders/HSL/LuminanceSlider.js.map +20 -36
  53. package/lib/commonjs/components/Sliders/Hue/HueCircular.js +141 -130
  54. package/lib/commonjs/components/Sliders/Hue/HueCircular.js.map +31 -39
  55. package/lib/commonjs/components/Sliders/Hue/HueSlider.js +122 -123
  56. package/lib/commonjs/components/Sliders/Hue/HueSlider.js.map +20 -33
  57. package/lib/commonjs/components/Sliders/OpacitySlider.js +128 -130
  58. package/lib/commonjs/components/Sliders/OpacitySlider.js.map +23 -33
  59. package/lib/commonjs/components/Sliders/RGB/BlueSlider.js +122 -120
  60. package/lib/commonjs/components/Sliders/RGB/BlueSlider.js.map +28 -38
  61. package/lib/commonjs/components/Sliders/RGB/GreenSlider.js +122 -120
  62. package/lib/commonjs/components/Sliders/RGB/GreenSlider.js.map +27 -38
  63. package/lib/commonjs/components/Sliders/RGB/RedSlider.js +121 -119
  64. package/lib/commonjs/components/Sliders/RGB/RedSlider.js.map +27 -37
  65. package/lib/commonjs/components/Sliders/SliderCore.js +240 -0
  66. package/lib/commonjs/components/Sliders/SliderCore.js.map +138 -0
  67. package/lib/commonjs/components/Swatches.js +2 -0
  68. package/lib/commonjs/components/Swatches.js.map +2 -2
  69. package/lib/commonjs/components/Thumb/BuiltinThumbs/Circle.js +6 -7
  70. package/lib/commonjs/components/Thumb/BuiltinThumbs/Circle.js.map +3 -3
  71. package/lib/commonjs/components/Thumb/BuiltinThumbs/DoubleTriangle.js +3 -3
  72. package/lib/commonjs/components/Thumb/BuiltinThumbs/DoubleTriangle.js.map +3 -3
  73. package/lib/commonjs/components/Thumb/BuiltinThumbs/Hollow.js +4 -4
  74. package/lib/commonjs/components/Thumb/BuiltinThumbs/Hollow.js.map +3 -3
  75. package/lib/commonjs/components/Thumb/BuiltinThumbs/Line.js +3 -3
  76. package/lib/commonjs/components/Thumb/BuiltinThumbs/Line.js.map +3 -3
  77. package/lib/commonjs/components/Thumb/BuiltinThumbs/Pill.js +3 -3
  78. package/lib/commonjs/components/Thumb/BuiltinThumbs/Pill.js.map +3 -3
  79. package/lib/commonjs/components/Thumb/BuiltinThumbs/Plus.js +4 -4
  80. package/lib/commonjs/components/Thumb/BuiltinThumbs/Plus.js.map +3 -3
  81. package/lib/commonjs/components/Thumb/BuiltinThumbs/Rect.js +6 -7
  82. package/lib/commonjs/components/Thumb/BuiltinThumbs/Rect.js.map +3 -3
  83. package/lib/commonjs/components/Thumb/BuiltinThumbs/Ring.js +3 -3
  84. package/lib/commonjs/components/Thumb/BuiltinThumbs/Ring.js.map +3 -3
  85. package/lib/commonjs/components/Thumb/BuiltinThumbs/Solid.js +6 -7
  86. package/lib/commonjs/components/Thumb/BuiltinThumbs/Solid.js.map +3 -3
  87. package/lib/commonjs/components/Thumb/BuiltinThumbs/TriangleDown.js +3 -3
  88. package/lib/commonjs/components/Thumb/BuiltinThumbs/TriangleDown.js.map +3 -3
  89. package/lib/commonjs/components/Thumb/BuiltinThumbs/TriangleUp.js +3 -3
  90. package/lib/commonjs/components/Thumb/BuiltinThumbs/TriangleUp.js.map +3 -3
  91. package/lib/commonjs/components/Thumb/Thumb.js +28 -97
  92. package/lib/commonjs/components/Thumb/Thumb.js.map +16 -21
  93. package/lib/commonjs/index.js +18 -18
  94. package/lib/commonjs/index.js.map +11 -11
  95. package/lib/commonjs/styles.js +3 -3
  96. package/lib/commonjs/styles.js.map +4 -5
  97. package/lib/commonjs/types.js.map +1 -1
  98. package/lib/commonjs/utils.js +30 -12
  99. package/lib/commonjs/utils.js.map +4 -2
  100. package/lib/module/AppContext.js.map +2 -2
  101. package/lib/module/ColorPicker.js +186 -161
  102. package/lib/module/ColorPicker.js.map +13 -6
  103. package/lib/module/colorKit/index.js +118 -105
  104. package/lib/module/colorKit/index.js.map +2 -2
  105. package/lib/module/colorKit/types.js.map +1 -1
  106. package/lib/module/components/InputWidget/InputWidget.js +27 -15
  107. package/lib/module/components/InputWidget/InputWidget.js.map +11 -3
  108. package/lib/module/components/InputWidget/Widgets/HexWidget.js +27 -20
  109. package/lib/module/components/InputWidget/Widgets/HexWidget.js.map +11 -4
  110. package/lib/module/components/InputWidget/Widgets/HslWidget.js +32 -21
  111. package/lib/module/components/InputWidget/Widgets/HslWidget.js.map +8 -4
  112. package/lib/module/components/InputWidget/Widgets/HsvWidget.js +32 -21
  113. package/lib/module/components/InputWidget/Widgets/HsvWidget.js.map +7 -4
  114. package/lib/module/components/InputWidget/Widgets/HwbWidget.js +32 -21
  115. package/lib/module/components/InputWidget/Widgets/HwbWidget.js.map +9 -4
  116. package/lib/module/components/InputWidget/Widgets/RgbWidget.js +31 -19
  117. package/lib/module/components/InputWidget/Widgets/RgbWidget.js.map +10 -4
  118. package/lib/module/components/InputWidget/Widgets/WidgetTextInput.js +24 -17
  119. package/lib/module/components/InputWidget/Widgets/WidgetTextInput.js.map +6 -3
  120. package/lib/module/components/Panels/Panel1.js +99 -92
  121. package/lib/module/components/Panels/Panel1.js.map +22 -30
  122. package/lib/module/components/Panels/Panel2.js +177 -123
  123. package/lib/module/components/Panels/Panel2.js.map +27 -34
  124. package/lib/module/components/Panels/Panel3/ExtraThumb.js +92 -48
  125. package/lib/module/components/Panels/Panel3/ExtraThumb.js.map +11 -6
  126. package/lib/module/components/Panels/Panel3/Panel3.js +203 -159
  127. package/lib/module/components/Panels/Panel3/Panel3.js.map +28 -36
  128. package/lib/module/components/Panels/Panel3/Panel3Context.js.map +2 -2
  129. package/lib/module/components/Panels/Panel4.js +150 -120
  130. package/lib/module/components/Panels/Panel4.js.map +33 -33
  131. package/lib/module/components/Panels/Panel5.js +87 -71
  132. package/lib/module/components/Panels/Panel5.js.map +32 -37
  133. package/lib/module/components/Panels/PanelCore.js +209 -0
  134. package/lib/module/components/Panels/PanelCore.js.map +119 -0
  135. package/lib/module/components/Preview.js +37 -60
  136. package/lib/module/components/Preview.js.map +16 -17
  137. package/lib/module/components/PreviewText.js +28 -10
  138. package/lib/module/components/PreviewText.js.map +22 -4
  139. package/lib/module/components/Sliders/CircularSliderCore.js +170 -0
  140. package/lib/module/components/Sliders/CircularSliderCore.js.map +99 -0
  141. package/lib/module/components/Sliders/HSB/BrightnessSlider.js +96 -101
  142. package/lib/module/components/Sliders/HSB/BrightnessSlider.js.map +17 -31
  143. package/lib/module/components/Sliders/HSB/SaturationSlider.js +111 -113
  144. package/lib/module/components/Sliders/HSB/SaturationSlider.js.map +17 -31
  145. package/lib/module/components/Sliders/HSL/HSLSaturationSlider.js +130 -124
  146. package/lib/module/components/Sliders/HSL/HSLSaturationSlider.js.map +15 -31
  147. package/lib/module/components/Sliders/HSL/LuminanceCircular.js +153 -139
  148. package/lib/module/components/Sliders/HSL/LuminanceCircular.js.map +25 -37
  149. package/lib/module/components/Sliders/HSL/LuminanceSlider.js +120 -119
  150. package/lib/module/components/Sliders/HSL/LuminanceSlider.js.map +19 -35
  151. package/lib/module/components/Sliders/Hue/HueCircular.js +138 -124
  152. package/lib/module/components/Sliders/Hue/HueCircular.js.map +26 -34
  153. package/lib/module/components/Sliders/Hue/HueSlider.js +123 -121
  154. package/lib/module/components/Sliders/Hue/HueSlider.js.map +18 -31
  155. package/lib/module/components/Sliders/OpacitySlider.js +129 -128
  156. package/lib/module/components/Sliders/OpacitySlider.js.map +21 -31
  157. package/lib/module/components/Sliders/RGB/BlueSlider.js +123 -118
  158. package/lib/module/components/Sliders/RGB/BlueSlider.js.map +25 -35
  159. package/lib/module/components/Sliders/RGB/GreenSlider.js +123 -118
  160. package/lib/module/components/Sliders/RGB/GreenSlider.js.map +24 -35
  161. package/lib/module/components/Sliders/RGB/RedSlider.js +122 -117
  162. package/lib/module/components/Sliders/RGB/RedSlider.js.map +25 -35
  163. package/lib/module/components/Sliders/SliderCore.js +208 -0
  164. package/lib/module/components/Sliders/SliderCore.js.map +116 -0
  165. package/lib/module/components/Swatches.js +2 -0
  166. package/lib/module/components/Swatches.js.map +2 -2
  167. package/lib/module/components/Thumb/BuiltinThumbs/Circle.js +15 -7
  168. package/lib/module/components/Thumb/BuiltinThumbs/Circle.js.map +3 -3
  169. package/lib/module/components/Thumb/BuiltinThumbs/DoubleTriangle.js +12 -3
  170. package/lib/module/components/Thumb/BuiltinThumbs/DoubleTriangle.js.map +3 -3
  171. package/lib/module/components/Thumb/BuiltinThumbs/Hollow.js +13 -4
  172. package/lib/module/components/Thumb/BuiltinThumbs/Hollow.js.map +3 -3
  173. package/lib/module/components/Thumb/BuiltinThumbs/Line.js +3 -3
  174. package/lib/module/components/Thumb/BuiltinThumbs/Line.js.map +3 -3
  175. package/lib/module/components/Thumb/BuiltinThumbs/Pill.js +3 -3
  176. package/lib/module/components/Thumb/BuiltinThumbs/Pill.js.map +3 -3
  177. package/lib/module/components/Thumb/BuiltinThumbs/Plus.js +4 -4
  178. package/lib/module/components/Thumb/BuiltinThumbs/Plus.js.map +3 -3
  179. package/lib/module/components/Thumb/BuiltinThumbs/Rect.js +6 -7
  180. package/lib/module/components/Thumb/BuiltinThumbs/Rect.js.map +3 -3
  181. package/lib/module/components/Thumb/BuiltinThumbs/Ring.js +3 -3
  182. package/lib/module/components/Thumb/BuiltinThumbs/Ring.js.map +3 -3
  183. package/lib/module/components/Thumb/BuiltinThumbs/Solid.js +6 -7
  184. package/lib/module/components/Thumb/BuiltinThumbs/Solid.js.map +3 -3
  185. package/lib/module/components/Thumb/BuiltinThumbs/TriangleDown.js +3 -3
  186. package/lib/module/components/Thumb/BuiltinThumbs/TriangleDown.js.map +3 -3
  187. package/lib/module/components/Thumb/BuiltinThumbs/TriangleUp.js +12 -3
  188. package/lib/module/components/Thumb/BuiltinThumbs/TriangleUp.js.map +3 -3
  189. package/lib/module/components/Thumb/Thumb.js +29 -98
  190. package/lib/module/components/Thumb/Thumb.js.map +14 -19
  191. package/lib/module/index.js +9 -9
  192. package/lib/module/index.js.map +12 -12
  193. package/lib/module/styles.js +3 -3
  194. package/lib/module/styles.js.map +4 -5
  195. package/lib/module/types.js.map +1 -1
  196. package/lib/module/utils.js +30 -12
  197. package/lib/module/utils.js.map +4 -2
  198. package/lib/src/AppContext.ts +1 -0
  199. package/lib/src/ColorPicker.tsx +180 -152
  200. package/lib/src/colorKit/index.ts +224 -212
  201. package/lib/src/colorKit/types.ts +192 -165
  202. package/lib/src/components/InputWidget/InputWidget.tsx +35 -18
  203. package/lib/src/components/InputWidget/Widgets/HexWidget.tsx +30 -19
  204. package/lib/src/components/InputWidget/Widgets/HslWidget.tsx +36 -20
  205. package/lib/src/components/InputWidget/Widgets/HsvWidget.tsx +36 -20
  206. package/lib/src/components/InputWidget/Widgets/HwbWidget.tsx +36 -20
  207. package/lib/src/components/InputWidget/Widgets/RgbWidget.tsx +35 -19
  208. package/lib/src/components/InputWidget/Widgets/WidgetTextInput.tsx +32 -21
  209. package/lib/src/components/Panels/Panel1.tsx +94 -78
  210. package/lib/src/components/Panels/Panel2.tsx +169 -103
  211. package/lib/src/components/Panels/Panel3/ExtraThumb.tsx +91 -46
  212. package/lib/src/components/Panels/Panel3/Panel3.tsx +179 -129
  213. package/lib/src/components/Panels/Panel3/Panel3Context.ts +1 -0
  214. package/lib/src/components/Panels/Panel4.tsx +122 -95
  215. package/lib/src/components/Panels/Panel5.tsx +83 -54
  216. package/lib/src/components/Panels/PanelCore.tsx +305 -0
  217. package/lib/src/components/Preview.tsx +39 -26
  218. package/lib/src/components/PreviewText.tsx +23 -9
  219. package/lib/src/components/Sliders/CircularSliderCore.tsx +240 -0
  220. package/lib/src/components/Sliders/HSB/BrightnessSlider.tsx +86 -79
  221. package/lib/src/components/Sliders/HSB/SaturationSlider.tsx +96 -84
  222. package/lib/src/components/Sliders/HSL/HSLSaturationSlider.tsx +120 -92
  223. package/lib/src/components/Sliders/HSL/LuminanceCircular.tsx +124 -106
  224. package/lib/src/components/Sliders/HSL/LuminanceSlider.tsx +105 -89
  225. package/lib/src/components/Sliders/Hue/HueCircular.tsx +123 -102
  226. package/lib/src/components/Sliders/Hue/HueSlider.tsx +102 -88
  227. package/lib/src/components/Sliders/OpacitySlider.tsx +108 -103
  228. package/lib/src/components/Sliders/RGB/BlueSlider.tsx +109 -87
  229. package/lib/src/components/Sliders/RGB/GreenSlider.tsx +109 -86
  230. package/lib/src/components/Sliders/RGB/RedSlider.tsx +107 -85
  231. package/lib/src/components/Sliders/SliderCore.tsx +291 -0
  232. package/lib/src/components/Swatches.tsx +1 -0
  233. package/lib/src/components/Thumb/BuiltinThumbs/Circle.tsx +8 -3
  234. package/lib/src/components/Thumb/BuiltinThumbs/DoubleTriangle.tsx +9 -4
  235. package/lib/src/components/Thumb/BuiltinThumbs/Hollow.tsx +10 -6
  236. package/lib/src/components/Thumb/BuiltinThumbs/Line.tsx +12 -5
  237. package/lib/src/components/Thumb/BuiltinThumbs/Pill.tsx +11 -5
  238. package/lib/src/components/Thumb/BuiltinThumbs/Plus.tsx +19 -7
  239. package/lib/src/components/Thumb/BuiltinThumbs/Rect.tsx +13 -4
  240. package/lib/src/components/Thumb/BuiltinThumbs/Ring.tsx +3 -3
  241. package/lib/src/components/Thumb/BuiltinThumbs/Solid.tsx +16 -4
  242. package/lib/src/components/Thumb/BuiltinThumbs/TriangleDown.tsx +7 -4
  243. package/lib/src/components/Thumb/BuiltinThumbs/TriangleUp.tsx +7 -4
  244. package/lib/src/components/Thumb/Thumb.tsx +27 -45
  245. package/lib/src/index.ts +10 -10
  246. package/lib/src/styles.ts +3 -3
  247. package/lib/src/types.ts +297 -229
  248. package/lib/src/utils.tsx +37 -14
  249. package/lib/typescript/AppContext.d.ts.map +1 -1
  250. package/lib/typescript/ColorPicker.d.ts +1 -0
  251. package/lib/typescript/ColorPicker.d.ts.map +1 -1
  252. package/lib/typescript/colorKit/index.d.ts +7 -6
  253. package/lib/typescript/colorKit/index.d.ts.map +1 -1
  254. package/lib/typescript/colorKit/types.d.ts +27 -169
  255. package/lib/typescript/colorKit/types.d.ts.map +1 -1
  256. package/lib/typescript/components/InputWidget/InputWidget.d.ts +2 -1
  257. package/lib/typescript/components/InputWidget/InputWidget.d.ts.map +1 -1
  258. package/lib/typescript/components/InputWidget/Widgets/HexWidget.d.ts +1 -1
  259. package/lib/typescript/components/InputWidget/Widgets/HexWidget.d.ts.map +1 -1
  260. package/lib/typescript/components/InputWidget/Widgets/HslWidget.d.ts +1 -1
  261. package/lib/typescript/components/InputWidget/Widgets/HslWidget.d.ts.map +1 -1
  262. package/lib/typescript/components/InputWidget/Widgets/HsvWidget.d.ts +1 -1
  263. package/lib/typescript/components/InputWidget/Widgets/HsvWidget.d.ts.map +1 -1
  264. package/lib/typescript/components/InputWidget/Widgets/HwbWidget.d.ts +1 -1
  265. package/lib/typescript/components/InputWidget/Widgets/HwbWidget.d.ts.map +1 -1
  266. package/lib/typescript/components/InputWidget/Widgets/RgbWidget.d.ts +1 -1
  267. package/lib/typescript/components/InputWidget/Widgets/RgbWidget.d.ts.map +1 -1
  268. package/lib/typescript/components/InputWidget/Widgets/WidgetTextInput.d.ts +5 -4
  269. package/lib/typescript/components/InputWidget/Widgets/WidgetTextInput.d.ts.map +1 -1
  270. package/lib/typescript/components/Panels/Panel1.d.ts +1 -1
  271. package/lib/typescript/components/Panels/Panel1.d.ts.map +1 -1
  272. package/lib/typescript/components/Panels/Panel2.d.ts +1 -1
  273. package/lib/typescript/components/Panels/Panel2.d.ts.map +1 -1
  274. package/lib/typescript/components/Panels/Panel3/ExtraThumb.d.ts +1 -0
  275. package/lib/typescript/components/Panels/Panel3/ExtraThumb.d.ts.map +1 -1
  276. package/lib/typescript/components/Panels/Panel3/Panel3.d.ts +1 -1
  277. package/lib/typescript/components/Panels/Panel3/Panel3.d.ts.map +1 -1
  278. package/lib/typescript/components/Panels/Panel3/Panel3Context.d.ts.map +1 -1
  279. package/lib/typescript/components/Panels/Panel4.d.ts +1 -1
  280. package/lib/typescript/components/Panels/Panel4.d.ts.map +1 -1
  281. package/lib/typescript/components/Panels/Panel5.d.ts +2 -2
  282. package/lib/typescript/components/Panels/Panel5.d.ts.map +1 -1
  283. package/lib/typescript/components/Panels/PanelCore.d.ts +89 -0
  284. package/lib/typescript/components/Panels/PanelCore.d.ts.map +8 -0
  285. package/lib/typescript/components/Preview.d.ts +1 -0
  286. package/lib/typescript/components/Preview.d.ts.map +1 -1
  287. package/lib/typescript/components/PreviewText.d.ts +1 -0
  288. package/lib/typescript/components/PreviewText.d.ts.map +1 -1
  289. package/lib/typescript/components/Sliders/CircularSliderCore.d.ts +65 -0
  290. package/lib/typescript/components/Sliders/CircularSliderCore.d.ts.map +8 -0
  291. package/lib/typescript/components/Sliders/HSB/BrightnessSlider.d.ts +1 -0
  292. package/lib/typescript/components/Sliders/HSB/BrightnessSlider.d.ts.map +1 -1
  293. package/lib/typescript/components/Sliders/HSB/SaturationSlider.d.ts +1 -0
  294. package/lib/typescript/components/Sliders/HSB/SaturationSlider.d.ts.map +1 -1
  295. package/lib/typescript/components/Sliders/HSL/HSLSaturationSlider.d.ts +1 -0
  296. package/lib/typescript/components/Sliders/HSL/HSLSaturationSlider.d.ts.map +1 -1
  297. package/lib/typescript/components/Sliders/HSL/LuminanceCircular.d.ts +1 -0
  298. package/lib/typescript/components/Sliders/HSL/LuminanceCircular.d.ts.map +1 -1
  299. package/lib/typescript/components/Sliders/HSL/LuminanceSlider.d.ts +1 -0
  300. package/lib/typescript/components/Sliders/HSL/LuminanceSlider.d.ts.map +1 -1
  301. package/lib/typescript/components/Sliders/Hue/HueCircular.d.ts +1 -0
  302. package/lib/typescript/components/Sliders/Hue/HueCircular.d.ts.map +1 -1
  303. package/lib/typescript/components/Sliders/Hue/HueSlider.d.ts +1 -0
  304. package/lib/typescript/components/Sliders/Hue/HueSlider.d.ts.map +1 -1
  305. package/lib/typescript/components/Sliders/OpacitySlider.d.ts +1 -0
  306. package/lib/typescript/components/Sliders/OpacitySlider.d.ts.map +1 -1
  307. package/lib/typescript/components/Sliders/RGB/BlueSlider.d.ts +3 -2
  308. package/lib/typescript/components/Sliders/RGB/BlueSlider.d.ts.map +1 -1
  309. package/lib/typescript/components/Sliders/RGB/GreenSlider.d.ts +3 -2
  310. package/lib/typescript/components/Sliders/RGB/GreenSlider.d.ts.map +1 -1
  311. package/lib/typescript/components/Sliders/RGB/RedSlider.d.ts +3 -2
  312. package/lib/typescript/components/Sliders/RGB/RedSlider.d.ts.map +1 -1
  313. package/lib/typescript/components/Sliders/SliderCore.d.ts +63 -0
  314. package/lib/typescript/components/Sliders/SliderCore.d.ts.map +8 -0
  315. package/lib/typescript/components/Swatches.d.ts +1 -0
  316. package/lib/typescript/components/Swatches.d.ts.map +1 -1
  317. package/lib/typescript/components/Thumb/BuiltinThumbs/Circle.d.ts +1 -1
  318. package/lib/typescript/components/Thumb/BuiltinThumbs/Circle.d.ts.map +1 -1
  319. package/lib/typescript/components/Thumb/BuiltinThumbs/DoubleTriangle.d.ts +1 -1
  320. package/lib/typescript/components/Thumb/BuiltinThumbs/DoubleTriangle.d.ts.map +1 -1
  321. package/lib/typescript/components/Thumb/BuiltinThumbs/Hollow.d.ts +1 -1
  322. package/lib/typescript/components/Thumb/BuiltinThumbs/Hollow.d.ts.map +1 -1
  323. package/lib/typescript/components/Thumb/BuiltinThumbs/Line.d.ts +1 -1
  324. package/lib/typescript/components/Thumb/BuiltinThumbs/Line.d.ts.map +1 -1
  325. package/lib/typescript/components/Thumb/BuiltinThumbs/Pill.d.ts +1 -1
  326. package/lib/typescript/components/Thumb/BuiltinThumbs/Pill.d.ts.map +1 -1
  327. package/lib/typescript/components/Thumb/BuiltinThumbs/Plus.d.ts +1 -1
  328. package/lib/typescript/components/Thumb/BuiltinThumbs/Plus.d.ts.map +1 -1
  329. package/lib/typescript/components/Thumb/BuiltinThumbs/Rect.d.ts +1 -1
  330. package/lib/typescript/components/Thumb/BuiltinThumbs/Rect.d.ts.map +1 -1
  331. package/lib/typescript/components/Thumb/BuiltinThumbs/Ring.d.ts +1 -1
  332. package/lib/typescript/components/Thumb/BuiltinThumbs/Ring.d.ts.map +1 -1
  333. package/lib/typescript/components/Thumb/BuiltinThumbs/Solid.d.ts +1 -1
  334. package/lib/typescript/components/Thumb/BuiltinThumbs/Solid.d.ts.map +1 -1
  335. package/lib/typescript/components/Thumb/BuiltinThumbs/TriangleDown.d.ts +1 -1
  336. package/lib/typescript/components/Thumb/BuiltinThumbs/TriangleDown.d.ts.map +1 -1
  337. package/lib/typescript/components/Thumb/BuiltinThumbs/TriangleUp.d.ts +1 -1
  338. package/lib/typescript/components/Thumb/BuiltinThumbs/TriangleUp.d.ts.map +1 -1
  339. package/lib/typescript/components/Thumb/Thumb.d.ts +1 -1
  340. package/lib/typescript/components/Thumb/Thumb.d.ts.map +1 -1
  341. package/lib/typescript/index.d.ts +9 -9
  342. package/lib/typescript/index.d.ts.map +1 -1
  343. package/lib/typescript/styles.d.ts +2 -3
  344. package/lib/typescript/styles.d.ts.map +1 -1
  345. package/lib/typescript/types.d.ts +266 -228
  346. package/lib/typescript/types.d.ts.map +1 -1
  347. package/lib/typescript/utils.d.ts +15 -7
  348. package/lib/typescript/utils.d.ts.map +1 -1
  349. package/package.json +6 -5
package/README.md CHANGED
@@ -34,8 +34,10 @@
34
34
 
35
35
  ## Examples
36
36
 
37
- - [Interactive Demo on Expo Snack](https://snack.expo.dev/@alabsi91/reanimated-color-picker)
38
37
  - [TypeScript Example Code](https://github.com/alabsi91/reanimated-color-picker/tree/main/ExamplesShared)
38
+ - [Bare workflow](https://github.com/alabsi91/reanimated-color-picker/tree/main/ExampleLatest)
39
+ - [Expo managed workflow](https://github.com/alabsi91/reanimated-color-picker/tree/main/ExampleExpoLatest)
40
+ - [Interactive Demo on Expo Snack](https://snack.expo.dev/@alabsi91/reanimated-color-picker)
39
41
  - [Download APK for Demo Examples (Android)](https://github.com/alabsi91/reanimated-color-picker/releases/latest)
40
42
 
41
43
  ## Prerequisites
@@ -50,7 +52,7 @@
50
52
 
51
53
  ## Installation
52
54
 
53
- > **Note**
55
+ > [!NOTE]
54
56
  > First we need to install [react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation)(>=2.0.0) and [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation)(>=2.0.0),
55
57
 
56
58
  - Open a Terminal in the project root and run:
@@ -72,7 +74,7 @@ npm i reanimated-color-picker
72
74
 
73
75
  ## License
74
76
 
75
- - Reanimated Color Picker library is licensed under [**The MIT License.**](https://github.com/alabsi91/reanimated-color-picker/blob/main/LICENSE)
77
+ Reanimated Color Picker library is licensed under [**The MIT License.**](https://github.com/alabsi91/reanimated-color-picker/blob/main/LICENSE)
76
78
 
77
79
  ## Sponsoring
78
80
 
@@ -16,8 +16,8 @@
16
16
  "sourceRoot": "../src",
17
17
  "sources": ["AppContext.ts"],
18
18
  "sourcesContent": [
19
- "import { createContext, useContext } from 'react';\n\nimport type { ColorPickerContext } from './types';\n\nconst pickerContext = createContext<ColorPickerContext>(null!);\nexport const PickerContextProvider = pickerContext.Provider;\n\nexport default function usePickerContext() {\n const ctx = useContext(pickerContext);\n if (!ctx) {\n throw new Error('[reanimated-color-picker]: App context is not ready yet!');\n }\n return ctx;\n}\n"
19
+ "import { createContext, useContext } from 'react';\n\nimport type { ColorPickerContext } from './types';\n\nconst pickerContext = createContext<ColorPickerContext>(null!);\nexport const PickerContextProvider = pickerContext.Provider;\n\nexport default function usePickerContext() {\n const ctx = useContext(pickerContext);\n if (!ctx) {\n throw new Error('[reanimated-color-picker]: App context is not ready yet!');\n }\n\n return ctx;\n}\n"
20
20
  ],
21
- "mappings": ";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,MAAMC,aAAa,gBAAG,IAAAC,oBAAa,EAAqB,IAAK,CAAC;AACvD,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAGF,aAAa,CAACI,QAAQ;AAE5C,SAASC,gBAAgBA,CAAA,EAAG;EACzC,MAAMC,GAAG,GAAG,IAAAC,iBAAU,EAACP,aAAa,CAAC;EACrC,IAAI,CAACM,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,0DAA0D,CAAC;EAC7E;EACA,OAAOF,GAAG;AACZ",
21
+ "mappings": ";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,MAAMC,aAAa,gBAAG,IAAAC,oBAAa,EAAqB,IAAK,CAAC;AACvD,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAGF,aAAa,CAACI,QAAQ;AAE5C,SAASC,gBAAgBA,CAAA,EAAG;EACzC,MAAMC,GAAG,GAAG,IAAAC,iBAAU,EAACP,aAAa,CAAC;EACrC,IAAI,CAACM,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,0DAA0D,CAAC;EAC7E;EAEA,OAAOF,GAAG;AACZ",
22
22
  "ignoreList": []
23
23
  }
@@ -42,174 +42,199 @@ if (_utils.isWeb && !global.setImmediate) {
42
42
  // @ts-expect-error no global
43
43
  global.setImmediate = setTimeout;
44
44
  }
45
- const ColorPicker = /*#__PURE__*/ (0, _react.forwardRef)(
46
- (
47
- {
48
- adaptSpectrum = false,
49
- sliderThickness = 25,
50
- thumbAnimationDuration = 200,
51
- thumbSize = 35,
52
- thumbShape = 'ring',
53
- boundedThumb = false,
54
- thumbScaleAnimationValue = 1.2,
55
- thumbScaleAnimationDuration = 100,
56
- thumbColor,
57
- renderThumb,
58
- thumbStyle,
59
- thumbInnerStyle,
60
- value = '#fff',
61
- onChange,
62
- onChangeJS,
63
- onComplete,
64
- onCompleteJS,
65
- style = {},
66
- children = /*#__PURE__*/ _react.default.createElement(_reactNative.Text, null, 'NO CHILDREN'),
67
- },
68
- ref,
69
- ) => {
70
- const initialColor = (0, _react.useRef)(_index.default.HSV(value).object(false)).current;
71
- // color's channels values.
72
- const hueValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.h);
73
- const saturationValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.s);
74
- const brightnessValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.v);
75
- const alphaValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.a);
76
- const returnedResults = inputColor => {
77
- 'worklet';
45
+ function ColorPickerWrapper(props, ref) {
46
+ const {
47
+ adaptSpectrum = false,
48
+ sliderThickness = 25,
49
+ thumbAnimationDuration = 200,
50
+ thumbSize = 35,
51
+ thumbShape = 'ring',
52
+ boundedThumb = false,
53
+ thumbScaleAnimationValue = 1.2,
54
+ thumbScaleAnimationDuration = 100,
55
+ thumbColor,
56
+ renderThumb,
57
+ thumbStyle,
58
+ thumbInnerStyle,
59
+ value = '#fff',
60
+ colorAnnouncementFormat = 'rgb',
61
+ enableColorAnnouncements = true,
62
+ onChange,
63
+ onChangeJS,
64
+ onComplete,
65
+ onCompleteJS,
66
+ style = {},
67
+ children = /*#__PURE__*/ _react.default.createElement(_reactNative.Text, null, 'NO CHILDREN'),
68
+ } = props;
69
+ const initialColor = (0, _react.useRef)(_index.default.HSV(value).object(false)).current;
70
+ const hueValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.h);
71
+ const saturationValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.s);
72
+ const brightnessValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.v);
73
+ const alphaValue = (0, _reactNativeReanimated.useSharedValue)(initialColor.a);
78
74
 
79
- const color = inputColor ?? {
80
- h: hueValue.value,
81
- s: saturationValue.value,
82
- v: brightnessValue.value,
83
- a: alphaValue.value,
84
- };
85
- return {
86
- get hex() {
87
- return _index.default.runOnUI().HEX(color);
88
- },
89
- get rgb() {
90
- return _index.default.runOnUI().RGB(color).string(false);
91
- },
92
- get rgba() {
93
- return _index.default.runOnUI().RGB(color).string(true);
94
- },
95
- get hsl() {
96
- return _index.default.runOnUI().HSL(color).string(false);
97
- },
98
- get hsla() {
99
- return _index.default.runOnUI().HSL(color).string(true);
100
- },
101
- get hsv() {
102
- return _index.default.runOnUI().HSV(color).string(false);
103
- },
104
- get hsva() {
105
- return _index.default.runOnUI().HSV(color).string(true);
106
- },
107
- get hwb() {
108
- return _index.default.runOnUI().HWB(color).string(false);
109
- },
110
- get hwba() {
111
- return _index.default.runOnUI().HWB(color).string(true);
112
- },
113
- };
114
- };
115
- const onGestureEnd = color => {
116
- 'worklet';
75
+ /**
76
+ * Returns lazy getters for the provided color in multiple formats.
77
+ *
78
+ * @worklet
79
+ */
80
+ const colorResult = inputColor => {
81
+ 'worklet';
117
82
 
118
- if (!onComplete && !onCompleteJS) return;
119
- const colorObject = returnedResults(color);
120
- if (onComplete) onComplete(colorObject);
121
- if (onCompleteJS) (0, _reactNativeReanimated.runOnJS)(onCompleteJS)(colorObject);
83
+ const color = inputColor ?? {
84
+ h: hueValue.value,
85
+ s: saturationValue.value,
86
+ v: brightnessValue.value,
87
+ a: alphaValue.value,
122
88
  };
123
- const onGestureChange = color => {
124
- 'worklet';
125
-
126
- if (!onChange && !onChangeJS) return;
127
- const colorObject = returnedResults(color);
128
- if (onChange) onChange(colorObject);
129
- if (onChangeJS) (0, _reactNativeReanimated.runOnJS)(onChangeJS)(colorObject);
130
- };
131
- const setColor = (color, duration = thumbAnimationDuration) => {
132
- const { h, s, v, a } = _index.default.HSV(color).object(false);
133
- hueValue.value = (0, _reactNativeReanimated.withTiming)(h, {
134
- duration,
135
- });
136
- saturationValue.value = (0, _reactNativeReanimated.withTiming)(s, {
137
- duration,
138
- });
139
- brightnessValue.value = (0, _reactNativeReanimated.withTiming)(v, {
140
- duration,
141
- });
142
- alphaValue.value = (0, _reactNativeReanimated.withTiming)(a, {
143
- duration,
144
- });
89
+ return {
90
+ get hex() {
91
+ return _index.default.runOnUI().HEX(color);
92
+ },
93
+ get rgb() {
94
+ return _index.default.runOnUI().RGB(color).string(false);
95
+ },
96
+ get rgba() {
97
+ return _index.default.runOnUI().RGB(color).string(true);
98
+ },
99
+ get hsl() {
100
+ return _index.default.runOnUI().HSL(color).string(false);
101
+ },
102
+ get hsla() {
103
+ return _index.default.runOnUI().HSL(color).string(true);
104
+ },
105
+ get hsv() {
106
+ return _index.default.runOnUI().HSV(color).string(false);
107
+ },
108
+ get hsva() {
109
+ return _index.default.runOnUI().HSV(color).string(true);
110
+ },
111
+ get hwb() {
112
+ return _index.default.runOnUI().HWB(color).string(false);
113
+ },
114
+ get hwba() {
115
+ return _index.default.runOnUI().HWB(color).string(true);
116
+ },
145
117
  };
146
- (0, _react.useEffect)(() => {
147
- // Ignore value changes if the current color already matches the new color from the value props.
148
- const newColorFormat = _index.default.getFormat(value);
149
- const currentColors = returnedResults();
118
+ };
119
+ const announceColor = color => {
120
+ _reactNative.AccessibilityInfo.announceForAccessibility(color);
121
+ };
150
122
 
151
- // null or named color E.g "red"
152
- if (!newColorFormat || newColorFormat === 'named') {
153
- setColor(value);
154
- return;
155
- }
123
+ /** @worklet */
124
+ const onGestureEnd = color => {
125
+ 'worklet';
156
126
 
157
- // hex color
158
- if (newColorFormat === 'hex3' || newColorFormat === 'hex4' || newColorFormat === 'hex6' || newColorFormat === 'hex8') {
159
- if (value !== currentColors.hex) setColor(value);
160
- return;
161
- }
127
+ const colorObject = colorResult(color);
128
+ if (enableColorAnnouncements && colorAnnouncementFormat in colorObject) {
129
+ (0, _reactNativeReanimated.runOnJS)(announceColor)(colorObject[colorAnnouncementFormat]);
130
+ }
131
+ if (onComplete) {
132
+ onComplete(colorObject);
133
+ }
134
+ if (onCompleteJS) {
135
+ (0, _reactNativeReanimated.runOnJS)(onCompleteJS)(colorObject);
136
+ }
137
+ };
162
138
 
163
- // hsl | hsla | rgb | rgba | hsva | hsv | hwba | hwb
164
- if (newColorFormat in currentColors) {
165
- if (value !== currentColors[newColorFormat]) setColor(value);
166
- return;
167
- }
139
+ /** @worklet */
140
+ const onGestureChange = color => {
141
+ 'worklet';
142
+
143
+ if (!onChange && !onChangeJS) {
144
+ return;
145
+ }
146
+ const colorObject = colorResult(color);
147
+ if (onChange) {
148
+ onChange(colorObject);
149
+ }
150
+ if (onChangeJS) {
151
+ (0, _reactNativeReanimated.runOnJS)(onChangeJS)(colorObject);
152
+ }
153
+ };
154
+ const setColor = (color, duration = thumbAnimationDuration) => {
155
+ const { h, s, v, a } = _index.default.HSV(color).object(false);
156
+ hueValue.value = (0, _reactNativeReanimated.withTiming)(h, {
157
+ duration,
158
+ });
159
+ saturationValue.value = (0, _reactNativeReanimated.withTiming)(s, {
160
+ duration,
161
+ });
162
+ brightnessValue.value = (0, _reactNativeReanimated.withTiming)(v, {
163
+ duration,
164
+ });
165
+ alphaValue.value = (0, _reactNativeReanimated.withTiming)(a, {
166
+ duration,
167
+ });
168
+ };
169
+ (0, _react.useEffect)(() => {
170
+ // Ignore value changes if the current color already matches the new color from the value props.
171
+ const newColorFormat = _index.default.getFormat(value);
172
+ const currentColors = colorResult();
173
+
174
+ // null or named color E.g "red"
175
+ if (!newColorFormat || newColorFormat === 'named') {
168
176
  setColor(value);
169
- }, [value]);
170
- (0, _react.useImperativeHandle)(ref, () => ({
171
- setColor,
172
- }));
173
- const ctxValue = {
174
- hueValue,
175
- saturationValue,
176
- brightnessValue,
177
- alphaValue,
178
- adaptSpectrum,
179
- sliderThickness,
180
- thumbSize,
181
- thumbShape,
182
- boundedThumb,
183
- thumbColor,
184
- renderThumb,
185
- thumbStyle,
186
- thumbInnerStyle,
187
- thumbScaleAnimationValue,
188
- thumbScaleAnimationDuration,
189
- value,
190
- setColor,
191
- returnedResults,
192
- onGestureEnd,
193
- onGestureChange,
194
- };
195
- return /*#__PURE__*/ _react.default.createElement(
196
- _reactNativeGestureHandler.GestureHandlerRootView,
197
- {
198
- style: [
199
- {
200
- direction: _utils.isWeb ? 'ltr' : undefined,
201
- },
202
- style,
203
- ],
204
- },
205
- /*#__PURE__*/ _react.default.createElement(
206
- _AppContext.PickerContextProvider,
177
+ return;
178
+ }
179
+
180
+ // hex color
181
+ if (newColorFormat === 'hex3' || newColorFormat === 'hex4' || newColorFormat === 'hex6' || newColorFormat === 'hex8') {
182
+ if (value !== currentColors.hex) setColor(value);
183
+ return;
184
+ }
185
+
186
+ // hsl | hsla | rgb | rgba | hsva | hsv | hwba | hwb
187
+ if (newColorFormat in currentColors) {
188
+ if (value !== currentColors[newColorFormat]) setColor(value);
189
+ return;
190
+ }
191
+ setColor(value);
192
+ }, [value]);
193
+ (0, _react.useImperativeHandle)(ref, () => ({
194
+ setColor,
195
+ }));
196
+ const ctxValue = {
197
+ hueValue,
198
+ saturationValue,
199
+ brightnessValue,
200
+ alphaValue,
201
+ adaptSpectrum,
202
+ sliderThickness,
203
+ thumbSize,
204
+ thumbShape,
205
+ boundedThumb,
206
+ thumbColor,
207
+ renderThumb,
208
+ thumbStyle,
209
+ thumbInnerStyle,
210
+ thumbScaleAnimationValue,
211
+ thumbScaleAnimationDuration,
212
+ value,
213
+ setColor,
214
+ colorResult,
215
+ onGestureEnd,
216
+ onGestureChange,
217
+ };
218
+ return /*#__PURE__*/ _react.default.createElement(
219
+ _reactNativeGestureHandler.GestureHandlerRootView,
220
+ {
221
+ style: [
207
222
  {
208
- value: ctxValue,
223
+ direction: _utils.isWeb ? 'ltr' : undefined,
209
224
  },
210
- children,
211
- ),
212
- );
213
- },
214
- );
225
+ style,
226
+ ],
227
+ },
228
+ /*#__PURE__*/ _react.default.createElement(
229
+ _AppContext.PickerContextProvider,
230
+ {
231
+ value: ctxValue,
232
+ },
233
+ children,
234
+ ),
235
+ );
236
+ }
237
+
238
+ /** @see [ColorPicker](https://alabsi91.github.io/reanimated-color-picker/api/color-picker-wrapper/) */
239
+ const ColorPicker = /*#__PURE__*/ (0, _react.forwardRef)(ColorPickerWrapper);
215
240
  var _default = (exports.default = ColorPicker);
@@ -34,8 +34,9 @@
34
34
  "global",
35
35
  "setImmediate",
36
36
  "setTimeout",
37
- "ColorPicker",
38
- "forwardRef",
37
+ "ColorPickerWrapper",
38
+ "props",
39
+ "ref",
39
40
  "adaptSpectrum",
40
41
  "sliderThickness",
41
42
  "thumbAnimationDuration",
@@ -49,6 +50,8 @@
49
50
  "thumbStyle",
50
51
  "thumbInnerStyle",
51
52
  "value",
53
+ "colorAnnouncementFormat",
54
+ "enableColorAnnouncements",
52
55
  "onChange",
53
56
  "onChangeJS",
54
57
  "onComplete",
@@ -57,7 +60,6 @@
57
60
  "children",
58
61
  "createElement",
59
62
  "Text",
60
- "ref",
61
63
  "initialColor",
62
64
  "useRef",
63
65
  "colorKit",
@@ -73,7 +75,7 @@
73
75
  "v",
74
76
  "alphaValue",
75
77
  "a",
76
- "returnedResults",
78
+ "colorResult",
77
79
  "inputColor",
78
80
  "color",
79
81
  "hex",
@@ -91,6 +93,9 @@
91
93
  "hwb",
92
94
  "HWB",
93
95
  "hwba",
96
+ "announceColor",
97
+ "AccessibilityInfo",
98
+ "announceForAccessibility",
94
99
  "onGestureEnd",
95
100
  "colorObject",
96
101
  "runOnJS",
@@ -108,14 +113,16 @@
108
113
  "direction",
109
114
  "undefined",
110
115
  "PickerContextProvider",
116
+ "ColorPicker",
117
+ "forwardRef",
111
118
  "_default",
112
119
  "exports"
113
120
  ],
114
121
  "sourceRoot": "../src",
115
122
  "sources": ["ColorPicker.tsx"],
116
123
  "sourcesContent": [
117
- "import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\nimport { Text } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\nimport { runOnJS, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport colorKit from './colorKit/index';\nimport { PickerContextProvider } from './AppContext';\nimport { isWeb } from './utils';\n\nimport type { ColorPickerContext, ColorPickerProps, ColorPickerRef } from './types';\nimport type { SupportedColorFormats } from './colorKit/types';\n\n// @ts-expect-error no global\nif (isWeb && !global.setImmediate) {\n // @ts-expect-error no global\n global.setImmediate = setTimeout;\n}\n\nconst ColorPicker = forwardRef<ColorPickerRef, ColorPickerProps>(\n (\n {\n adaptSpectrum = false,\n sliderThickness = 25,\n thumbAnimationDuration = 200,\n thumbSize = 35,\n thumbShape = 'ring',\n boundedThumb = false,\n thumbScaleAnimationValue = 1.2,\n thumbScaleAnimationDuration = 100,\n thumbColor,\n renderThumb,\n thumbStyle,\n thumbInnerStyle,\n value = '#fff',\n onChange,\n onChangeJS,\n onComplete,\n onCompleteJS,\n style = {},\n children = <Text>NO CHILDREN</Text>,\n },\n ref,\n ) => {\n const initialColor = useRef(colorKit.HSV(value).object(false)).current;\n // color's channels values.\n const hueValue = useSharedValue(initialColor.h);\n const saturationValue = useSharedValue(initialColor.s);\n const brightnessValue = useSharedValue(initialColor.v);\n const alphaValue = useSharedValue(initialColor.a);\n\n const returnedResults = (inputColor?: SupportedColorFormats) => {\n 'worklet';\n\n const color = inputColor ?? {\n h: hueValue.value,\n s: saturationValue.value,\n v: brightnessValue.value,\n a: alphaValue.value,\n };\n\n return {\n get hex() {\n return colorKit.runOnUI().HEX(color);\n },\n get rgb() {\n return colorKit.runOnUI().RGB(color).string(false);\n },\n get rgba() {\n return colorKit.runOnUI().RGB(color).string(true);\n },\n get hsl() {\n return colorKit.runOnUI().HSL(color).string(false);\n },\n get hsla() {\n return colorKit.runOnUI().HSL(color).string(true);\n },\n get hsv() {\n return colorKit.runOnUI().HSV(color).string(false);\n },\n get hsva() {\n return colorKit.runOnUI().HSV(color).string(true);\n },\n get hwb() {\n return colorKit.runOnUI().HWB(color).string(false);\n },\n get hwba() {\n return colorKit.runOnUI().HWB(color).string(true);\n },\n };\n };\n\n const onGestureEnd = (color?: SupportedColorFormats) => {\n 'worklet';\n\n if (!onComplete && !onCompleteJS) return;\n const colorObject = returnedResults(color);\n\n if (onComplete) onComplete(colorObject);\n if (onCompleteJS) runOnJS(onCompleteJS)(colorObject);\n };\n\n const onGestureChange = (color?: SupportedColorFormats) => {\n 'worklet';\n\n if (!onChange && !onChangeJS) return;\n const colorObject = returnedResults(color);\n\n if (onChange) onChange(colorObject);\n if (onChangeJS) runOnJS(onChangeJS)(colorObject);\n };\n\n const setColor = (color: SupportedColorFormats, duration = thumbAnimationDuration) => {\n const { h, s, v, a } = colorKit.HSV(color).object(false);\n\n hueValue.value = withTiming(h, { duration });\n saturationValue.value = withTiming(s, { duration });\n brightnessValue.value = withTiming(v, { duration });\n alphaValue.value = withTiming(a, { duration });\n };\n\n useEffect(() => {\n // Ignore value changes if the current color already matches the new color from the value props.\n const newColorFormat = colorKit.getFormat(value);\n const currentColors = returnedResults();\n\n // null or named color E.g \"red\"\n if (!newColorFormat || newColorFormat === 'named') {\n setColor(value);\n return;\n }\n\n // hex color\n if (newColorFormat === 'hex3' || newColorFormat === 'hex4' || newColorFormat === 'hex6' || newColorFormat === 'hex8') {\n if (value !== currentColors.hex) setColor(value);\n return;\n }\n\n // hsl | hsla | rgb | rgba | hsva | hsv | hwba | hwb\n if (newColorFormat in currentColors) {\n if (value !== currentColors[newColorFormat]) setColor(value);\n return;\n }\n\n setColor(value);\n }, [value]);\n\n useImperativeHandle(ref, () => ({ setColor }));\n\n const ctxValue: ColorPickerContext = {\n hueValue,\n saturationValue,\n brightnessValue,\n alphaValue,\n\n adaptSpectrum,\n\n sliderThickness,\n thumbSize,\n thumbShape,\n boundedThumb,\n thumbColor,\n renderThumb,\n thumbStyle,\n thumbInnerStyle,\n thumbScaleAnimationValue,\n thumbScaleAnimationDuration,\n\n value,\n setColor,\n\n returnedResults,\n onGestureEnd,\n onGestureChange,\n };\n\n return (\n <GestureHandlerRootView style={[{ direction: isWeb ? 'ltr' : undefined }, style]}>\n <PickerContextProvider value={ctxValue}>{children}</PickerContextProvider>\n </GestureHandlerRootView>\n );\n },\n);\n\nexport default ColorPicker;\n"
124
+ "import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\nimport { AccessibilityInfo, Text } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\nimport { runOnJS, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport colorKit from './colorKit/index';\nimport { PickerContextProvider } from './AppContext';\nimport { isWeb } from './utils';\n\nimport type { ColorPickerContext, ColorPickerProps, ColorPickerRef } from './types';\nimport type { SupportedColorFormats } from './colorKit/types';\n\n// @ts-expect-error no global\nif (isWeb && !global.setImmediate) {\n // @ts-expect-error no global\n global.setImmediate = setTimeout;\n}\n\nfunction ColorPickerWrapper(props: ColorPickerProps, ref: React.ForwardedRef<ColorPickerRef>) {\n const {\n adaptSpectrum = false,\n sliderThickness = 25,\n thumbAnimationDuration = 200,\n thumbSize = 35,\n thumbShape = 'ring',\n boundedThumb = false,\n thumbScaleAnimationValue = 1.2,\n thumbScaleAnimationDuration = 100,\n thumbColor,\n renderThumb,\n thumbStyle,\n thumbInnerStyle,\n value = '#fff',\n colorAnnouncementFormat = 'rgb',\n enableColorAnnouncements = true,\n onChange,\n onChangeJS,\n onComplete,\n onCompleteJS,\n style = {},\n children = <Text>NO CHILDREN</Text>,\n } = props;\n\n const initialColor = useRef(colorKit.HSV(value).object(false)).current;\n const hueValue = useSharedValue(initialColor.h);\n const saturationValue = useSharedValue(initialColor.s);\n const brightnessValue = useSharedValue(initialColor.v);\n const alphaValue = useSharedValue(initialColor.a);\n\n /**\n * Returns lazy getters for the provided color in multiple formats.\n *\n * @worklet\n */\n const colorResult = (inputColor?: SupportedColorFormats) => {\n 'worklet';\n\n const color = inputColor ?? {\n h: hueValue.value,\n s: saturationValue.value,\n v: brightnessValue.value,\n a: alphaValue.value,\n };\n\n return {\n get hex() {\n return colorKit.runOnUI().HEX(color);\n },\n get rgb() {\n return colorKit.runOnUI().RGB(color).string(false);\n },\n get rgba() {\n return colorKit.runOnUI().RGB(color).string(true);\n },\n get hsl() {\n return colorKit.runOnUI().HSL(color).string(false);\n },\n get hsla() {\n return colorKit.runOnUI().HSL(color).string(true);\n },\n get hsv() {\n return colorKit.runOnUI().HSV(color).string(false);\n },\n get hsva() {\n return colorKit.runOnUI().HSV(color).string(true);\n },\n get hwb() {\n return colorKit.runOnUI().HWB(color).string(false);\n },\n get hwba() {\n return colorKit.runOnUI().HWB(color).string(true);\n },\n };\n };\n\n const announceColor = (color: string) => {\n AccessibilityInfo.announceForAccessibility(color);\n };\n\n /** @worklet */\n const onGestureEnd = (color?: SupportedColorFormats) => {\n 'worklet';\n\n const colorObject = colorResult(color);\n\n if (enableColorAnnouncements && colorAnnouncementFormat in colorObject) {\n runOnJS(announceColor)(colorObject[colorAnnouncementFormat]);\n }\n\n if (onComplete) {\n onComplete(colorObject);\n }\n\n if (onCompleteJS) {\n runOnJS(onCompleteJS)(colorObject);\n }\n };\n\n /** @worklet */\n const onGestureChange = (color?: SupportedColorFormats) => {\n 'worklet';\n\n if (!onChange && !onChangeJS) {\n return;\n }\n\n const colorObject = colorResult(color);\n\n if (onChange) {\n onChange(colorObject);\n }\n\n if (onChangeJS) {\n runOnJS(onChangeJS)(colorObject);\n }\n };\n\n const setColor = (color: SupportedColorFormats, duration = thumbAnimationDuration) => {\n const { h, s, v, a } = colorKit.HSV(color).object(false);\n\n hueValue.value = withTiming(h, { duration });\n saturationValue.value = withTiming(s, { duration });\n brightnessValue.value = withTiming(v, { duration });\n alphaValue.value = withTiming(a, { duration });\n };\n\n useEffect(() => {\n // Ignore value changes if the current color already matches the new color from the value props.\n const newColorFormat = colorKit.getFormat(value);\n const currentColors = colorResult();\n\n // null or named color E.g \"red\"\n if (!newColorFormat || newColorFormat === 'named') {\n setColor(value);\n return;\n }\n\n // hex color\n if (newColorFormat === 'hex3' || newColorFormat === 'hex4' || newColorFormat === 'hex6' || newColorFormat === 'hex8') {\n if (value !== currentColors.hex) setColor(value);\n return;\n }\n\n // hsl | hsla | rgb | rgba | hsva | hsv | hwba | hwb\n if (newColorFormat in currentColors) {\n if (value !== currentColors[newColorFormat]) setColor(value);\n return;\n }\n\n setColor(value);\n }, [value]);\n\n useImperativeHandle(ref, () => ({ setColor }));\n\n const ctxValue: ColorPickerContext = {\n hueValue,\n saturationValue,\n brightnessValue,\n alphaValue,\n\n adaptSpectrum,\n\n sliderThickness,\n thumbSize,\n thumbShape,\n boundedThumb,\n thumbColor,\n renderThumb,\n thumbStyle,\n thumbInnerStyle,\n thumbScaleAnimationValue,\n thumbScaleAnimationDuration,\n\n value,\n setColor,\n\n colorResult,\n onGestureEnd,\n onGestureChange,\n };\n\n return (\n <GestureHandlerRootView style={[{ direction: isWeb ? 'ltr' : undefined }, style]}>\n <PickerContextProvider value={ctxValue}>{children}</PickerContextProvider>\n </GestureHandlerRootView>\n );\n}\n\n/** @see [ColorPicker](https://alabsi91.github.io/reanimated-color-picker/api/color-picker-wrapper/) */\nconst ColorPicker = forwardRef<ColorPickerRef, ColorPickerProps>(ColorPickerWrapper);\n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