You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.8 KiB
1 line
2.8 KiB
{"ast":null,"code":"'use strict';\n\nimport PressResponder from \"./PressResponder\";\nimport { useDebugValue, useEffect, useRef } from 'react';\nexport default function usePressEvents(hostRef, config) {\n var pressResponderRef = useRef(null);\n if (pressResponderRef.current == null) {\n pressResponderRef.current = new PressResponder(config);\n }\n var pressResponder = pressResponderRef.current;\n useEffect(function () {\n pressResponder.configure(config);\n }, [config, pressResponder]);\n useEffect(function () {\n return function () {\n pressResponder.reset();\n };\n }, [pressResponder]);\n useDebugValue(config);\n return pressResponder.getEventHandlers();\n}","map":{"version":3,"names":["PressResponder","useDebugValue","useEffect","useRef","usePressEvents","hostRef","config","pressResponderRef","current","pressResponder","configure","reset","getEventHandlers"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/modules/usePressEvents/index.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport PressResponder from './PressResponder';\nimport { useDebugValue, useEffect, useRef } from 'react';\nexport default function usePressEvents(hostRef, config) {\n var pressResponderRef = useRef(null);\n\n if (pressResponderRef.current == null) {\n pressResponderRef.current = new PressResponder(config);\n }\n\n var pressResponder = pressResponderRef.current; // Re-configure to use the current node and configuration.\n\n useEffect(() => {\n pressResponder.configure(config);\n }, [config, pressResponder]); // Reset the `pressResponder` when cleanup needs to occur. This is\n // a separate effect because we do not want to rest the responder when `config` changes.\n\n useEffect(() => {\n return () => {\n pressResponder.reset();\n };\n }, [pressResponder]);\n useDebugValue(config);\n return pressResponder.getEventHandlers();\n}"],"mappings":"AASA,YAAY;;AAEZ,OAAOA,cAAc;AACrB,SAASC,aAAa,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACxD,eAAe,SAASC,cAAc,CAACC,OAAO,EAAEC,MAAM,EAAE;EACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAAC,IAAI,CAAC;EAEpC,IAAII,iBAAiB,CAACC,OAAO,IAAI,IAAI,EAAE;IACrCD,iBAAiB,CAACC,OAAO,GAAG,IAAIR,cAAc,CAACM,MAAM,CAAC;EACxD;EAEA,IAAIG,cAAc,GAAGF,iBAAiB,CAACC,OAAO;EAE9CN,SAAS,CAAC,YAAM;IACdO,cAAc,CAACC,SAAS,CAACJ,MAAM,CAAC;EAClC,CAAC,EAAE,CAACA,MAAM,EAAEG,cAAc,CAAC,CAAC;EAG5BP,SAAS,CAAC,YAAM;IACd,OAAO,YAAM;MACXO,cAAc,CAACE,KAAK,EAAE;IACxB,CAAC;EACH,CAAC,EAAE,CAACF,cAAc,CAAC,CAAC;EACpBR,aAAa,CAACK,MAAM,CAAC;EACrB,OAAOG,cAAc,CAACG,gBAAgB,EAAE;AAC1C"},"metadata":{},"sourceType":"module"} |