@aliexme/react-utils 1.0.1 → 2.0.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/components/Maybe/Maybe.cjs +1 -0
- package/dist/components/Maybe/Maybe.d.ts +1 -1
- package/dist/components/Maybe/Maybe.js +7 -13
- package/dist/hooks/useDidMount.cjs +1 -0
- package/dist/hooks/useDidMount.d.ts +1 -1
- package/dist/hooks/useDidMount.js +6 -9
- package/dist/hooks/useIsomorphicLayoutEffect.cjs +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js +5 -6
- package/dist/hooks/usePrevious.cjs +1 -0
- package/dist/hooks/usePrevious.js +4 -9
- package/dist/hooks/useValueRef.cjs +1 -0
- package/dist/hooks/useValueRef.d.ts +1 -1
- package/dist/hooks/useValueRef.js +9 -12
- package/dist/hooks/useWillUnmount.cjs +1 -0
- package/dist/hooks/useWillUnmount.js +6 -10
- package/dist/hooks/useWindowSize.cjs +1 -0
- package/dist/hooks/useWindowSize.d.ts +5 -6
- package/dist/hooks/useWindowSize.js +28 -33
- package/dist/index.cjs +1 -0
- package/dist/index.js +15 -18
- package/package.json +18 -10
- package/dist/components/Maybe/Maybe.js.map +0 -1
- package/dist/components/Maybe/index.js +0 -18
- package/dist/components/Maybe/index.js.map +0 -1
- package/dist/components/index.js +0 -18
- package/dist/components/index.js.map +0 -1
- package/dist/hooks/index.js +0 -23
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useDidMount.js.map +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/dist/hooks/usePrevious.js.map +0 -1
- package/dist/hooks/useValueRef.js.map +0 -1
- package/dist/hooks/useWillUnmount.js.map +0 -1
- package/dist/hooks/useWindowSize.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=n=>{const{when:r,component:c,orElse:l=React.createElement(e.Fragment,null),children:t}=n;return r?e.cloneElement(c,{children:t}):e.cloneElement(l,{children:t})};exports.Maybe=o;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (when) {
|
|
9
|
-
return (0, react_1.cloneElement)(component, { children });
|
|
10
|
-
}
|
|
11
|
-
return (0, react_1.cloneElement)(orElse, { children });
|
|
1
|
+
import { cloneElement as n, Fragment as l } from "react";
|
|
2
|
+
const a = (t) => {
|
|
3
|
+
const { when: r, component: o, orElse: c = /* @__PURE__ */ React.createElement(l, null), children: e } = t;
|
|
4
|
+
return r ? n(o, { children: e }) : n(c, { children: e });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
a as Maybe
|
|
12
8
|
};
|
|
13
|
-
exports.Maybe = Maybe;
|
|
14
|
-
//# sourceMappingURL=Maybe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=e=>{t.useEffect(e,[])};exports.useDidMount=u;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EffectCallback } from 'react';
|
|
2
2
|
export declare const useDidMount: (effect: EffectCallback) => void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, react_1.useEffect)(effect, []);
|
|
1
|
+
import { useEffect as t } from "react";
|
|
2
|
+
const f = (o) => {
|
|
3
|
+
t(o, []);
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
f as useDidMount
|
|
8
7
|
};
|
|
9
|
-
exports.useDidMount = useDidMount;
|
|
10
|
-
//# sourceMappingURL=useDidMount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=typeof window<"u"?e.useLayoutEffect:e.useEffect;exports.useIsomorphicLayoutEffect=t;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
|
|
1
|
+
import { useLayoutEffect as e, useEffect as o } from "react";
|
|
2
|
+
const t = typeof window < "u" ? e : o;
|
|
3
|
+
export {
|
|
4
|
+
t as useIsomorphicLayoutEffect
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./useValueRef.cjs"),r=e=>u.useValueRef(e).current;exports.usePrevious=r;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const usePrevious = (value) => {
|
|
6
|
-
const valueRef = (0, useValueRef_1.useValueRef)(value);
|
|
7
|
-
return valueRef.current;
|
|
1
|
+
import { useValueRef as r } from "./useValueRef.js";
|
|
2
|
+
const t = (e) => r(e).current;
|
|
3
|
+
export {
|
|
4
|
+
t as usePrevious
|
|
8
5
|
};
|
|
9
|
-
exports.usePrevious = usePrevious;
|
|
10
|
-
//# sourceMappingURL=usePrevious.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),u=e=>{const t=r.useRef(e);return r.useEffect(()=>{t.current=e},[e]),t};exports.useValueRef=u;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
2
|
export declare const useValueRef: <T>(value: T) => MutableRefObject<T>;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return ref;
|
|
1
|
+
import { useRef as t, useEffect as f } from "react";
|
|
2
|
+
const s = (e) => {
|
|
3
|
+
const r = t(e);
|
|
4
|
+
return f(() => {
|
|
5
|
+
r.current = e;
|
|
6
|
+
}, [e]), r;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
s as useValueRef
|
|
11
10
|
};
|
|
12
|
-
exports.useValueRef = useValueRef;
|
|
13
|
-
//# sourceMappingURL=useValueRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./useDidMount.cjs"),u=e=>{t.useDidMount(()=>e)};exports.useWillUnmount=u;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return destructor;
|
|
8
|
-
});
|
|
1
|
+
import { useDidMount as t } from "./useDidMount.js";
|
|
2
|
+
const r = (o) => {
|
|
3
|
+
t(() => o);
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
r as useWillUnmount
|
|
9
7
|
};
|
|
10
|
-
exports.useWillUnmount = useWillUnmount;
|
|
11
|
-
//# sourceMappingURL=useWillUnmount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),r=require("@aliexme/js-utils"),s=(d={})=>{const{throttleDelay:i=100}=d,[o,w]=t.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return t.useEffect(()=>{if(typeof window>"u")return;const n=r.throttle(()=>{w(e=>e.width===window.innerWidth&&e.height===window.innerHeight?e:{width:window.innerWidth,height:window.innerHeight})},i,{withTrailing:!0});return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[i]),o};exports.useWindowSize=s;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
interface WindowSize {
|
|
1
|
+
export interface WindowSize {
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export {};
|
|
5
|
+
export interface UseWindowSizeOptions {
|
|
6
|
+
throttleDelay?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const useWindowSize: (options?: UseWindowSizeOptions) => WindowSize;
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useState as o, useEffect as r } from "react";
|
|
2
|
+
import { throttle as h } from "@aliexme/js-utils";
|
|
3
|
+
const u = (t = {}) => {
|
|
4
|
+
const { throttleDelay: i = 100 } = t, [w, d] = o({
|
|
5
|
+
width: typeof window < "u" ? window.innerWidth : 0,
|
|
6
|
+
height: typeof window < "u" ? window.innerHeight : 0
|
|
7
|
+
});
|
|
8
|
+
return r(() => {
|
|
9
|
+
if (typeof window > "u")
|
|
10
|
+
return;
|
|
11
|
+
const n = h(
|
|
12
|
+
() => {
|
|
13
|
+
d(
|
|
14
|
+
(e) => e.width === window.innerWidth && e.height === window.innerHeight ? e : {
|
|
15
|
+
width: window.innerWidth,
|
|
16
|
+
height: window.innerHeight
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
i,
|
|
21
|
+
{ withTrailing: !0 }
|
|
22
|
+
);
|
|
23
|
+
return window.addEventListener("resize", n), () => {
|
|
24
|
+
window.removeEventListener("resize", n);
|
|
25
|
+
};
|
|
26
|
+
}, [i]), w;
|
|
4
27
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
9
|
-
const useWindowSize = (options = {}) => {
|
|
10
|
-
const { debounceWait = 0, debounceMaxWait = 1000 } = options;
|
|
11
|
-
const [windowSize, setWindowSize] = (0, react_1.useState)({
|
|
12
|
-
width: typeof window !== 'undefined' ? window.innerWidth : 0,
|
|
13
|
-
height: typeof window !== 'undefined' ? window.innerHeight : 0,
|
|
14
|
-
});
|
|
15
|
-
(0, react_1.useEffect)(() => {
|
|
16
|
-
if (typeof window === 'undefined') {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const handleWindowResize = (0, debounce_1.default)(() => {
|
|
20
|
-
setWindowSize((prevWindowSize) => prevWindowSize.width === window.innerWidth && prevWindowSize.height === window.innerHeight
|
|
21
|
-
? prevWindowSize
|
|
22
|
-
: {
|
|
23
|
-
width: window.innerWidth,
|
|
24
|
-
height: window.innerHeight,
|
|
25
|
-
});
|
|
26
|
-
}, debounceWait, { maxWait: debounceMaxWait });
|
|
27
|
-
window.addEventListener('resize', handleWindowResize);
|
|
28
|
-
return () => {
|
|
29
|
-
window.removeEventListener('resize', handleWindowResize);
|
|
30
|
-
};
|
|
31
|
-
}, [debounceWait, debounceMaxWait]);
|
|
32
|
-
return windowSize;
|
|
28
|
+
export {
|
|
29
|
+
u as useWindowSize
|
|
33
30
|
};
|
|
34
|
-
exports.useWindowSize = useWindowSize;
|
|
35
|
-
//# sourceMappingURL=useWindowSize.js.map
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/Maybe/Maybe.cjs"),u=require("./hooks/useIsomorphicLayoutEffect.cjs"),s=require("./hooks/useDidMount.cjs"),o=require("./hooks/useWillUnmount.cjs"),i=require("./hooks/useValueRef.cjs"),t=require("./hooks/usePrevious.cjs"),r=require("./hooks/useWindowSize.cjs");exports.Maybe=e.Maybe;exports.useIsomorphicLayoutEffect=u.useIsomorphicLayoutEffect;exports.useDidMount=s.useDidMount;exports.useWillUnmount=o.useWillUnmount;exports.useValueRef=i.useValueRef;exports.usePrevious=t.usePrevious;exports.useWindowSize=r.useWindowSize;
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { Maybe as r } from "./components/Maybe/Maybe.js";
|
|
2
|
+
import { useIsomorphicLayoutEffect as u } from "./hooks/useIsomorphicLayoutEffect.js";
|
|
3
|
+
import { useDidMount as m } from "./hooks/useDidMount.js";
|
|
4
|
+
import { useWillUnmount as s } from "./hooks/useWillUnmount.js";
|
|
5
|
+
import { useValueRef as i } from "./hooks/useValueRef.js";
|
|
6
|
+
import { usePrevious as a } from "./hooks/usePrevious.js";
|
|
7
|
+
import { useWindowSize as c } from "./hooks/useWindowSize.js";
|
|
8
|
+
export {
|
|
9
|
+
r as Maybe,
|
|
10
|
+
m as useDidMount,
|
|
11
|
+
u as useIsomorphicLayoutEffect,
|
|
12
|
+
a as usePrevious,
|
|
13
|
+
i as useValueRef,
|
|
14
|
+
s as useWillUnmount,
|
|
15
|
+
c as useWindowSize
|
|
15
16
|
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./components"), exports);
|
|
18
|
-
__exportStar(require("./hooks"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aliexme/react-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "React utilities",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Alexander Smirnov <al.smirnov996@gmail.com>",
|
|
@@ -11,28 +11,36 @@
|
|
|
11
11
|
"directory": "packages/react-utils"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
|
+
"type": "module",
|
|
14
15
|
"files": [
|
|
15
16
|
"dist"
|
|
16
17
|
],
|
|
17
|
-
"main": "./dist/index.
|
|
18
|
-
"
|
|
18
|
+
"main": "./dist/index.cjs",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"require": "./dist/index.cjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
19
28
|
"publishConfig": {
|
|
20
29
|
"access": "public"
|
|
21
30
|
},
|
|
22
31
|
"scripts": {
|
|
23
|
-
"build": "
|
|
32
|
+
"build": "vite build",
|
|
24
33
|
"ts:check": "tsc --noEmit"
|
|
25
34
|
},
|
|
26
35
|
"dependencies": {
|
|
27
|
-
"
|
|
36
|
+
"@aliexme/js-utils": "^2.1.2"
|
|
28
37
|
},
|
|
29
38
|
"devDependencies": {
|
|
30
|
-
"@types/
|
|
31
|
-
"
|
|
32
|
-
"react": "18.2.0"
|
|
39
|
+
"@types/react": "18.3.11",
|
|
40
|
+
"react": "18.3.1"
|
|
33
41
|
},
|
|
34
42
|
"peerDependencies": {
|
|
35
|
-
"react": "
|
|
43
|
+
"react": "^18.0.0"
|
|
36
44
|
},
|
|
37
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "b8a504e726d4d9ee140e45a422168e491bf6f984"
|
|
38
46
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Maybe.js","sourceRoot":"","sources":["../../../src/components/Maybe/Maybe.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkG;AAQ3F,MAAM,KAAK,GAAmB,CAAC,KAAK,EAAE,EAAE;IAC7C,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,uBAAC,gBAAQ,KAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAElE,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,IAAA,oBAAY,EAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,IAAA,oBAAY,EAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;AAC3C,CAAC,CAAA;AARY,QAAA,KAAK,SAQjB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Maybe"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Maybe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
|
package/dist/components/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Maybe"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
|
package/dist/hooks/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./useIsomorphicLayoutEffect"), exports);
|
|
18
|
-
__exportStar(require("./useDidMount"), exports);
|
|
19
|
-
__exportStar(require("./useWillUnmount"), exports);
|
|
20
|
-
__exportStar(require("./useValueRef"), exports);
|
|
21
|
-
__exportStar(require("./usePrevious"), exports);
|
|
22
|
-
__exportStar(require("./useWindowSize"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
package/dist/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,gDAA6B;AAC7B,mDAAgC;AAChC,gDAA6B;AAC7B,gDAA6B;AAC7B,kDAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDidMount.js","sourceRoot":"","sources":["../../src/hooks/useDidMount.ts"],"names":[],"mappings":";;;AAAA,iCAAsD;AAE/C,MAAM,WAAW,GAAG,CAAC,MAAsB,EAAE,EAAE;IACpD,uDAAuD;IACvD,IAAA,iBAAS,EAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACvB,CAAC,CAAA;AAHY,QAAA,WAAW,eAGvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsomorphicLayoutEffect.js","sourceRoot":"","sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":";;;AAAA,iCAAkD;AAErC,QAAA,yBAAyB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,uBAAe,CAAC,CAAC,CAAC,iBAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePrevious.js","sourceRoot":"","sources":["../../src/hooks/usePrevious.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAEpC,MAAM,WAAW,GAAG,CAAI,KAAQ,EAAK,EAAE;IAC5C,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,KAAK,CAAC,CAAA;IAEnC,OAAO,QAAQ,CAAC,OAAO,CAAA;AACzB,CAAC,CAAA;AAJY,QAAA,WAAW,eAIvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useValueRef.js","sourceRoot":"","sources":["../../src/hooks/useValueRef.ts"],"names":[],"mappings":";;;AAAA,iCAAgE;AAEzD,MAAM,WAAW,GAAG,CAAI,KAAQ,EAAuB,EAAE;IAC9D,MAAM,GAAG,GAAG,IAAA,cAAM,EAAI,KAAK,CAAC,CAAA;IAE5B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACrB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AARY,QAAA,WAAW,eAQvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWillUnmount.js","sourceRoot":"","sources":["../../src/hooks/useWillUnmount.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAEpC,MAAM,cAAc,GAAG,CAAC,UAAsB,EAAE,EAAE;IACvD,IAAA,yBAAW,EAAC,GAAG,EAAE;QACf,OAAO,UAAU,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAJY,QAAA,cAAc,kBAI1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize.js","sourceRoot":"","sources":["../../src/hooks/useWindowSize.ts"],"names":[],"mappings":";;;;;;AAAA,iCAA2C;AAC3C,+DAAsC;AAO/B,MAAM,aAAa,GAAG,CAC3B,UAGI,EAAE,EACN,EAAE;IACF,MAAM,EAAE,YAAY,GAAG,CAAC,EAAE,eAAe,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IAE5D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAa;QACvD,KAAK,EAAE,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,EAAE,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;KAC/D,CAAC,CAAA;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAM;QACR,CAAC;QAED,MAAM,kBAAkB,GAAG,IAAA,kBAAQ,EACjC,GAAG,EAAE;YACH,aAAa,CAAC,CAAC,cAAc,EAAE,EAAE,CAC/B,cAAc,CAAC,KAAK,KAAK,MAAM,CAAC,UAAU,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW;gBACxF,CAAC,CAAC,cAAc;gBAChB,CAAC,CAAC;oBACE,KAAK,EAAE,MAAM,CAAC,UAAU;oBACxB,MAAM,EAAE,MAAM,CAAC,WAAW;iBAC3B,CACN,CAAA;QACH,CAAC,EACD,YAAY,EACZ,EAAE,OAAO,EAAE,eAAe,EAAE,CAC7B,CAAA;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAA;QAErD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAA;QAC1D,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,CAAA;IAEnC,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AAzCY,QAAA,aAAa,iBAyCzB"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,0CAAuB"}
|