@aiszlab/relax 1.2.34 → 1.2.36

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.
@@ -8,7 +8,7 @@ const useHover = (props) => {
8
8
  chain(props?.onEnter, turnOn)(e);
9
9
  }, [props?.onEnter]);
10
10
  const onPointerLeave = useCallback((e) => {
11
- chain(props?.onEnter, turnOff)(e);
11
+ chain(props?.onLeave, turnOff)(e);
12
12
  }, [props?.onLeave]);
13
13
  return [isHovered, { onPointerEnter, onPointerLeave }];
14
14
  };
@@ -40,6 +40,9 @@ class ScrollLocker {
40
40
  // if locked, do not lock again
41
41
  if (this.#locked.has(element))
42
42
  return;
43
+ // if target is not scrollable, do not lock
44
+ if (element.scrollHeight <= element.clientHeight)
45
+ return;
43
46
  this.#locked.set(element, setStyle(element, {
44
47
  overflow: 'hidden',
45
48
  width: `calc(100% - ${this.barSize.width}px)`
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description
3
+ * string/number/... is primitive type
4
+ */
5
+ export declare const isPrimitive: (value: unknown) => boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @description
3
+ * in develop, there are many cases to clone a string/number/object/array
4
+ * this util is planning to resolve it
5
+ */
6
+ export declare const clone: (value: unknown) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiszlab/relax",
3
- "version": "1.2.34",
3
+ "version": "1.2.36",
4
4
  "description": "react utils collection",
5
5
  "type": "module",
6
6
  "exports": {