@fountain-ui/core 1.14.1 → 1.14.2
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/CHANGELOG.md +8 -0
- package/build/commonjs/hooks/index.js +8 -0
- package/build/commonjs/hooks/index.js.map +1 -1
- package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js +22 -0
- package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js.map +1 -0
- package/build/commonjs/hooks/useValidWindowDimensions/index.js +12 -0
- package/build/commonjs/hooks/useValidWindowDimensions/index.js.map +1 -0
- package/build/module/hooks/index.js +1 -0
- package/build/module/hooks/index.js.map +1 -1
- package/build/module/hooks/useValidWindowDimensions/index.ios.js +13 -0
- package/build/module/hooks/useValidWindowDimensions/index.ios.js.map +1 -0
- package/build/module/hooks/useValidWindowDimensions/index.js +3 -0
- package/build/module/hooks/useValidWindowDimensions/index.js.map +1 -0
- package/build/typescript/hooks/index.d.ts +1 -0
- package/build/typescript/hooks/useValidWindowDimensions/index.d.ts +2 -0
- package/build/typescript/hooks/useValidWindowDimensions/index.ios.d.ts +1 -0
- package/package.json +2 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useValidWindowDimensions/index.ios.ts +15 -0
- package/src/hooks/useValidWindowDimensions/index.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.14.2](https://github.com/tappytoon/tappytoon/compare/@fountain-ui/core@1.11.0...@fountain-ui/core@1.14.2) (2022-01-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @fountain-ui/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.14.1](https://github.com/tappytoon/tappytoon/compare/@fountain-ui/core@1.11.0...@fountain-ui/core@1.14.1) (2022-01-07)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @fountain-ui/core
|
|
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "useThrottle", {
|
|
|
39
39
|
return _useThrottle.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "useValidWindowDimensions", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _useValidWindowDimensions.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
|
|
43
49
|
var _useBreakpointUp = _interopRequireDefault(require("./useBreakpointUp"));
|
|
44
50
|
|
|
@@ -52,5 +58,7 @@ var _useFadeInAppBar = _interopRequireDefault(require("./useFadeInAppBar"));
|
|
|
52
58
|
|
|
53
59
|
var _useThrottle = _interopRequireDefault(require("./useThrottle"));
|
|
54
60
|
|
|
61
|
+
var _useValidWindowDimensions = _interopRequireDefault(require("./useValidWindowDimensions"));
|
|
62
|
+
|
|
55
63
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
56
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { default as useBreakpointUp } from './useBreakpointUp';\nexport { default as useCollapsibleAppBar } from './useCollapsibleAppBar';\nexport { default as useContentContainerStyle } from './useContentContainerStyle';\nexport { default as useElevationStyle } from './useElevationStyle';\nexport { default as useFadeInAppBar } from './useFadeInAppBar';\nexport { default as useThrottle } from './useThrottle';\nexport { default as useValidWindowDimensions } from './useValidWindowDimensions';\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useValidWindowDimensions;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function useValidWindowDimensions() {
|
|
13
|
+
const window = (0, _reactNative.useWindowDimensions)();
|
|
14
|
+
const [validWindow, setValidWindow] = (0, _react.useState)(window);
|
|
15
|
+
(0, _react.useEffect)(() => {
|
|
16
|
+
if (window.width !== 0 && window.height !== 0) {
|
|
17
|
+
setValidWindow(window);
|
|
18
|
+
}
|
|
19
|
+
}, [window]);
|
|
20
|
+
return validWindow;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ios.ts"],"names":["useValidWindowDimensions","window","validWindow","setValidWindow","width","height"],"mappings":";;;;;;;AAAA;;AACA;;AAEe,SAASA,wBAAT,GAAoC;AAC/C,QAAMC,MAAM,GAAG,uCAAf;AACA,QAAM,CAACC,WAAD,EAAcC,cAAd,IAAgC,qBAASF,MAAT,CAAtC;AAEA,wBAAU,MAAM;AACZ,QAAIA,MAAM,CAACG,KAAP,KAAiB,CAAjB,IAAsBH,MAAM,CAACI,MAAP,KAAkB,CAA5C,EAA+C;AAC3CF,MAAAA,cAAc,CAACF,MAAD,CAAd;AACH;AACJ,GAJD,EAIG,CAACA,MAAD,CAJH;AAMA,SAAOC,WAAP;AACH","sourcesContent":["import { useState, useEffect } from 'react';\nimport { useWindowDimensions } from 'react-native';\n\nexport default function useValidWindowDimensions() {\n const window = useWindowDimensions();\n const [validWindow, setValidWindow] = useState(window);\n\n useEffect(() => {\n if (window.width !== 0 && window.height !== 0) {\n setValidWindow(window);\n }\n }, [window]);\n\n return validWindow;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
|
|
10
|
+
var _default = _reactNative.useWindowDimensions;
|
|
11
|
+
exports.default = _default;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["useWindowDimensions"],"mappings":";;;;;;;AAAA;;eAEeA,gC","sourcesContent":["import { useWindowDimensions } from 'react-native';\n\nexport default useWindowDimensions;\n"]}
|
|
@@ -4,4 +4,5 @@ export { default as useContentContainerStyle } from './useContentContainerStyle'
|
|
|
4
4
|
export { default as useElevationStyle } from './useElevationStyle';
|
|
5
5
|
export { default as useFadeInAppBar } from './useFadeInAppBar';
|
|
6
6
|
export { default as useThrottle } from './useThrottle';
|
|
7
|
+
export { default as useValidWindowDimensions } from './useValidWindowDimensions';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["default","useBreakpointUp","useCollapsibleAppBar","useContentContainerStyle","useElevationStyle","useFadeInAppBar","useThrottle"],"mappings":"AAAA,SAASA,OAAO,IAAIC,eAApB,QAA2C,mBAA3C;AACA,SAASD,OAAO,IAAIE,oBAApB,QAAgD,wBAAhD;AACA,SAASF,OAAO,IAAIG,wBAApB,QAAoD,4BAApD;AACA,SAASH,OAAO,IAAII,iBAApB,QAA6C,qBAA7C;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,mBAA3C;AACA,SAASL,OAAO,IAAIM,WAApB,QAAuC,eAAvC","sourcesContent":["export { default as useBreakpointUp } from './useBreakpointUp';\nexport { default as useCollapsibleAppBar } from './useCollapsibleAppBar';\nexport { default as useContentContainerStyle } from './useContentContainerStyle';\nexport { default as useElevationStyle } from './useElevationStyle';\nexport { default as useFadeInAppBar } from './useFadeInAppBar';\nexport { default as useThrottle } from './useThrottle';\n"]}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["default","useBreakpointUp","useCollapsibleAppBar","useContentContainerStyle","useElevationStyle","useFadeInAppBar","useThrottle","useValidWindowDimensions"],"mappings":"AAAA,SAASA,OAAO,IAAIC,eAApB,QAA2C,mBAA3C;AACA,SAASD,OAAO,IAAIE,oBAApB,QAAgD,wBAAhD;AACA,SAASF,OAAO,IAAIG,wBAApB,QAAoD,4BAApD;AACA,SAASH,OAAO,IAAII,iBAApB,QAA6C,qBAA7C;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,mBAA3C;AACA,SAASL,OAAO,IAAIM,WAApB,QAAuC,eAAvC;AACA,SAASN,OAAO,IAAIO,wBAApB,QAAoD,4BAApD","sourcesContent":["export { default as useBreakpointUp } from './useBreakpointUp';\nexport { default as useCollapsibleAppBar } from './useCollapsibleAppBar';\nexport { default as useContentContainerStyle } from './useContentContainerStyle';\nexport { default as useElevationStyle } from './useElevationStyle';\nexport { default as useFadeInAppBar } from './useFadeInAppBar';\nexport { default as useThrottle } from './useThrottle';\nexport { default as useValidWindowDimensions } from './useValidWindowDimensions';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useWindowDimensions } from 'react-native';
|
|
3
|
+
export default function useValidWindowDimensions() {
|
|
4
|
+
const window = useWindowDimensions();
|
|
5
|
+
const [validWindow, setValidWindow] = useState(window);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (window.width !== 0 && window.height !== 0) {
|
|
8
|
+
setValidWindow(window);
|
|
9
|
+
}
|
|
10
|
+
}, [window]);
|
|
11
|
+
return validWindow;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ios.ts"],"names":["useState","useEffect","useWindowDimensions","useValidWindowDimensions","window","validWindow","setValidWindow","width","height"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,OAApC;AACA,SAASC,mBAAT,QAAoC,cAApC;AAEA,eAAe,SAASC,wBAAT,GAAoC;AAC/C,QAAMC,MAAM,GAAGF,mBAAmB,EAAlC;AACA,QAAM,CAACG,WAAD,EAAcC,cAAd,IAAgCN,QAAQ,CAACI,MAAD,CAA9C;AAEAH,EAAAA,SAAS,CAAC,MAAM;AACZ,QAAIG,MAAM,CAACG,KAAP,KAAiB,CAAjB,IAAsBH,MAAM,CAACI,MAAP,KAAkB,CAA5C,EAA+C;AAC3CF,MAAAA,cAAc,CAACF,MAAD,CAAd;AACH;AACJ,GAJQ,EAIN,CAACA,MAAD,CAJM,CAAT;AAMA,SAAOC,WAAP;AACH","sourcesContent":["import { useState, useEffect } from 'react';\nimport { useWindowDimensions } from 'react-native';\n\nexport default function useValidWindowDimensions() {\n const window = useWindowDimensions();\n const [validWindow, setValidWindow] = useState(window);\n\n useEffect(() => {\n if (window.width !== 0 && window.height !== 0) {\n setValidWindow(window);\n }\n }, [window]);\n\n return validWindow;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["useWindowDimensions"],"mappings":"AAAA,SAASA,mBAAT,QAAoC,cAApC;AAEA,eAAeA,mBAAf","sourcesContent":["import { useWindowDimensions } from 'react-native';\n\nexport default useWindowDimensions;\n"]}
|
|
@@ -4,3 +4,4 @@ export { default as useContentContainerStyle } from './useContentContainerStyle'
|
|
|
4
4
|
export { default as useElevationStyle } from './useElevationStyle';
|
|
5
5
|
export { default as useFadeInAppBar } from './useFadeInAppBar';
|
|
6
6
|
export { default as useThrottle } from './useThrottle';
|
|
7
|
+
export { default as useValidWindowDimensions } from './useValidWindowDimensions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useValidWindowDimensions(): import("react-native").ScaledSize;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fountain-ui/core",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"author": "Fountain-UI Team",
|
|
5
5
|
"description": "React components that implement Tappytoon's Fountain Design.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "2453b78c3d7ff484fc25ea0663e33a681942f910"
|
|
71
71
|
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { default as useContentContainerStyle } from './useContentContainerStyle'
|
|
|
4
4
|
export { default as useElevationStyle } from './useElevationStyle';
|
|
5
5
|
export { default as useFadeInAppBar } from './useFadeInAppBar';
|
|
6
6
|
export { default as useThrottle } from './useThrottle';
|
|
7
|
+
export { default as useValidWindowDimensions } from './useValidWindowDimensions';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useWindowDimensions } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export default function useValidWindowDimensions() {
|
|
5
|
+
const window = useWindowDimensions();
|
|
6
|
+
const [validWindow, setValidWindow] = useState(window);
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (window.width !== 0 && window.height !== 0) {
|
|
10
|
+
setValidWindow(window);
|
|
11
|
+
}
|
|
12
|
+
}, [window]);
|
|
13
|
+
|
|
14
|
+
return validWindow;
|
|
15
|
+
}
|