@nextui-org/react-utils
Advanced tools
Comparing version 2.0.10 to 2.0.11
@@ -23,3 +23,11 @@ import { DOMRefValue, FocusableRefValue, FocusableRef } from '@react-types/shared'; | ||
declare function useSyncRef<T>(context: ContextValue<T | null>, ref: RefObject<T>): void; | ||
/** | ||
* Checks if two DOMRect objects intersect each other. | ||
* | ||
* @param rect1 - The first DOMRect object. | ||
* @param rect2 - The second DOMRect object. | ||
* @returns A boolean indicating whether the two DOMRect objects intersect. | ||
*/ | ||
declare function areRectsIntersecting(rect1: DOMRect, rect2: DOMRect): boolean; | ||
export { ContextValue, UserAgentBrowser, UserAgentDeviceType, UserAgentOS, canUseDOM, createDOMRef, createFocusableRef, detectBrowser, detectDeviceType, detectOS, detectTouch, getUserAgentBrowser, getUserAgentOS, isBrowser, useDOMRef, useFocusableRef, useSyncRef }; | ||
export { ContextValue, UserAgentBrowser, UserAgentDeviceType, UserAgentOS, areRectsIntersecting, canUseDOM, createDOMRef, createFocusableRef, detectBrowser, detectDeviceType, detectOS, detectTouch, getUserAgentBrowser, getUserAgentOS, isBrowser, useDOMRef, useFocusableRef, useSyncRef }; |
@@ -24,2 +24,3 @@ "use client"; | ||
__export(dom_exports, { | ||
areRectsIntersecting: () => areRectsIntersecting, | ||
canUseDOM: () => canUseDOM, | ||
@@ -153,4 +154,8 @@ createDOMRef: () => createDOMRef, | ||
} | ||
function areRectsIntersecting(rect1, rect2) { | ||
return rect1 && rect2 && rect1.x < rect2.x + rect2.width && rect1.x + rect1.width > rect2.x && rect1.y < rect2.y + rect2.height && rect1.y + rect1.height > rect2.y; | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
areRectsIntersecting, | ||
canUseDOM, | ||
@@ -157,0 +162,0 @@ createDOMRef, |
export { CreateContextOptions, CreateContextReturn, createContext } from './context.js'; | ||
export { ReactRef, assignRef, mergeRefs } from './refs.js'; | ||
export { ContextValue, UserAgentBrowser, UserAgentDeviceType, UserAgentOS, canUseDOM, createDOMRef, createFocusableRef, detectBrowser, detectDeviceType, detectOS, detectTouch, getUserAgentBrowser, getUserAgentOS, isBrowser, useDOMRef, useFocusableRef, useSyncRef } from './dom.js'; | ||
export { ContextValue, UserAgentBrowser, UserAgentDeviceType, UserAgentOS, areRectsIntersecting, canUseDOM, createDOMRef, createFocusableRef, detectBrowser, detectDeviceType, detectOS, detectTouch, getUserAgentBrowser, getUserAgentOS, isBrowser, useDOMRef, useFocusableRef, useSyncRef } from './dom.js'; | ||
export { ShapeType, getCSSStyleVal, getRealShape } from './dimensions.js'; | ||
@@ -5,0 +5,0 @@ export * from '@nextui-org/react-rsc-utils'; |
@@ -31,2 +31,3 @@ "use client"; | ||
__export(src_exports, { | ||
areRectsIntersecting: () => areRectsIntersecting, | ||
assignRef: () => assignRef, | ||
@@ -212,2 +213,5 @@ canUseDOM: () => canUseDOM, | ||
} | ||
function areRectsIntersecting(rect1, rect2) { | ||
return rect1 && rect2 && rect1.x < rect2.x + rect2.width && rect1.x + rect1.width > rect2.x && rect1.y < rect2.y + rect2.height && rect1.y + rect1.height > rect2.y; | ||
} | ||
@@ -237,2 +241,3 @@ // src/dimensions.ts | ||
0 && (module.exports = { | ||
areRectsIntersecting, | ||
assignRef, | ||
@@ -239,0 +244,0 @@ canUseDOM, |
{ | ||
"name": "@nextui-org/react-utils", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"description": "A set of utilities for react on client side", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@nextui-org/shared-utils": "2.0.4", | ||
"@nextui-org/react-rsc-utils": "2.0.10" | ||
"@nextui-org/shared-utils": "2.0.5", | ||
"@nextui-org/react-rsc-utils": "2.0.11" | ||
}, | ||
@@ -49,3 +49,3 @@ "clean-package": "../../../clean-package.config.json", | ||
"build:fast": "tsup src", | ||
"dev": "yarn build:fast -- --watch", | ||
"dev": "pnpm build:fast --watch", | ||
"clean": "rimraf dist .turbo", | ||
@@ -52,0 +52,0 @@ "typecheck": "tsc --noEmit" |
@@ -21,5 +21,5 @@ # @nextui-org/react-utils | ||
## Licence | ||
## License | ||
This project is licensed under the terms of the | ||
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32894
988
+ Added@nextui-org/react-rsc-utils@2.0.11(transitive)
+ Added@nextui-org/shared-utils@2.0.5(transitive)
- Removed@nextui-org/react-rsc-utils@2.0.10(transitive)
- Removed@nextui-org/shared-utils@2.0.4(transitive)