react-native-reanimated 3.12.0-set-experimental → 3.12.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 (74) hide show
  1. package/Common/cpp/Fabric/ShadowTreeCloner.cpp +8 -6
  2. package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.cpp +0 -5
  3. package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.h +0 -1
  4. package/android/build.gradle +7 -0
  5. package/android/src/main/cpp/AndroidUIScheduler.cpp +3 -3
  6. package/android/src/main/cpp/AndroidUIScheduler.h +1 -1
  7. package/android/src/main/cpp/LayoutAnimations.cpp +0 -16
  8. package/android/src/main/cpp/LayoutAnimations.h +0 -4
  9. package/android/src/main/cpp/NativeProxy.cpp +0 -10
  10. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +2 -10
  11. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +0 -2
  12. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/NativeMethodsHolder.java +0 -2
  13. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +0 -26
  14. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedTransitionManager.java +26 -189
  15. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/Snapshot.java +0 -30
  16. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +2 -12
  17. package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +0 -8
  18. package/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/DevMenuUtils.java +18 -0
  19. package/android/src/reactNativeVersionPatch/ReactHost/latest/com/swmansion/reanimated/DevMenuUtils.java +34 -0
  20. package/apple/LayoutReanimation/REAAnimationsManager.h +0 -5
  21. package/apple/LayoutReanimation/REAAnimationsManager.m +2 -31
  22. package/apple/LayoutReanimation/REAScreensHelper.h +0 -7
  23. package/apple/LayoutReanimation/REAScreensHelper.m +4 -125
  24. package/apple/LayoutReanimation/REASharedTransitionManager.h +0 -6
  25. package/apple/LayoutReanimation/REASharedTransitionManager.m +59 -419
  26. package/apple/LayoutReanimation/REASwizzledUIManager.mm +0 -13
  27. package/apple/native/NativeProxy.mm +0 -12
  28. package/lib/module/reanimated2/Colors.js +70 -18
  29. package/lib/module/reanimated2/Colors.js.map +1 -1
  30. package/lib/module/reanimated2/component/FlatList.js.map +1 -1
  31. package/lib/module/reanimated2/hook/index.js +1 -0
  32. package/lib/module/reanimated2/hook/index.js.map +1 -1
  33. package/lib/module/reanimated2/hook/useComposedEventHandler.js +52 -0
  34. package/lib/module/reanimated2/hook/useComposedEventHandler.js.map +1 -0
  35. package/lib/module/reanimated2/hook/useScrollViewOffset.js +19 -30
  36. package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  37. package/lib/module/reanimated2/index.js +1 -1
  38. package/lib/module/reanimated2/index.js.map +1 -1
  39. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +1 -1
  40. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  41. package/lib/module/reanimated2/layoutReanimation/web/animationParser.js +0 -22
  42. package/lib/module/reanimated2/layoutReanimation/web/animationParser.js.map +1 -1
  43. package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js +12 -22
  44. package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js.map +1 -1
  45. package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js +4 -31
  46. package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js.map +1 -1
  47. package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js +7 -47
  48. package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js.map +1 -1
  49. package/lib/module/reanimated2/platform-specific/jsVersion.js +1 -1
  50. package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -1
  51. package/lib/typescript/reanimated2/Colors.d.ts +1 -0
  52. package/lib/typescript/reanimated2/component/FlatList.d.ts +4 -0
  53. package/lib/typescript/reanimated2/hook/index.d.ts +1 -0
  54. package/lib/typescript/reanimated2/hook/useComposedEventHandler.d.ts +11 -0
  55. package/lib/typescript/reanimated2/hook/useScrollViewOffset.d.ts +1 -1
  56. package/lib/typescript/reanimated2/index.d.ts +1 -1
  57. package/lib/typescript/reanimated2/layoutReanimation/web/animationParser.d.ts +0 -2
  58. package/lib/typescript/reanimated2/layoutReanimation/web/componentUtils.d.ts +2 -5
  59. package/lib/typescript/reanimated2/layoutReanimation/web/createAnimation.d.ts +2 -11
  60. package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
  61. package/package.json +3 -3
  62. package/src/reanimated2/Colors.ts +96 -15
  63. package/src/reanimated2/component/FlatList.tsx +4 -0
  64. package/src/reanimated2/hook/index.ts +1 -0
  65. package/src/reanimated2/hook/useComposedEventHandler.ts +80 -0
  66. package/src/reanimated2/hook/useScrollViewOffset.ts +25 -44
  67. package/src/reanimated2/index.ts +1 -0
  68. package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +1 -1
  69. package/src/reanimated2/layoutReanimation/web/animationParser.ts +0 -32
  70. package/src/reanimated2/layoutReanimation/web/animationsManager.ts +11 -37
  71. package/src/reanimated2/layoutReanimation/web/componentUtils.ts +4 -41
  72. package/src/reanimated2/layoutReanimation/web/createAnimation.ts +19 -86
  73. package/src/reanimated2/platform-specific/jsVersion.ts +1 -1
  74. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/TabNavigatorObserver.java +0 -112
@@ -10,19 +10,23 @@
10
10
  /* eslint no-bitwise: 0 */
11
11
  import { makeShareable } from './core';
12
12
  import { isAndroid, isWeb } from './PlatformChecker';
13
- // var INTEGER = '[-+]?\\d+';
14
- const NUMBER = '[-+]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)';
13
+ const NUMBER = '[-+]?\\d*\\.?\\d+';
15
14
  const PERCENTAGE = NUMBER + '%';
16
15
  function call(...args) {
17
- 'worklet';
18
-
16
+ return '\\(\\s*(' + args.join(')\\s*,?\\s*(') + ')\\s*\\)';
17
+ }
18
+ function callWithSlashSeparator(...args) {
19
+ return '\\(\\s*(' + args.slice(0, args.length - 1).join(')\\s*,?\\s*(') + ')\\s*/\\s*(' + args[args.length - 1] + ')\\s*\\)';
20
+ }
21
+ function commaSeparatedCall(...args) {
19
22
  return '\\(\\s*(' + args.join(')\\s*,\\s*(') + ')\\s*\\)';
20
23
  }
21
24
  const MATCHERS = {
22
25
  rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),
23
- rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),
26
+ rgba: new RegExp('rgba(' + commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) + '|' + callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER) + ')'),
24
27
  hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),
25
- hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),
28
+ hsla: new RegExp('hsla(' + commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) + '|' + callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) + ')'),
29
+ hwb: new RegExp('hwb' + call(NUMBER, PERCENTAGE, PERCENTAGE)),
26
30
  hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
27
31
  hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
28
32
  hex6: /^#([0-9a-fA-F]{6})$/,
@@ -58,6 +62,18 @@ function hslToRgb(h, s, l) {
58
62
  const b = hue2rgb(p, q, h - 1 / 3);
59
63
  return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
60
64
  }
65
+ function hwbToRgb(h, w, b) {
66
+ 'worklet';
67
+
68
+ if (w + b >= 1) {
69
+ const gray = Math.round(w * 255 / (w + b));
70
+ return gray << 24 | gray << 16 | gray << 8;
71
+ }
72
+ const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;
73
+ const green = hue2rgb(0, 1, h) * (1 - w - b) + w;
74
+ const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;
75
+ return Math.round(red * 255) << 24 | Math.round(green * 255) << 16 | Math.round(blue * 255) << 8;
76
+ }
61
77
  function parse255(str) {
62
78
  'worklet';
63
79
 
@@ -257,7 +273,7 @@ const names = makeShareable({
257
273
 
258
274
  // copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes
259
275
  export const ColorProperties = makeShareable(['backgroundColor', 'borderBottomColor', 'borderColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'borderStartColor', 'borderEndColor', 'borderBlockColor', 'borderBlockEndColor', 'borderBlockStartColor', 'color', 'shadowColor', 'textDecorationColor', 'tintColor', 'textShadowColor', 'overlayColor']);
260
- function normalizeColor(color) {
276
+ export function normalizeColor(color) {
261
277
  'worklet';
262
278
 
263
279
  if (typeof color === 'number') {
@@ -291,16 +307,29 @@ function normalizeColor(color) {
291
307
  );
292
308
  }
293
309
  if (match = MATCHERS.rgba.exec(color)) {
294
- return (
295
- // b
296
- (parse255(match[1]) << 24 |
310
+ // rgba(R G B / A) notation
311
+ if (match[6] !== undefined) {
312
+ return (parse255(match[6]) << 24 |
297
313
  // r
298
- parse255(match[2]) << 16 |
314
+ parse255(match[7]) << 16 |
299
315
  // g
300
- parse255(match[3]) << 8 | parse1(match[4])) >>>
316
+ parse255(match[8]) << 8 |
317
+ // b
318
+ parse1(match[9])) >>>
301
319
  // a
302
- 0
303
- );
320
+ 0;
321
+ }
322
+
323
+ // rgba(R, G, B, A) notation
324
+ return (parse255(match[2]) << 24 |
325
+ // r
326
+ parse255(match[3]) << 16 |
327
+ // g
328
+ parse255(match[4]) << 8 |
329
+ // b
330
+ parse1(match[5])) >>>
331
+ // a
332
+ 0;
304
333
  }
305
334
  if (match = MATCHERS.hex3.exec(color)) {
306
335
  return Number.parseInt(match[1] + match[1] +
@@ -340,12 +369,35 @@ function normalizeColor(color) {
340
369
  0;
341
370
  }
342
371
  if (match = MATCHERS.hsla.exec(color)) {
343
- return (hslToRgb(parse360(match[1]),
372
+ // hsla(H S L / A) notation
373
+ if (match[6] !== undefined) {
374
+ return (hslToRgb(parse360(match[6]),
375
+ // h
376
+ parsePercentage(match[7]),
377
+ // s
378
+ parsePercentage(match[8]) // l
379
+ ) | parse1(match[9])) >>>
380
+ // a
381
+ 0;
382
+ }
383
+
384
+ // hsla(H, S, L, A) notation
385
+ return (hslToRgb(parse360(match[2]),
344
386
  // h
345
- parsePercentage(match[2]),
387
+ parsePercentage(match[3]),
346
388
  // s
347
- parsePercentage(match[3]) // l
348
- ) | parse1(match[4])) >>>
389
+ parsePercentage(match[4]) // l
390
+ ) | parse1(match[5])) >>>
391
+ // a
392
+ 0;
393
+ }
394
+ if (match = MATCHERS.hwb.exec(color)) {
395
+ return (hwbToRgb(parse360(match[1]),
396
+ // h
397
+ parsePercentage(match[2]),
398
+ // w
399
+ parsePercentage(match[3]) // b
400
+ ) | 0x000000ff) >>>
349
401
  // a
350
402
  0;
351
403
  }
@@ -1 +1 @@
1
- {"version":3,"names":["makeShareable","isAndroid","isWeb","NUMBER","PERCENTAGE","call","args","join","MATCHERS","rgb","RegExp","rgba","hsl","hsla","hex3","hex4","hex6","hex8","hue2rgb","p","q","t","hslToRgb","h","s","l","r","g","b","Math","round","parse255","str","int","Number","parseInt","parse360","parseFloat","parse1","num","parsePercentage","names","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","ColorProperties","normalizeColor","color","match","exec","undefined","opacity","c","IS_WEB","IS_ANDROID","rgbaColor","alpha","_WORKLET","RGBtoHSV","max","min","d","v","HSVtoRGB","i","floor","f","hsvToColor","a","processColorInitially","normalizedColor","isColor","value","processColor","processColorsInProps","props","key","includes","convertToRGBA","processedColor","rgbaArrayToRGBAColor","RGBA","toLinearSpace","gamma","res","push","pow","toGammaSpace"],"sources":["Colors.ts"],"sourcesContent":["'use strict';\n/**\n * Copied from:\n * react-native/Libraries/StyleSheet/normalizeColor.js\n * react-native/Libraries/StyleSheet/processColor.js\n * https://github.com/wcandillon/react-native-redash/blob/master/src/Colors.ts\n */\n\n/* eslint no-bitwise: 0 */\nimport type { StyleProps } from './commonTypes';\nimport { makeShareable } from './core';\nimport { isAndroid, isWeb } from './PlatformChecker';\n\ninterface RGB {\n r: number;\n g: number;\n b: number;\n}\n\ninterface HSV {\n h: number;\n s: number;\n v: number;\n}\n\n// var INTEGER = '[-+]?\\\\d+';\nconst NUMBER = '[-+]?(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args: unknown[]): string {\n 'worklet';\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nconst MATCHERS = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n};\n\nfunction hue2rgb(p: number, q: number, t: number): number {\n 'worklet';\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h: number, s: number, l: number): number {\n 'worklet';\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction parse255(str: string): number {\n 'worklet';\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str: string): number {\n 'worklet';\n const int = Number.parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str: string): number {\n 'worklet';\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str: string): number {\n 'worklet';\n // parseFloat conveniently ignores the final %\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nconst names: Record<string, number> = makeShareable({\n transparent: 0x00000000,\n\n // http://www.w3.org/TR/css3-color/#svg-color\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n});\n\n// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes\nexport const ColorProperties = makeShareable([\n 'backgroundColor',\n 'borderBottomColor',\n 'borderColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderTopColor',\n 'borderStartColor',\n 'borderEndColor',\n 'borderBlockColor',\n 'borderBlockEndColor',\n 'borderBlockStartColor',\n 'color',\n 'shadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'textShadowColor',\n 'overlayColor',\n]);\n\nfunction normalizeColor(color: unknown): number | null {\n 'worklet';\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n let match: RegExpExecArray | null | undefined;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = MATCHERS.hex6.exec(color))) {\n return Number.parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names[color] !== undefined) {\n return names[color];\n }\n\n if ((match = MATCHERS.rgb.exec(color))) {\n return (\n // b\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.rgba.exec(color))) {\n return (\n // b\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) |\n parse1(match[4])) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hex3.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = MATCHERS.hex8.exec(color))) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = MATCHERS.hex4.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16\n ) >>> 0\n );\n }\n\n if ((match = MATCHERS.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hsla.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4])) >>> // a\n 0\n );\n }\n\n return null;\n}\n\nexport const opacity = (c: number): number => {\n 'worklet';\n return ((c >> 24) & 255) / 255;\n};\n\nexport const red = (c: number): number => {\n 'worklet';\n return (c >> 16) & 255;\n};\n\nexport const green = (c: number): number => {\n 'worklet';\n return (c >> 8) & 255;\n};\n\nexport const blue = (c: number): number => {\n 'worklet';\n return c & 255;\n};\n\nconst IS_WEB = isWeb();\nconst IS_ANDROID = isAndroid();\n\nexport const rgbaColor = (\n r: number,\n g: number,\n b: number,\n alpha = 1\n): number | string => {\n 'worklet';\n if (IS_WEB || !_WORKLET) {\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n const c =\n Math.round(alpha * 255) * (1 << 24) +\n Math.round(r) * (1 << 16) +\n Math.round(g) * (1 << 8) +\n Math.round(b);\n if (IS_ANDROID) {\n // on Android color is represented as signed 32 bit int\n return c < (1 << 31) >>> 0 ? c : c - 4294967296; // 4294967296 == Math.pow(2, 32);\n }\n return c;\n};\n\n/**\n *\n * @param r - red value (0-255)\n * @param g - green value (0-255)\n * @param b - blue value (0-255)\n * @returns \\{h: hue (0-1), s: saturation (0-1), v: value (0-1)\\}\n */\nexport function RGBtoHSV(r: number, g: number, b: number): HSV {\n 'worklet';\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n const v = max / 255;\n\n let h = 0;\n\n switch (max) {\n case min:\n break;\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n }\n\n return { h, s, v };\n}\n\n/**\n *\n * @param h - hue (0-1)\n * @param s - saturation (0-1)\n * @param v - value (0-1)\n * @returns \\{r: red (0-255), g: green (0-255), b: blue (0-255)\\}\n */\nfunction HSVtoRGB(h: number, s: number, v: number): RGB {\n 'worklet';\n let r, g, b;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n switch ((i % 6) as 0 | 1 | 2 | 3 | 4 | 5) {\n case 0:\n [r, g, b] = [v, t, p];\n break;\n case 1:\n [r, g, b] = [q, v, p];\n break;\n case 2:\n [r, g, b] = [p, v, t];\n break;\n case 3:\n [r, g, b] = [p, q, v];\n break;\n case 4:\n [r, g, b] = [t, p, v];\n break;\n case 5:\n [r, g, b] = [v, p, q];\n break;\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n };\n}\n\nexport const hsvToColor = (\n h: number,\n s: number,\n v: number,\n a: number\n): number | string => {\n 'worklet';\n const { r, g, b } = HSVtoRGB(h, s, v);\n return rgbaColor(r, g, b, a);\n};\n\nfunction processColorInitially(color: unknown): number | null | undefined {\n 'worklet';\n if (color === null || color === undefined || typeof color === 'number') {\n return color;\n }\n\n let normalizedColor = normalizeColor(color);\n\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb\n return normalizedColor;\n}\n\nexport function isColor(value: unknown): boolean {\n 'worklet';\n if (typeof value !== 'string') {\n return false;\n }\n return processColorInitially(value) != null;\n}\n\nexport function processColor(color: unknown): number | null | undefined {\n 'worklet';\n let normalizedColor = processColorInitially(color);\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n if (IS_ANDROID) {\n // Android use 32 bit *signed* integer to represent the color\n // We utilize the fact that bitwise operations in JS also operates on\n // signed 32 bit integers, so that we can use those to convert from\n // *unsigned* to *signed* 32bit int that way.\n normalizedColor = normalizedColor | 0x0;\n }\n\n return normalizedColor;\n}\n\nexport function processColorsInProps(props: StyleProps) {\n 'worklet';\n for (const key in props) {\n if (ColorProperties.includes(key)) {\n props[key] = processColor(props[key]);\n }\n }\n}\n\nexport type ParsedColorArray = [number, number, number, number];\n\nexport function convertToRGBA(color: unknown): ParsedColorArray {\n 'worklet';\n const processedColor = processColorInitially(color)!; // argb;\n const a = (processedColor >>> 24) / 255;\n const r = ((processedColor << 8) >>> 24) / 255;\n const g = ((processedColor << 16) >>> 24) / 255;\n const b = ((processedColor << 24) >>> 24) / 255;\n return [r, g, b, a];\n}\n\nexport function rgbaArrayToRGBAColor(RGBA: ParsedColorArray): string {\n 'worklet';\n return `rgba(${Math.round(RGBA[0] * 255)}, ${Math.round(\n RGBA[1] * 255\n )}, ${Math.round(RGBA[2] * 255)}, ${RGBA[3]})`;\n}\n\nexport function toLinearSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n\nexport function toGammaSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], 1 / gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEA,SAASA,aAAa,QAAQ,QAAQ;AACtC,SAASC,SAAS,EAAEC,KAAK,QAAQ,mBAAmB;AAcpD;AACA,MAAMC,MAAM,GAAG,mCAAmC;AAClD,MAAMC,UAAU,GAAGD,MAAM,GAAG,GAAG;AAE/B,SAASE,IAAIA,CAAC,GAAGC,IAAe,EAAU;EACxC,SAAS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;;EACT,MAAMC,GAAG,GAAG,EAAE;EACd,KAAK,IAAIpB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAE,EAAEA,CAAC,EAAE;IAC1BoB,GAAG,CAACC,IAAI,CAAC3M,IAAI,CAAC4M,GAAG,CAACL,IAAI,CAACjB,CAAC,CAAC,EAAE,CAAC,GAAGmB,KAAK,CAAC,CAAC;EACxC;EACAC,GAAG,CAACC,IAAI,CAACJ,IAAI,CAAC,CAAC,CAAC,CAAC;EACjB,OAAOG,GAAG;AACZ","ignoreList":[]}
1
+ {"version":3,"names":["makeShareable","isAndroid","isWeb","NUMBER","PERCENTAGE","call","args","join","callWithSlashSeparator","slice","length","commaSeparatedCall","MATCHERS","rgb","RegExp","rgba","hsl","hsla","hwb","hex3","hex4","hex6","hex8","hue2rgb","p","q","t","hslToRgb","h","s","l","r","g","b","Math","round","hwbToRgb","w","gray","red","green","blue","parse255","str","int","Number","parseInt","parse360","parseFloat","parse1","num","parsePercentage","names","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","ColorProperties","normalizeColor","color","match","exec","undefined","opacity","c","IS_WEB","IS_ANDROID","rgbaColor","alpha","_WORKLET","RGBtoHSV","max","min","d","v","HSVtoRGB","i","floor","f","hsvToColor","a","processColorInitially","normalizedColor","isColor","value","processColor","processColorsInProps","props","key","includes","convertToRGBA","processedColor","rgbaArrayToRGBAColor","RGBA","toLinearSpace","gamma","res","push","pow","toGammaSpace"],"sources":["Colors.ts"],"sourcesContent":["'use strict';\n/**\n * Copied from:\n * react-native/Libraries/StyleSheet/normalizeColor.js\n * react-native/Libraries/StyleSheet/processColor.js\n * https://github.com/wcandillon/react-native-redash/blob/master/src/Colors.ts\n */\n\n/* eslint no-bitwise: 0 */\nimport type { StyleProps } from './commonTypes';\nimport { makeShareable } from './core';\nimport { isAndroid, isWeb } from './PlatformChecker';\n\ninterface RGB {\n r: number;\n g: number;\n b: number;\n}\n\ninterface HSV {\n h: number;\n s: number;\n v: number;\n}\n\nconst NUMBER: string = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args: (RegExp | string)[]) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,?\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callWithSlashSeparator(...args: (RegExp | string)[]) {\n return (\n '\\\\(\\\\s*(' +\n args.slice(0, args.length - 1).join(')\\\\s*,?\\\\s*(') +\n ')\\\\s*/\\\\s*(' +\n args[args.length - 1] +\n ')\\\\s*\\\\)'\n );\n}\n\nfunction commaSeparatedCall(...args: (RegExp | string)[]) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nconst MATCHERS = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp(\n 'rgba(' +\n commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER) +\n ')'\n ),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp(\n 'hsla(' +\n commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n ')'\n ),\n hwb: new RegExp('hwb' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n};\n\nfunction hue2rgb(p: number, q: number, t: number): number {\n 'worklet';\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h: number, s: number, l: number): number {\n 'worklet';\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction hwbToRgb(h: number, w: number, b: number): number {\n 'worklet';\n if (w + b >= 1) {\n const gray = Math.round((w * 255) / (w + b));\n\n return (gray << 24) | (gray << 16) | (gray << 8);\n }\n\n const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;\n const green = hue2rgb(0, 1, h) * (1 - w - b) + w;\n const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;\n\n return (\n (Math.round(red * 255) << 24) |\n (Math.round(green * 255) << 16) |\n (Math.round(blue * 255) << 8)\n );\n}\n\nfunction parse255(str: string): number {\n 'worklet';\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str: string): number {\n 'worklet';\n const int = Number.parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str: string): number {\n 'worklet';\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str: string): number {\n 'worklet';\n // parseFloat conveniently ignores the final %\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nconst names: Record<string, number> = makeShareable({\n transparent: 0x00000000,\n\n // http://www.w3.org/TR/css3-color/#svg-color\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n});\n\n// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes\nexport const ColorProperties = makeShareable([\n 'backgroundColor',\n 'borderBottomColor',\n 'borderColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderTopColor',\n 'borderStartColor',\n 'borderEndColor',\n 'borderBlockColor',\n 'borderBlockEndColor',\n 'borderBlockStartColor',\n 'color',\n 'shadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'textShadowColor',\n 'overlayColor',\n]);\n\nexport function normalizeColor(color: unknown): number | null {\n 'worklet';\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n let match: RegExpExecArray | null | undefined;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = MATCHERS.hex6.exec(color))) {\n return Number.parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names[color] !== undefined) {\n return names[color];\n }\n\n if ((match = MATCHERS.rgb.exec(color))) {\n return (\n // b\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.rgba.exec(color))) {\n // rgba(R G B / A) notation\n if (match[6] !== undefined) {\n return (\n ((parse255(match[6]) << 24) | // r\n (parse255(match[7]) << 16) | // g\n (parse255(match[8]) << 8) | // b\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // rgba(R, G, B, A) notation\n return (\n ((parse255(match[2]) << 24) | // r\n (parse255(match[3]) << 16) | // g\n (parse255(match[4]) << 8) | // b\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hex3.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = MATCHERS.hex8.exec(color))) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = MATCHERS.hex4.exec(color))) {\n return (\n Number.parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16\n ) >>> 0\n );\n }\n\n if ((match = MATCHERS.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hsla.exec(color))) {\n // hsla(H S L / A) notation\n if (match[6] !== undefined) {\n return (\n (hslToRgb(\n parse360(match[6]), // h\n parsePercentage(match[7]), // s\n parsePercentage(match[8]) // l\n ) |\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // hsla(H, S, L, A) notation\n return (\n (hslToRgb(\n parse360(match[2]), // h\n parsePercentage(match[3]), // s\n parsePercentage(match[4]) // l\n ) |\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = MATCHERS.hwb.exec(color))) {\n return (\n (hwbToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // w\n parsePercentage(match[3]) // b\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n return null;\n}\n\nexport const opacity = (c: number): number => {\n 'worklet';\n return ((c >> 24) & 255) / 255;\n};\n\nexport const red = (c: number): number => {\n 'worklet';\n return (c >> 16) & 255;\n};\n\nexport const green = (c: number): number => {\n 'worklet';\n return (c >> 8) & 255;\n};\n\nexport const blue = (c: number): number => {\n 'worklet';\n return c & 255;\n};\n\nconst IS_WEB = isWeb();\nconst IS_ANDROID = isAndroid();\n\nexport const rgbaColor = (\n r: number,\n g: number,\n b: number,\n alpha = 1\n): number | string => {\n 'worklet';\n if (IS_WEB || !_WORKLET) {\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n const c =\n Math.round(alpha * 255) * (1 << 24) +\n Math.round(r) * (1 << 16) +\n Math.round(g) * (1 << 8) +\n Math.round(b);\n if (IS_ANDROID) {\n // on Android color is represented as signed 32 bit int\n return c < (1 << 31) >>> 0 ? c : c - 4294967296; // 4294967296 == Math.pow(2, 32);\n }\n return c;\n};\n\n/**\n *\n * @param r - red value (0-255)\n * @param g - green value (0-255)\n * @param b - blue value (0-255)\n * @returns \\{h: hue (0-1), s: saturation (0-1), v: value (0-1)\\}\n */\nexport function RGBtoHSV(r: number, g: number, b: number): HSV {\n 'worklet';\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n const v = max / 255;\n\n let h = 0;\n\n switch (max) {\n case min:\n break;\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n }\n\n return { h, s, v };\n}\n\n/**\n *\n * @param h - hue (0-1)\n * @param s - saturation (0-1)\n * @param v - value (0-1)\n * @returns \\{r: red (0-255), g: green (0-255), b: blue (0-255)\\}\n */\nfunction HSVtoRGB(h: number, s: number, v: number): RGB {\n 'worklet';\n let r, g, b;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n switch ((i % 6) as 0 | 1 | 2 | 3 | 4 | 5) {\n case 0:\n [r, g, b] = [v, t, p];\n break;\n case 1:\n [r, g, b] = [q, v, p];\n break;\n case 2:\n [r, g, b] = [p, v, t];\n break;\n case 3:\n [r, g, b] = [p, q, v];\n break;\n case 4:\n [r, g, b] = [t, p, v];\n break;\n case 5:\n [r, g, b] = [v, p, q];\n break;\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n };\n}\n\nexport const hsvToColor = (\n h: number,\n s: number,\n v: number,\n a: number\n): number | string => {\n 'worklet';\n const { r, g, b } = HSVtoRGB(h, s, v);\n return rgbaColor(r, g, b, a);\n};\n\nfunction processColorInitially(color: unknown): number | null | undefined {\n 'worklet';\n if (color === null || color === undefined || typeof color === 'number') {\n return color;\n }\n\n let normalizedColor = normalizeColor(color);\n\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb\n return normalizedColor;\n}\n\nexport function isColor(value: unknown): boolean {\n 'worklet';\n if (typeof value !== 'string') {\n return false;\n }\n return processColorInitially(value) != null;\n}\n\nexport function processColor(color: unknown): number | null | undefined {\n 'worklet';\n let normalizedColor = processColorInitially(color);\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n if (IS_ANDROID) {\n // Android use 32 bit *signed* integer to represent the color\n // We utilize the fact that bitwise operations in JS also operates on\n // signed 32 bit integers, so that we can use those to convert from\n // *unsigned* to *signed* 32bit int that way.\n normalizedColor = normalizedColor | 0x0;\n }\n\n return normalizedColor;\n}\n\nexport function processColorsInProps(props: StyleProps) {\n 'worklet';\n for (const key in props) {\n if (ColorProperties.includes(key)) {\n props[key] = processColor(props[key]);\n }\n }\n}\n\nexport type ParsedColorArray = [number, number, number, number];\n\nexport function convertToRGBA(color: unknown): ParsedColorArray {\n 'worklet';\n const processedColor = processColorInitially(color)!; // argb;\n const a = (processedColor >>> 24) / 255;\n const r = ((processedColor << 8) >>> 24) / 255;\n const g = ((processedColor << 16) >>> 24) / 255;\n const b = ((processedColor << 24) >>> 24) / 255;\n return [r, g, b, a];\n}\n\nexport function rgbaArrayToRGBAColor(RGBA: ParsedColorArray): string {\n 'worklet';\n return `rgba(${Math.round(RGBA[0] * 255)}, ${Math.round(\n RGBA[1] * 255\n )}, ${Math.round(RGBA[2] * 255)}, ${RGBA[3]})`;\n}\n\nexport function toLinearSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n\nexport function toGammaSpace(\n RGBA: ParsedColorArray,\n gamma = 2.2\n): ParsedColorArray {\n 'worklet';\n const res = [];\n for (let i = 0; i < 3; ++i) {\n res.push(Math.pow(RGBA[i], 1 / gamma));\n }\n res.push(RGBA[3]);\n return res as ParsedColorArray;\n}\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEA,SAASA,aAAa,QAAQ,QAAQ;AACtC,SAASC,SAAS,EAAEC,KAAK,QAAQ,mBAAmB;AAcpD,MAAMC,MAAc,GAAG,mBAAmB;AAC1C,MAAMC,UAAU,GAAGD,MAAM,GAAG,GAAG;AAE/B,SAASE,IAAIA,CAAC,GAAGC,IAAyB,EAAE;EAC1C,OAAO,UAAU,GAAGA,IAAI,CAACC,IAAI,CAAC,cAAc,CAAC,GAAG,UAAU;AAC5D;AAEA,SAASC,sBAAsBA,CAAC,GAAGF,IAAyB,EAAE;EAC5D,OACE,UAAU,GACVA,IAAI,CAACG,KAAK,CAAC,CAAC,EAAEH,IAAI,CAACI,MAAM,GAAG,CAAC,CAAC,CAACH,IAAI,CAAC,cAAc,CAAC,GACnD,aAAa,GACbD,IAAI,CAACA,IAAI,CAACI,MAAM,GAAG,CAAC,CAAC,GACrB,UAAU;AAEd;AAEA,SAASC,kBAAkBA,CAAC,GAAGL,IAA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pB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAE,EAAEA,CAAC,EAAE;IAC1BoB,GAAG,CAACC,IAAI,CAAC7M,IAAI,CAAC8M,GAAG,CAACL,IAAI,CAACjB,CAAC,CAAC,EAAE,CAAC,GAAGmB,KAAK,CAAC,CAAC;EACxC;EACAC,GAAG,CAACC,IAAI,CAACJ,IAAI,CAAC,CAAC,CAAC,CAAC;EACjB,OAAOG,GAAG;AACZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","React","forwardRef","useRef","FlatList","AnimatedView","createAnimatedComponent","LayoutAnimationConfig","AnimatedFlatList","createCellRendererComponent","itemLayoutAnimationRef","CellRendererComponent","props","createElement","layout","current","onLayout","style","children","FlatListForwardRefRender","ref","itemLayoutAnimation","skipEnteringExitingAnimations","restProps","scrollEventThrottle","useMemo","animatedFlatList","undefined","skipEntering","skipExiting","ReanimatedFlatList"],"sources":["FlatList.tsx"],"sourcesContent":["'use strict';\nimport React, { forwardRef, useRef } from 'react';\nimport type {\n FlatListProps,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport { FlatList } from 'react-native';\nimport { AnimatedView } from './View';\nimport { createAnimatedComponent } from '../../createAnimatedComponent';\nimport type { ILayoutAnimationBuilder } from '../layoutReanimation/animationBuilder/commonTypes';\nimport { LayoutAnimationConfig } from './LayoutAnimationConfig';\nimport type { AnimatedProps, AnimatedStyle } from '../helperTypes';\n\nconst AnimatedFlatList = createAnimatedComponent(FlatList);\n\ninterface CellRendererComponentProps {\n onLayout?: ((event: LayoutChangeEvent) => void) | undefined;\n children: React.ReactNode;\n style?: StyleProp<AnimatedStyle<ViewStyle>>;\n}\n\nconst createCellRendererComponent = (\n itemLayoutAnimationRef?: React.MutableRefObject<\n ILayoutAnimationBuilder | undefined\n >\n) => {\n const CellRendererComponent = (props: CellRendererComponentProps) => {\n return (\n <AnimatedView\n // TODO TYPESCRIPT This is temporary cast is to get rid of .d.ts file.\n layout={itemLayoutAnimationRef?.current as any}\n onLayout={props.onLayout}\n style={props.style}>\n {props.children}\n </AnimatedView>\n );\n };\n\n return CellRendererComponent;\n};\n\ninterface ReanimatedFlatListPropsWithLayout<T>\n extends AnimatedProps<FlatListProps<T>> {\n /**\n * Lets you pass layout animation directly to the FlatList item.\n */\n itemLayoutAnimation?: ILayoutAnimationBuilder;\n /**\n * Lets you skip entering and exiting animations of FlatList items when on FlatList mount or unmount.\n */\n skipEnteringExitingAnimations?: boolean;\n}\n\nexport type FlatListPropsWithLayout<T> = ReanimatedFlatListPropsWithLayout<T>;\n\n// Since createAnimatedComponent return type is ComponentClass that has the props of the argument,\n// but not things like NativeMethods, etc. we need to add them manually by extending the type.\ninterface AnimatedFlatListComplement<T> extends FlatList<T> {\n getNode(): FlatList<T>;\n}\n\n// We need explicit any here, because this is the exact same type that is used in React Native types.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst FlatListForwardRefRender = function <Item = any>(\n props: ReanimatedFlatListPropsWithLayout<Item>,\n ref: React.ForwardedRef<FlatList>\n) {\n const { itemLayoutAnimation, skipEnteringExitingAnimations, ...restProps } =\n props;\n\n // Set default scrollEventThrottle, because user expects\n // to have continuous scroll events and\n // react-native defaults it to 50 for FlatLists.\n // We set it to 1, so we have peace until\n // there are 960 fps screens.\n if (!('scrollEventThrottle' in restProps)) {\n restProps.scrollEventThrottle = 1;\n }\n\n const itemLayoutAnimationRef = useRef(itemLayoutAnimation);\n itemLayoutAnimationRef.current = itemLayoutAnimation;\n\n const CellRendererComponent = React.useMemo(\n () => createCellRendererComponent(itemLayoutAnimationRef),\n [itemLayoutAnimationRef]\n );\n\n const animatedFlatList = (\n // @ts-expect-error In its current type state, createAnimatedComponent cannot create generic components.\n <AnimatedFlatList\n ref={ref}\n {...restProps}\n CellRendererComponent={CellRendererComponent}\n />\n );\n\n if (skipEnteringExitingAnimations === undefined) {\n return animatedFlatList;\n }\n\n return (\n <LayoutAnimationConfig skipEntering skipExiting>\n {animatedFlatList}\n </LayoutAnimationConfig>\n );\n};\n\nexport const ReanimatedFlatList = forwardRef(FlatListForwardRefRender) as <\n // We need explicit any here, because this is the exact same type that is used in React Native types.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ItemT = any\n>(\n props: ReanimatedFlatListPropsWithLayout<ItemT> & {\n ref?: React.ForwardedRef<FlatList>;\n }\n) => React.ReactElement;\n\nexport type ReanimatedFlatList<T> = typeof AnimatedFlatList &\n AnimatedFlatListComplement<T>;\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AACb,OAAOQ,KAAK,IAAIC,UAAU,EAAEC,MAAM,QAAQ,OAAO;AAOjD,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,YAAY,QAAQ,QAAQ;AACrC,SAASC,uBAAuB,QAAQ,+BAA+B;AAEvE,SAASC,qBAAqB,QAAQ,yBAAyB;AAG/D,MAAMC,gBAAgB,GAAGF,uBAAuB,CAACF,QAAQ,CAAC;AAQ1D,MAAMK,2BAA2B,GAC/BC,sBAEC,IACE;EACH,MAAMC,qBAAqB,GAAIC,KAAiC,IAAK;IACnE,oBACEX,KAAA,CAAAY,aAAA,CAACR;IACC;IAAA;MACAS,MAAM,EAAEJ,sBAAsB,aAAtBA,sBAAsB,uBAAtBA,sBAAsB,CAAEK,OAAe;MAC/CC,QAAQ,EAAEJ,KAAK,CAACI,QAAS;MACzBC,KAAK,EAAEL,KAAK,CAACK;IAAM,GAClBL,KAAK,CAACM,QACK,CAAC;EAEnB,CAAC;EAED,OAAOP,qBAAqB;AAC9B,CAAC;;AAgBD;AACA;;AAKA;AACA;AACA,MAAMQ,wBAAwB,GAAG,SAAAA,CAC/BP,KAA8C,EAC9CQ,GAAiC,EACjC;EACA,MAAM;IAAEC,mBAAmB;IAAEC,6BAA6B;IAAE,GAAGC;EAAU,CAAC,GACxEX,KAAK;;EAEP;EACA;EACA;EACA;EACA;EACA,IAAI,EAAE,qBAAqB,IAAIW,SAAS,CAAC,EAAE;IACzCA,SAAS,CAACC,mBAAmB,GAAG,CAAC;EACnC;EAEA,MAAMd,sBAAsB,GAAGP,MAAM,CAACkB,mBAAmB,CAAC;EAC1DX,sBAAsB,CAACK,OAAO,GAAGM,mBAAmB;EAEpD,MAAMV,qBAAqB,GAAGV,KAAK,CAACwB,OAAO,CACzC,MAAMhB,2BAA2B,CAACC,sBAAsB,CAAC,EACzD,CAACA,sBAAsB,CACzB,CAAC;EAED,MAAMgB,gBAAgB;EAAA;EACpB;EACAzB,KAAA,CAAAY,aAAA,CAACL,gBAAgB,EAAArB,QAAA;IACfiC,GAAG,EAAEA;EAAI,GACLG,SAAS;IACbZ,qBAAqB,EAAEA;EAAsB,EAC9C,CACF;EAED,IAAIW,6BAA6B,KAAKK,SAAS,EAAE;IAC/C,OAAOD,gBAAgB;EACzB;EAEA,oBACEzB,KAAA,CAAAY,aAAA,CAACN,qBAAqB;IAACqB,YAAY;IAACC,WAAW;EAAA,GAC5CH,gBACoB,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMI,kBAAkB,gBAAG5B,UAAU,CAACiB,wBAAwB,CAQ9C","ignoreList":[]}
1
+ {"version":3,"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","React","forwardRef","useRef","FlatList","AnimatedView","createAnimatedComponent","LayoutAnimationConfig","AnimatedFlatList","createCellRendererComponent","itemLayoutAnimationRef","CellRendererComponent","props","createElement","layout","current","onLayout","style","children","FlatListForwardRefRender","ref","itemLayoutAnimation","skipEnteringExitingAnimations","restProps","scrollEventThrottle","useMemo","animatedFlatList","undefined","skipEntering","skipExiting","ReanimatedFlatList"],"sources":["FlatList.tsx"],"sourcesContent":["'use strict';\nimport React, { forwardRef, useRef } from 'react';\nimport type {\n FlatListProps,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport { FlatList } from 'react-native';\nimport { AnimatedView } from './View';\nimport { createAnimatedComponent } from '../../createAnimatedComponent';\nimport type { ILayoutAnimationBuilder } from '../layoutReanimation/animationBuilder/commonTypes';\nimport { LayoutAnimationConfig } from './LayoutAnimationConfig';\nimport type { AnimatedProps, AnimatedStyle } from '../helperTypes';\n\nconst AnimatedFlatList = createAnimatedComponent(FlatList);\n\ninterface CellRendererComponentProps {\n onLayout?: ((event: LayoutChangeEvent) => void) | undefined;\n children: React.ReactNode;\n style?: StyleProp<AnimatedStyle<ViewStyle>>;\n}\n\nconst createCellRendererComponent = (\n itemLayoutAnimationRef?: React.MutableRefObject<\n ILayoutAnimationBuilder | undefined\n >\n) => {\n const CellRendererComponent = (props: CellRendererComponentProps) => {\n return (\n <AnimatedView\n // TODO TYPESCRIPT This is temporary cast is to get rid of .d.ts file.\n layout={itemLayoutAnimationRef?.current as any}\n onLayout={props.onLayout}\n style={props.style}>\n {props.children}\n </AnimatedView>\n );\n };\n\n return CellRendererComponent;\n};\n\ninterface ReanimatedFlatListPropsWithLayout<T>\n extends AnimatedProps<FlatListProps<T>> {\n /**\n * Lets you pass layout animation directly to the FlatList item.\n */\n itemLayoutAnimation?: ILayoutAnimationBuilder;\n /**\n * Lets you skip entering and exiting animations of FlatList items when on FlatList mount or unmount.\n */\n skipEnteringExitingAnimations?: boolean;\n /**\n * Property `CellRendererComponent` is not supported in `Animated.FlatList`.\n */\n CellRendererComponent?: never;\n}\n\nexport type FlatListPropsWithLayout<T> = ReanimatedFlatListPropsWithLayout<T>;\n\n// Since createAnimatedComponent return type is ComponentClass that has the props of the argument,\n// but not things like NativeMethods, etc. we need to add them manually by extending the type.\ninterface AnimatedFlatListComplement<T> extends FlatList<T> {\n getNode(): FlatList<T>;\n}\n\n// We need explicit any here, because this is the exact same type that is used in React Native types.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst FlatListForwardRefRender = function <Item = any>(\n props: ReanimatedFlatListPropsWithLayout<Item>,\n ref: React.ForwardedRef<FlatList>\n) {\n const { itemLayoutAnimation, skipEnteringExitingAnimations, ...restProps } =\n props;\n\n // Set default scrollEventThrottle, because user expects\n // to have continuous scroll events and\n // react-native defaults it to 50 for FlatLists.\n // We set it to 1, so we have peace until\n // there are 960 fps screens.\n if (!('scrollEventThrottle' in restProps)) {\n restProps.scrollEventThrottle = 1;\n }\n\n const itemLayoutAnimationRef = useRef(itemLayoutAnimation);\n itemLayoutAnimationRef.current = itemLayoutAnimation;\n\n const CellRendererComponent = React.useMemo(\n () => createCellRendererComponent(itemLayoutAnimationRef),\n [itemLayoutAnimationRef]\n );\n\n const animatedFlatList = (\n // @ts-expect-error In its current type state, createAnimatedComponent cannot create generic components.\n <AnimatedFlatList\n ref={ref}\n {...restProps}\n CellRendererComponent={CellRendererComponent}\n />\n );\n\n if (skipEnteringExitingAnimations === undefined) {\n return animatedFlatList;\n }\n\n return (\n <LayoutAnimationConfig skipEntering skipExiting>\n {animatedFlatList}\n </LayoutAnimationConfig>\n );\n};\n\nexport const ReanimatedFlatList = forwardRef(FlatListForwardRefRender) as <\n // We need explicit any here, because this is the exact same type that is used in React Native types.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ItemT = any\n>(\n props: ReanimatedFlatListPropsWithLayout<ItemT> & {\n ref?: React.ForwardedRef<FlatList>;\n }\n) => React.ReactElement;\n\nexport type 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jC;EACA,MAAM;IAAEC,mBAAmB;IAAEC,6BAA6B;IAAE,GAAGC;EAAU,CAAC,GACxEX,KAAK;;EAEP;EACA;EACA;EACA;EACA;EACA,IAAI,EAAE,qBAAqB,IAAIW,SAAS,CAAC,EAAE;IACzCA,SAAS,CAACC,mBAAmB,GAAG,CAAC;EACnC;EAEA,MAAMd,sBAAsB,GAAGP,MAAM,CAACkB,mBAAmB,CAAC;EAC1DX,sBAAsB,CAACK,OAAO,GAAGM,mBAAmB;EAEpD,MAAMV,qBAAqB,GAAGV,KAAK,CAACwB,OAAO,CACzC,MAAMhB,2BAA2B,CAACC,sBAAsB,CAAC,EACzD,CAACA,sBAAsB,CACzB,CAAC;EAED,MAAMgB,gBAAgB;EAAA;EACpB;EACAzB,KAAA,CAAAY,aAAA,CAACL,gBAAgB,EAAArB,QAAA;IACfiC,GAAG,EAAEA;EAAI,GACLG,SAAS;IACbZ,qBAAqB,EAAEA;EAAsB,EAC9C,CACF;EAED,IAAIW,6BAA6B,KAAKK,SAAS,EAAE;IAC/C,OAAOD,gBAAgB;EACzB;EAEA,oBACEzB,KAAA,CAAAY,aAAA,CAACN,qBAAqB;IAACqB,YAAY;IAACC,WAAW;EAAA,GAC5CH,gBACoB,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMI,kBAAkB,gBAAG5B,UAAU,CAACiB,wBAAwB,CAQ9C","ignoreList":[]}
@@ -16,4 +16,5 @@ export { useAnimatedKeyboard } from './useAnimatedKeyboard';
16
16
  export { useScrollViewOffset } from './useScrollViewOffset';
17
17
  export { useEvent } from './useEvent';
18
18
  export { useHandler } from './useHandler';
19
+ export { useComposedEventHandler } from './useComposedEventHandler';
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedProps","useWorkletCallback","useSharedValue","useReducedMotion","useAnimatedStyle","useAnimatedGestureHandler","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useDerivedValue","useAnimatedSensor","useFrameCallback","useAnimatedKeyboard","useScrollViewOffset","useEvent","useHandler"],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport type {\n DependencyList,\n AnimatedRef,\n ReanimatedScrollEvent as ScrollEvent,\n ReanimatedEvent,\n} from './commonTypes';\nexport { useAnimatedProps } from './useAnimatedProps';\nexport { useWorkletCallback } from './useWorkletCallback';\nexport { useSharedValue } from './useSharedValue';\nexport { useReducedMotion } from './useReducedMotion';\nexport { useAnimatedStyle } from './useAnimatedStyle';\nexport { useAnimatedGestureHandler } from './useAnimatedGestureHandler';\nexport type {\n GestureHandlerEvent,\n GestureHandlers,\n} from './useAnimatedGestureHandler';\nexport { useAnimatedReaction } from './useAnimatedReaction';\nexport { useAnimatedRef } from './useAnimatedRef';\nexport { useAnimatedScrollHandler } from './useAnimatedScrollHandler';\nexport type {\n ScrollHandler,\n ScrollHandlers,\n ScrollHandlerProcessed,\n ScrollHandlerInternal,\n} from './useAnimatedScrollHandler';\nexport { useDerivedValue } from './useDerivedValue';\nexport type { DerivedValue } from './useDerivedValue';\nexport { useAnimatedSensor } from './useAnimatedSensor';\nexport { useFrameCallback } from './useFrameCallback';\nexport type { FrameCallback } from './useFrameCallback';\nexport { useAnimatedKeyboard } from './useAnimatedKeyboard';\nexport { useScrollViewOffset } from './useScrollViewOffset';\nexport type {\n EventHandler,\n EventHandlerProcessed,\n EventHandlerInternal,\n} from './useEvent';\nexport { useEvent } from './useEvent';\nexport type { UseHandlerContext } from './useHandler';\nexport { useHandler } from './useHandler';\n"],"mappings":"AAAA,YAAY;;AAOZ,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,yBAAyB,QAAQ,6BAA6B;AAKvE,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,wBAAwB,QAAQ,4BAA4B;AAOrE,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,mBAAmB,QAAQ,uBAAuB;AAM3D,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,UAAU,QAAQ,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedProps","useWorkletCallback","useSharedValue","useReducedMotion","useAnimatedStyle","useAnimatedGestureHandler","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useDerivedValue","useAnimatedSensor","useFrameCallback","useAnimatedKeyboard","useScrollViewOffset","useEvent","useHandler","useComposedEventHandler"],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport type {\n DependencyList,\n AnimatedRef,\n ReanimatedScrollEvent as ScrollEvent,\n ReanimatedEvent,\n} from './commonTypes';\nexport { useAnimatedProps } from './useAnimatedProps';\nexport { useWorkletCallback } from './useWorkletCallback';\nexport { useSharedValue } from './useSharedValue';\nexport { useReducedMotion } from './useReducedMotion';\nexport { useAnimatedStyle } from './useAnimatedStyle';\nexport { useAnimatedGestureHandler } from './useAnimatedGestureHandler';\nexport type {\n GestureHandlerEvent,\n GestureHandlers,\n} from './useAnimatedGestureHandler';\nexport { useAnimatedReaction } from './useAnimatedReaction';\nexport { useAnimatedRef } from './useAnimatedRef';\nexport { useAnimatedScrollHandler } from './useAnimatedScrollHandler';\nexport type {\n ScrollHandler,\n ScrollHandlers,\n ScrollHandlerProcessed,\n ScrollHandlerInternal,\n} from './useAnimatedScrollHandler';\nexport { useDerivedValue } from './useDerivedValue';\nexport type { DerivedValue } from './useDerivedValue';\nexport { useAnimatedSensor } from './useAnimatedSensor';\nexport { useFrameCallback } from './useFrameCallback';\nexport type { FrameCallback } from './useFrameCallback';\nexport { useAnimatedKeyboard } from './useAnimatedKeyboard';\nexport { useScrollViewOffset } from './useScrollViewOffset';\nexport type {\n EventHandler,\n EventHandlerProcessed,\n EventHandlerInternal,\n} from './useEvent';\nexport { useEvent } from './useEvent';\nexport type { UseHandlerContext } from './useHandler';\nexport { useHandler } from './useHandler';\nexport { useComposedEventHandler } from './useComposedEventHandler';\n"],"mappings":"AAAA,YAAY;;AAOZ,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,yBAAyB,QAAQ,6BAA6B;AAKvE,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,wBAAwB,QAAQ,4BAA4B;AAOrE,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,mBAAmB,QAAQ,uBAAuB;AAM3D,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,uBAAuB,QAAQ,2BAA2B","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ import { useEvent } from './useEvent';
4
+ import { useHandler } from './useHandler';
5
+ import { WorkletEventHandler } from '../WorkletEventHandler';
6
+
7
+ /**
8
+ * Lets you compose multiple event handlers based on [useEvent](https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent) hook.
9
+ *
10
+ * @param handlers - An array of event handlers created using [useEvent](https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent) hook.
11
+ * @returns An object you need to pass to a coresponding "onEvent" prop on an `Animated` component (for example handlers responsible for `onScroll` event go to `onScroll` prop).
12
+ * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useComposedEventHandler
13
+ */
14
+ // @ts-expect-error This overload is required by our API.
15
+
16
+ export function useComposedEventHandler(handlers) {
17
+ // Record of handlers' worklets to calculate deps diffs. We use the record type to match the useHandler API requirements
18
+ const workletsRecord = {};
19
+ // Summed event names for registration
20
+ const composedEventNames = new Set();
21
+ // Map that holds worklets for specific handled events
22
+ const workletsMap = {};
23
+ handlers.filter(h => h !== null).forEach(handler => {
24
+ // EventHandlerProcessed is the return type of useEvent and has to be force casted to EventHandlerInternal, because we need WorkletEventHandler object
25
+ const {
26
+ workletEventHandler
27
+ } = handler;
28
+ if (workletEventHandler instanceof WorkletEventHandler) {
29
+ workletEventHandler.eventNames.forEach(eventName => {
30
+ composedEventNames.add(eventName);
31
+ if (workletsMap[eventName]) {
32
+ workletsMap[eventName].push(workletEventHandler.worklet);
33
+ } else {
34
+ workletsMap[eventName] = [workletEventHandler.worklet];
35
+ }
36
+ const handlerName = eventName + `${workletsMap[eventName].length}`;
37
+ workletsRecord[handlerName] = workletEventHandler.worklet;
38
+ });
39
+ }
40
+ });
41
+ const {
42
+ doDependenciesDiffer
43
+ } = useHandler(workletsRecord);
44
+ return useEvent(event => {
45
+ 'worklet';
46
+
47
+ if (workletsMap[event.eventName]) {
48
+ workletsMap[event.eventName].forEach(worklet => worklet(event));
49
+ }
50
+ }, Array.from(composedEventNames), doDependenciesDiffer);
51
+ }
52
+ //# sourceMappingURL=useComposedEventHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEvent","useHandler","WorkletEventHandler","useComposedEventHandler","handlers","workletsRecord","composedEventNames","Set","workletsMap","filter","h","forEach","handler","workletEventHandler","eventNames","eventName","add","push","worklet","handlerName","length","doDependenciesDiffer","event","Array","from"],"sources":["useComposedEventHandler.ts"],"sourcesContent":["'use strict';\nimport { useEvent } from './useEvent';\nimport { useHandler } from './useHandler';\nimport { WorkletEventHandler } from '../WorkletEventHandler';\nimport type { ReanimatedEvent } from './commonTypes';\nimport type { WorkletFunction } from '../commonTypes';\nimport type { EventHandlerProcessed, EventHandlerInternal } from './useEvent';\n\ntype ComposedHandlerProcessed<\n Event extends object,\n Context extends Record<string, unknown> = Record<string, unknown>\n> = EventHandlerProcessed<Event, Context>;\n\ntype ComposedHandlerInternal<Event extends object> =\n EventHandlerInternal<Event>;\n\n/**\n * Lets you compose multiple event handlers based on [useEvent](https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent) hook.\n *\n * @param handlers - An array of event handlers created using [useEvent](https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent) hook.\n * @returns An object you need to pass to a coresponding \"onEvent\" prop on an `Animated` component (for example handlers responsible for `onScroll` event go to `onScroll` prop).\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useComposedEventHandler\n */\n// @ts-expect-error This overload is required by our API.\nexport function useComposedEventHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(\n handlers: (EventHandlerProcessed<Event, Context> | null)[]\n): ComposedHandlerProcessed<Event, Context>;\n\nexport function useComposedEventHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(handlers: (EventHandlerProcessed<Event, Context> | null)[]) {\n // Record of handlers' worklets to calculate deps diffs. We use the record type to match the useHandler API requirements\n const workletsRecord: Record<string, WorkletFunction> = {};\n // Summed event names for registration\n const composedEventNames = new Set<string>();\n // Map that holds worklets for specific handled events\n const workletsMap: {\n [key: string]: ((event: ReanimatedEvent<Event>) => void)[];\n } = {};\n\n handlers\n .filter((h) => h !== null)\n .forEach((handler) => {\n // EventHandlerProcessed is the return type of useEvent and has to be force casted to EventHandlerInternal, because we need WorkletEventHandler object\n const { workletEventHandler } =\n handler as unknown as EventHandlerInternal<Context>;\n if (workletEventHandler instanceof WorkletEventHandler) {\n workletEventHandler.eventNames.forEach((eventName) => {\n composedEventNames.add(eventName);\n\n if (workletsMap[eventName]) {\n workletsMap[eventName].push(workletEventHandler.worklet);\n } else {\n workletsMap[eventName] = [workletEventHandler.worklet];\n }\n\n const handlerName = eventName + `${workletsMap[eventName].length}`;\n workletsRecord[handlerName] =\n workletEventHandler.worklet as WorkletFunction;\n });\n }\n });\n\n const { doDependenciesDiffer } = useHandler(workletsRecord);\n\n return useEvent<Event, Context>(\n (event) => {\n 'worklet';\n if (workletsMap[event.eventName]) {\n workletsMap[event.eventName].forEach((worklet) => worklet(event));\n }\n },\n Array.from(composedEventNames),\n doDependenciesDiffer\n ) as unknown as ComposedHandlerInternal<Event>;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,mBAAmB,QAAQ,wBAAwB;;AAa5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASC,uBAAuBA,CAGrCC,QAA0D,EAAE;EAC5D;EACA,MAAMC,cAA+C,GAAG,CAAC,CAAC;EAC1D;EACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC5C;EACA,MAAMC,WAEL,GAAG,CAAC,CAAC;EAENJ,QAAQ,CACLK,MAAM,CAAEC,CAAC,IAAKA,CAAC,KAAK,IAAI,CAAC,CACzBC,OAAO,CAAEC,OAAO,IAAK;IACpB;IACA,MAAM;MAAEC;IAAoB,CAAC,GAC3BD,OAAmD;IACrD,IAAIC,mBAAmB,YAAYX,mBAAmB,EAAE;MACtDW,mBAAmB,CAACC,UAAU,CAACH,OAAO,CAAEI,SAAS,IAAK;QACpDT,kBAAkB,CAACU,GAAG,CAACD,SAAS,CAAC;QAEjC,IAAIP,WAAW,CAACO,SAAS,CAAC,EAAE;UAC1BP,WAAW,CAACO,SAAS,CAAC,CAACE,IAAI,CAACJ,mBAAmB,CAACK,OAAO,CAAC;QAC1D,CAAC,MAAM;UACLV,WAAW,CAACO,SAAS,CAAC,GAAG,CAACF,mBAAmB,CAACK,OAAO,CAAC;QACxD;QAEA,MAAMC,WAAW,GAAGJ,SAAS,GAAI,GAAEP,WAAW,CAACO,SAAS,CAAC,CAACK,MAAO,EAAC;QAClEf,cAAc,CAACc,WAAW,CAAC,GACzBN,mBAAmB,CAACK,OAA0B;MAClD,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEJ,MAAM;IAAEG;EAAqB,CAAC,GAAGpB,UAAU,CAACI,cAAc,CAAC;EAE3D,OAAOL,QAAQ,CACZsB,KAAK,IAAK;IACT,SAAS;;IACT,IAAId,WAAW,CAACc,KAAK,CAACP,SAAS,CAAC,EAAE;MAChCP,WAAW,CAACc,KAAK,CAACP,SAAS,CAAC,CAACJ,OAAO,CAAEO,OAAO,IAAKA,OAAO,CAACI,KAAK,CAAC,CAAC;IACnE;EACF,CAAC,EACDC,KAAK,CAACC,IAAI,CAAClB,kBAAkB,CAAC,EAC9Be,oBACF,CAAC;AACH","ignoreList":[]}
@@ -17,38 +17,36 @@ export const useScrollViewOffset = IS_WEB ? useScrollViewOffsetWeb : useScrollVi
17
17
  function useScrollViewOffsetWeb(animatedRef, providedOffset) {
18
18
  const internalOffset = useSharedValue(0);
19
19
  const offset = useRef(providedOffset ?? internalOffset).current;
20
- const scrollRef = useRef(null);
21
20
  const eventHandler = useCallback(() => {
22
21
  'worklet';
23
22
 
24
- const element = getWebScrollableElement(animatedRef.current);
25
- // scrollLeft is the X axis scrolled offset, works properly also with RTL layout
26
- offset.value = element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;
23
+ if (animatedRef) {
24
+ const element = getWebScrollableElement(animatedRef.current);
25
+ // scrollLeft is the X axis scrolled offset, works properly also with RTL layout
26
+ offset.value = element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;
27
+ }
27
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
28
- }, [animatedRef, animatedRef.current]);
29
+ }, [animatedRef, animatedRef === null || animatedRef === void 0 ? void 0 : animatedRef.current]);
29
30
  useEffect(() => {
30
- // We need to make sure that listener for old animatedRef value is removed
31
- if (scrollRef.current !== null) {
32
- getWebScrollableElement(scrollRef.current).removeEventListener('scroll', eventHandler);
31
+ const element = animatedRef !== null && animatedRef !== void 0 && animatedRef.current ? getWebScrollableElement(animatedRef.current) : null;
32
+ if (element) {
33
+ element.addEventListener('scroll', eventHandler);
33
34
  }
34
- scrollRef.current = animatedRef.current;
35
- const element = getWebScrollableElement(animatedRef.current);
36
- element.addEventListener('scroll', eventHandler);
37
35
  return () => {
38
- element.removeEventListener('scroll', eventHandler);
36
+ if (element) {
37
+ element.removeEventListener('scroll', eventHandler);
38
+ }
39
39
  };
40
40
  // React here has a problem with `animatedRef.current` since a Ref .current
41
41
  // field shouldn't be used as a dependency. However, in this case we have
42
42
  // to do it this way.
43
43
  // eslint-disable-next-line react-hooks/exhaustive-deps
44
- }, [animatedRef, animatedRef.current, eventHandler]);
44
+ }, [animatedRef, animatedRef === null || animatedRef === void 0 ? void 0 : animatedRef.current, eventHandler]);
45
45
  return offset;
46
46
  }
47
47
  function useScrollViewOffsetNative(animatedRef, providedOffset) {
48
48
  const internalOffset = useSharedValue(0);
49
49
  const offset = useRef(providedOffset ?? internalOffset).current;
50
- const scrollRef = useRef(null);
51
- const scrollRefTag = useRef(null);
52
50
  const eventHandler = useEvent(event => {
53
51
  'worklet';
54
52
 
@@ -58,29 +56,20 @@ function useScrollViewOffsetNative(animatedRef, providedOffset) {
58
56
  // for more information about this cast.
59
57
  );
60
58
  useEffect(() => {
61
- // We need to make sure that listener for old animatedRef value is removed
62
- if (scrollRef.current !== null && scrollRefTag.current !== null) {
63
- eventHandler.workletEventHandler.unregisterFromEvents(scrollRefTag.current);
64
- }
65
-
66
- // Store the ref and viewTag for future cleanup
67
- scrollRef.current = animatedRef.current;
68
- scrollRefTag.current = animatedRef.getTag();
69
- if (scrollRefTag === null) {
70
- console.warn('[Reanimated] ScrollViewOffset failed to resolve the view tag from animated ref. Did you forget to attach the ref to a component?');
71
- } else {
72
- eventHandler.workletEventHandler.registerForEvents(scrollRefTag.current);
59
+ const elementTag = (animatedRef === null || animatedRef === void 0 ? void 0 : animatedRef.getTag()) ?? null;
60
+ if (elementTag) {
61
+ eventHandler.workletEventHandler.registerForEvents(elementTag);
73
62
  }
74
63
  return () => {
75
- if (scrollRefTag.current !== null) {
76
- eventHandler.workletEventHandler.unregisterFromEvents(scrollRefTag.current);
64
+ if (elementTag) {
65
+ eventHandler.workletEventHandler.unregisterFromEvents(elementTag);
77
66
  }
78
67
  };
79
68
  // React here has a problem with `animatedRef.current` since a Ref .current
80
69
  // field shouldn't be used as a dependency. However, in this case we have
81
70
  // to do it this way.
82
71
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
- }, [animatedRef, animatedRef.current, eventHandler]);
72
+ }, [animatedRef, animatedRef === null || animatedRef === void 0 ? void 0 : animatedRef.current, eventHandler]);
84
73
  return offset;
85
74
  }
86
75
  function getWebScrollableElement(scrollComponent) {
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useRef","useCallback","useEvent","useSharedValue","isWeb","IS_WEB","useScrollViewOffset","useScrollViewOffsetWeb","useScrollViewOffsetNative","animatedRef","providedOffset","internalOffset","offset","current","scrollRef","eventHandler","element","getWebScrollableElement","value","scrollLeft","scrollTop","removeEventListener","addEventListener","scrollRefTag","event","contentOffset","x","y","scrollNativeEventNames","workletEventHandler","unregisterFromEvents","getTag","console","warn","registerForEvents","scrollComponent","getScrollableNode"],"sources":["useScrollViewOffset.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef, useCallback } from 'react';\nimport type { SharedValue } from '../commonTypes';\nimport type { EventHandlerInternal } from './useEvent';\nimport { useEvent } from './useEvent';\nimport { useSharedValue } from './useSharedValue';\nimport type { AnimatedScrollView } from '../component/ScrollView';\nimport type {\n AnimatedRef,\n RNNativeScrollEvent,\n ReanimatedScrollEvent,\n} from './commonTypes';\nimport { isWeb } from '../PlatformChecker';\n\nconst IS_WEB = isWeb();\n\n/**\n * Lets you synchronously get the current offset of a `ScrollView`.\n *\n * @param animatedRef - An [animated ref](https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedRef) attached to an Animated.ScrollView component.\n * @returns A shared value which holds the current offset of the `ScrollView`.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/scroll/useScrollViewOffset\n */\nexport const useScrollViewOffset = IS_WEB\n ? useScrollViewOffsetWeb\n : useScrollViewOffsetNative;\n\nfunction useScrollViewOffsetWeb(\n animatedRef: AnimatedRef<AnimatedScrollView>,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n const scrollRef = useRef<AnimatedScrollView | null>(null);\n\n const eventHandler = useCallback(() => {\n 'worklet';\n const element = getWebScrollableElement(animatedRef.current);\n // scrollLeft is the X axis scrolled offset, works properly also with RTL layout\n offset.value =\n element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current]);\n\n useEffect(() => {\n // We need to make sure that listener for old animatedRef value is removed\n if (scrollRef.current !== null) {\n getWebScrollableElement(scrollRef.current).removeEventListener(\n 'scroll',\n eventHandler\n );\n }\n scrollRef.current = animatedRef.current;\n\n const element = getWebScrollableElement(animatedRef.current);\n element.addEventListener('scroll', eventHandler);\n return () => {\n element.removeEventListener('scroll', eventHandler);\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current, eventHandler]);\n\n return offset;\n}\n\nfunction useScrollViewOffsetNative(\n animatedRef: AnimatedRef<AnimatedScrollView>,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n const scrollRef = useRef<AnimatedScrollView | null>(null);\n const scrollRefTag = useRef<number | null>(null);\n\n const eventHandler = useEvent<RNNativeScrollEvent>(\n (event: ReanimatedScrollEvent) => {\n 'worklet';\n offset.value =\n event.contentOffset.x === 0\n ? event.contentOffset.y\n : event.contentOffset.x;\n },\n scrollNativeEventNames\n // Read https://github.com/software-mansion/react-native-reanimated/pull/5056\n // for more information about this cast.\n ) as unknown as EventHandlerInternal<ReanimatedScrollEvent>;\n\n useEffect(() => {\n // We need to make sure that listener for old animatedRef value is removed\n if (scrollRef.current !== null && scrollRefTag.current !== null) {\n eventHandler.workletEventHandler.unregisterFromEvents(\n scrollRefTag.current\n );\n }\n\n // Store the ref and viewTag for future cleanup\n scrollRef.current = animatedRef.current;\n scrollRefTag.current = animatedRef.getTag();\n\n if (scrollRefTag === null) {\n console.warn(\n '[Reanimated] ScrollViewOffset failed to resolve the view tag from animated ref. Did you forget to attach the ref to a component?'\n );\n } else {\n eventHandler.workletEventHandler.registerForEvents(scrollRefTag.current);\n }\n\n return () => {\n if (scrollRefTag.current !== null) {\n eventHandler.workletEventHandler.unregisterFromEvents(\n scrollRefTag.current\n );\n }\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current, eventHandler]);\n\n return offset;\n}\n\nfunction getWebScrollableElement(\n scrollComponent: AnimatedScrollView | null\n): HTMLElement {\n return (\n (scrollComponent?.getScrollableNode() as unknown as HTMLElement) ??\n scrollComponent\n );\n}\n\nconst scrollNativeEventNames = [\n 'onScroll',\n 'onScrollBeginDrag',\n 'onScrollEndDrag',\n 'onMomentumScrollBegin',\n 'onMomentumScrollEnd',\n];\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,EAAEC,WAAW,QAAQ,OAAO;AAGtD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,cAAc,QAAQ,kBAAkB;AAOjD,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,MAAMC,MAAM,GAAGD,KAAK,CAAC,CAAC;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,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AAC;EAEpD,OAAOH,MAAM;AACf;AAEA,SAASK,uBAAuBA,CAC9BkB,eAA0C,EAC7B;EACb,OACE,CAACA,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEC,iBAAiB,CAAC,CAAC,KACrCD,eAAe;AAEnB;AAEA,MAAMP,sBAAsB,GAAG,CAC7B,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,CACtB","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useRef","useCallback","useEvent","useSharedValue","isWeb","IS_WEB","useScrollViewOffset","useScrollViewOffsetWeb","useScrollViewOffsetNative","animatedRef","providedOffset","internalOffset","offset","current","eventHandler","element","getWebScrollableElement","value","scrollLeft","scrollTop","addEventListener","removeEventListener","event","contentOffset","x","y","scrollNativeEventNames","elementTag","getTag","workletEventHandler","registerForEvents","unregisterFromEvents","scrollComponent","getScrollableNode"],"sources":["useScrollViewOffset.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef, useCallback } from 'react';\nimport type { SharedValue } from '../commonTypes';\nimport type { EventHandlerInternal } from './useEvent';\nimport { useEvent } from './useEvent';\nimport { useSharedValue } from './useSharedValue';\nimport type { AnimatedScrollView } from '../component/ScrollView';\nimport type {\n AnimatedRef,\n RNNativeScrollEvent,\n ReanimatedScrollEvent,\n} from './commonTypes';\nimport { isWeb } from '../PlatformChecker';\n\nconst IS_WEB = isWeb();\n\n/**\n * Lets you synchronously get the current offset of a `ScrollView`.\n *\n * @param animatedRef - An [animated ref](https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedRef) attached to an Animated.ScrollView component.\n * @returns A shared value which holds the current offset of the `ScrollView`.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/scroll/useScrollViewOffset\n */\nexport const useScrollViewOffset = IS_WEB\n ? useScrollViewOffsetWeb\n : useScrollViewOffsetNative;\n\nfunction useScrollViewOffsetWeb(\n animatedRef: AnimatedRef<AnimatedScrollView> | null,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n\n const eventHandler = useCallback(() => {\n 'worklet';\n if (animatedRef) {\n const element = getWebScrollableElement(animatedRef.current);\n // scrollLeft is the X axis scrolled offset, works properly also with RTL layout\n offset.value =\n element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef?.current]);\n\n useEffect(() => {\n const element = animatedRef?.current\n ? getWebScrollableElement(animatedRef.current)\n : null;\n\n if (element) {\n element.addEventListener('scroll', eventHandler);\n }\n return () => {\n if (element) {\n element.removeEventListener('scroll', eventHandler);\n }\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef?.current, eventHandler]);\n\n return offset;\n}\n\nfunction useScrollViewOffsetNative(\n animatedRef: AnimatedRef<AnimatedScrollView> | null,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n\n const eventHandler = useEvent<RNNativeScrollEvent>(\n (event: ReanimatedScrollEvent) => {\n 'worklet';\n offset.value =\n event.contentOffset.x === 0\n ? event.contentOffset.y\n : event.contentOffset.x;\n },\n scrollNativeEventNames\n // Read https://github.com/software-mansion/react-native-reanimated/pull/5056\n // for more information about this cast.\n ) as unknown as EventHandlerInternal<ReanimatedScrollEvent>;\n\n useEffect(() => {\n const elementTag = animatedRef?.getTag() ?? null;\n\n if (elementTag) {\n eventHandler.workletEventHandler.registerForEvents(elementTag);\n }\n return () => {\n if (elementTag) {\n eventHandler.workletEventHandler.unregisterFromEvents(elementTag);\n }\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef?.current, eventHandler]);\n\n return offset;\n}\n\nfunction getWebScrollableElement(\n scrollComponent: AnimatedScrollView | null\n): HTMLElement {\n return (\n (scrollComponent?.getScrollableNode() as unknown as HTMLElement) ??\n scrollComponent\n );\n}\n\nconst scrollNativeEventNames = [\n 'onScroll',\n 'onScrollBeginDrag',\n 'onScrollEndDrag',\n 'onMomentumScrollBegin',\n 'onMomentumScrollEnd',\n];\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,EAAEC,WAAW,QAAQ,OAAO;AAGtD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,cAAc,QAAQ,kBAAkB;AAOjD,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,MAAMC,MAAM,GAAGD,KAAK,CAAC,CAAC;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,GAAGD,MAAM,GACrCE,sBAAsB,GACtBC,yBAAyB;AAE7B,SAASD,sBAAsBA,CAC7BE,WAAmD,EACnDC,cAAoC,EACf;EACrB,MAAMC,cAAc,GAAGR,cAAc,CAAC,CAAC,CAAC;EACxC,MAAMS,MAAM,GAAGZ,MAAM,CAACU,cAAc,IAAIC,cAAc,CAAC,CAACE,OAAO;EAE/D,MAAMC,YAAY,GAAGb,WAAW,CAAC,MAAM;IACrC,SAAS;;IACT,IAAIQ,WAAW,EAAE;MACf,MAAMM,OAAO,GAAGC,uBAAuB,CAACP,WAAW,CAACI,OAAO,CAAC;MAC5D;MACAD,MAAM,CAACK,KAAK,GACVF,OAAO,CAACG,UAAU,KAAK,CAAC,GAAGH,OAAO,CAACI,SAAS,GAAGJ,OAAO,CAACG,UAAU;IACrE;IACA;EACF,CAAC,EAAE,CAACT,WAAW,EAAEA,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEI,OAAO,CAAC,CAAC;EAEvCd,SAAS,CAAC,MAAM;IACd,MAAMgB,OAAO,GAAGN,WAAW,aA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,CAAC;IACD;IACA;IACA;IACA;EACF,CAAC,EAAE,CAAClB,WAAW,EAAEA,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEI,OAAO,EAAEC,YAAY,CAAC,CAAC;EAErD,OAAOF,MAAM;AACf;AAEA,SAASI,uBAAuBA,CAC9BgB,eAA0C,EAC7B;EACb,OACE,CAACA,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEC,iBAAiB,CAAC,CAAC,KACrCD,eAAe;AAEnB;AAEA,MAAMN,sBAAsB,GAAG,CAC7B,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,CACtB","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import './publicGlobals';
4
4
  export { runOnJS, runOnUI, createWorkletRuntime, runOnRuntime, makeMutable, makeShareableCloneRecursive, isReanimated3, isConfigured, enableLayoutAnimations, getViewProp, executeOnUIRuntimeSync } from './core';
5
- export { useAnimatedProps, useEvent, useHandler, useWorkletCallback, useSharedValue, useReducedMotion, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useDerivedValue, useAnimatedSensor, useFrameCallback, useAnimatedKeyboard, useScrollViewOffset } from './hook';
5
+ export { useAnimatedProps, useEvent, useHandler, useWorkletCallback, useSharedValue, useReducedMotion, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useDerivedValue, useAnimatedSensor, useFrameCallback, useAnimatedKeyboard, useScrollViewOffset, useComposedEventHandler } from './hook';
6
6
  export { cancelAnimation, defineAnimation, withClamp, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming } from './animation';
7
7
  export { Extrapolation, interpolate, clamp } from './interpolation';
8
8
  export {