Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@react-aria/utils

Package Overview
Dependencies
Maintainers
2
Versions
795
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/utils - npm Package Compare versions

Comparing version 3.0.0-nightly.2947 to 3.0.0-nightly.2952

1

dist/types.d.ts

@@ -160,2 +160,3 @@ import React, { ForwardedRef, MutableRefObject, ReactNode, HTMLAttributes, EffectCallback, RefObject, Dispatch } from "react";

ref: RefObject<T | undefined> | undefined;
box?: ResizeObserverBoxOptions;
onResize: () => void;

@@ -162,0 +163,0 @@ };

9

dist/useResizeObserver.main.js

@@ -14,3 +14,3 @@ var $aM4zL$react = require("react");

function $37733e1652f47193$export$683480f191c0e3ea(options) {
const { ref: ref, onResize: onResize } = options;
const { ref: ref, box: box, onResize: onResize } = options;
(0, $aM4zL$react.useEffect)(()=>{

@@ -29,3 +29,5 @@ let element = ref === null || ref === void 0 ? void 0 : ref.current;

});
resizeObserverInstance.observe(element);
resizeObserverInstance.observe(element, {
box: box
});
return ()=>{

@@ -37,3 +39,4 @@ if (element) resizeObserverInstance.unobserve(element);

onResize,
ref
ref,
box
]);

@@ -40,0 +43,0 @@ }

@@ -8,3 +8,3 @@ import {useEffect as $Vsl8o$useEffect} from "react";

function $9daab02d461809db$export$683480f191c0e3ea(options) {
const { ref: ref, onResize: onResize } = options;
const { ref: ref, box: box, onResize: onResize } = options;
(0, $Vsl8o$useEffect)(()=>{

@@ -23,3 +23,5 @@ let element = ref === null || ref === void 0 ? void 0 : ref.current;

});
resizeObserverInstance.observe(element);
resizeObserverInstance.observe(element, {
box: box
});
return ()=>{

@@ -31,3 +33,4 @@ if (element) resizeObserverInstance.unobserve(element);

onResize,
ref
ref,
box
]);

@@ -34,0 +37,0 @@ }

{
"name": "@react-aria/utils",
"version": "3.0.0-nightly.2947+23c5ba142",
"version": "3.0.0-nightly.2952+10bac541a",
"description": "Spectrum UI components in React",

@@ -25,5 +25,5 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/ssr": "3.9.5-nightly.4659+23c5ba142",
"@react-stately/utils": "3.0.0-nightly.2947+23c5ba142",
"@react-types/shared": "3.0.0-nightly.2947+23c5ba142",
"@react-aria/ssr": "3.9.5-nightly.4664+10bac541a",
"@react-stately/utils": "3.0.0-nightly.2952+10bac541a",
"@react-types/shared": "3.0.0-nightly.2952+10bac541a",
"@swc/helpers": "^0.5.0",

@@ -38,3 +38,3 @@ "clsx": "^2.0.0"

},
"gitHead": "23c5ba142e0faad80ab33d6d3c66c5bdafebf5d2"
"gitHead": "10bac541a2a5c666b443fe70f313455a405a5c77"
}

@@ -9,2 +9,3 @@ import {RefObject, useEffect} from 'react';

ref: RefObject<T | undefined> | undefined,
box?: ResizeObserverBoxOptions,
onResize: () => void

@@ -14,3 +15,3 @@ }

export function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>) {
const {ref, onResize} = options;
const {ref, box, onResize} = options;

@@ -37,3 +38,3 @@ useEffect(() => {

});
resizeObserverInstance.observe(element);
resizeObserverInstance.observe(element, {box});

@@ -47,3 +48,3 @@ return () => {

}, [onResize, ref]);
}, [onResize, ref, box]);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc