@fountain-ui/core 2.0.0-beta.45 → 2.0.0-beta.46

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.
@@ -7,12 +7,10 @@ exports.default = useHeight;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- var _reactNativeReanimated = require("react-native-reanimated");
11
-
12
10
  function useHeight() {
13
11
  let initialHeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
14
12
  const [height, setHeight] = (0, _react.useState)(initialHeight);
15
- const onLayout = (0, _reactNativeReanimated.useWorkletCallback)(e => {
13
+ const onLayout = (0, _react.useCallback)(e => {
16
14
  setHeight(e.nativeEvent.layout.height);
17
15
  }, []);
18
16
  return [height, onLayout];
@@ -1 +1 @@
1
- {"version":3,"names":["useHeight","initialHeight","height","setHeight","useState","onLayout","useWorkletCallback","e","nativeEvent","layout"],"sources":["useHeight.ts"],"sourcesContent":["import { useState } from 'react';\nimport { ViewProps } from 'react-native';\nimport { useWorkletCallback } from 'react-native-reanimated';\n\ntype OnLayoutCallback = ViewProps['onLayout'];\n\nexport default function useHeight(initialHeight = 0): [number, OnLayoutCallback] {\n const [height, setHeight] = useState<number>(initialHeight);\n\n const onLayout = useWorkletCallback((e) => {\n setHeight(e.nativeEvent.layout.height);\n }, []);\n\n return [height, onLayout];\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAIe,SAASA,SAAT,GAAkE;EAAA,IAA/CC,aAA+C,uEAA/B,CAA+B;EAC7E,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAiBH,aAAjB,CAA5B;EAEA,MAAMI,QAAQ,GAAG,IAAAC,yCAAA,EAAoBC,CAAD,IAAO;IACvCJ,SAAS,CAACI,CAAC,CAACC,WAAF,CAAcC,MAAd,CAAqBP,MAAtB,CAAT;EACH,CAFgB,EAEd,EAFc,CAAjB;EAIA,OAAO,CAACA,MAAD,EAASG,QAAT,CAAP;AACH;;AAAA"}
1
+ {"version":3,"names":["useHeight","initialHeight","height","setHeight","useState","onLayout","useCallback","e","nativeEvent","layout"],"sources":["useHeight.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { LayoutChangeEvent, ViewProps } from 'react-native';\n\ntype OnLayoutCallback = ViewProps['onLayout'];\n\nexport default function useHeight(initialHeight = 0): [number, OnLayoutCallback] {\n const [height, setHeight] = useState<number>(initialHeight);\n\n const onLayout = useCallback((e: LayoutChangeEvent) => {\n setHeight(e.nativeEvent.layout.height);\n }, []);\n\n return [height, onLayout];\n};\n"],"mappings":";;;;;;;AAAA;;AAKe,SAASA,SAAT,GAAkE;EAAA,IAA/CC,aAA+C,uEAA/B,CAA+B;EAC7E,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAiBH,aAAjB,CAA5B;EAEA,MAAMI,QAAQ,GAAG,IAAAC,kBAAA,EAAaC,CAAD,IAA0B;IACnDJ,SAAS,CAACI,CAAC,CAACC,WAAF,CAAcC,MAAd,CAAqBP,MAAtB,CAAT;EACH,CAFgB,EAEd,EAFc,CAAjB;EAIA,OAAO,CAACA,MAAD,EAASG,QAAT,CAAP;AACH;;AAAA"}
@@ -1,9 +1,8 @@
1
- import { useState } from 'react';
2
- import { useWorkletCallback } from 'react-native-reanimated';
1
+ import { useCallback, useState } from 'react';
3
2
  export default function useHeight() {
4
3
  let initialHeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
5
4
  const [height, setHeight] = useState(initialHeight);
6
- const onLayout = useWorkletCallback(e => {
5
+ const onLayout = useCallback(e => {
7
6
  setHeight(e.nativeEvent.layout.height);
8
7
  }, []);
9
8
  return [height, onLayout];
@@ -1 +1 @@
1
- {"version":3,"names":["useState","useWorkletCallback","useHeight","initialHeight","height","setHeight","onLayout","e","nativeEvent","layout"],"sources":["useHeight.ts"],"sourcesContent":["import { useState } from 'react';\nimport { ViewProps } from 'react-native';\nimport { useWorkletCallback } from 'react-native-reanimated';\n\ntype OnLayoutCallback = ViewProps['onLayout'];\n\nexport default function useHeight(initialHeight = 0): [number, OnLayoutCallback] {\n const [height, setHeight] = useState<number>(initialHeight);\n\n const onLayout = useWorkletCallback((e) => {\n setHeight(e.nativeEvent.layout.height);\n }, []);\n\n return [height, onLayout];\n};\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,OAAzB;AAEA,SAASC,kBAAT,QAAmC,yBAAnC;AAIA,eAAe,SAASC,SAAT,GAAkE;EAAA,IAA/CC,aAA+C,uEAA/B,CAA+B;EAC7E,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBL,QAAQ,CAASG,aAAT,CAApC;EAEA,MAAMG,QAAQ,GAAGL,kBAAkB,CAAEM,CAAD,IAAO;IACvCF,SAAS,CAACE,CAAC,CAACC,WAAF,CAAcC,MAAd,CAAqBL,MAAtB,CAAT;EACH,CAFkC,EAEhC,EAFgC,CAAnC;EAIA,OAAO,CAACA,MAAD,EAASE,QAAT,CAAP;AACH;AAAA"}
1
+ {"version":3,"names":["useCallback","useState","useHeight","initialHeight","height","setHeight","onLayout","e","nativeEvent","layout"],"sources":["useHeight.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { LayoutChangeEvent, ViewProps } from 'react-native';\n\ntype OnLayoutCallback = ViewProps['onLayout'];\n\nexport default function useHeight(initialHeight = 0): [number, OnLayoutCallback] {\n const [height, setHeight] = useState<number>(initialHeight);\n\n const onLayout = useCallback((e: LayoutChangeEvent) => {\n setHeight(e.nativeEvent.layout.height);\n }, []);\n\n return [height, onLayout];\n};\n"],"mappings":"AAAA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,OAAtC;AAKA,eAAe,SAASC,SAAT,GAAkE;EAAA,IAA/CC,aAA+C,uEAA/B,CAA+B;EAC7E,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBJ,QAAQ,CAASE,aAAT,CAApC;EAEA,MAAMG,QAAQ,GAAGN,WAAW,CAAEO,CAAD,IAA0B;IACnDF,SAAS,CAACE,CAAC,CAACC,WAAF,CAAcC,MAAd,CAAqBL,MAAtB,CAAT;EACH,CAF2B,EAEzB,EAFyB,CAA5B;EAIA,OAAO,CAACA,MAAD,EAASE,QAAT,CAAP;AACH;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fountain-ui/core",
3
- "version": "2.0.0-beta.45",
3
+ "version": "2.0.0-beta.46",
4
4
  "author": "Fountain-UI Team",
5
5
  "description": "React components that implement Tappytoon's Fountain Design.",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "react-dom": "^16.8.0 || ^17.0.0",
24
24
  "react-native": "^0.63.0",
25
25
  "react-native-fast-image": "8.6.3",
26
- "react-native-reanimated": "^2.0.0",
26
+ "react-native-reanimated": "3.3.0",
27
27
  "react-native-safe-area-context": "^4.0.0",
28
28
  "react-native-svg": "^13.14.0"
29
29
  },
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "devDependencies": {
45
- "react-native-reanimated": "^2.17.0",
45
+ "react-native-reanimated": "3.3.0",
46
46
  "react-native-svg": "^13.14.0"
47
47
  },
48
48
  "react-native-builder-bob": {
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "f050289a7f6fa99a9b683186816920a0997c4b53"
70
+ "gitHead": "5f9d653a1f6b47741ab2f61cf1fbf6654bd88139"
71
71
  }
@@ -1,13 +1,12 @@
1
- import { useState } from 'react';
2
- import { ViewProps } from 'react-native';
3
- import { useWorkletCallback } from 'react-native-reanimated';
1
+ import { useCallback, useState } from 'react';
2
+ import { LayoutChangeEvent, ViewProps } from 'react-native';
4
3
 
5
4
  type OnLayoutCallback = ViewProps['onLayout'];
6
5
 
7
6
  export default function useHeight(initialHeight = 0): [number, OnLayoutCallback] {
8
7
  const [height, setHeight] = useState<number>(initialHeight);
9
8
 
10
- const onLayout = useWorkletCallback((e) => {
9
+ const onLayout = useCallback((e: LayoutChangeEvent) => {
11
10
  setHeight(e.nativeEvent.layout.height);
12
11
  }, []);
13
12