@reactuses/core 2.2.8 → 2.2.9
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.cjs +88 -36
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +87 -37
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3878,11 +3878,11 @@ function useOnline() {
|
|
|
3878
3878
|
return online;
|
|
3879
3879
|
}
|
|
3880
3880
|
|
|
3881
|
-
const defaultState = {
|
|
3881
|
+
const defaultState$1 = {
|
|
3882
3882
|
angle: 0,
|
|
3883
3883
|
type: "landscape-primary"
|
|
3884
3884
|
};
|
|
3885
|
-
function useOrientation(initialState = defaultState) {
|
|
3885
|
+
function useOrientation(initialState = defaultState$1) {
|
|
3886
3886
|
const [state, setState] = React.useState(initialState);
|
|
3887
3887
|
React.useEffect(() => {
|
|
3888
3888
|
const screen = window.screen;
|
|
@@ -4050,19 +4050,19 @@ function useDropZone(target, onDrop) {
|
|
|
4050
4050
|
return over;
|
|
4051
4051
|
}
|
|
4052
4052
|
|
|
4053
|
-
var __defProp$
|
|
4054
|
-
var __getOwnPropSymbols$
|
|
4055
|
-
var __hasOwnProp$
|
|
4056
|
-
var __propIsEnum$
|
|
4057
|
-
var __defNormalProp$
|
|
4058
|
-
var __spreadValues$
|
|
4053
|
+
var __defProp$2 = Object.defineProperty;
|
|
4054
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4055
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4056
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
4057
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4058
|
+
var __spreadValues$2 = (a, b) => {
|
|
4059
4059
|
for (var prop in b || (b = {}))
|
|
4060
|
-
if (__hasOwnProp$
|
|
4061
|
-
__defNormalProp$
|
|
4062
|
-
if (__getOwnPropSymbols$
|
|
4063
|
-
for (var prop of __getOwnPropSymbols$
|
|
4064
|
-
if (__propIsEnum$
|
|
4065
|
-
__defNormalProp$
|
|
4060
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
4061
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
4062
|
+
if (__getOwnPropSymbols$3)
|
|
4063
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
4064
|
+
if (__propIsEnum$3.call(b, prop))
|
|
4065
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
4066
4066
|
}
|
|
4067
4067
|
return a;
|
|
4068
4068
|
};
|
|
@@ -4090,7 +4090,7 @@ function useFileDialog(options = {}) {
|
|
|
4090
4090
|
if (!inputRef.current) {
|
|
4091
4091
|
return;
|
|
4092
4092
|
}
|
|
4093
|
-
const _options = __spreadValues$
|
|
4093
|
+
const _options = __spreadValues$2(__spreadValues$2(__spreadValues$2({}, DEFAULT_OPTIONS), options), localOptions);
|
|
4094
4094
|
inputRef.current.multiple = _options.multiple;
|
|
4095
4095
|
inputRef.current.accept = _options.accept;
|
|
4096
4096
|
inputRef.current.capture = _options.capture;
|
|
@@ -4177,21 +4177,21 @@ function useScroll(target, options = {}) {
|
|
|
4177
4177
|
return [x, y, isScrolling, arrivedState, directions];
|
|
4178
4178
|
}
|
|
4179
4179
|
|
|
4180
|
-
var __defProp = Object.defineProperty;
|
|
4180
|
+
var __defProp$1 = Object.defineProperty;
|
|
4181
4181
|
var __defProps = Object.defineProperties;
|
|
4182
4182
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4183
|
-
var __getOwnPropSymbols$
|
|
4184
|
-
var __hasOwnProp$
|
|
4185
|
-
var __propIsEnum$
|
|
4186
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4187
|
-
var __spreadValues = (a, b) => {
|
|
4183
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
4184
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
4185
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
4186
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4187
|
+
var __spreadValues$1 = (a, b) => {
|
|
4188
4188
|
for (var prop in b || (b = {}))
|
|
4189
|
-
if (__hasOwnProp$
|
|
4190
|
-
__defNormalProp(a, prop, b[prop]);
|
|
4191
|
-
if (__getOwnPropSymbols$
|
|
4192
|
-
for (var prop of __getOwnPropSymbols$
|
|
4193
|
-
if (__propIsEnum$
|
|
4194
|
-
__defNormalProp(a, prop, b[prop]);
|
|
4189
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
4190
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4191
|
+
if (__getOwnPropSymbols$2)
|
|
4192
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
4193
|
+
if (__propIsEnum$2.call(b, prop))
|
|
4194
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4195
4195
|
}
|
|
4196
4196
|
return a;
|
|
4197
4197
|
};
|
|
@@ -4220,8 +4220,8 @@ function useInfiniteScroll(target, onLoadMore, options = {}) {
|
|
|
4220
4220
|
var _a, _b;
|
|
4221
4221
|
const savedLoadMore = useLatest(onLoadMore);
|
|
4222
4222
|
const direction = (_a = options.direction) != null ? _a : "bottom";
|
|
4223
|
-
const state = useScroll(target, __spreadProps(__spreadValues({}, options), {
|
|
4224
|
-
offset: __spreadValues({
|
|
4223
|
+
const state = useScroll(target, __spreadProps(__spreadValues$1({}, options), {
|
|
4224
|
+
offset: __spreadValues$1({
|
|
4225
4225
|
[direction]: (_b = options.distance) != null ? _b : 0
|
|
4226
4226
|
}, options.offset)
|
|
4227
4227
|
}));
|
|
@@ -5417,17 +5417,17 @@ function init (converter, defaultAttributes) {
|
|
|
5417
5417
|
|
|
5418
5418
|
var api = init(defaultConverter, { path: '/' });
|
|
5419
5419
|
|
|
5420
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5421
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5422
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5420
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
5421
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
5422
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
5423
5423
|
var __objRest = (source, exclude) => {
|
|
5424
5424
|
var target = {};
|
|
5425
5425
|
for (var prop in source)
|
|
5426
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5426
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5427
5427
|
target[prop] = source[prop];
|
|
5428
|
-
if (source != null && __getOwnPropSymbols)
|
|
5429
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
5430
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
5428
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
5429
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
5430
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
5431
5431
|
target[prop] = source[prop];
|
|
5432
5432
|
}
|
|
5433
5433
|
return target;
|
|
@@ -5511,6 +5511,56 @@ function useDoubleClick({
|
|
|
5511
5511
|
useEventListener("touchend", handleTouchEnd, element, { passive: false });
|
|
5512
5512
|
}
|
|
5513
5513
|
|
|
5514
|
+
var __defProp = Object.defineProperty;
|
|
5515
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5516
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5517
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5518
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5519
|
+
var __spreadValues = (a, b) => {
|
|
5520
|
+
for (var prop in b || (b = {}))
|
|
5521
|
+
if (__hasOwnProp.call(b, prop))
|
|
5522
|
+
__defNormalProp(a, prop, b[prop]);
|
|
5523
|
+
if (__getOwnPropSymbols)
|
|
5524
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
5525
|
+
if (__propIsEnum.call(b, prop))
|
|
5526
|
+
__defNormalProp(a, prop, b[prop]);
|
|
5527
|
+
}
|
|
5528
|
+
return a;
|
|
5529
|
+
};
|
|
5530
|
+
function useSetState(initialState) {
|
|
5531
|
+
const [state, _setState] = React.useState(initialState);
|
|
5532
|
+
const setState = React.useCallback(
|
|
5533
|
+
(statePartial) => _setState((current) => __spreadValues(__spreadValues({}, current), typeof statePartial === "function" ? statePartial(current) : statePartial)),
|
|
5534
|
+
[]
|
|
5535
|
+
);
|
|
5536
|
+
return [state, setState];
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5539
|
+
const defaultState = {
|
|
5540
|
+
x: 0,
|
|
5541
|
+
y: 0,
|
|
5542
|
+
width: 0,
|
|
5543
|
+
height: 0,
|
|
5544
|
+
top: 0,
|
|
5545
|
+
left: 0,
|
|
5546
|
+
bottom: 0,
|
|
5547
|
+
right: 0
|
|
5548
|
+
};
|
|
5549
|
+
function useMeasure(target, options = {}) {
|
|
5550
|
+
const [rect, setRect] = React.useState(defaultState);
|
|
5551
|
+
const stop = useResizeObserver(
|
|
5552
|
+
target,
|
|
5553
|
+
(entries) => {
|
|
5554
|
+
if (entries[0]) {
|
|
5555
|
+
const { x, y, width, height, top, left, bottom, right } = entries[0].contentRect;
|
|
5556
|
+
setRect({ x, y, width, height, top, left, bottom, right });
|
|
5557
|
+
}
|
|
5558
|
+
},
|
|
5559
|
+
options
|
|
5560
|
+
);
|
|
5561
|
+
return [rect, stop];
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5514
5564
|
exports.getHMSTime = getHMSTime;
|
|
5515
5565
|
exports.useActiveElement = useActiveElement;
|
|
5516
5566
|
exports.useAsyncEffect = useAsyncEffect;
|
|
@@ -5553,6 +5603,7 @@ exports.useKeyModifier = useKeyModifier;
|
|
|
5553
5603
|
exports.useLatest = useLatest;
|
|
5554
5604
|
exports.useLocalStorage = useLocalStorage;
|
|
5555
5605
|
exports.useLongPress = useLongPress;
|
|
5606
|
+
exports.useMeasure = useMeasure;
|
|
5556
5607
|
exports.useMediaDevices = index$3;
|
|
5557
5608
|
exports.useMediaQuery = useMediaQuery;
|
|
5558
5609
|
exports.useMount = useMount;
|
|
@@ -5581,6 +5632,7 @@ exports.useScroll = useScroll;
|
|
|
5581
5632
|
exports.useScrollIntoView = useScrollIntoView;
|
|
5582
5633
|
exports.useScrollLock = useScrollLock;
|
|
5583
5634
|
exports.useSessionStorage = useSessionStorage;
|
|
5635
|
+
exports.useSetState = useSetState;
|
|
5584
5636
|
exports.useSticky = useSticky;
|
|
5585
5637
|
exports.useSupported = useSupported;
|
|
5586
5638
|
exports.useTextDirection = useTextDirection;
|
package/dist/index.d.ts
CHANGED
|
@@ -847,4 +847,9 @@ declare function useDoubleClick({ target, latency, onSingleClick, onDoubleClick,
|
|
|
847
847
|
onDoubleClick?: (e?: MouseEvent | TouchEvent) => void;
|
|
848
848
|
}): void;
|
|
849
849
|
|
|
850
|
-
|
|
850
|
+
declare function useSetState<T extends Record<string, any>>(initialState: T): readonly [T, (statePartial: Partial<T> | ((currentState: T) => Partial<T>)) => void];
|
|
851
|
+
|
|
852
|
+
type UseMeasureRect = Omit<DOMRectReadOnly, "toJSON">;
|
|
853
|
+
declare function useMeasure(target: BasicTarget, options?: ResizeObserverOptions): readonly [UseMeasureRect, () => void];
|
|
854
|
+
|
|
855
|
+
export { ColorScheme, Contrast, CookieOptions, CookieState, CursorState, EyeDropperOpenReturnType, GeneralPermissionDescriptor, IDisposable, IEvent, IEventOnce, IListener, INetworkInformation, IState, IUseNetworkState, KeyModifier, MousePressedOptions, MouseSourceType, OrientationState, RafLoopReturns, ScrollIntoViewAnimation, ScrollIntoViewParams, State, Status, Target, UseDarkOptions, UseDraggableOptions, UseElementBoundingOptions, UseEventEmitterReturn, UseEyeDropperReturn, UseFileDialogOptions, UseFpsOptions, UseFullScreenOptions, UseInfiniteScrollOptions, UseLongPressOptions, UseMeasureRect, UseModifierOptions, UseScriptTagOptions, UseScrollOptions, UseStickyParams, UseTextDirectionOptions, UseTextDirectionValue, UseTimeoutFnOptions, UseVirtualListItem, UseVirtualListOptions, UseVirtualListReturn, WindowSize, getHMSTime, useActiveElement, useAsyncEffect, useClickOutSide as useClickOutside, useClipBorad as useClipboard, useControlled, useCookie, useCountDown, useCounter, useCustomCompareEffect, useCycleList, useDarkMode, useDebounce, useDebounceFn, useDeepCompareEffect, useDocumentVisibility, useDoubleClick, useDraggable, useDropZone, useElementBounding, useElementSize, useElementVisibility, useEvent, useEventEmitter, useEventListener, useEyeDropper, useFavicon, useFileDialog, useFirstMountState, useFocus, _default$2 as useFps, useFullscreen, useGeolocation, useIdle, useInfiniteScroll, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyModifier, useLatest, useLocalStorage, useLongPress, useMeasure, _default$3 as useMediaDevices, useMediaQuery, useMount, useMountedState, useMouse, useMousePressed, useMutationObserver, useNetwork, useObjectUrl, _default$1 as useOnceEffect, _default as useOnceLayoutEffect, useOnline, useOrientation, usePageLeave, usePermission, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePrevious, useRafFn, useRafState, useReducedMotion, useResizeObserver, useScriptTag, useScroll, useScrollIntoView, useScrollLock, useSessionStorage, useSetState, useSticky, useSupported, useTextDirection, useTextSelection, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useTitle, useToggle, useUnmount, useUpdate, _default$5 as useUpdateEffect, _default$4 as useUpdateLayoutEffect, useVirtualList, useWindowScroll, useWindowSize, useWindowsFocus };
|
package/dist/index.mjs
CHANGED
|
@@ -3870,11 +3870,11 @@ function useOnline() {
|
|
|
3870
3870
|
return online;
|
|
3871
3871
|
}
|
|
3872
3872
|
|
|
3873
|
-
const defaultState = {
|
|
3873
|
+
const defaultState$1 = {
|
|
3874
3874
|
angle: 0,
|
|
3875
3875
|
type: "landscape-primary"
|
|
3876
3876
|
};
|
|
3877
|
-
function useOrientation(initialState = defaultState) {
|
|
3877
|
+
function useOrientation(initialState = defaultState$1) {
|
|
3878
3878
|
const [state, setState] = useState(initialState);
|
|
3879
3879
|
useEffect(() => {
|
|
3880
3880
|
const screen = window.screen;
|
|
@@ -4042,19 +4042,19 @@ function useDropZone(target, onDrop) {
|
|
|
4042
4042
|
return over;
|
|
4043
4043
|
}
|
|
4044
4044
|
|
|
4045
|
-
var __defProp$
|
|
4046
|
-
var __getOwnPropSymbols$
|
|
4047
|
-
var __hasOwnProp$
|
|
4048
|
-
var __propIsEnum$
|
|
4049
|
-
var __defNormalProp$
|
|
4050
|
-
var __spreadValues$
|
|
4045
|
+
var __defProp$2 = Object.defineProperty;
|
|
4046
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4047
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4048
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
4049
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4050
|
+
var __spreadValues$2 = (a, b) => {
|
|
4051
4051
|
for (var prop in b || (b = {}))
|
|
4052
|
-
if (__hasOwnProp$
|
|
4053
|
-
__defNormalProp$
|
|
4054
|
-
if (__getOwnPropSymbols$
|
|
4055
|
-
for (var prop of __getOwnPropSymbols$
|
|
4056
|
-
if (__propIsEnum$
|
|
4057
|
-
__defNormalProp$
|
|
4052
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
4053
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
4054
|
+
if (__getOwnPropSymbols$3)
|
|
4055
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
4056
|
+
if (__propIsEnum$3.call(b, prop))
|
|
4057
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
4058
4058
|
}
|
|
4059
4059
|
return a;
|
|
4060
4060
|
};
|
|
@@ -4082,7 +4082,7 @@ function useFileDialog(options = {}) {
|
|
|
4082
4082
|
if (!inputRef.current) {
|
|
4083
4083
|
return;
|
|
4084
4084
|
}
|
|
4085
|
-
const _options = __spreadValues$
|
|
4085
|
+
const _options = __spreadValues$2(__spreadValues$2(__spreadValues$2({}, DEFAULT_OPTIONS), options), localOptions);
|
|
4086
4086
|
inputRef.current.multiple = _options.multiple;
|
|
4087
4087
|
inputRef.current.accept = _options.accept;
|
|
4088
4088
|
inputRef.current.capture = _options.capture;
|
|
@@ -4169,21 +4169,21 @@ function useScroll(target, options = {}) {
|
|
|
4169
4169
|
return [x, y, isScrolling, arrivedState, directions];
|
|
4170
4170
|
}
|
|
4171
4171
|
|
|
4172
|
-
var __defProp = Object.defineProperty;
|
|
4172
|
+
var __defProp$1 = Object.defineProperty;
|
|
4173
4173
|
var __defProps = Object.defineProperties;
|
|
4174
4174
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4175
|
-
var __getOwnPropSymbols$
|
|
4176
|
-
var __hasOwnProp$
|
|
4177
|
-
var __propIsEnum$
|
|
4178
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4179
|
-
var __spreadValues = (a, b) => {
|
|
4175
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
4176
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
4177
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
4178
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4179
|
+
var __spreadValues$1 = (a, b) => {
|
|
4180
4180
|
for (var prop in b || (b = {}))
|
|
4181
|
-
if (__hasOwnProp$
|
|
4182
|
-
__defNormalProp(a, prop, b[prop]);
|
|
4183
|
-
if (__getOwnPropSymbols$
|
|
4184
|
-
for (var prop of __getOwnPropSymbols$
|
|
4185
|
-
if (__propIsEnum$
|
|
4186
|
-
__defNormalProp(a, prop, b[prop]);
|
|
4181
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
4182
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4183
|
+
if (__getOwnPropSymbols$2)
|
|
4184
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
4185
|
+
if (__propIsEnum$2.call(b, prop))
|
|
4186
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4187
4187
|
}
|
|
4188
4188
|
return a;
|
|
4189
4189
|
};
|
|
@@ -4212,8 +4212,8 @@ function useInfiniteScroll(target, onLoadMore, options = {}) {
|
|
|
4212
4212
|
var _a, _b;
|
|
4213
4213
|
const savedLoadMore = useLatest(onLoadMore);
|
|
4214
4214
|
const direction = (_a = options.direction) != null ? _a : "bottom";
|
|
4215
|
-
const state = useScroll(target, __spreadProps(__spreadValues({}, options), {
|
|
4216
|
-
offset: __spreadValues({
|
|
4215
|
+
const state = useScroll(target, __spreadProps(__spreadValues$1({}, options), {
|
|
4216
|
+
offset: __spreadValues$1({
|
|
4217
4217
|
[direction]: (_b = options.distance) != null ? _b : 0
|
|
4218
4218
|
}, options.offset)
|
|
4219
4219
|
}));
|
|
@@ -5409,17 +5409,17 @@ function init (converter, defaultAttributes) {
|
|
|
5409
5409
|
|
|
5410
5410
|
var api = init(defaultConverter, { path: '/' });
|
|
5411
5411
|
|
|
5412
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5413
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5414
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5412
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
5413
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
5414
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
5415
5415
|
var __objRest = (source, exclude) => {
|
|
5416
5416
|
var target = {};
|
|
5417
5417
|
for (var prop in source)
|
|
5418
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5418
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5419
5419
|
target[prop] = source[prop];
|
|
5420
|
-
if (source != null && __getOwnPropSymbols)
|
|
5421
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
5422
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
5420
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
5421
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
5422
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
5423
5423
|
target[prop] = source[prop];
|
|
5424
5424
|
}
|
|
5425
5425
|
return target;
|
|
@@ -5503,4 +5503,54 @@ function useDoubleClick({
|
|
|
5503
5503
|
useEventListener("touchend", handleTouchEnd, element, { passive: false });
|
|
5504
5504
|
}
|
|
5505
5505
|
|
|
5506
|
-
|
|
5506
|
+
var __defProp = Object.defineProperty;
|
|
5507
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5508
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5509
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5510
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5511
|
+
var __spreadValues = (a, b) => {
|
|
5512
|
+
for (var prop in b || (b = {}))
|
|
5513
|
+
if (__hasOwnProp.call(b, prop))
|
|
5514
|
+
__defNormalProp(a, prop, b[prop]);
|
|
5515
|
+
if (__getOwnPropSymbols)
|
|
5516
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
5517
|
+
if (__propIsEnum.call(b, prop))
|
|
5518
|
+
__defNormalProp(a, prop, b[prop]);
|
|
5519
|
+
}
|
|
5520
|
+
return a;
|
|
5521
|
+
};
|
|
5522
|
+
function useSetState(initialState) {
|
|
5523
|
+
const [state, _setState] = useState(initialState);
|
|
5524
|
+
const setState = useCallback(
|
|
5525
|
+
(statePartial) => _setState((current) => __spreadValues(__spreadValues({}, current), typeof statePartial === "function" ? statePartial(current) : statePartial)),
|
|
5526
|
+
[]
|
|
5527
|
+
);
|
|
5528
|
+
return [state, setState];
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
const defaultState = {
|
|
5532
|
+
x: 0,
|
|
5533
|
+
y: 0,
|
|
5534
|
+
width: 0,
|
|
5535
|
+
height: 0,
|
|
5536
|
+
top: 0,
|
|
5537
|
+
left: 0,
|
|
5538
|
+
bottom: 0,
|
|
5539
|
+
right: 0
|
|
5540
|
+
};
|
|
5541
|
+
function useMeasure(target, options = {}) {
|
|
5542
|
+
const [rect, setRect] = useState(defaultState);
|
|
5543
|
+
const stop = useResizeObserver(
|
|
5544
|
+
target,
|
|
5545
|
+
(entries) => {
|
|
5546
|
+
if (entries[0]) {
|
|
5547
|
+
const { x, y, width, height, top, left, bottom, right } = entries[0].contentRect;
|
|
5548
|
+
setRect({ x, y, width, height, top, left, bottom, right });
|
|
5549
|
+
}
|
|
5550
|
+
},
|
|
5551
|
+
options
|
|
5552
|
+
);
|
|
5553
|
+
return [rect, stop];
|
|
5554
|
+
}
|
|
5555
|
+
|
|
5556
|
+
export { getHMSTime, useActiveElement, useAsyncEffect, useClickOutSide as useClickOutside, useClipBorad as useClipboard, useControlled, useCookie, useCountDown, useCounter, useCustomCompareEffect, useCycleList, useDarkMode, useDebounce, useDebounceFn, useDeepCompareEffect, useDocumentVisibility, useDoubleClick, useDraggable, useDropZone, useElementBounding, useElementSize, useElementVisibility, useEvent, useEventEmitter, useEventListener, useEyeDropper, useFavicon, useFileDialog, useFirstMountState, useFocus, index$2 as useFps, useFullscreen, useGeolocation, useIdle, useInfiniteScroll, useIntersectionObserver, useInterval, useIsomorphicLayoutEffect, useKeyModifier, useLatest, useLocalStorage, useLongPress, useMeasure, index$3 as useMediaDevices, useMediaQuery, useMount, useMountedState, useMouse, useMousePressed, useMutationObserver, useNetwork, useObjectUrl, index$1 as useOnceEffect, index as useOnceLayoutEffect, useOnline, useOrientation, usePageLeave, usePermission, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePrevious, useRafFn, useRafState, useReducedMotion, useResizeObserver, useScriptTag, useScroll, useScrollIntoView, useScrollLock, useSessionStorage, useSetState, useSticky, useSupported, useTextDirection, useTextSelection, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useTitle, useToggle, useUnmount, useUpdate, useUpdateEffect, index$4 as useUpdateLayoutEffect, useVirtualList, useWindowScroll, useWindowSize, useWindowsFocus };
|