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

@react-aria/toast

Package Overview
Dependencies
Maintainers
0
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/toast - npm Package Compare versions

Comparing version 3.0.0-nightly-e60fb427c-240930 to 3.0.0-nightly-e94e36431-241203

2

dist/useToast.main.js

@@ -33,3 +33,3 @@ var $f49b2d6c91681304$exports = require("./intlStrings.main.js");

(0, $ijFUR$react.useEffect)(()=>{
if (!timer) return;
if (timer == null || timeout == null) return;
timer.reset(timeout);

@@ -36,0 +36,0 @@ return ()=>{

@@ -27,3 +27,3 @@ import $7WpW4$intlStringsmodulejs from "./intlStrings.module.js";

(0, $7WpW4$useEffect)(()=>{
if (!timer) return;
if (timer == null || timeout == null) return;
timer.reset(timeout);

@@ -30,0 +30,0 @@ return ()=>{

@@ -45,3 +45,3 @@ var $f49b2d6c91681304$exports = require("./intlStrings.main.js");

// If no toast has focus, then don't do anything.
if (focusedToast.current === -1 || state.visibleToasts.length === 0) {
if (focusedToast.current === -1 || state.visibleToasts.length === 0 || !ref.current) {
toasts.current = [];

@@ -48,0 +48,0 @@ prevVisibleToasts.current = state.visibleToasts;

@@ -39,3 +39,3 @@ import $ckyCP$intlStringsmodulejs from "./intlStrings.module.js";

// If no toast has focus, then don't do anything.
if (focusedToast.current === -1 || state.visibleToasts.length === 0) {
if (focusedToast.current === -1 || state.visibleToasts.length === 0 || !ref.current) {
toasts.current = [];

@@ -42,0 +42,0 @@ prevVisibleToasts.current = state.visibleToasts;

{
"name": "@react-aria/toast",
"version": "3.0.0-nightly-e60fb427c-240930",
"version": "3.0.0-nightly-e94e36431-241203",
"description": "Spectrum UI components in React",

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

"dependencies": {
"@react-aria/i18n": "^3.0.0-nightly-e60fb427c-240930",
"@react-aria/interactions": "^3.0.0-nightly-e60fb427c-240930",
"@react-aria/landmark": "3.0.0-nightly-e60fb427c-240930",
"@react-aria/utils": "^3.0.0-nightly-e60fb427c-240930",
"@react-stately/toast": "3.0.0-nightly-e60fb427c-240930",
"@react-types/button": "^3.0.0-nightly-e60fb427c-240930",
"@react-types/shared": "^3.0.0-nightly-e60fb427c-240930",
"@react-aria/i18n": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/interactions": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/landmark": "3.0.0-nightly-e94e36431-241203",
"@react-aria/utils": "^3.0.0-nightly-e94e36431-241203",
"@react-stately/toast": "3.0.0-nightly-e94e36431-241203",
"@react-types/button": "^3.0.0-nightly-e94e36431-241203",
"@react-types/shared": "^3.0.0-nightly-e94e36431-241203",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},

@@ -41,3 +41,3 @@ "publishConfig": {

},
"stableVersion": "3.0.0-beta.15"
"stableVersion": "3.0.0-beta.18"
}

@@ -54,3 +54,3 @@ /*

useEffect(() => {
if (!timer) {
if (timer == null || timeout == null) {
return;

@@ -57,0 +57,0 @@ }

@@ -1,2 +0,2 @@

import {AriaLabelingProps, DOMAttributes, RefObject} from '@react-types/shared';
import {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
import {focusWithoutScrolling, mergeProps, useLayoutEffect} from '@react-aria/utils';

@@ -44,8 +44,8 @@ import {getInteractionModality, useFocusWithin, useHover} from '@react-aria/interactions';

// if they only show one toast at a time.
let toasts = useRef([]);
let toasts = useRef<FocusableElement[]>([]);
let prevVisibleToasts = useRef(state.visibleToasts);
let focusedToast = useRef(null);
let focusedToast = useRef<number | null>(null);
useLayoutEffect(() => {
// If no toast has focus, then don't do anything.
if (focusedToast.current === -1 || state.visibleToasts.length === 0) {
if (focusedToast.current === -1 || state.visibleToasts.length === 0 || !ref.current) {
toasts.current = [];

@@ -55,3 +55,3 @@ prevVisibleToasts.current = state.visibleToasts;

}
toasts.current = [...ref.current.querySelectorAll('[role="alertdialog"]')];
toasts.current = [...ref.current.querySelectorAll('[role="alertdialog"]')] as FocusableElement[];
// If the visible toasts haven't changed, we don't need to do anything.

@@ -108,7 +108,7 @@ if (prevVisibleToasts.current.length === state.visibleToasts.length

let lastFocused = useRef(null);
let lastFocused = useRef<FocusableElement | null>(null);
let {focusWithinProps} = useFocusWithin({
onFocusWithin: (e) => {
state.pauseAll();
lastFocused.current = e.relatedTarget;
lastFocused.current = e.relatedTarget as FocusableElement;
},

@@ -115,0 +115,0 @@ onBlurWithin: () => {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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