@react-native-aria/interactions 0.2.10-alpha.1 → 0.2.10

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.
@@ -11,7 +11,7 @@ var _react = require("react");
11
11
 
12
12
  var _utils = require("@react-native-aria/utils");
13
13
 
14
- const useHover = (props, ref) => {
14
+ const useHover = (props = {}, ref) => {
15
15
  let params = (0, _interactions.useHover)(props);
16
16
  (0, _react.useEffect)(() => {
17
17
  ref && ref.current && (0, _utils.attachEventHandlersOnRef)(params.hoverProps, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["useHover.web.ts"],"names":["useHover","props","ref","params","current","hoverProps","finalResult","onHoverIn","onPointerEnter","onHoverOut","onPointerLeave"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEO,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAqBC,GAArB,KAAmC;AACzD,MAAIC,MAAM,GAAG,4BAAYF,KAAZ,CAAb;AACA,wBAAU,MAAM;AACdC,IAAAA,GAAG,IAAIA,GAAG,CAACE,OAAX,IAAsB,qCAAyBD,MAAM,CAACE,UAAhC,EAA4CH,GAA5C,CAAtB;AACD,GAFD,EAEG,EAFH;AAIA,QAAMI,WAAW,GAAG,EAClB,GAAGH,MADe;AAElBE,IAAAA,UAAU,EAAE,EACV,GAAGF,MAAM,CAACE,UADA;AAEVE,MAAAA,SAAS,EAAEJ,MAAM,CAACE,UAAP,CAAkBG,cAFnB;AAGVC,MAAAA,UAAU,EAAEN,MAAM,CAACE,UAAP,CAAkBK;AAHpB;AAFM,GAApB;AASA,SAAOJ,WAAP;AACD,CAhBM","sourcesContent":["import { useHover as useHoverWeb, HoverProps } from '@react-aria/interactions';\nimport { useEffect } from 'react';\nimport { attachEventHandlersOnRef } from '@react-native-aria/utils';\n\nexport const useHover = (props?: HoverProps, ref?: any) => {\n let params = useHoverWeb(props);\n useEffect(() => {\n ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);\n }, []);\n\n const finalResult = {\n ...params,\n hoverProps: {\n ...params.hoverProps,\n onHoverIn: params.hoverProps.onPointerEnter,\n onHoverOut: params.hoverProps.onPointerLeave,\n },\n };\n\n return finalResult;\n};\n"]}
1
+ {"version":3,"sources":["useHover.web.ts"],"names":["useHover","props","ref","params","current","hoverProps","finalResult","onHoverIn","onPointerEnter","onHoverOut","onPointerLeave"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEO,MAAMA,QAAQ,GAAG,CAACC,KAAK,GAAG,EAAT,EAA2BC,GAA3B,KAAyC;AAC/D,MAAIC,MAAM,GAAG,4BAAYF,KAAZ,CAAb;AACA,wBAAU,MAAM;AACdC,IAAAA,GAAG,IAAIA,GAAG,CAACE,OAAX,IAAsB,qCAAyBD,MAAM,CAACE,UAAhC,EAA4CH,GAA5C,CAAtB;AACD,GAFD,EAEG,EAFH;AAIA,QAAMI,WAAW,GAAG,EAClB,GAAGH,MADe;AAElBE,IAAAA,UAAU,EAAE,EACV,GAAGF,MAAM,CAACE,UADA;AAEVE,MAAAA,SAAS,EAAEJ,MAAM,CAACE,UAAP,CAAkBG,cAFnB;AAGVC,MAAAA,UAAU,EAAEN,MAAM,CAACE,UAAP,CAAkBK;AAHpB;AAFM,GAApB;AASA,SAAOJ,WAAP;AACD,CAhBM","sourcesContent":["import { useHover as useHoverWeb, HoverProps } from '@react-aria/interactions';\nimport { useEffect } from 'react';\nimport { attachEventHandlersOnRef } from '@react-native-aria/utils';\n\nexport const useHover = (props = {} as HoverProps, ref?: any) => {\n let params = useHoverWeb(props);\n useEffect(() => {\n ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);\n }, []);\n\n const finalResult = {\n ...params,\n hoverProps: {\n ...params.hoverProps,\n onHoverIn: params.hoverProps.onPointerEnter,\n onHoverOut: params.hoverProps.onPointerLeave,\n },\n };\n\n return finalResult;\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  import { useHover as useHoverWeb } from '@react-aria/interactions';
2
2
  import { useEffect } from 'react';
3
3
  import { attachEventHandlersOnRef } from '@react-native-aria/utils';
4
- export const useHover = (props, ref) => {
4
+ export const useHover = (props = {}, ref) => {
5
5
  let params = useHoverWeb(props);
6
6
  useEffect(() => {
7
7
  ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["useHover.web.ts"],"names":["useHover","useHoverWeb","useEffect","attachEventHandlersOnRef","props","ref","params","current","hoverProps","finalResult","onHoverIn","onPointerEnter","onHoverOut","onPointerLeave"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,WAArB,QAAoD,0BAApD;AACA,SAASC,SAAT,QAA0B,OAA1B;AACA,SAASC,wBAAT,QAAyC,0BAAzC;AAEA,OAAO,MAAMH,QAAQ,GAAG,CAACI,KAAD,EAAqBC,GAArB,KAAmC;AACzD,MAAIC,MAAM,GAAGL,WAAW,CAACG,KAAD,CAAxB;AACAF,EAAAA,SAAS,CAAC,MAAM;AACdG,IAAAA,GAAG,IAAIA,GAAG,CAACE,OAAX,IAAsBJ,wBAAwB,CAACG,MAAM,CAACE,UAAR,EAAoBH,GAApB,CAA9C;AACD,GAFQ,EAEN,EAFM,CAAT;AAIA,QAAMI,WAAW,GAAG,EAClB,GAAGH,MADe;AAElBE,IAAAA,UAAU,EAAE,EACV,GAAGF,MAAM,CAACE,UADA;AAEVE,MAAAA,SAAS,EAAEJ,MAAM,CAACE,UAAP,CAAkBG,cAFnB;AAGVC,MAAAA,UAAU,EAAEN,MAAM,CAACE,UAAP,CAAkBK;AAHpB;AAFM,GAApB;AASA,SAAOJ,WAAP;AACD,CAhBM","sourcesContent":["import { useHover as useHoverWeb, HoverProps } from '@react-aria/interactions';\nimport { useEffect } from 'react';\nimport { attachEventHandlersOnRef } from '@react-native-aria/utils';\n\nexport const useHover = (props?: HoverProps, ref?: any) => {\n let params = useHoverWeb(props);\n useEffect(() => {\n ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);\n }, []);\n\n const finalResult = {\n ...params,\n hoverProps: {\n ...params.hoverProps,\n onHoverIn: params.hoverProps.onPointerEnter,\n onHoverOut: params.hoverProps.onPointerLeave,\n },\n };\n\n return finalResult;\n};\n"]}
1
+ {"version":3,"sources":["useHover.web.ts"],"names":["useHover","useHoverWeb","useEffect","attachEventHandlersOnRef","props","ref","params","current","hoverProps","finalResult","onHoverIn","onPointerEnter","onHoverOut","onPointerLeave"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,WAArB,QAAoD,0BAApD;AACA,SAASC,SAAT,QAA0B,OAA1B;AACA,SAASC,wBAAT,QAAyC,0BAAzC;AAEA,OAAO,MAAMH,QAAQ,GAAG,CAACI,KAAK,GAAG,EAAT,EAA2BC,GAA3B,KAAyC;AAC/D,MAAIC,MAAM,GAAGL,WAAW,CAACG,KAAD,CAAxB;AACAF,EAAAA,SAAS,CAAC,MAAM;AACdG,IAAAA,GAAG,IAAIA,GAAG,CAACE,OAAX,IAAsBJ,wBAAwB,CAACG,MAAM,CAACE,UAAR,EAAoBH,GAApB,CAA9C;AACD,GAFQ,EAEN,EAFM,CAAT;AAIA,QAAMI,WAAW,GAAG,EAClB,GAAGH,MADe;AAElBE,IAAAA,UAAU,EAAE,EACV,GAAGF,MAAM,CAACE,UADA;AAEVE,MAAAA,SAAS,EAAEJ,MAAM,CAACE,UAAP,CAAkBG,cAFnB;AAGVC,MAAAA,UAAU,EAAEN,MAAM,CAACE,UAAP,CAAkBK;AAHpB;AAFM,GAApB;AASA,SAAOJ,WAAP;AACD,CAhBM","sourcesContent":["import { useHover as useHoverWeb, HoverProps } from '@react-aria/interactions';\nimport { useEffect } from 'react';\nimport { attachEventHandlersOnRef } from '@react-native-aria/utils';\n\nexport const useHover = (props = {} as HoverProps, ref?: any) => {\n let params = useHoverWeb(props);\n useEffect(() => {\n ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);\n }, []);\n\n const finalResult = {\n ...params,\n hoverProps: {\n ...params.hoverProps,\n onHoverIn: params.hoverProps.onPointerEnter,\n onHoverOut: params.hoverProps.onPointerLeave,\n },\n };\n\n return finalResult;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-aria/interactions",
3
- "version": "0.2.10-alpha.1",
3
+ "version": "0.2.10",
4
4
  "description": "mono repo setup with bob",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -2,7 +2,7 @@ import { useHover as useHoverWeb, HoverProps } from '@react-aria/interactions';
2
2
  import { useEffect } from 'react';
3
3
  import { attachEventHandlersOnRef } from '@react-native-aria/utils';
4
4
 
5
- export const useHover = (props?: HoverProps, ref?: any) => {
5
+ export const useHover = (props = {} as HoverProps, ref?: any) => {
6
6
  let params = useHoverWeb(props);
7
7
  useEffect(() => {
8
8
  ref && ref.current && attachEventHandlersOnRef(params.hoverProps, ref);