@sheinx/hooks 3.4.4 → 3.4.5-beta.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ export { default as useInView } from './use-in-view';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "useInView", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _useInView.default;
11
+ }
12
+ });
13
+ var _useInView = _interopRequireDefault(require("./use-in-view"));
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ interface UseInViewOptions {
3
+ root?: HTMLElement | null;
4
+ rootMargin?: string;
5
+ threshold?: number | number[];
6
+ once?: boolean;
7
+ }
8
+ declare const useInView: <T extends HTMLElement>(options?: UseInViewOptions) => {
9
+ ref: import("react").MutableRefObject<T | null>;
10
+ isInView: boolean;
11
+ wasInView: boolean;
12
+ };
13
+ export default useInView;
14
+ //# sourceMappingURL=use-in-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["use-in-view.ts"],"names":[],"mappings":";AAIA,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,SAAS,oCAAoC,gBAAgB;;;;CAqClE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ var useInView = function useInView() {
15
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
16
+ var elementRef = (0, _react.useRef)(null);
17
+ var _useState = (0, _react.useState)(false),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ isInView = _useState2[0],
20
+ setIsInView = _useState2[1];
21
+ var _useState3 = (0, _react.useState)(false),
22
+ _useState4 = _slicedToArray(_useState3, 2),
23
+ wasInView = _useState4[0],
24
+ setWasInView = _useState4[1];
25
+ (0, _react.useEffect)(function () {
26
+ var element = elementRef.current;
27
+ if (!element) return;
28
+ var observer = new IntersectionObserver(function (_ref) {
29
+ var _ref2 = _slicedToArray(_ref, 1),
30
+ entry = _ref2[0];
31
+ var inView = entry.isIntersecting;
32
+ setIsInView(inView);
33
+ if (inView) {
34
+ setWasInView(true);
35
+ // 如果设置了 once 选项,且元素已经出现过,则取消观察
36
+ if (options.once) {
37
+ observer.disconnect();
38
+ }
39
+ }
40
+ }, {
41
+ root: options.root || null,
42
+ rootMargin: options.rootMargin || '0px',
43
+ threshold: options.threshold || 0
44
+ });
45
+ observer.observe(element);
46
+ return function () {
47
+ observer.disconnect();
48
+ };
49
+ }, [options.root, options.rootMargin, options.threshold, options.once]);
50
+ return {
51
+ ref: elementRef,
52
+ isInView: isInView,
53
+ wasInView: wasInView
54
+ };
55
+ };
56
+ var _default = exports.default = useInView; // 使用示例
57
+ // const Example = () => {
58
+ // const { ref, isInView } = useInView({
59
+ // threshold: 0.5,
60
+ // rootMargin: '50px',
61
+ // once: true
62
+ // });
63
+ // return (
64
+ // <div ref={ref}>
65
+ // {isInView ? '元素在视窗中' : '元素不在视窗中'}
66
+ // </div>
67
+ // );
68
+ // };
package/cjs/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { util };
5
5
  export * from './common/type';
6
6
  export * from './common/use-fork-ref';
7
7
  export * from './common/use-input-able';
8
+ export * from './common/use-in-view';
8
9
  export * from './common/use-latest-obj';
9
10
  export * from './common/use-persist-fn';
10
11
  export * from './common/use-key-event';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AAEjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,IAAI,EAAE,CAAC;AAGhB,cAAc,eA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,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;;AAE1C,wBAAkB"}
package/cjs/index.js CHANGED
@@ -71,6 +71,18 @@ Object.keys(_useInputAble).forEach(function (key) {
71
71
  }
72
72
  });
73
73
  });
74
+ var _useInView = require("./common/use-in-view");
75
+ Object.keys(_useInView).forEach(function (key) {
76
+ if (key === "default" || key === "__esModule") return;
77
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
78
+ if (key in exports && exports[key] === _useInView[key]) return;
79
+ Object.defineProperty(exports, key, {
80
+ enumerable: true,
81
+ get: function get() {
82
+ return _useInView[key];
83
+ }
84
+ });
85
+ });
74
86
  var _useLatestObj = require("./common/use-latest-obj");
75
87
  Object.keys(_useLatestObj).forEach(function (key) {
76
88
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,2 @@
1
+ export { default as useInView } from './use-in-view';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { default as useInView } from "./use-in-view";
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ interface UseInViewOptions {
3
+ root?: HTMLElement | null;
4
+ rootMargin?: string;
5
+ threshold?: number | number[];
6
+ once?: boolean;
7
+ }
8
+ declare const useInView: <T extends HTMLElement>(options?: UseInViewOptions) => {
9
+ ref: import("react").MutableRefObject<T | null>;
10
+ isInView: boolean;
11
+ wasInView: boolean;
12
+ };
13
+ export default useInView;
14
+ //# sourceMappingURL=use-in-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["use-in-view.ts"],"names":[],"mappings":";AAIA,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,SAAS,oCAAoC,gBAAgB;;;;CAqClE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,65 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useEffect, useRef, useState } from 'react';
8
+ var useInView = function useInView() {
9
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10
+ var elementRef = useRef(null);
11
+ var _useState = useState(false),
12
+ _useState2 = _slicedToArray(_useState, 2),
13
+ isInView = _useState2[0],
14
+ setIsInView = _useState2[1];
15
+ var _useState3 = useState(false),
16
+ _useState4 = _slicedToArray(_useState3, 2),
17
+ wasInView = _useState4[0],
18
+ setWasInView = _useState4[1];
19
+ useEffect(function () {
20
+ var element = elementRef.current;
21
+ if (!element) return;
22
+ var observer = new IntersectionObserver(function (_ref) {
23
+ var _ref2 = _slicedToArray(_ref, 1),
24
+ entry = _ref2[0];
25
+ var inView = entry.isIntersecting;
26
+ setIsInView(inView);
27
+ if (inView) {
28
+ setWasInView(true);
29
+ // 如果设置了 once 选项,且元素已经出现过,则取消观察
30
+ if (options.once) {
31
+ observer.disconnect();
32
+ }
33
+ }
34
+ }, {
35
+ root: options.root || null,
36
+ rootMargin: options.rootMargin || '0px',
37
+ threshold: options.threshold || 0
38
+ });
39
+ observer.observe(element);
40
+ return function () {
41
+ observer.disconnect();
42
+ };
43
+ }, [options.root, options.rootMargin, options.threshold, options.once]);
44
+ return {
45
+ ref: elementRef,
46
+ isInView: isInView,
47
+ wasInView: wasInView
48
+ };
49
+ };
50
+ export default useInView;
51
+
52
+ // 使用示例
53
+ // const Example = () => {
54
+ // const { ref, isInView } = useInView({
55
+ // threshold: 0.5,
56
+ // rootMargin: '50px',
57
+ // once: true
58
+ // });
59
+
60
+ // return (
61
+ // <div ref={ref}>
62
+ // {isInView ? '元素在视窗中' : '元素不在视窗中'}
63
+ // </div>
64
+ // );
65
+ // };
package/esm/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { util };
5
5
  export * from './common/type';
6
6
  export * from './common/use-fork-ref';
7
7
  export * from './common/use-input-able';
8
+ export * from './common/use-in-view';
8
9
  export * from './common/use-latest-obj';
9
10
  export * from './common/use-persist-fn';
10
11
  export * from './common/use-key-event';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"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ACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;;AAE1C,wBAAkB"}
package/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export { util };
8
8
  export * from "./common/type";
9
9
  export * from "./common/use-fork-ref";
10
10
  export * from "./common/use-input-able";
11
+ export * from "./common/use-in-view";
11
12
  export * from "./common/use-latest-obj";
12
13
  export * from "./common/use-persist-fn";
13
14
  export * from "./common/use-key-event";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.4.4",
3
+ "version": "3.4.5-beta.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",