extra-react-hooks 0.1.11 → 0.1.14

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.
Files changed (52) hide show
  1. package/README.md +43 -5
  2. package/dist/es2015/index.min.mjs +3 -18
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +11239 -16563
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +11241 -16562
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +3 -18
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +3 -18
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +11239 -16563
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +11241 -16562
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +3 -18
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/index.d.ts +3 -0
  19. package/lib/es2015/index.js +3 -0
  20. package/lib/es2015/index.js.map +1 -1
  21. package/lib/es2015/use-finite-state-machine.js +5 -2
  22. package/lib/es2015/use-finite-state-machine.js.map +1 -1
  23. package/lib/es2015/use-is-first-render.d.ts +1 -0
  24. package/lib/es2015/use-is-first-render.js +25 -0
  25. package/lib/es2015/use-is-first-render.js.map +1 -0
  26. package/lib/es2015/use-multiple-selection.d.ts +13 -0
  27. package/lib/es2015/use-multiple-selection.js +39 -0
  28. package/lib/es2015/use-multiple-selection.js.map +1 -0
  29. package/lib/es2015/use-single-selection.d.ts +5 -6
  30. package/lib/es2015/use-single-selection.js +4 -4
  31. package/lib/es2015/use-single-selection.js.map +1 -1
  32. package/lib/es2015/use-update-effect.d.ts +2 -0
  33. package/lib/es2015/use-update-effect.js +15 -0
  34. package/lib/es2015/use-update-effect.js.map +1 -0
  35. package/lib/es2018/index.d.ts +3 -0
  36. package/lib/es2018/index.js +3 -0
  37. package/lib/es2018/index.js.map +1 -1
  38. package/lib/es2018/use-finite-state-machine.js +5 -2
  39. package/lib/es2018/use-finite-state-machine.js.map +1 -1
  40. package/lib/es2018/use-is-first-render.d.ts +1 -0
  41. package/lib/es2018/use-is-first-render.js +25 -0
  42. package/lib/es2018/use-is-first-render.js.map +1 -0
  43. package/lib/es2018/use-multiple-selection.d.ts +13 -0
  44. package/lib/es2018/use-multiple-selection.js +39 -0
  45. package/lib/es2018/use-multiple-selection.js.map +1 -0
  46. package/lib/es2018/use-single-selection.d.ts +5 -6
  47. package/lib/es2018/use-single-selection.js +4 -4
  48. package/lib/es2018/use-single-selection.js.map +1 -1
  49. package/lib/es2018/use-update-effect.d.ts +2 -0
  50. package/lib/es2018/use-update-effect.js +15 -0
  51. package/lib/es2018/use-update-effect.js.map +1 -0
  52. package/package.json +14 -14
@@ -1,7 +1,10 @@
1
1
  export * from './use-increment';
2
2
  export * from './use-is-mounted';
3
+ export * from './use-is-first-render';
3
4
  export * from './use-mount';
5
+ export * from './use-update-effect';
4
6
  export * from './use-single-selection';
7
+ export * from './use-multiple-selection';
5
8
  export * from './use-state-cycle';
6
9
  export * from './use-toggle';
7
10
  export * from './use-resize-observer';
@@ -16,8 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./use-increment"), exports);
18
18
  __exportStar(require("./use-is-mounted"), exports);
19
+ __exportStar(require("./use-is-first-render"), exports);
19
20
  __exportStar(require("./use-mount"), exports);
21
+ __exportStar(require("./use-update-effect"), exports);
20
22
  __exportStar(require("./use-single-selection"), exports);
23
+ __exportStar(require("./use-multiple-selection"), exports);
21
24
  __exportStar(require("./use-state-cycle"), exports);
22
25
  __exportStar(require("./use-toggle"), exports);
23
26
  __exportStar(require("./use-resize-observer"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,mDAAgC;AAChC,8CAA2B;AAC3B,yDAAsC;AACtC,oDAAiC;AACjC,+CAA4B;AAC5B,wDAAqC;AACrC,6CAA0B;AAC1B,qDAAkC;AAClC,6DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,mDAAgC;AAChC,wDAAqC;AACrC,8CAA2B;AAC3B,sDAAmC;AACnC,yDAAsC;AACtC,2DAAwC;AACxC,oDAAiC;AACjC,+CAA4B;AAC5B,wDAAqC;AACrC,6CAA0B;AAC1B,qDAAkC;AAClC,6DAA0C"}
@@ -3,14 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useFiniteStateMachine = exports.ObservableFiniteStateMachine = void 0;
4
4
  const react_1 = require("react");
5
5
  const structures_1 = require("@blackglory/structures");
6
- const observable_hooks_1 = require("observable-hooks");
7
6
  const use_force_update_1 = require("./use-force-update");
8
7
  var structures_2 = require("@blackglory/structures");
9
8
  Object.defineProperty(exports, "ObservableFiniteStateMachine", { enumerable: true, get: function () { return structures_2.ObservableFiniteStateMachine; } });
10
9
  function useFiniteStateMachine(schema, initialState) {
11
10
  const forceUpdate = (0, use_force_update_1.useForceUpdate)();
12
11
  const fsm = (0, react_1.useMemo)(() => new structures_1.ObservableFiniteStateMachine(schema, initialState), [schema]);
13
- (0, observable_hooks_1.useSubscription)((0, observable_hooks_1.useObservable)(() => fsm.observeStateChanges(), [fsm]), forceUpdate);
12
+ (0, react_1.useEffect)(() => {
13
+ const observable = fsm.observeStateChanges();
14
+ const subscription = observable.subscribe(() => forceUpdate());
15
+ return () => subscription.unsubscribe();
16
+ }, [fsm]);
14
17
  return fsm;
15
18
  }
16
19
  exports.useFiniteStateMachine = useFiniteStateMachine;
@@ -1 +1 @@
1
- {"version":3,"file":"use-finite-state-machine.js","sourceRoot":"","sources":["../../src/use-finite-state-machine.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAC/B,uDAG+B;AAC/B,uDAAiE;AACjE,yDAAmD;AAEnD,qDAG+B;AAF7B,0HAAA,4BAA4B,OAAA;AAI9B,SAAgB,qBAAqB,CACnC,MAA+C,EAC/C,YAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,iCAAc,GAAE,CAAA;IACpC,MAAM,GAAG,GAAG,IAAA,eAAO,EACjB,GAAG,EAAE,CAAC,IAAI,yCAA4B,CAAC,MAAM,EAAE,YAAY,CAAC,EAC5D,CAAC,MAAM,CAAC,CACT,CAAA;IACD,IAAA,kCAAe,EACb,IAAA,gCAAa,EAAC,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EACrD,WAAW,CACZ,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAdD,sDAcC"}
1
+ {"version":3,"file":"use-finite-state-machine.js","sourceRoot":"","sources":["../../src/use-finite-state-machine.ts"],"names":[],"mappings":";;;AAAA,iCAA0C;AAC1C,uDAG+B;AAC/B,yDAAmD;AAEnD,qDAG+B;AAF7B,0HAAA,4BAA4B,OAAA;AAI9B,SAAgB,qBAAqB,CACnC,MAA+C,EAC/C,YAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,iCAAc,GAAE,CAAA;IACpC,MAAM,GAAG,GAAG,IAAA,eAAO,EACjB,GAAG,EAAE,CAAC,IAAI,yCAA4B,CAAC,MAAM,EAAE,YAAY,CAAC,EAC5D,CAAC,MAAM,CAAC,CACT,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,GAAG,CAAC,mBAAmB,EAAE,CAAA;QAC5C,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;QAE9D,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAA;IACzC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,OAAO,GAAG,CAAA;AACZ,CAAC;AAlBD,sDAkBC"}
@@ -0,0 +1 @@
1
+ export declare function useIsFirstRender(): () => boolean;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsFirstRender = void 0;
4
+ const react_1 = require("react");
5
+ var State;
6
+ (function (State) {
7
+ State[State["InitialValue"] = 0] = "InitialValue";
8
+ State[State["First"] = 1] = "First";
9
+ State[State["NotFirst"] = 2] = "NotFirst";
10
+ })(State || (State = {}));
11
+ function useIsFirstRender() {
12
+ const state = (0, react_1.useRef)(State.InitialValue);
13
+ switch (state.current) {
14
+ case State.InitialValue:
15
+ state.current = State.First;
16
+ break;
17
+ case State.First:
18
+ state.current = State.NotFirst;
19
+ break;
20
+ case State.NotFirst: break;
21
+ }
22
+ return () => state.current === State.First;
23
+ }
24
+ exports.useIsFirstRender = useIsFirstRender;
25
+ //# sourceMappingURL=use-is-first-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-first-render.js","sourceRoot":"","sources":["../../src/use-is-first-render.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B,IAAK,KAIJ;AAJD,WAAK,KAAK;IACR,iDAAY,CAAA;IACZ,mCAAK,CAAA;IACL,yCAAQ,CAAA;AACV,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAED,SAAgB,gBAAgB;IAC9B,MAAM,KAAK,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAExC,QAAQ,KAAK,CAAC,OAAO,EAAE;QACrB,KAAK,KAAK,CAAC,YAAY;YACrB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAA;YAC3B,MAAK;QACP,KAAK,KAAK,CAAC,KAAK;YACd,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;YAC9B,MAAK;QACP,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAK;KAC3B;IAED,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,KAAK,CAAA;AAC5C,CAAC;AAdD,4CAcC"}
@@ -0,0 +1,13 @@
1
+ interface IMultipleSelectionOption<T> {
2
+ value: T;
3
+ index: number;
4
+ selected: boolean;
5
+ select(): void;
6
+ unselect(): void;
7
+ toggle(): void;
8
+ }
9
+ export declare function useMultipleSelection<T>(values: T[], defaultSelectedIndexes?: number[]): {
10
+ values: T[];
11
+ options: Array<IMultipleSelectionOption<T>>;
12
+ };
13
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useMultipleSelection = void 0;
4
+ const react_1 = require("react");
5
+ const errors_1 = require("@blackglory/errors");
6
+ const iterable_operator_1 = require("iterable-operator");
7
+ function useMultipleSelection(values, defaultSelectedIndexes = []) {
8
+ (0, errors_1.assert)(values.length > 0, 'The parameter values must be a non-empty array');
9
+ for (const index of defaultSelectedIndexes) {
10
+ (0, errors_1.assert)(index >= 0 && index < values.length, 'The index of parameter defaultSelectedIndexes must be in the range of 0 to values.length');
11
+ }
12
+ const [selectedIndexes, setSelectedIndexes] = (0, react_1.useState)(new Set(defaultSelectedIndexes));
13
+ return {
14
+ values: (0, iterable_operator_1.toArray)((0, iterable_operator_1.map)(selectedIndexes, i => values[i])),
15
+ options: values.map((value, index) => {
16
+ const selected = selectedIndexes.has(index);
17
+ const select = () => {
18
+ const set = new Set(selectedIndexes);
19
+ set.add(index);
20
+ setSelectedIndexes(set);
21
+ };
22
+ const unselect = () => {
23
+ const set = new Set(selectedIndexes);
24
+ set.delete(index);
25
+ setSelectedIndexes(set);
26
+ };
27
+ return {
28
+ value,
29
+ index,
30
+ selected,
31
+ select,
32
+ unselect,
33
+ toggle: selected ? unselect : select
34
+ };
35
+ })
36
+ };
37
+ }
38
+ exports.useMultipleSelection = useMultipleSelection;
39
+ //# sourceMappingURL=use-multiple-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-multiple-selection.js","sourceRoot":"","sources":["../../src/use-multiple-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,+CAA2C;AAC3C,yDAAgD;AAYhD,SAAgB,oBAAoB,CAClC,MAAW,EACX,yBAAmC,EAAE;IAKrC,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,KAAK,MAAM,KAAK,IAAI,sBAAsB,EAAE;QAC1C,IAAA,eAAM,EACJ,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,EACnC,0FAA0F,CAC3F,CAAA;KACF;IAED,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAA;IAEvF,OAAO;QACL,MAAM,EAAE,IAAA,2BAAO,EAAC,IAAA,uBAAG,EAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACnC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC3C,MAAM,MAAM,GAAG,GAAG,EAAE;gBAClB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;gBACpC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBACd,kBAAkB,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC,CAAA;YACD,MAAM,QAAQ,GAAG,GAAG,EAAE;gBACpB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;gBACpC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;gBACjB,kBAAkB,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC,CAAA;YAED,OAAO;gBACL,KAAK;gBACL,KAAK;gBACL,QAAQ;gBACR,MAAM;gBACN,QAAQ;gBACR,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;aACrC,CAAA;QACH,CAAC,CAAC;KACH,CAAA;AACH,CAAC;AA1CD,oDA0CC"}
@@ -1,15 +1,14 @@
1
- interface IOption<T> {
1
+ export interface ISingleSelectionOption<T> {
2
2
  value: T;
3
3
  index: number;
4
4
  selected: boolean;
5
- select: () => void;
5
+ select(): void;
6
6
  }
7
- export declare function useSingleSelection<T>(values: T[], defaultIndex: number): {
7
+ export declare function useSingleSelection<T>(values: T[], defaultSelectedIndex: number): {
8
8
  value: T;
9
- options: Array<IOption<T>>;
9
+ options: Array<ISingleSelectionOption<T>>;
10
10
  };
11
11
  export declare function useSingleSelection<T>(values: T[]): {
12
12
  value: T | undefined;
13
- options: Array<IOption<T>>;
13
+ options: Array<ISingleSelectionOption<T>>;
14
14
  };
15
- export {};
@@ -4,12 +4,12 @@ exports.useSingleSelection = void 0;
4
4
  const react_1 = require("react");
5
5
  const types_1 = require("@blackglory/types");
6
6
  const errors_1 = require("@blackglory/errors");
7
- function useSingleSelection(values, defaultIndex) {
7
+ function useSingleSelection(values, defaultSelectedIndex) {
8
8
  (0, errors_1.assert)(values.length > 0, 'The parameter values must be a non-empty array');
9
- if ((0, types_1.isntUndefined)(defaultIndex)) {
10
- (0, errors_1.assert)(defaultIndex >= 0 && defaultIndex < values.length, 'The parameter defaultIndex must be in the range of 0 to values.length');
9
+ if ((0, types_1.isntUndefined)(defaultSelectedIndex)) {
10
+ (0, errors_1.assert)(defaultSelectedIndex >= 0 && defaultSelectedIndex < values.length, 'The parameter defaultSelectedIndex must be in the range of 0 to values.length');
11
11
  }
12
- const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(defaultIndex);
12
+ const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(defaultSelectedIndex);
13
13
  return {
14
14
  value: (0, types_1.isUndefined)(selectedIndex) ? undefined : values[selectedIndex],
15
15
  options: values.map((value, index) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"use-single-selection.js","sourceRoot":"","sources":["../../src/use-single-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,6CAA8D;AAC9D,+CAA2C;AAiB3C,SAAgB,kBAAkB,CAAI,MAAW,EAAE,YAAqB;IACtE,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,IAAI,IAAA,qBAAa,EAAC,YAAY,CAAC,EAAE;QAC/B,IAAA,eAAM,EACJ,YAAY,IAAI,CAAC,IAAI,YAAY,GAAG,MAAM,CAAC,MAAM,EACjD,uEAAuE,CACxE,CAAA;KACF;IAED,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAqB,YAAY,CAAC,CAAA;IAEpF,OAAO;QACL,KAAK,EAAE,IAAA,mBAAW,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACrE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,KAAK;YACL,KAAK;YACL,QAAQ,EAAE,KAAK,KAAK,aAAa;YACjC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;SACtC,CAAC,CAAC;KACJ,CAAA;AACH,CAAC;AApBD,gDAoBC"}
1
+ {"version":3,"file":"use-single-selection.js","sourceRoot":"","sources":["../../src/use-single-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,6CAA8D;AAC9D,+CAA2C;AAqB3C,SAAgB,kBAAkB,CAChC,MAAW,EACX,oBAA6B;IAE7B,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,IAAI,IAAA,qBAAa,EAAC,oBAAoB,CAAC,EAAE;QACvC,IAAA,eAAM,EACJ,oBAAoB,IAAI,CAAC,IAAI,oBAAoB,GAAG,MAAM,CAAC,MAAM,EACjE,+EAA+E,CAChF,CAAA;KACF;IAED,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAqB,oBAAoB,CAAC,CAAA;IAE5F,OAAO;QACL,KAAK,EAAE,IAAA,mBAAW,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACrE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,KAAK;YACL,KAAK;YACL,QAAQ,EAAE,KAAK,KAAK,aAAa;YACjC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;SACtC,CAAC,CAAC;KACJ,CAAA;AACH,CAAC;AAvBD,gDAuBC"}
@@ -0,0 +1,2 @@
1
+ import { EffectCallback } from 'react';
2
+ export declare function useUpdateEffect(effect: EffectCallback, deps?: React.DependencyList): void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useUpdateEffect = void 0;
4
+ const react_1 = require("react");
5
+ const use_is_first_render_1 = require("./use-is-first-render");
6
+ function useUpdateEffect(effect, deps) {
7
+ const isFirstRender = (0, use_is_first_render_1.useIsFirstRender)();
8
+ (0, react_1.useEffect)(() => {
9
+ if (!isFirstRender()) {
10
+ return effect();
11
+ }
12
+ }, deps);
13
+ }
14
+ exports.useUpdateEffect = useUpdateEffect;
15
+ //# sourceMappingURL=use-update-effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-update-effect.js","sourceRoot":"","sources":["../../src/use-update-effect.ts"],"names":[],"mappings":";;;AAAA,iCAAiD;AACjD,+DAAwD;AAExD,SAAgB,eAAe,CAC7B,MAAsB,EACtB,IAA2B;IAE3B,MAAM,aAAa,GAAG,IAAA,sCAAgB,GAAE,CAAA;IAExC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,EAAE,EAAE;YACpB,OAAO,MAAM,EAAE,CAAA;SAChB;IACH,CAAC,EAAE,IAAI,CAAC,CAAA;AACV,CAAC;AAXD,0CAWC"}
@@ -1,7 +1,10 @@
1
1
  export * from './use-increment';
2
2
  export * from './use-is-mounted';
3
+ export * from './use-is-first-render';
3
4
  export * from './use-mount';
5
+ export * from './use-update-effect';
4
6
  export * from './use-single-selection';
7
+ export * from './use-multiple-selection';
5
8
  export * from './use-state-cycle';
6
9
  export * from './use-toggle';
7
10
  export * from './use-resize-observer';
@@ -16,8 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./use-increment"), exports);
18
18
  __exportStar(require("./use-is-mounted"), exports);
19
+ __exportStar(require("./use-is-first-render"), exports);
19
20
  __exportStar(require("./use-mount"), exports);
21
+ __exportStar(require("./use-update-effect"), exports);
20
22
  __exportStar(require("./use-single-selection"), exports);
23
+ __exportStar(require("./use-multiple-selection"), exports);
21
24
  __exportStar(require("./use-state-cycle"), exports);
22
25
  __exportStar(require("./use-toggle"), exports);
23
26
  __exportStar(require("./use-resize-observer"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,mDAAgC;AAChC,8CAA2B;AAC3B,yDAAsC;AACtC,oDAAiC;AACjC,+CAA4B;AAC5B,wDAAqC;AACrC,6CAA0B;AAC1B,qDAAkC;AAClC,6DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,mDAAgC;AAChC,wDAAqC;AACrC,8CAA2B;AAC3B,sDAAmC;AACnC,yDAAsC;AACtC,2DAAwC;AACxC,oDAAiC;AACjC,+CAA4B;AAC5B,wDAAqC;AACrC,6CAA0B;AAC1B,qDAAkC;AAClC,6DAA0C"}
@@ -3,14 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useFiniteStateMachine = exports.ObservableFiniteStateMachine = void 0;
4
4
  const react_1 = require("react");
5
5
  const structures_1 = require("@blackglory/structures");
6
- const observable_hooks_1 = require("observable-hooks");
7
6
  const use_force_update_1 = require("./use-force-update");
8
7
  var structures_2 = require("@blackglory/structures");
9
8
  Object.defineProperty(exports, "ObservableFiniteStateMachine", { enumerable: true, get: function () { return structures_2.ObservableFiniteStateMachine; } });
10
9
  function useFiniteStateMachine(schema, initialState) {
11
10
  const forceUpdate = (0, use_force_update_1.useForceUpdate)();
12
11
  const fsm = (0, react_1.useMemo)(() => new structures_1.ObservableFiniteStateMachine(schema, initialState), [schema]);
13
- (0, observable_hooks_1.useSubscription)((0, observable_hooks_1.useObservable)(() => fsm.observeStateChanges(), [fsm]), forceUpdate);
12
+ (0, react_1.useEffect)(() => {
13
+ const observable = fsm.observeStateChanges();
14
+ const subscription = observable.subscribe(() => forceUpdate());
15
+ return () => subscription.unsubscribe();
16
+ }, [fsm]);
14
17
  return fsm;
15
18
  }
16
19
  exports.useFiniteStateMachine = useFiniteStateMachine;
@@ -1 +1 @@
1
- {"version":3,"file":"use-finite-state-machine.js","sourceRoot":"","sources":["../../src/use-finite-state-machine.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAC/B,uDAG+B;AAC/B,uDAAiE;AACjE,yDAAmD;AAEnD,qDAG+B;AAF7B,0HAAA,4BAA4B,OAAA;AAI9B,SAAgB,qBAAqB,CACnC,MAA+C,EAC/C,YAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,iCAAc,GAAE,CAAA;IACpC,MAAM,GAAG,GAAG,IAAA,eAAO,EACjB,GAAG,EAAE,CAAC,IAAI,yCAA4B,CAAC,MAAM,EAAE,YAAY,CAAC,EAC5D,CAAC,MAAM,CAAC,CACT,CAAA;IACD,IAAA,kCAAe,EACb,IAAA,gCAAa,EAAC,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EACrD,WAAW,CACZ,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAdD,sDAcC"}
1
+ {"version":3,"file":"use-finite-state-machine.js","sourceRoot":"","sources":["../../src/use-finite-state-machine.ts"],"names":[],"mappings":";;;AAAA,iCAA0C;AAC1C,uDAG+B;AAC/B,yDAAmD;AAEnD,qDAG+B;AAF7B,0HAAA,4BAA4B,OAAA;AAI9B,SAAgB,qBAAqB,CACnC,MAA+C,EAC/C,YAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,iCAAc,GAAE,CAAA;IACpC,MAAM,GAAG,GAAG,IAAA,eAAO,EACjB,GAAG,EAAE,CAAC,IAAI,yCAA4B,CAAC,MAAM,EAAE,YAAY,CAAC,EAC5D,CAAC,MAAM,CAAC,CACT,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,GAAG,CAAC,mBAAmB,EAAE,CAAA;QAC5C,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;QAE9D,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAA;IACzC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,OAAO,GAAG,CAAA;AACZ,CAAC;AAlBD,sDAkBC"}
@@ -0,0 +1 @@
1
+ export declare function useIsFirstRender(): () => boolean;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsFirstRender = void 0;
4
+ const react_1 = require("react");
5
+ var State;
6
+ (function (State) {
7
+ State[State["InitialValue"] = 0] = "InitialValue";
8
+ State[State["First"] = 1] = "First";
9
+ State[State["NotFirst"] = 2] = "NotFirst";
10
+ })(State || (State = {}));
11
+ function useIsFirstRender() {
12
+ const state = (0, react_1.useRef)(State.InitialValue);
13
+ switch (state.current) {
14
+ case State.InitialValue:
15
+ state.current = State.First;
16
+ break;
17
+ case State.First:
18
+ state.current = State.NotFirst;
19
+ break;
20
+ case State.NotFirst: break;
21
+ }
22
+ return () => state.current === State.First;
23
+ }
24
+ exports.useIsFirstRender = useIsFirstRender;
25
+ //# sourceMappingURL=use-is-first-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-first-render.js","sourceRoot":"","sources":["../../src/use-is-first-render.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B,IAAK,KAIJ;AAJD,WAAK,KAAK;IACR,iDAAY,CAAA;IACZ,mCAAK,CAAA;IACL,yCAAQ,CAAA;AACV,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAED,SAAgB,gBAAgB;IAC9B,MAAM,KAAK,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAExC,QAAQ,KAAK,CAAC,OAAO,EAAE;QACrB,KAAK,KAAK,CAAC,YAAY;YACrB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAA;YAC3B,MAAK;QACP,KAAK,KAAK,CAAC,KAAK;YACd,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;YAC9B,MAAK;QACP,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAK;KAC3B;IAED,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,KAAK,CAAA;AAC5C,CAAC;AAdD,4CAcC"}
@@ -0,0 +1,13 @@
1
+ interface IMultipleSelectionOption<T> {
2
+ value: T;
3
+ index: number;
4
+ selected: boolean;
5
+ select(): void;
6
+ unselect(): void;
7
+ toggle(): void;
8
+ }
9
+ export declare function useMultipleSelection<T>(values: T[], defaultSelectedIndexes?: number[]): {
10
+ values: T[];
11
+ options: Array<IMultipleSelectionOption<T>>;
12
+ };
13
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useMultipleSelection = void 0;
4
+ const react_1 = require("react");
5
+ const errors_1 = require("@blackglory/errors");
6
+ const iterable_operator_1 = require("iterable-operator");
7
+ function useMultipleSelection(values, defaultSelectedIndexes = []) {
8
+ (0, errors_1.assert)(values.length > 0, 'The parameter values must be a non-empty array');
9
+ for (const index of defaultSelectedIndexes) {
10
+ (0, errors_1.assert)(index >= 0 && index < values.length, 'The index of parameter defaultSelectedIndexes must be in the range of 0 to values.length');
11
+ }
12
+ const [selectedIndexes, setSelectedIndexes] = (0, react_1.useState)(new Set(defaultSelectedIndexes));
13
+ return {
14
+ values: (0, iterable_operator_1.toArray)((0, iterable_operator_1.map)(selectedIndexes, i => values[i])),
15
+ options: values.map((value, index) => {
16
+ const selected = selectedIndexes.has(index);
17
+ const select = () => {
18
+ const set = new Set(selectedIndexes);
19
+ set.add(index);
20
+ setSelectedIndexes(set);
21
+ };
22
+ const unselect = () => {
23
+ const set = new Set(selectedIndexes);
24
+ set.delete(index);
25
+ setSelectedIndexes(set);
26
+ };
27
+ return {
28
+ value,
29
+ index,
30
+ selected,
31
+ select,
32
+ unselect,
33
+ toggle: selected ? unselect : select
34
+ };
35
+ })
36
+ };
37
+ }
38
+ exports.useMultipleSelection = useMultipleSelection;
39
+ //# sourceMappingURL=use-multiple-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-multiple-selection.js","sourceRoot":"","sources":["../../src/use-multiple-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,+CAA2C;AAC3C,yDAAgD;AAYhD,SAAgB,oBAAoB,CAClC,MAAW,EACX,yBAAmC,EAAE;IAKrC,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,KAAK,MAAM,KAAK,IAAI,sBAAsB,EAAE;QAC1C,IAAA,eAAM,EACJ,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,EACnC,0FAA0F,CAC3F,CAAA;KACF;IAED,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAA;IAEvF,OAAO;QACL,MAAM,EAAE,IAAA,2BAAO,EAAC,IAAA,uBAAG,EAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACnC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC3C,MAAM,MAAM,GAAG,GAAG,EAAE;gBAClB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;gBACpC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBACd,kBAAkB,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC,CAAA;YACD,MAAM,QAAQ,GAAG,GAAG,EAAE;gBACpB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;gBACpC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;gBACjB,kBAAkB,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC,CAAA;YAED,OAAO;gBACL,KAAK;gBACL,KAAK;gBACL,QAAQ;gBACR,MAAM;gBACN,QAAQ;gBACR,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;aACrC,CAAA;QACH,CAAC,CAAC;KACH,CAAA;AACH,CAAC;AA1CD,oDA0CC"}
@@ -1,15 +1,14 @@
1
- interface IOption<T> {
1
+ export interface ISingleSelectionOption<T> {
2
2
  value: T;
3
3
  index: number;
4
4
  selected: boolean;
5
- select: () => void;
5
+ select(): void;
6
6
  }
7
- export declare function useSingleSelection<T>(values: T[], defaultIndex: number): {
7
+ export declare function useSingleSelection<T>(values: T[], defaultSelectedIndex: number): {
8
8
  value: T;
9
- options: Array<IOption<T>>;
9
+ options: Array<ISingleSelectionOption<T>>;
10
10
  };
11
11
  export declare function useSingleSelection<T>(values: T[]): {
12
12
  value: T | undefined;
13
- options: Array<IOption<T>>;
13
+ options: Array<ISingleSelectionOption<T>>;
14
14
  };
15
- export {};
@@ -4,12 +4,12 @@ exports.useSingleSelection = void 0;
4
4
  const react_1 = require("react");
5
5
  const types_1 = require("@blackglory/types");
6
6
  const errors_1 = require("@blackglory/errors");
7
- function useSingleSelection(values, defaultIndex) {
7
+ function useSingleSelection(values, defaultSelectedIndex) {
8
8
  (0, errors_1.assert)(values.length > 0, 'The parameter values must be a non-empty array');
9
- if ((0, types_1.isntUndefined)(defaultIndex)) {
10
- (0, errors_1.assert)(defaultIndex >= 0 && defaultIndex < values.length, 'The parameter defaultIndex must be in the range of 0 to values.length');
9
+ if ((0, types_1.isntUndefined)(defaultSelectedIndex)) {
10
+ (0, errors_1.assert)(defaultSelectedIndex >= 0 && defaultSelectedIndex < values.length, 'The parameter defaultSelectedIndex must be in the range of 0 to values.length');
11
11
  }
12
- const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(defaultIndex);
12
+ const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(defaultSelectedIndex);
13
13
  return {
14
14
  value: (0, types_1.isUndefined)(selectedIndex) ? undefined : values[selectedIndex],
15
15
  options: values.map((value, index) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"use-single-selection.js","sourceRoot":"","sources":["../../src/use-single-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,6CAA8D;AAC9D,+CAA2C;AAiB3C,SAAgB,kBAAkB,CAAI,MAAW,EAAE,YAAqB;IACtE,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,IAAI,IAAA,qBAAa,EAAC,YAAY,CAAC,EAAE;QAC/B,IAAA,eAAM,EACJ,YAAY,IAAI,CAAC,IAAI,YAAY,GAAG,MAAM,CAAC,MAAM,EACjD,uEAAuE,CACxE,CAAA;KACF;IAED,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAqB,YAAY,CAAC,CAAA;IAEpF,OAAO;QACL,KAAK,EAAE,IAAA,mBAAW,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACrE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,KAAK;YACL,KAAK;YACL,QAAQ,EAAE,KAAK,KAAK,aAAa;YACjC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;SACtC,CAAC,CAAC;KACJ,CAAA;AACH,CAAC;AApBD,gDAoBC"}
1
+ {"version":3,"file":"use-single-selection.js","sourceRoot":"","sources":["../../src/use-single-selection.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,6CAA8D;AAC9D,+CAA2C;AAqB3C,SAAgB,kBAAkB,CAChC,MAAW,EACX,oBAA6B;IAE7B,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,gDAAgD,CAAC,CAAA;IAC3E,IAAI,IAAA,qBAAa,EAAC,oBAAoB,CAAC,EAAE;QACvC,IAAA,eAAM,EACJ,oBAAoB,IAAI,CAAC,IAAI,oBAAoB,GAAG,MAAM,CAAC,MAAM,EACjE,+EAA+E,CAChF,CAAA;KACF;IAED,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAqB,oBAAoB,CAAC,CAAA;IAE5F,OAAO;QACL,KAAK,EAAE,IAAA,mBAAW,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACrE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,KAAK;YACL,KAAK;YACL,QAAQ,EAAE,KAAK,KAAK,aAAa;YACjC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;SACtC,CAAC,CAAC;KACJ,CAAA;AACH,CAAC;AAvBD,gDAuBC"}
@@ -0,0 +1,2 @@
1
+ import { EffectCallback } from 'react';
2
+ export declare function useUpdateEffect(effect: EffectCallback, deps?: React.DependencyList): void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useUpdateEffect = void 0;
4
+ const react_1 = require("react");
5
+ const use_is_first_render_1 = require("./use-is-first-render");
6
+ function useUpdateEffect(effect, deps) {
7
+ const isFirstRender = (0, use_is_first_render_1.useIsFirstRender)();
8
+ (0, react_1.useEffect)(() => {
9
+ if (!isFirstRender()) {
10
+ return effect();
11
+ }
12
+ }, deps);
13
+ }
14
+ exports.useUpdateEffect = useUpdateEffect;
15
+ //# sourceMappingURL=use-update-effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-update-effect.js","sourceRoot":"","sources":["../../src/use-update-effect.ts"],"names":[],"mappings":";;;AAAA,iCAAiD;AACjD,+DAAwD;AAExD,SAAgB,eAAe,CAC7B,MAAsB,EACtB,IAA2B;IAE3B,MAAM,aAAa,GAAG,IAAA,sCAAgB,GAAE,CAAA;IAExC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,EAAE,EAAE;YACpB,OAAO,MAAM,EAAE,CAAA;SAChB;IACH,CAAC,EAAE,IAAI,CAAC,CAAA;AACV,CAAC;AAXD,0CAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-react-hooks",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [
@@ -38,10 +38,10 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@blackglory/wait-for": "^0.4.4",
42
- "@commitlint/cli": "^16.2.3",
43
- "@commitlint/config-conventional": "^16.2.1",
44
- "@rollup/plugin-commonjs": "^21.0.2",
41
+ "@blackglory/wait-for": "^0.5.1",
42
+ "@commitlint/cli": "^17.0.3",
43
+ "@commitlint/config-conventional": "^17.0.3",
44
+ "@rollup/plugin-commonjs": "^22.0.1",
45
45
  "@rollup/plugin-json": "^4.1.0",
46
46
  "@rollup/plugin-node-resolve": "^13.1.3",
47
47
  "@rollup/plugin-replace": "^4.0.0",
@@ -50,24 +50,24 @@
50
50
  "@testing-library/react-hooks": "^7.0.2",
51
51
  "@types/jasmine": "^4.0.0",
52
52
  "@types/react": "^17.0.40",
53
- "@typescript-eslint/eslint-plugin": "^5.15.0",
54
- "@typescript-eslint/parser": "^5.15.0",
55
- "eslint": "^8.11.0",
53
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
54
+ "@typescript-eslint/parser": "^5.30.7",
55
+ "eslint": "^8.20.0",
56
56
  "husky": "4",
57
57
  "karma": "^6.3.17",
58
58
  "karma-chrome-launcher": "^3.1.1",
59
- "karma-jasmine": "^4.0.1",
59
+ "karma-jasmine": "^5.1.0",
60
60
  "karma-webpack": "^5.0.0",
61
61
  "npm-run-all": "^4.1.5",
62
62
  "react": "^17.0.2",
63
63
  "react-dom": "^17.0.2",
64
64
  "react-test-renderer": "^17.0.2",
65
65
  "rimraf": "^3.0.2",
66
- "rollup": "^2.70.1",
66
+ "rollup": "^2.77.0",
67
67
  "rollup-plugin-analyzer": "^4.0.0",
68
68
  "rollup-plugin-terser": "^7.0.2",
69
69
  "standard-version": "^9.3.2",
70
- "ts-loader": "^9.2.8",
70
+ "ts-loader": "^9.3.1",
71
71
  "tsconfig-paths-webpack-plugin": "^3.5.2",
72
72
  "tscpaths": "^0.0.9",
73
73
  "tslib": "^2.3.1",
@@ -76,10 +76,10 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@blackglory/errors": "^2.2.1",
79
- "@blackglory/structures": "^0.3.5",
79
+ "@blackglory/structures": "^0.6.0",
80
80
  "@blackglory/types": "^1.0.0",
81
- "observable-hooks": "^4.2.0",
82
- "rxjs": "^7.5.5"
81
+ "iterable-operator": "^1.1.0",
82
+ "rxjs": "^7.5.6"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": ">= 16.8"