@quenty/statestack 8.4.0 → 8.5.1-canary.e446bc5.0
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/CHANGELOG.md +19 -0
- package/package.json +8 -8
- package/src/Shared/RxStateStackUtils.lua +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.5.1-canary.e446bc5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/statestack@8.5.0...@quenty/statestack@8.5.1-canary.e446bc5.0) (2023-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add defaultValue to RxStateStackUtils ([ada9d3e](https://github.com/Quenty/NevermoreEngine/commit/ada9d3e02eb4efe3fce6eeb8361ea92fccc9f49e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [8.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/statestack@8.4.0...@quenty/statestack@8.5.0) (2023-02-21)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @quenty/statestack
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [8.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/statestack@8.3.0...@quenty/statestack@8.4.0) (2023-01-11)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @quenty/statestack
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/statestack",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.1-canary.e446bc5.0",
|
|
4
4
|
"description": "Stack of values that allows multiple systems to enable or disable a state",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/brio": "
|
|
30
|
-
"@quenty/loader": "
|
|
31
|
-
"@quenty/maid": "
|
|
32
|
-
"@quenty/rx": "
|
|
33
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/baseobject": "6.1.0",
|
|
29
|
+
"@quenty/brio": "8.5.1-canary.e446bc5.0",
|
|
30
|
+
"@quenty/loader": "6.1.0",
|
|
31
|
+
"@quenty/maid": "2.4.0",
|
|
32
|
+
"@quenty/rx": "7.5.1-canary.e446bc5.0",
|
|
33
|
+
"@quenty/valueobject": "7.5.1-canary.e446bc5.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "e446bc5836cab9dcdf7e2086b63bb72055a91d14"
|
|
39
39
|
}
|
|
@@ -13,14 +13,16 @@ local RxStateStackUtils = {}
|
|
|
13
13
|
|
|
14
14
|
--[=[
|
|
15
15
|
Converts the observable of Brios into a statestack.
|
|
16
|
+
|
|
17
|
+
@param defaultValue T | nil
|
|
16
18
|
@return (source: Observable<Brio<T>>) -> Observable<T?>
|
|
17
19
|
]=]
|
|
18
|
-
function RxStateStackUtils.topOfStack()
|
|
20
|
+
function RxStateStackUtils.topOfStack(defaultValue)
|
|
19
21
|
return function(source)
|
|
20
22
|
return Observable.new(function(sub)
|
|
21
23
|
local maid = Maid.new()
|
|
22
24
|
|
|
23
|
-
local current = StateStack.new(
|
|
25
|
+
local current = StateStack.new(defaultValue)
|
|
24
26
|
maid:GiveTask(current)
|
|
25
27
|
|
|
26
28
|
maid:GiveTask(source:Subscribe(function(brio)
|