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

rc-trigger

Package Overview
Dependencies
Maintainers
5
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 5.2.10 to 5.2.11

HISTORY.md

9

es/Popup/useVisibleStatus.js
import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import { useState, useEffect, useRef } from 'react';
import { useEffect, useRef } from 'react';
import raf from "rc-util/es/raf";
import useState from "rc-util/es/hooks/useState";
var StatusQueue = ['measure', 'align', null, 'motion'];

@@ -14,8 +15,5 @@ export default (function (visible, doMeasure) {

var rafRef = useRef();
var destroyRef = useRef(false);
function setStatus(nextStatus) {
if (!destroyRef.current) {
setInternalStatus(nextStatus);
}
setInternalStatus(nextStatus, true);
}

@@ -87,3 +85,2 @@

return function () {
destroyRef.current = true;
cancelRaf();

@@ -90,0 +87,0 @@ };

@@ -10,4 +10,4 @@ "use strict";

});
exports.default = void 0;
exports.generateTrigger = generateTrigger;
exports.default = void 0;

@@ -14,0 +14,0 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

@@ -20,6 +20,8 @@ "use strict";

var _useState3 = _interopRequireDefault(require("rc-util/lib/hooks/useState"));
var StatusQueue = ['measure', 'align', null, 'motion'];
var _default = function _default(visible, doMeasure) {
var _useState = (0, _react.useState)(null),
var _useState = (0, _useState3.default)(null),
_useState2 = (0, _slicedToArray2.default)(_useState, 2),

@@ -30,8 +32,5 @@ status = _useState2[0],

var rafRef = (0, _react.useRef)();
var destroyRef = (0, _react.useRef)(false);
function setStatus(nextStatus) {
if (!destroyRef.current) {
setInternalStatus(nextStatus);
}
setInternalStatus(nextStatus, true);
}

@@ -103,3 +102,2 @@

return function () {
destroyRef.current = true;
cancelRaf();

@@ -106,0 +104,0 @@ };

{
"name": "rc-trigger",
"version": "5.2.10",
"version": "5.2.11",
"description": "base abstract trigger component for react",

@@ -33,7 +33,7 @@ "engines": {

"scripts": {
"start": "cross-env NODE_ENV=development father doc dev --storybook",
"build": "father doc build --storybook",
"start": "dumi dev",
"build": "dumi build",
"compile": "father build && lessc assets/index.less assets/index.css",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js",
"lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
"test": "father test",

@@ -50,2 +50,3 @@ "coverage": "father test --coverage",

"cross-env": "^7.0.1",
"dumi": "^1.1.38",
"enzyme": "^3.3.0",

@@ -68,3 +69,3 @@ "enzyme-adapter-react-16": "^1.14.0",

"rc-motion": "^2.0.0",
"rc-util": "^5.5.0"
"rc-util": "^5.19.2"
},

@@ -71,0 +72,0 @@ "peerDependencies": {

@@ -13,2 +13,3 @@ # rc-trigger

[![bundle size][bundlephobia-image]][bundlephobia-url]
[![dumi][dumi-image]][dumi-url]

@@ -31,2 +32,4 @@ [npm-image]: http://img.shields.io/npm/v/rc-trigger.svg?style=flat-square

[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-trigger
[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square
[dumi-url]: https://github.com/umijs/dumi

@@ -33,0 +36,0 @@ ## Install

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