node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# `react-use-callback-ref`
## Installation
```sh
$ yarn add @radix-ui/react-use-callback-ref
# or
$ npm install @radix-ui/react-use-callback-ref
```
## Usage
This is an internal utility, not intended for public usage.

View File

@@ -0,0 +1,7 @@
/**
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
* prop or avoid re-executing effects when passed as a dependency
*/
export function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,7 @@
/**
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
* prop or avoid re-executing effects when passed as a dependency
*/
export function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"mappings":"AAEA;;;GAGG;AACH,+BAAwB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,CASrF","sources":["packages/react/use-callback-ref/src/packages/react/use-callback-ref/src/useCallbackRef.tsx","packages/react/use-callback-ref/src/packages/react/use-callback-ref/src/index.ts","packages/react/use-callback-ref/src/index.ts"],"sourcesContent":[null,null,"export { useCallbackRef } from './useCallbackRef';\n"],"names":[],"version":3,"file":"index.d.ts.map"}

View File

@@ -0,0 +1,27 @@
var $92muK$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useCallbackRef", () => $28e03942f763e819$export$25bec8c6f54ee79a);
/**
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
* prop or avoid re-executing effects when passed as a dependency
*/ function $28e03942f763e819$export$25bec8c6f54ee79a(callback) {
const callbackRef = $92muK$react.useRef(callback);
$92muK$react.useEffect(()=>{
callbackRef.current = callback;
}); // https://github.com/facebook/react/issues/19240
return $92muK$react.useMemo(()=>(...args)=>{
var _callbackRef$current;
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
}
, []);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"mappings":";;;;;;;ACAA;AAEA;;;GAGA,CACA,SAASA,yCAAT,CAA2DE,QAA3D,EAAuF;IACrF,MAAMC,WAAW,GAAGF,mBAAA,CAAaC,QAAb,CAApB,AAAA;IAEAD,sBAAA,CAAgB,IAAM;QACpBE,WAAW,CAACG,OAAZ,GAAsBJ,QAAtB,CAAAC;KADF,CAAA,CAHqF,CAOrF,iDAFC;IAGD,OAAOF,oBAAA,CAAc,IAAO,CAAIO,GAAAA,IAAJ,GAA5B;YAA4B,IAAA,oBAAA,AAAA;YAAA,OAAA,AAAA,CAAA,oBAAA,GAAaL,WAAW,CAACG,OAAzB,CAAA,KAAA,IAAA,IAAA,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAa,oBAAA,CAAA,IAAA,CAAAH,WAAW,KAAcK,IAAd,CAAxB,CAAA;SAArB;IAAA,EAAwE,EAAxE,CAAP,CAA4B;CAC7B;;ADfD","sources":["packages/react/use-callback-ref/src/index.ts","packages/react/use-callback-ref/src/useCallbackRef.tsx"],"sourcesContent":["export { useCallbackRef } from './useCallbackRef';\n","import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n"],"names":["useCallbackRef","React","callback","callbackRef","useRef","useEffect","current","useMemo","args"],"version":3,"file":"index.js.map"}

View File

@@ -0,0 +1,23 @@
import {useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo} from "react";
/**
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
* prop or avoid re-executing effects when passed as a dependency
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
const callbackRef = $lwiWj$useRef(callback);
$lwiWj$useEffect(()=>{
callbackRef.current = callback;
}); // https://github.com/facebook/react/issues/19240
return $lwiWj$useMemo(()=>(...args)=>{
var _callbackRef$current;
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
}
, []);
}
export {$b1b2314f5f9a1d84$export$25bec8c6f54ee79a as useCallbackRef};
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"mappings":";;ACAA;AAEA;;;GAGA,CACA,SAASA,yCAAT,CAA2DE,QAA3D,EAAuF;IACrF,MAAMC,WAAW,GAAGF,aAAA,CAAaC,QAAb,CAApB,AAAA;IAEAD,gBAAA,CAAgB,IAAM;QACpBE,WAAW,CAACG,OAAZ,GAAsBJ,QAAtB,CAAAC;KADF,CAAA,CAHqF,CAOrF,iDAFC;IAGD,OAAOF,cAAA,CAAc,IAAO,CAAIO,GAAAA,IAAJ,GAA5B;YAA4B,IAAA,oBAAA,AAAA;YAAA,OAAA,AAAA,CAAA,oBAAA,GAAaL,WAAW,CAACG,OAAzB,CAAA,KAAA,IAAA,IAAA,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAa,oBAAA,CAAA,IAAA,CAAAH,WAAW,KAAcK,IAAd,CAAxB,CAAA;SAArB;IAAA,EAAwE,EAAxE,CAAP,CAA4B;CAC7B;;ADfD","sources":["packages/react/use-callback-ref/src/index.ts","packages/react/use-callback-ref/src/useCallbackRef.tsx"],"sourcesContent":["export { useCallbackRef } from './useCallbackRef';\n","import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n"],"names":["useCallbackRef","React","callback","callbackRef","useRef","useEffect","current","useMemo","args"],"version":3,"file":"index.mjs.map"}

View File

@@ -0,0 +1,50 @@
{
"name": "@radix-ui/react-use-callback-ref",
"version": "1.0.1",
"license": "MIT",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"clean": "rm -rf dist",
"version": "yarn version"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"dependencies": {
"@babel/runtime": "^7.13.10"
}
}