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

@rc-component/tour

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rc-component/tour - npm Package Compare versions

Comparing version 1.15.0 to 1.15.1

5

es/hooks/useTarget.js

@@ -6,2 +6,5 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

import { isInViewPort } from "../util";
function isValidNumber(val) {
return typeof val === 'number' && !Number.isNaN(val);
}
export default function useTarget(target, open, gap, scrollIntoViewOptions) {

@@ -74,3 +77,3 @@ // ========================= Target =========================

var gapOffsetY = getGapOffset(1);
var gapRadius = (gap === null || gap === void 0 ? void 0 : gap.radius) || 2;
var gapRadius = isValidNumber(gap === null || gap === void 0 ? void 0 : gap.radius) ? gap === null || gap === void 0 ? void 0 : gap.radius : 2;
return {

@@ -77,0 +80,0 @@ left: posInfo.left - gapOffsetX,

8

es/Tour.js

@@ -117,3 +117,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

var _triggerRef$current;
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.forceAlign();
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.forceAlign();
}, [arrowPointAtCenter, mergedCurrent]);

@@ -124,3 +124,3 @@

setMergedCurrent(nextCurrent);
onChange === null || onChange === void 0 || onChange(nextCurrent);
onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent);
};

@@ -143,3 +143,3 @@ var mergedBuiltinPlacements = useMemo(function () {

setMergedOpen(false);
onClose === null || onClose === void 0 || onClose(mergedCurrent);
onClose === null || onClose === void 0 ? void 0 : onClose(mergedCurrent);
};

@@ -163,3 +163,3 @@ var getPopupElement = function getPopupElement() {

handleClose();
_onFinish === null || _onFinish === void 0 || _onFinish();
_onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
}

@@ -166,0 +166,0 @@ }, steps[mergedCurrent], {

@@ -13,2 +13,5 @@ "use strict";

var _util = require("../util");
function isValidNumber(val) {
return typeof val === 'number' && !Number.isNaN(val);
}
function useTarget(target, open, gap, scrollIntoViewOptions) {

@@ -81,3 +84,3 @@ // ========================= Target =========================

var gapOffsetY = getGapOffset(1);
var gapRadius = (gap === null || gap === void 0 ? void 0 : gap.radius) || 2;
var gapRadius = isValidNumber(gap === null || gap === void 0 ? void 0 : gap.radius) ? gap === null || gap === void 0 ? void 0 : gap.radius : 2;
return {

@@ -84,0 +87,0 @@ left: posInfo.left - gapOffsetX,

@@ -9,2 +9,3 @@ "use strict";

var _Tour = _interopRequireDefault(require("./Tour"));
var _default = exports.default = _Tour.default;
var _default = _Tour.default;
exports.default = _default;

@@ -106,2 +106,3 @@ "use strict";

};
var _default = exports.default = Mask;
var _default = Mask;
exports.default = _default;

@@ -76,2 +76,3 @@ "use strict";

}
var placements = exports.placements = getPlacements();
var placements = getPlacements();
exports.placements = placements;

@@ -14,4 +14,3 @@ "use strict";

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var React = _react;
var React = _interopRequireWildcard(require("react"));
var _portal = _interopRequireDefault(require("@rc-component/portal"));

@@ -126,3 +125,3 @@ var _trigger = _interopRequireDefault(require("@rc-component/trigger"));

var _triggerRef$current;
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.forceAlign();
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.forceAlign();
}, [arrowPointAtCenter, mergedCurrent]);

@@ -133,5 +132,5 @@

setMergedCurrent(nextCurrent);
onChange === null || onChange === void 0 || onChange(nextCurrent);
onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent);
};
var mergedBuiltinPlacements = (0, _react.useMemo)(function () {
var mergedBuiltinPlacements = (0, React.useMemo)(function () {
if (builtinPlacements) {

@@ -152,3 +151,3 @@ return typeof builtinPlacements === 'function' ? builtinPlacements({

setMergedOpen(false);
onClose === null || onClose === void 0 || onClose(mergedCurrent);
onClose === null || onClose === void 0 ? void 0 : onClose(mergedCurrent);
};

@@ -172,3 +171,3 @@ var getPopupElement = function getPopupElement() {

handleClose();
_onFinish === null || _onFinish === void 0 || _onFinish();
_onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
}

@@ -222,2 +221,3 @@ }, steps[mergedCurrent], {

};
var _default = exports.default = Tour;
var _default = Tour;
exports.default = _default;

@@ -16,2 +16,3 @@ "use strict";

};
var _default = exports.default = TourStep;
var _default = TourStep;
exports.default = _default;
{
"name": "@rc-component/tour",
"version": "1.15.0",
"version": "1.15.1",
"description": "React tour Component",

@@ -65,2 +65,3 @@ "keywords": [

"typescript": "^5.0.0",
"cheerio": "1.0.0-rc.12",
"umi-test": "^1.9.7"

@@ -67,0 +68,0 @@ },

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