@cleartrip/talos-use-intersection-observer 1.0.0-beta-260515-7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/talos-use-intersection-observer.browser.cjs.js +2 -0
- package/dist/talos-use-intersection-observer.browser.cjs.js.map +1 -0
- package/dist/talos-use-intersection-observer.browser.esm.js +2 -0
- package/dist/talos-use-intersection-observer.browser.esm.js.map +1 -0
- package/dist/talos-use-intersection-observer.cjs.js +40 -0
- package/dist/talos-use-intersection-observer.cjs.js.map +1 -0
- package/dist/talos-use-intersection-observer.esm.js +38 -0
- package/dist/talos-use-intersection-observer.esm.js.map +1 -0
- package/dist/talos-use-intersection-observer.umd.js +44 -0
- package/dist/talos-use-intersection-observer.umd.js.map +1 -0
- package/dist/useIntersectionObserver.d.ts +2 -0
- package/dist/useIntersectionObserver.d.ts.map +1 -0
- package/package.json +32 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/hooks/use-intersection-observer/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react");exports.useIntersectionObserver=function(r,n){var t=e.useState(function(){return function(e){return void 0===e}(r)}),o=t[0],i=t[1],s=null!=n?n:{},u=s.root,c=s.rootMargin,f=s.threshold;return e.useEffect(function(){if(void 0!==r)if(r){if("undefined"!=typeof IntersectionObserver){var e=new IntersectionObserver(function(e){var r,n=e[0];i(null!==(r=null==n?void 0:n.isIntersecting)&&void 0!==r&&r)},{root:u,rootMargin:c,threshold:f});return e.observe(r),function(){return e.disconnect()}}i(!0)}else i(!1);else i(!0)},[r,u,c,f]),o};
|
|
2
|
+
//# sourceMappingURL=talos-use-intersection-observer.browser.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talos-use-intersection-observer.browser.cjs.js","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"sourcesContent":[null],"names":["element","options","_a","useState","undefined","initialIntersecting","isIntersecting","setIsIntersecting","_b","root","rootMargin","threshold","useEffect","IntersectionObserver","observer","entry","observe","disconnect"],"mappings":"oEAWgB,SACdA,EACAC,GAEM,IAAAC,EAAsCC,EAAAA,SAAS,WACnD,OAdJ,SAA6BH,GAC3B,YAAgBI,IAAZJ,CAEN,CAWIK,CAAoBL,EAApB,GADKM,OAAgBC,OAIjBC,EAAkCP,QAAAA,EAAW,CAAE,EAA7CQ,SAAMC,eAAYC,cA6B1B,OA3BAC,EAAAA,UAAU,WACR,QAAgBR,IAAZJ,EAKJ,GAAKA,EAAL,CAKA,GAAoC,oBAAzBa,qBAAX,CAKA,IAAMC,EAAW,IAAID,qBACnB,SAACX,SAACa,EAAKb,EAAA,GACLK,EAAuC,QAArBC,EAAAO,aAAK,EAALA,EAAOT,sBAAc,IAAAE,GAAAA,EACzC,EACA,CAAEC,KAAIA,EAAEC,WAAUA,EAAEC,UAASA,IAI/B,OADAG,EAASE,QAAQhB,GACV,WAAM,OAAAc,EAASG,YAAY,CAVjC,CAFCV,GAAkB,EAHnB,MAFCA,GAAkB,QALlBA,GAAkB,EAuBrB,EAAE,CAACP,EAASS,EAAMC,EAAYC,IAExBL,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useState as n,useEffect as r}from"react";function e(e,o){var t=n(function(){return function(n){return void 0===n}(e)}),i=t[0],u=t[1],c=null!=o?o:{},f=c.root,s=c.rootMargin,l=c.threshold;return r(function(){if(void 0!==e)if(e){if("undefined"!=typeof IntersectionObserver){var n=new IntersectionObserver(function(n){var r,e=n[0];u(null!==(r=null==e?void 0:e.isIntersecting)&&void 0!==r&&r)},{root:f,rootMargin:s,threshold:l});return n.observe(e),function(){return n.disconnect()}}u(!0)}else u(!1);else u(!0)},[e,f,s,l]),i}export{e as useIntersectionObserver};
|
|
2
|
+
//# sourceMappingURL=talos-use-intersection-observer.browser.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talos-use-intersection-observer.browser.esm.js","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"sourcesContent":[null],"names":["useIntersectionObserver","element","options","_a","useState","undefined","initialIntersecting","isIntersecting","setIsIntersecting","_b","root","rootMargin","threshold","useEffect","IntersectionObserver","observer","entry","observe","disconnect"],"mappings":"gDAWgB,SAAAA,EACdC,EACAC,GAEM,IAAAC,EAAsCC,EAAS,WACnD,OAdJ,SAA6BH,GAC3B,YAAgBI,IAAZJ,CAEN,CAWIK,CAAoBL,EAApB,GADKM,OAAgBC,OAIjBC,EAAkCP,QAAAA,EAAW,CAAE,EAA7CQ,SAAMC,eAAYC,cA6B1B,OA3BAC,EAAU,WACR,QAAgBR,IAAZJ,EAKJ,GAAKA,EAAL,CAKA,GAAoC,oBAAzBa,qBAAX,CAKA,IAAMC,EAAW,IAAID,qBACnB,SAACX,SAACa,EAAKb,EAAA,GACLK,EAAuC,QAArBC,EAAAO,aAAK,EAALA,EAAOT,sBAAc,IAAAE,GAAAA,EACzC,EACA,CAAEC,KAAIA,EAAEC,WAAUA,EAAEC,UAASA,IAI/B,OADAG,EAASE,QAAQhB,GACV,WAAM,OAAAc,EAASG,YAAY,CAVjC,CAFCV,GAAkB,EAHnB,MAFCA,GAAkB,QALlBA,GAAkB,EAuBrB,EAAE,CAACP,EAASS,EAAMC,EAAYC,IAExBL,CACT"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
|
|
5
|
+
function initialIntersecting(element) {
|
|
6
|
+
if (element === undefined)
|
|
7
|
+
return true;
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
function useIntersectionObserver(element, options) {
|
|
11
|
+
var _a = react.useState(function () {
|
|
12
|
+
return initialIntersecting(element);
|
|
13
|
+
}), isIntersecting = _a[0], setIsIntersecting = _a[1];
|
|
14
|
+
var _b = options !== null && options !== void 0 ? options : {}, root = _b.root, rootMargin = _b.rootMargin, threshold = _b.threshold;
|
|
15
|
+
react.useEffect(function () {
|
|
16
|
+
if (element === undefined) {
|
|
17
|
+
setIsIntersecting(true);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!element) {
|
|
21
|
+
setIsIntersecting(false);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
25
|
+
setIsIntersecting(true);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
var observer = new IntersectionObserver(function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var entry = _a[0];
|
|
31
|
+
setIsIntersecting((_b = entry === null || entry === void 0 ? void 0 : entry.isIntersecting) !== null && _b !== void 0 ? _b : false);
|
|
32
|
+
}, { root: root, rootMargin: rootMargin, threshold: threshold });
|
|
33
|
+
observer.observe(element);
|
|
34
|
+
return function () { return observer.disconnect(); };
|
|
35
|
+
}, [element, root, rootMargin, threshold]);
|
|
36
|
+
return isIntersecting;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.useIntersectionObserver = useIntersectionObserver;
|
|
40
|
+
//# sourceMappingURL=talos-use-intersection-observer.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talos-use-intersection-observer.cjs.js","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"sourcesContent":[null],"names":["useState","useEffect"],"mappings":";;;;AAEA,SAAS,mBAAmB,CAAC,OAAmC,EAAA;IAC9D,IAAI,OAAO,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI,CAAC;AACvC,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;AAMe,SAAA,uBAAuB,CACrC,OAAmC,EACnC,OAAkC,EAAA;IAE5B,IAAA,EAAA,GAAsCA,cAAQ,CAAC,YAAA;QACnD,OAAA,mBAAmB,CAAC,OAAO,CAAC,CAAA;AAA5B,KAA4B,CAC7B,EAFM,cAAc,QAAA,EAAE,iBAAiB,QAEvC,CAAC;AAEI,IAAA,IAAA,KAAkC,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAP,OAAO,GAAI,EAAE,EAA7C,IAAI,UAAA,EAAE,UAAU,gBAAA,EAAE,SAAS,eAAkB,CAAC;AAEtD,IAAAC,eAAS,CAAC,YAAA;QACR,IAAI,OAAO,KAAK,SAAS,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;AACR,SAAA;QAED,IAAI,CAAC,OAAO,EAAE;YACZ,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO;AACR,SAAA;AAED,QAAA,IAAI,OAAO,oBAAoB,KAAK,WAAW,EAAE;YAC/C,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;AACR,SAAA;AAED,QAAA,IAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,UAAC,EAAO,EAAA;;AAAN,YAAA,IAAA,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AACL,YAAA,iBAAiB,CAAC,CAAA,EAAA,GAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,CAAC,CAAC;AACpD,SAAC,EACD,EAAE,IAAI,EAAA,IAAA,EAAE,UAAU,EAAA,UAAA,EAAE,SAAS,EAAA,SAAA,EAAE,CAChC,CAAC;AAEF,QAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,YAAA,EAAM,OAAA,QAAQ,CAAC,UAAU,EAAE,CAAA,EAAA,CAAC;KACpC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAE3C,IAAA,OAAO,cAAc,CAAC;AACxB;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
function initialIntersecting(element) {
|
|
4
|
+
if (element === undefined)
|
|
5
|
+
return true;
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
function useIntersectionObserver(element, options) {
|
|
9
|
+
var _a = useState(function () {
|
|
10
|
+
return initialIntersecting(element);
|
|
11
|
+
}), isIntersecting = _a[0], setIsIntersecting = _a[1];
|
|
12
|
+
var _b = options !== null && options !== void 0 ? options : {}, root = _b.root, rootMargin = _b.rootMargin, threshold = _b.threshold;
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
if (element === undefined) {
|
|
15
|
+
setIsIntersecting(true);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (!element) {
|
|
19
|
+
setIsIntersecting(false);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
23
|
+
setIsIntersecting(true);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
var observer = new IntersectionObserver(function (_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var entry = _a[0];
|
|
29
|
+
setIsIntersecting((_b = entry === null || entry === void 0 ? void 0 : entry.isIntersecting) !== null && _b !== void 0 ? _b : false);
|
|
30
|
+
}, { root: root, rootMargin: rootMargin, threshold: threshold });
|
|
31
|
+
observer.observe(element);
|
|
32
|
+
return function () { return observer.disconnect(); };
|
|
33
|
+
}, [element, root, rootMargin, threshold]);
|
|
34
|
+
return isIntersecting;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { useIntersectionObserver };
|
|
38
|
+
//# sourceMappingURL=talos-use-intersection-observer.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talos-use-intersection-observer.esm.js","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,SAAS,mBAAmB,CAAC,OAAmC,EAAA;IAC9D,IAAI,OAAO,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI,CAAC;AACvC,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;AAMe,SAAA,uBAAuB,CACrC,OAAmC,EACnC,OAAkC,EAAA;IAE5B,IAAA,EAAA,GAAsC,QAAQ,CAAC,YAAA;QACnD,OAAA,mBAAmB,CAAC,OAAO,CAAC,CAAA;AAA5B,KAA4B,CAC7B,EAFM,cAAc,QAAA,EAAE,iBAAiB,QAEvC,CAAC;AAEI,IAAA,IAAA,KAAkC,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAP,OAAO,GAAI,EAAE,EAA7C,IAAI,UAAA,EAAE,UAAU,gBAAA,EAAE,SAAS,eAAkB,CAAC;AAEtD,IAAA,SAAS,CAAC,YAAA;QACR,IAAI,OAAO,KAAK,SAAS,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;AACR,SAAA;QAED,IAAI,CAAC,OAAO,EAAE;YACZ,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO;AACR,SAAA;AAED,QAAA,IAAI,OAAO,oBAAoB,KAAK,WAAW,EAAE;YAC/C,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;AACR,SAAA;AAED,QAAA,IAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,UAAC,EAAO,EAAA;;AAAN,YAAA,IAAA,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AACL,YAAA,iBAAiB,CAAC,CAAA,EAAA,GAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,CAAC,CAAC;AACpD,SAAC,EACD,EAAE,IAAI,EAAA,IAAA,EAAE,UAAU,EAAA,UAAA,EAAE,SAAS,EAAA,SAAA,EAAE,CAChC,CAAC;AAEF,QAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,YAAA,EAAM,OAAA,QAAQ,CAAC,UAAU,EAAE,CAAA,EAAA,CAAC;KACpC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAE3C,IAAA,OAAO,cAAc,CAAC;AACxB;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TalosUseIntersectionObserver = {}, global.React));
|
|
5
|
+
})(this, (function (exports, react) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function initialIntersecting(element) {
|
|
8
|
+
if (element === undefined)
|
|
9
|
+
return true;
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
function useIntersectionObserver(element, options) {
|
|
13
|
+
var _a = react.useState(function () {
|
|
14
|
+
return initialIntersecting(element);
|
|
15
|
+
}), isIntersecting = _a[0], setIsIntersecting = _a[1];
|
|
16
|
+
var _b = options !== null && options !== void 0 ? options : {}, root = _b.root, rootMargin = _b.rootMargin, threshold = _b.threshold;
|
|
17
|
+
react.useEffect(function () {
|
|
18
|
+
if (element === undefined) {
|
|
19
|
+
setIsIntersecting(true);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!element) {
|
|
23
|
+
setIsIntersecting(false);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
27
|
+
setIsIntersecting(true);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
var observer = new IntersectionObserver(function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var entry = _a[0];
|
|
33
|
+
setIsIntersecting((_b = entry === null || entry === void 0 ? void 0 : entry.isIntersecting) !== null && _b !== void 0 ? _b : false);
|
|
34
|
+
}, { root: root, rootMargin: rootMargin, threshold: threshold });
|
|
35
|
+
observer.observe(element);
|
|
36
|
+
return function () { return observer.disconnect(); };
|
|
37
|
+
}, [element, root, rootMargin, threshold]);
|
|
38
|
+
return isIntersecting;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
exports.useIntersectionObserver = useIntersectionObserver;
|
|
42
|
+
|
|
43
|
+
}));
|
|
44
|
+
//# sourceMappingURL=talos-use-intersection-observer.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talos-use-intersection-observer.umd.js","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"sourcesContent":[null],"names":["useState","useEffect"],"mappings":";;;;;;IAEA,SAAS,mBAAmB,CAAC,OAAmC,EAAA;QAC9D,IAAI,OAAO,KAAK,SAAS;IAAE,QAAA,OAAO,IAAI,CAAC;IACvC,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;IAMe,SAAA,uBAAuB,CACrC,OAAmC,EACnC,OAAkC,EAAA;QAE5B,IAAA,EAAA,GAAsCA,cAAQ,CAAC,YAAA;YACnD,OAAA,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAA5B,KAA4B,CAC7B,EAFM,cAAc,QAAA,EAAE,iBAAiB,QAEvC,CAAC;IAEI,IAAA,IAAA,KAAkC,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAP,OAAO,GAAI,EAAE,EAA7C,IAAI,UAAA,EAAE,UAAU,gBAAA,EAAE,SAAS,eAAkB,CAAC;IAEtD,IAAAC,eAAS,CAAC,YAAA;YACR,IAAI,OAAO,KAAK,SAAS,EAAE;gBACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACxB,OAAO;IACR,SAAA;YAED,IAAI,CAAC,OAAO,EAAE;gBACZ,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBACzB,OAAO;IACR,SAAA;IAED,QAAA,IAAI,OAAO,oBAAoB,KAAK,WAAW,EAAE;gBAC/C,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACxB,OAAO;IACR,SAAA;IAED,QAAA,IAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,UAAC,EAAO,EAAA;;IAAN,YAAA,IAAA,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;IACL,YAAA,iBAAiB,CAAC,CAAA,EAAA,GAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,CAAC,CAAC;IACpD,SAAC,EACD,EAAE,IAAI,EAAA,IAAA,EAAE,UAAU,EAAA,UAAA,EAAE,SAAS,EAAA,SAAA,EAAE,CAChC,CAAC;IAEF,QAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC1B,OAAO,YAAA,EAAM,OAAA,QAAQ,CAAC,UAAU,EAAE,CAAA,EAAA,CAAC;SACpC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAE3C,IAAA,OAAO,cAAc,CAAC;IACxB;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntersectionObserver.d.ts","sourceRoot":"","sources":["../packages/hooks/use-intersection-observer/src/useIntersectionObserver.ts"],"names":[],"mappings":"AAWA,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EACnC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAmCT"}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cleartrip/talos-use-intersection-observer",
|
|
3
|
+
"version": "1.0.0-beta-260515-7.1",
|
|
4
|
+
"description": "Hook for tracking element viewport intersection via IntersectionObserver",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/talos-use-intersection-observer.cjs.js",
|
|
7
|
+
"jsnext:main": "dist/talos-use-intersection-observer.esm.js",
|
|
8
|
+
"module": "dist/talos-use-intersection-observer.esm.js",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"browser": {
|
|
11
|
+
"./dist/talos-use-intersection-observer.esm.js": "./dist/talos-use-intersection-observer.browser.esm.js",
|
|
12
|
+
"./dist/talos-use-intersection-observer.cjs.js": "./dist/talos-use-intersection-observer.browser.cjs.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"react": ">=16.8.0",
|
|
19
|
+
"react-dom": ">=16.8.0"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"author": "Cleartrip",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
28
|
+
"watch-package": "rollup -c -w",
|
|
29
|
+
"build-package": "rollup -c",
|
|
30
|
+
"build-package:clean": "rm -rf dist && rollup -c"
|
|
31
|
+
}
|
|
32
|
+
}
|