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

@react-aria/utils

Package Overview
Dependencies
Maintainers
2
Versions
808
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.997 to 3.0.0-nightly.1006

src/useSyncRef.ts

14

dist/main.js

@@ -737,2 +737,16 @@ var {

// Syncs ref from context with ref passed to hook
function useSyncRef(context, ref) {
useLayoutEffect(() => {
if (context && context.ref) {
context.ref.current = ref.current;
return () => {
context.ref.current = null;
};
}
}, [context, ref]);
}
exports.useSyncRef = useSyncRef;
function getScrollParent(node) {

@@ -739,0 +753,0 @@ while (node && !$e9be933e81f272fbb0513fcc706c7$var$isScrollable(node)) {

@@ -677,2 +677,13 @@ import { clamp, snapValueToStep } from "@react-stately/utils";

}
// Syncs ref from context with ref passed to hook
export function useSyncRef(context, ref) {
useLayoutEffect(() => {
if (context && context.ref) {
context.ref.current = ref.current;
return () => {
context.ref.current = null;
};
}
}, [context, ref]);
}
export function getScrollParent(node) {

@@ -679,0 +690,0 @@ while (node && !$a164c39662575b65a0b01a73e313e5$var$isScrollable(node)) {

4

dist/types.d.ts

@@ -94,2 +94,6 @@ import React, { HTMLAttributes, MutableRefObject, EffectCallback, RefObject } from "react";

export function useResizeObserver<T extends HTMLElement>(options: useResizeObserverOptionsType<T>): void;
interface ContextValue<T> {
ref?: MutableRefObject<T>;
}
export function useSyncRef<T>(context: ContextValue<T>, ref: RefObject<T>): void;
export function getScrollParent(node: Element): Element;

@@ -96,0 +100,0 @@ interface ViewportSize {

10

package.json
{
"name": "@react-aria/utils",
"version": "3.0.0-nightly.997+1e2b7f28",
"version": "3.0.0-nightly.1006+3a1f1549",
"description": "Spectrum UI components in React",

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

"@babel/runtime": "^7.6.2",
"@react-aria/ssr": "3.0.2-nightly.2677+1e2b7f28",
"@react-stately/utils": "3.0.0-nightly.997+1e2b7f28",
"@react-types/shared": "3.0.0-nightly.997+1e2b7f28",
"@react-aria/ssr": "3.0.2-nightly.2686+3a1f1549",
"@react-stately/utils": "3.0.0-nightly.1006+3a1f1549",
"@react-types/shared": "3.0.0-nightly.1006+3a1f1549",
"clsx": "^1.1.1"

@@ -33,3 +33,3 @@ },

},
"gitHead": "1e2b7f280a04ead83e21b27fa580eb189e5f4186"
"gitHead": "3a1f15494c22fb9f06de7285f8b920f46f959fac"
}

@@ -27,2 +27,3 @@ /*

export * from './useResizeObserver';
export * from './useSyncRef';
export * from './getScrollParent';

@@ -29,0 +30,0 @@ export * from './useViewportSize';

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