@ainias42/react-bootstrap-mobile 0.2.6 → 0.2.8
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/bootstrapReactMobile.ts +1 -0
- package/dist/bootstrapReactMobile.d.ts +1 -0
- package/dist/bootstrapReactMobile.js +27 -4
- package/dist/bootstrapReactMobile.js.map +1 -1
- package/dist/src/Components/Hooks/useDelayedEffect.d.ts +1 -1
- package/dist/src/Components/Hooks/useRerender.d.ts +1 -0
- package/package.json +1 -1
- package/src/Components/Hooks/useDelayedEffect.ts +2 -2
- package/src/Components/Hooks/useRerender.ts +21 -0
package/bootstrapReactMobile.ts
CHANGED
|
@@ -57,6 +57,7 @@ export * from './src/Components/Hooks/useListener';
|
|
|
57
57
|
export * from './src/Components/Hooks/useMousePosition';
|
|
58
58
|
export * from './src/Components/Hooks/useOnMount';
|
|
59
59
|
export * from './src/Components/Hooks/useOnce';
|
|
60
|
+
export * from './src/Components/Hooks/useRerender';
|
|
60
61
|
export * from './src/Components/Hooks/useWindowDimensions';
|
|
61
62
|
export * from './src/Components/Icon/DoubleIcon';
|
|
62
63
|
export * from './src/Components/Icon/Icon';
|
|
@@ -57,6 +57,7 @@ export * from './src/Components/Hooks/useListener';
|
|
|
57
57
|
export * from './src/Components/Hooks/useMousePosition';
|
|
58
58
|
export * from './src/Components/Hooks/useOnMount';
|
|
59
59
|
export * from './src/Components/Hooks/useOnce';
|
|
60
|
+
export * from './src/Components/Hooks/useRerender';
|
|
60
61
|
export * from './src/Components/Hooks/useWindowDimensions';
|
|
61
62
|
export * from './src/Components/Icon/DoubleIcon';
|
|
62
63
|
export * from './src/Components/Icon/Icon';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @ainias42/react-bootstrap-mobile v0.2.
|
|
3
|
+
* @ainias42/react-bootstrap-mobile v0.2.7
|
|
4
4
|
* git+https://github.com/Ainias/Bootstrap-React-Mobile.git
|
|
5
5
|
* Copyright (c) Silas Günther and project contributors.
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
@@ -4803,7 +4803,7 @@ module.exports = baseForOwn;
|
|
|
4803
4803
|
/***/ 7422:
|
|
4804
4804
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4805
4805
|
|
|
4806
|
-
var castPath = __webpack_require__(
|
|
4806
|
+
var castPath = __webpack_require__(1769),
|
|
4807
4807
|
toKey = __webpack_require__(7797);
|
|
4808
4808
|
|
|
4809
4809
|
/**
|
|
@@ -5693,7 +5693,7 @@ module.exports = castFunction;
|
|
|
5693
5693
|
|
|
5694
5694
|
/***/ }),
|
|
5695
5695
|
|
|
5696
|
-
/***/
|
|
5696
|
+
/***/ 1769:
|
|
5697
5697
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
5698
5698
|
|
|
5699
5699
|
var isArray = __webpack_require__(6449),
|
|
@@ -6772,7 +6772,7 @@ module.exports = getValue;
|
|
|
6772
6772
|
/***/ 9326:
|
|
6773
6773
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
6774
6774
|
|
|
6775
|
-
var castPath = __webpack_require__(
|
|
6775
|
+
var castPath = __webpack_require__(1769),
|
|
6776
6776
|
isArguments = __webpack_require__(2428),
|
|
6777
6777
|
isArray = __webpack_require__(6449),
|
|
6778
6778
|
isIndex = __webpack_require__(361),
|
|
@@ -10150,6 +10150,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
10150
10150
|
useOnChangeDone: () => (/* reexport */ useOnChangeDone),
|
|
10151
10151
|
useOnMount: () => (/* reexport */ useOnMount),
|
|
10152
10152
|
useOnce: () => (/* reexport */ useOnce),
|
|
10153
|
+
useRerender: () => (/* reexport */ useRerender),
|
|
10153
10154
|
useSendFormContext: () => (/* reexport */ useSendFormContext),
|
|
10154
10155
|
useSharedSelectedColor: () => (/* reexport */ useSharedSelectedColor),
|
|
10155
10156
|
useSpoilerGroup: () => (/* reexport */ useSpoilerGroup),
|
|
@@ -24910,6 +24911,26 @@ function useOnce(cb, condition) {
|
|
|
24910
24911
|
}
|
|
24911
24912
|
});
|
|
24912
24913
|
}
|
|
24914
|
+
;// CONCATENATED MODULE: ./src/Components/Hooks/useRerender.ts
|
|
24915
|
+
|
|
24916
|
+
function useRerender(defaultDelay = 0) {
|
|
24917
|
+
const timeoutRef = (0,external_react_.useRef)();
|
|
24918
|
+
const [renderCounter, updateRenderCounter] = (0,external_react_.useState)(0);
|
|
24919
|
+
const update = (0,external_react_.useCallback)((delay = defaultDelay) => {
|
|
24920
|
+
if (delay === 0) {
|
|
24921
|
+
clearTimeout(timeoutRef.current);
|
|
24922
|
+
timeoutRef.current = undefined;
|
|
24923
|
+
updateRenderCounter(old => old + 1);
|
|
24924
|
+
} else if (!timeoutRef.current) {
|
|
24925
|
+
timeoutRef.current = setTimeout(() => {
|
|
24926
|
+
clearTimeout(timeoutRef.current);
|
|
24927
|
+
timeoutRef.current = undefined;
|
|
24928
|
+
updateRenderCounter(old => old + 1);
|
|
24929
|
+
}, delay);
|
|
24930
|
+
}
|
|
24931
|
+
}, []);
|
|
24932
|
+
return [update, renderCounter];
|
|
24933
|
+
}
|
|
24913
24934
|
;// CONCATENATED MODULE: ./src/Components/Hooks/useWindowDimensions.ts
|
|
24914
24935
|
|
|
24915
24936
|
|
|
@@ -29279,6 +29300,7 @@ function nonEmptyString(str, other = Characters.NBSP) {
|
|
|
29279
29300
|
|
|
29280
29301
|
|
|
29281
29302
|
|
|
29303
|
+
|
|
29282
29304
|
|
|
29283
29305
|
|
|
29284
29306
|
})();
|
|
@@ -29400,6 +29422,7 @@ exports.useMousePosition = __webpack_exports__.useMousePosition;
|
|
|
29400
29422
|
exports.useOnChangeDone = __webpack_exports__.useOnChangeDone;
|
|
29401
29423
|
exports.useOnMount = __webpack_exports__.useOnMount;
|
|
29402
29424
|
exports.useOnce = __webpack_exports__.useOnce;
|
|
29425
|
+
exports.useRerender = __webpack_exports__.useRerender;
|
|
29403
29426
|
exports.useSendFormContext = __webpack_exports__.useSendFormContext;
|
|
29404
29427
|
exports.useSharedSelectedColor = __webpack_exports__.useSharedSelectedColor;
|
|
29405
29428
|
exports.useSpoilerGroup = __webpack_exports__.useSpoilerGroup;
|