mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Copy react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 (upstream software-mansion/enriched-markdown 766fc0e67) into packages/react-native-enriched-markdown, with patches/react-native-enriched-markdown+1.2.0-nightly-20261014-766fc0e67.patch applied. Nothing else changes in this commit; the package is not a workspace yet. Reproduce: npm pack react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 tar xzf react-native-enriched-markdown-*.tgz mkdir -p t/node_modules && mv package t/node_modules/react-native-enriched-markdown (cd t && git init -q && git apply ../patches/react-native-enriched-markdown+*.patch) diff -r t/node_modules/react-native-enriched-markdown packages/react-native-enriched-markdown The diff is empty.
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
"use strict";
|
|
|
|
/**
|
|
* Deep import of React Native's `usePressability`.
|
|
*
|
|
* The hook only became a root `react-native` export around 0.84. The peer
|
|
* dependency is `react-native: "*"`, so a named root import is `undefined`
|
|
* before that.
|
|
*
|
|
* `Libraries/Pressability/usePressability.js` exists on those versions, so
|
|
* we use that deep import instead.
|
|
*
|
|
* The export shape has changed across versions: newer ones use `export
|
|
* default` (surfacing as `.default` after Metro's CJS transform) while older
|
|
* ones assigned `module.exports` directly. A raw require bypasses Babel's
|
|
* import interop, so both shapes are handled here.
|
|
*/
|
|
|
|
/**
|
|
* Copied from the type for usePressability in
|
|
* packages/react-native-enriched-markdown/node_modules/react-native/types_generated/Libraries/Pressability/usePressability.d.ts
|
|
*/
|
|
|
|
const usePressabilityModule =
|
|
// eslint-disable-next-line @react-native/no-deep-imports
|
|
require('react-native/Libraries/Pressability/usePressability');
|
|
export const usePressability = usePressabilityModule.default ?? usePressabilityModule;
|
|
//# sourceMappingURL=usePressability.js.map
|