@jobber/hooks 2.7.2 → 2.7.3-fix-hide-h.40
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/README.mdx +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/useAssert/useAssert.js +2 -1
- package/dist/useBreakpoints/mockViewportWidth/mockViewportWidth.js +2 -0
- package/dist/useBreakpoints/useMediaQuery.d.ts +7 -4
- package/dist/useBreakpoints/useMediaQuery.js +16 -15
- package/dist/useIsMounted/useIsMounted.js +2 -1
- package/dist/useSafeLayoutEffect/index.d.ts +1 -0
- package/dist/useSafeLayoutEffect/index.js +5 -0
- package/dist/useSafeLayoutEffect/useSafeLayoutEffect.d.ts +2 -0
- package/dist/useSafeLayoutEffect/useSafeLayoutEffect.js +7 -0
- package/dist/useShowClear/index.d.ts +1 -0
- package/dist/useShowClear/index.js +5 -0
- package/dist/useShowClear/useShowClear.d.ts +10 -0
- package/dist/useShowClear/useShowClear.js +19 -0
- package/dist/useShowClear/useShowClear.test.d.ts +1 -0
- package/dist/useShowClear/useShowClear.test.js +136 -0
- package/dist/useWindowDimensions/index.d.ts +1 -0
- package/dist/useWindowDimensions/index.js +5 -0
- package/dist/useWindowDimensions/useWIndowDimensions.test.d.ts +1 -0
- package/dist/useWindowDimensions/useWIndowDimensions.test.js +23 -0
- package/dist/useWindowDimensions/useWindowDimensions.d.ts +4 -0
- package/dist/useWindowDimensions/useWindowDimensions.js +29 -0
- package/package.json +3 -3
- package/useSafeLayoutEffect.d.ts +1 -0
- package/useSafeLayoutEffect.js +17 -0
- package/useShowClear.d.ts +1 -0
- package/useShowClear.js +17 -0
- package/useWindowDimensions.d.ts +1 -0
- package/useWindowDimensions.js +17 -0
package/README.mdx
CHANGED
|
@@ -14,6 +14,7 @@ Shared hooks for components in Atlantis.
|
|
|
14
14
|
- [usePasswordStrength](../?path=/docs/hooks-usepasswordstrength--use-password-strength)
|
|
15
15
|
- [useRefocusOnActivator](../?path=/docs/hooks-userefocusonactivator--use-refocus-on-activator)
|
|
16
16
|
- [useResizeObserver](../?path=/docs/packages-hooks--page)
|
|
17
|
+
- [useWindowDimensions](../?path=/docs/hooks-usewindowdimensions--page)
|
|
17
18
|
|
|
18
19
|
## Installing
|
|
19
20
|
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,6 @@ export * from "./useOnKeyDown";
|
|
|
11
11
|
export * from "./usePasswordStrength";
|
|
12
12
|
export * from "./useRefocusOnActivator";
|
|
13
13
|
export * from "./useResizeObserver";
|
|
14
|
+
export * from "./useSafeLayoutEffect";
|
|
15
|
+
export * from "./useShowClear";
|
|
16
|
+
export * from "./useWindowDimensions";
|
package/dist/index.js
CHANGED
|
@@ -27,3 +27,6 @@ __exportStar(require("./useOnKeyDown"), exports);
|
|
|
27
27
|
__exportStar(require("./usePasswordStrength"), exports);
|
|
28
28
|
__exportStar(require("./useRefocusOnActivator"), exports);
|
|
29
29
|
__exportStar(require("./useResizeObserver"), exports);
|
|
30
|
+
__exportStar(require("./useSafeLayoutEffect"), exports);
|
|
31
|
+
__exportStar(require("./useShowClear"), exports);
|
|
32
|
+
__exportStar(require("./useWindowDimensions"), exports);
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.useAssert = void 0;
|
|
7
7
|
const process_1 = __importDefault(require("process"));
|
|
8
8
|
function useAssert(shouldShow, message, options) {
|
|
9
|
-
|
|
9
|
+
var _a;
|
|
10
|
+
if (((_a = process_1.default === null || process_1.default === void 0 ? void 0 : process_1.default.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== "production" && shouldShow) {
|
|
10
11
|
if (options === null || options === void 0 ? void 0 : options.warn) {
|
|
11
12
|
console.warn(message);
|
|
12
13
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
type MediaQuery = `(${string}:${string})`;
|
|
2
|
+
export declare const mediaQueryStore: {
|
|
3
|
+
subscribe(onChange: () => void, query: MediaQuery): () => void;
|
|
4
|
+
getSnapshot(query: MediaQuery): () => boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function useMediaQuery(query: MediaQuery): boolean;
|
|
7
|
+
export {};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMediaQuery = void 0;
|
|
3
|
+
exports.useMediaQuery = exports.mediaQueryStore = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
exports.mediaQueryStore = {
|
|
6
|
+
subscribe(onChange, query) {
|
|
7
|
+
const matchMedia = window.matchMedia(query);
|
|
8
|
+
matchMedia.addEventListener("change", onChange);
|
|
9
|
+
return () => {
|
|
10
|
+
matchMedia.removeEventListener("change", onChange);
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
getSnapshot(query) {
|
|
14
|
+
return () => window.matchMedia(query).matches;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
function useMediaQuery(query) {
|
|
18
|
+
const subscribeMediaQuery = (0, react_1.useCallback)((onChange) => exports.mediaQueryStore.subscribe(onChange, query), [query]);
|
|
19
|
+
const matches = (0, react_1.useSyncExternalStore)(subscribeMediaQuery, exports.mediaQueryStore.getSnapshot(query), () => true);
|
|
19
20
|
return matches;
|
|
20
21
|
}
|
|
21
22
|
exports.useMediaQuery = useMediaQuery;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useIsMounted = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const useSafeLayoutEffect_1 = require("../useSafeLayoutEffect");
|
|
5
6
|
/**
|
|
6
7
|
* Why does this work?
|
|
7
8
|
*
|
|
@@ -20,7 +21,7 @@ const react_1 = require("react");
|
|
|
20
21
|
*/
|
|
21
22
|
function useIsMounted() {
|
|
22
23
|
const isMounted = (0, react_1.useRef)(false);
|
|
23
|
-
(0,
|
|
24
|
+
(0, useSafeLayoutEffect_1.useSafeLayoutEffect)(() => {
|
|
24
25
|
isMounted.current = true;
|
|
25
26
|
return () => {
|
|
26
27
|
isMounted.current = false;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSafeLayoutEffect } from "./useSafeLayoutEffect";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSafeLayoutEffect = void 0;
|
|
4
|
+
var useSafeLayoutEffect_1 = require("./useSafeLayoutEffect");
|
|
5
|
+
Object.defineProperty(exports, "useSafeLayoutEffect", { enumerable: true, get: function () { return useSafeLayoutEffect_1.useSafeLayoutEffect; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSafeLayoutEffect = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.useSafeLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)
|
|
6
|
+
? react_1.useLayoutEffect
|
|
7
|
+
: react_1.useEffect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useShowClear, Clearable } from "./useShowClear";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useShowClear = void 0;
|
|
4
|
+
var useShowClear_1 = require("./useShowClear");
|
|
5
|
+
Object.defineProperty(exports, "useShowClear", { enumerable: true, get: function () { return useShowClear_1.useShowClear; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Clearable = "never" | "while-editing" | "always";
|
|
2
|
+
interface UseShowClearParameters {
|
|
3
|
+
clearable: Clearable;
|
|
4
|
+
multiline: boolean;
|
|
5
|
+
focused: boolean;
|
|
6
|
+
hasValue: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useShowClear({ clearable, multiline, focused, hasValue, disabled, }: UseShowClearParameters): boolean | undefined;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useShowClear = void 0;
|
|
4
|
+
function useShowClear({ clearable, multiline, focused, hasValue, disabled = false, }) {
|
|
5
|
+
if (multiline && clearable !== "never") {
|
|
6
|
+
throw new Error("Multiline inputs can not be clearable");
|
|
7
|
+
}
|
|
8
|
+
// Do not show if there is no value
|
|
9
|
+
if (!hasValue || clearable === "never" || disabled) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
switch (clearable) {
|
|
13
|
+
case "while-editing":
|
|
14
|
+
return focused;
|
|
15
|
+
case "always":
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.useShowClear = useShowClear;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const useShowClear_1 = require("./useShowClear");
|
|
4
|
+
describe("useShowClear", () => {
|
|
5
|
+
describe.each([
|
|
6
|
+
{
|
|
7
|
+
clearable: "always",
|
|
8
|
+
hasValue: true,
|
|
9
|
+
focused: false,
|
|
10
|
+
multiline: false,
|
|
11
|
+
disabled: false,
|
|
12
|
+
expected: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
clearable: "always",
|
|
16
|
+
hasValue: true,
|
|
17
|
+
focused: true,
|
|
18
|
+
multiline: false,
|
|
19
|
+
disabled: false,
|
|
20
|
+
expected: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
clearable: "always",
|
|
24
|
+
hasValue: true,
|
|
25
|
+
focused: false,
|
|
26
|
+
multiline: false,
|
|
27
|
+
disabled: true,
|
|
28
|
+
expected: false,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
clearable: "always",
|
|
32
|
+
hasValue: false,
|
|
33
|
+
focused: false,
|
|
34
|
+
multiline: false,
|
|
35
|
+
disabled: true,
|
|
36
|
+
expected: false,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
clearable: "while-editing",
|
|
40
|
+
hasValue: true,
|
|
41
|
+
focused: false,
|
|
42
|
+
multiline: false,
|
|
43
|
+
disabled: false,
|
|
44
|
+
expected: false,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
clearable: "while-editing",
|
|
48
|
+
hasValue: true,
|
|
49
|
+
focused: true,
|
|
50
|
+
multiline: false,
|
|
51
|
+
disabled: false,
|
|
52
|
+
expected: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
clearable: "while-editing",
|
|
56
|
+
hasValue: false,
|
|
57
|
+
focused: false,
|
|
58
|
+
multiline: false,
|
|
59
|
+
disabled: true,
|
|
60
|
+
expected: false,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
clearable: "while-editing",
|
|
64
|
+
hasValue: true,
|
|
65
|
+
focused: false,
|
|
66
|
+
multiline: false,
|
|
67
|
+
disabled: true,
|
|
68
|
+
expected: false,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
clearable: "never",
|
|
72
|
+
hasValue: true,
|
|
73
|
+
focused: false,
|
|
74
|
+
multiline: false,
|
|
75
|
+
disabled: false,
|
|
76
|
+
expected: false,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
clearable: "never",
|
|
80
|
+
hasValue: true,
|
|
81
|
+
focused: true,
|
|
82
|
+
multiline: false,
|
|
83
|
+
disabled: false,
|
|
84
|
+
expected: false,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
clearable: "never",
|
|
88
|
+
hasValue: false,
|
|
89
|
+
focused: false,
|
|
90
|
+
multiline: false,
|
|
91
|
+
disabled: true,
|
|
92
|
+
expected: false,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
clearable: "never",
|
|
96
|
+
hasValue: true,
|
|
97
|
+
focused: false,
|
|
98
|
+
multiline: false,
|
|
99
|
+
disabled: true,
|
|
100
|
+
expected: false,
|
|
101
|
+
},
|
|
102
|
+
])("%j", ({ clearable, hasValue, focused, multiline, disabled, expected, }) => {
|
|
103
|
+
it(`returns ${expected}`, () => {
|
|
104
|
+
expect((0, useShowClear_1.useShowClear)({ clearable, multiline, focused, hasValue, disabled })).toEqual(expected);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
it("throws an error if multiline is true and clearable isn't never", () => {
|
|
108
|
+
expect(() => {
|
|
109
|
+
(0, useShowClear_1.useShowClear)({
|
|
110
|
+
clearable: "always",
|
|
111
|
+
multiline: true,
|
|
112
|
+
focused: true,
|
|
113
|
+
hasValue: true,
|
|
114
|
+
disabled: false,
|
|
115
|
+
});
|
|
116
|
+
}).toThrow();
|
|
117
|
+
expect(() => {
|
|
118
|
+
(0, useShowClear_1.useShowClear)({
|
|
119
|
+
clearable: "while-editing",
|
|
120
|
+
multiline: true,
|
|
121
|
+
focused: true,
|
|
122
|
+
hasValue: true,
|
|
123
|
+
disabled: false,
|
|
124
|
+
});
|
|
125
|
+
}).toThrow();
|
|
126
|
+
expect(() => {
|
|
127
|
+
(0, useShowClear_1.useShowClear)({
|
|
128
|
+
clearable: "never",
|
|
129
|
+
multiline: true,
|
|
130
|
+
focused: true,
|
|
131
|
+
hasValue: true,
|
|
132
|
+
disabled: false,
|
|
133
|
+
});
|
|
134
|
+
}).not.toThrow();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useWindowDimensions } from "./useWindowDimensions";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useWindowDimensions = void 0;
|
|
4
|
+
var useWindowDimensions_1 = require("./useWindowDimensions");
|
|
5
|
+
Object.defineProperty(exports, "useWindowDimensions", { enumerable: true, get: function () { return useWindowDimensions_1.useWindowDimensions; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_hooks_1 = require("@testing-library/react-hooks");
|
|
4
|
+
const react_1 = require("@testing-library/react");
|
|
5
|
+
const useWindowDimensions_1 = require("./useWindowDimensions");
|
|
6
|
+
describe("useWindowDimensions", () => {
|
|
7
|
+
it("should return window dimensions", () => {
|
|
8
|
+
window.innerHeight = 100;
|
|
9
|
+
window.innerWidth = 1000;
|
|
10
|
+
const { result } = (0, react_hooks_1.renderHook)(() => (0, useWindowDimensions_1.useWindowDimensions)());
|
|
11
|
+
expect(result.current).toEqual({ width: 1000, height: 100 });
|
|
12
|
+
});
|
|
13
|
+
describe("resize event", () => {
|
|
14
|
+
it("should return window dimensions after resize", () => {
|
|
15
|
+
window.innerHeight = 100;
|
|
16
|
+
window.innerWidth = 1000;
|
|
17
|
+
const { result } = (0, react_hooks_1.renderHook)(() => (0, useWindowDimensions_1.useWindowDimensions)());
|
|
18
|
+
window.innerWidth = 500;
|
|
19
|
+
(0, react_1.fireEvent)(window, new Event("resize"));
|
|
20
|
+
expect(result.current).toEqual({ width: 500, height: 100 });
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useWindowDimensions = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function getWindowDimensions() {
|
|
6
|
+
if (!(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)) {
|
|
7
|
+
return {
|
|
8
|
+
width: 0,
|
|
9
|
+
height: 0,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const { innerWidth: width, innerHeight: height } = window;
|
|
13
|
+
return {
|
|
14
|
+
width,
|
|
15
|
+
height,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function useWindowDimensions() {
|
|
19
|
+
const [windowDimensions, setWindowDimensions] = (0, react_1.useState)(getWindowDimensions());
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
function handleResize() {
|
|
22
|
+
setWindowDimensions(getWindowDimensions());
|
|
23
|
+
}
|
|
24
|
+
window === null || window === void 0 ? void 0 : window.addEventListener("resize", handleResize);
|
|
25
|
+
return () => window === null || window === void 0 ? void 0 : window.removeEventListener("resize", handleResize);
|
|
26
|
+
}, []);
|
|
27
|
+
return windowDimensions;
|
|
28
|
+
}
|
|
29
|
+
exports.useWindowDimensions = useWindowDimensions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/hooks",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3-fix-hide-h.40+6cd98b2a",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@apollo/react-testing": "^4.0.0",
|
|
23
|
-
"@jobber/formatters": "
|
|
23
|
+
"@jobber/formatters": "^0.2.3-fix-hide-h.758+6cd98b2a",
|
|
24
24
|
"@testing-library/react": "^14.0.0",
|
|
25
25
|
"@testing-library/react-hooks": "^7.0.0",
|
|
26
26
|
"@testing-library/user-event": "^14.5.1",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@apollo/client": "^3.0.0",
|
|
45
45
|
"react": "^18"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6cd98b2ae36e2810bdec97e994735ad322e19c1f"
|
|
48
48
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/useSafeLayoutEffect";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var useSafeLayoutEffect = require("./dist/useSafeLayoutEffect");
|
|
8
|
+
|
|
9
|
+
Object.keys(useSafeLayoutEffect).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return useSafeLayoutEffect[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/useShowClear";
|
package/useShowClear.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var useShowClear = require("./dist/useShowClear");
|
|
8
|
+
|
|
9
|
+
Object.keys(useShowClear).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return useShowClear[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/useWindowDimensions";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var useWindowDimensions = require("./dist/useWindowDimensions");
|
|
8
|
+
|
|
9
|
+
Object.keys(useWindowDimensions).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return useWindowDimensions[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|