@quenty/statestack 14.18.3 → 14.18.4-canary.11a5dcf.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 +11 -0
- package/package.json +8 -8
- package/src/Shared/RxStateStackUtils.lua +4 -4
- package/src/Shared/StateStack.lua +9 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [14.18.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/statestack@14.18.3...@quenty/statestack@14.18.4-canary.11a5dcf.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [14.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/statestack@14.18.2...@quenty/statestack@14.18.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**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": "14.18.
|
|
3
|
+
"version": "14.18.4-canary.11a5dcf.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": "10.8.4-canary.11a5dcf.0",
|
|
29
|
+
"@quenty/brio": "14.17.4-canary.11a5dcf.0",
|
|
30
|
+
"@quenty/loader": "10.8.4-canary.11a5dcf.0",
|
|
31
|
+
"@quenty/maid": "3.4.4-canary.11a5dcf.0",
|
|
32
|
+
"@quenty/rx": "13.17.4-canary.11a5dcf.0",
|
|
33
|
+
"@quenty/valueobject": "13.17.4-canary.11a5dcf.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
|
|
39
39
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
local require = require(script.Parent.loader).load(script)
|
|
7
7
|
|
|
8
|
-
local StateStack = require("StateStack")
|
|
9
|
-
local Observable = require("Observable")
|
|
10
|
-
local Maid = require("Maid")
|
|
11
8
|
local Brio = require("Brio")
|
|
9
|
+
local Maid = require("Maid")
|
|
10
|
+
local Observable = require("Observable")
|
|
11
|
+
local StateStack = require("StateStack")
|
|
12
12
|
|
|
13
13
|
local RxStateStackUtils = {}
|
|
14
14
|
|
|
@@ -71,4 +71,4 @@ function RxStateStackUtils.createStateStack<T>(observable: Observable.Observable
|
|
|
71
71
|
return stateStack
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
-
return RxStateStackUtils
|
|
74
|
+
return RxStateStackUtils
|
|
@@ -25,12 +25,11 @@
|
|
|
25
25
|
local require = require(script.Parent.loader).load(script)
|
|
26
26
|
|
|
27
27
|
local BaseObject = require("BaseObject")
|
|
28
|
+
local Brio = require("Brio")
|
|
29
|
+
local Observable = require("Observable")
|
|
30
|
+
local Rx = require("Rx")
|
|
31
|
+
local Signal = require("Signal")
|
|
28
32
|
local ValueObject = require("ValueObject")
|
|
29
|
-
local _Brio = require("Brio")
|
|
30
|
-
local _Signal = require("Signal")
|
|
31
|
-
local _Observable = require("Observable")
|
|
32
|
-
local _Maid = require("Maid")
|
|
33
|
-
local _Rx = require("Rx")
|
|
34
33
|
|
|
35
34
|
local StateStack = setmetatable({}, BaseObject)
|
|
36
35
|
StateStack.ClassName = "StateStack"
|
|
@@ -38,7 +37,7 @@ StateStack.__index = StateStack
|
|
|
38
37
|
|
|
39
38
|
export type StateStack<T> = typeof(setmetatable(
|
|
40
39
|
{} :: {
|
|
41
|
-
Changed:
|
|
40
|
+
Changed: Signal.Signal<T>,
|
|
42
41
|
|
|
43
42
|
_state: ValueObject.ValueObject<T>,
|
|
44
43
|
_defaultValue: T,
|
|
@@ -90,7 +89,7 @@ end
|
|
|
90
89
|
Observes the current value of stack
|
|
91
90
|
@return Observable<T>
|
|
92
91
|
]=]
|
|
93
|
-
function StateStack.Observe<T>(self: StateStack<T>):
|
|
92
|
+
function StateStack.Observe<T>(self: StateStack<T>): Observable.Observable<T>
|
|
94
93
|
return self._state:Observe()
|
|
95
94
|
end
|
|
96
95
|
|
|
@@ -99,10 +98,7 @@ end
|
|
|
99
98
|
@param predicate function
|
|
100
99
|
@return Observable<T>
|
|
101
100
|
]=]
|
|
102
|
-
function StateStack.ObserveBrio<T>(
|
|
103
|
-
self: StateStack<T>,
|
|
104
|
-
predicate: _Rx.Predicate<T>?
|
|
105
|
-
): _Observable.Observable<_Brio.Brio<T>>
|
|
101
|
+
function StateStack.ObserveBrio<T>(self: StateStack<T>, predicate: Rx.Predicate<T>?): Observable.Observable<Brio.Brio<T>>
|
|
106
102
|
return self._state:ObserveBrio(predicate) :: any
|
|
107
103
|
end
|
|
108
104
|
|
|
@@ -129,7 +125,7 @@ end
|
|
|
129
125
|
@param brio Brio
|
|
130
126
|
@return function -- Cleanup function
|
|
131
127
|
]=]
|
|
132
|
-
function StateStack.PushBrio<T>(self: StateStack<T>, brio:
|
|
128
|
+
function StateStack.PushBrio<T>(self: StateStack<T>, brio: Brio.Brio<T>): (() -> ())?
|
|
133
129
|
if brio:IsDead() then
|
|
134
130
|
return nil
|
|
135
131
|
end
|
|
@@ -177,4 +173,4 @@ end
|
|
|
177
173
|
@within StateStack
|
|
178
174
|
]=]
|
|
179
175
|
|
|
180
|
-
return StateStack
|
|
176
|
+
return StateStack
|