@aiszlab/relax 1.2.15 → 1.2.16

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.
@@ -1,15 +1,14 @@
1
1
  import { __classPrivateFieldSet, __classPrivateFieldGet } from '../node_modules/tslib/tslib.es6.js';
2
2
 
3
- var _Scroller_scrolled, _Scroller_scroller;
3
+ var _a, _Scroller_scrolled, _Scroller_scroller;
4
4
  class Scroller {
5
5
  constructor() {
6
- var _a;
6
+ var _b;
7
+ var _c;
7
8
  _Scroller_scrolled.set(this, new Map()
8
9
  // singleton mode
9
10
  );
10
- // singleton mode
11
- _Scroller_scroller.set(this, null);
12
- return (__classPrivateFieldSet(this, _Scroller_scroller, (_a = __classPrivateFieldGet(this, _Scroller_scroller, "f")) !== null && _a !== void 0 ? _a : this, "f"));
11
+ return (__classPrivateFieldSet(_c = _a, _a, (_b = __classPrivateFieldGet(_c, _a, "f", _Scroller_scroller)) !== null && _b !== void 0 ? _b : this, "f", _Scroller_scroller));
13
12
  }
14
13
  get scrolled() {
15
14
  return __classPrivateFieldGet(this, _Scroller_scrolled, "f");
@@ -18,7 +17,9 @@ class Scroller {
18
17
  return direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
19
18
  }
20
19
  }
21
- _Scroller_scrolled = new WeakMap(), _Scroller_scroller = new WeakMap();
20
+ _a = Scroller, _Scroller_scrolled = new WeakMap();
21
+ // singleton mode
22
+ _Scroller_scroller = { value: null };
22
23
  /**
23
24
  * @description
24
25
  * scroll to for wrapper element
@@ -0,0 +1,6 @@
1
+ import { State } from '../is/is-state-getter';
2
+ /**
3
+ * @description
4
+ * use reactive
5
+ */
6
+ export declare const useReactive: <T>(initialState: State<T>) => void;
@@ -6,11 +6,14 @@ const useUpdateEffect = (callable, deps) => {
6
6
  const isMounted = useRef(false);
7
7
  useEffect(() => {
8
8
  if (!isMounted.current)
9
- return void 0;
9
+ return;
10
10
  return callAsEffect(callable);
11
11
  }, deps);
12
12
  useMounted(() => {
13
13
  isMounted.current = true;
14
+ return () => {
15
+ isMounted.current = false;
16
+ };
14
17
  });
15
18
  };
16
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiszlab/relax",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "react utils collection",
5
5
  "type": "module",
6
6
  "exports": {