awai 1.0.0-rc-2 → 1.0.0-rc-3

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/README.md CHANGED
@@ -17,20 +17,11 @@
17
17
  <p>| <a href="https://awai.js.org">Documentation</a> | <a href="https://awai.js.org/examples">Examples</a> | <a href="https://www.npmjs.com/package/awai">NPM</a> | <a href="https://github.com/yuriyyakym/awai-react">Awai-React</a> |</p>
18
18
  </div>
19
19
 
20
- ---
21
-
22
20
  ## About
23
21
 
24
- This library suggests an [architectural approach](https://awai.js.org/architecture), where every event is a promise-like (thennable) [AwaiEvent](https://awai.js.org/awai-event) with no terminal state.
25
-
26
- AwaiEvent is a fundamental part of this library. It can re-resolve infinite amount of times, and if you await it in a loop, you have an event listener replacement.
27
-
28
- Awai provides variety of nodes which were design to help with handling complex logics.
29
- Every Awai node has its events, which can be mixed into any async logics, or used as trigger for [Scenarios](https://awai.js.org/scenario).
22
+ This library introduces a fresh approach to state management, where every event is a thennable (promise-like) with no terminal state.
30
23
 
31
- [Scenario](/scenario) is a powerful helper which helps to describe complex logics and events sequences using async functions.
32
-
33
- Awai helps with organizing asynchronous logics and handling race conditions with ease, and its main goal is to completely extract business logics from UI layer.
24
+ Awai provides variety of tools helping with organizing asynchronous logic, handling race conditions, and prioritizes the extraction of business logic from the UI layer.
34
25
 
35
26
  ## Installation
36
27
 
@@ -41,18 +32,21 @@ npm install awai
41
32
  ## Documentation
42
33
 
43
34
  - [Quick start](https://awai.js.org/quick-start)
44
- - [Motivation](https://awai.js.org/motivation)
45
35
  - [Architecture](https://awai.js.org/architecture)
46
36
  - [Examples](https://awai.js.org/examples)
47
- - Awai nodes: [State](https://awai.js.org/state), [AsyncState](https://awai.js.org/async-state), [Selector](https://awai.js.org/selector), [Action](https://awai.js.org/action), [Scenario](https://awai.js.org/scenario), [FamilyState](https://awai.js.org/family-state), [Effect](https://awai.js.org/effect)
37
+ - Tools:
38
+ - [State](https://awai.js.org/state) - simple node which stores data
39
+ - [AsyncState](https://awai.js.org/async-state) - helps with storing data loaded asynchronously protecting against race conditions
40
+ - [Selector](https://awai.js.org/selector) - combines multiple states into a single value. Handles async loading and protects against race conditions
41
+ - [Action](https://awai.js.org/action) - function wrapper which emits events; is helpful for controlling scenarios
42
+ - [Scenario](https://awai.js.org/scenario) - composable event listener which allows to declaratively write logic in a saga-like way using async functions
43
+ - [FamilyState](https://awai.js.org/family-state) - aggregator of multiple states of the same type; handles both sync and async states
44
+ - [Effect](https://awai.js.org/effect) - runs callback on dependency states change and cleans up previous effects
48
45
  - Other
49
46
  - [AwaiEvent](https://awai.js.org/awai-event)
50
47
  - [Registry](https://awai.js.org/registry)
48
+ - [Motivation](https://awai.js.org/motivation)
51
49
 
52
50
  ## Integrations
53
51
 
54
- - **React** - [NPM](https://www.npmjs.com/package/awai-react), [Repository](https://github.com/yuriyyakym/awai-react)
55
-
56
- ## Name meaning
57
-
58
- The name comes from a Thai phrase [เอาไว้](https://www.thai2english.com/dictionary/1457374.html) which means "to keep/save/store for later".
52
+ - **React** - [NPM](https://www.npmjs.com/package/awai-react), [GitHub](https://github.com/yuriyyakym/awai-react)
package/dist/index.d.ts CHANGED
@@ -111,7 +111,7 @@ type ActionInvokedEvent<Args> = {
111
111
  type ActionFulfilledEvent<Args, Return> = {
112
112
  arguments: Args;
113
113
  config: Config$6;
114
- result: Return;
114
+ result: Awaited<Return>;
115
115
  };
116
116
  type ActionRejectedEvent<Args> = {
117
117
  arguments: Args;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awai",
3
- "version": "1.0.0-rc-2",
3
+ "version": "1.0.0-rc-3",
4
4
  "author": "Yuriy Yakym",
5
5
  "description": "State management library",
6
6
  "license": "MIT",