@quenty/promptqueue 1.18.2 → 1.18.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/CHANGELOG.md +8 -0
- package/package.json +7 -7
- package/src/Shared/PromptQueue.lua +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/promptqueue@1.18.2...@quenty/promptqueue@1.18.3) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/promptqueue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.18.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/promptqueue@1.18.0...@quenty/promptqueue@1.18.2) (2025-04-07)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/promptqueue",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.3",
|
|
4
4
|
"description": "Queue system for prompts and other UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "^10.8.
|
|
29
|
-
"@quenty/loader": "^10.8.
|
|
30
|
-
"@quenty/promise": "^10.10.
|
|
31
|
-
"@quenty/signal": "^7.10.
|
|
32
|
-
"@quenty/transitionmodel": "^7.19.
|
|
28
|
+
"@quenty/baseobject": "^10.8.3",
|
|
29
|
+
"@quenty/loader": "^10.8.3",
|
|
30
|
+
"@quenty/promise": "^10.10.4",
|
|
31
|
+
"@quenty/signal": "^7.10.3",
|
|
32
|
+
"@quenty/transitionmodel": "^7.19.3"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
|
|
38
38
|
}
|
|
@@ -27,21 +27,20 @@ type PromptEntry = {
|
|
|
27
27
|
|
|
28
28
|
export type PromptQueue = typeof(setmetatable(
|
|
29
29
|
{} :: {
|
|
30
|
-
_maid: Maid.Maid,
|
|
31
30
|
_isShowing: ValueObject.ValueObject<boolean>,
|
|
32
31
|
_clearRequested: Signal.Signal<(boolean?)>,
|
|
33
32
|
_queue: { PromptEntry },
|
|
34
33
|
_currentProcessingEntry: PromptEntry?,
|
|
35
34
|
},
|
|
36
|
-
{ __index = PromptQueue }
|
|
37
|
-
))
|
|
35
|
+
{} :: typeof({ __index = PromptQueue })
|
|
36
|
+
)) & BaseObject.BaseObject
|
|
38
37
|
|
|
39
38
|
--[=[
|
|
40
39
|
Constructs a new prompt queue
|
|
41
40
|
@return PromptQueue
|
|
42
41
|
]=]
|
|
43
42
|
function PromptQueue.new(): PromptQueue
|
|
44
|
-
local self = setmetatable(BaseObject.new() :: any, PromptQueue)
|
|
43
|
+
local self: PromptQueue = setmetatable(BaseObject.new() :: any, PromptQueue)
|
|
45
44
|
|
|
46
45
|
self._isShowing = self._maid:Add(ValueObject.new(false, "boolean"))
|
|
47
46
|
self._clearRequested = self._maid:Add(Signal.new())
|
|
@@ -49,7 +48,7 @@ function PromptQueue.new(): PromptQueue
|
|
|
49
48
|
self._queue = {}
|
|
50
49
|
self._currentProcessingEntry = nil
|
|
51
50
|
|
|
52
|
-
return self
|
|
51
|
+
return self
|
|
53
52
|
end
|
|
54
53
|
|
|
55
54
|
--[=[
|
|
@@ -68,13 +67,13 @@ function PromptQueue.Queue(self: PromptQueue, transitionModel: TransitionModel.T
|
|
|
68
67
|
local entry: PromptEntry = {
|
|
69
68
|
promise = promise,
|
|
70
69
|
execute = function()
|
|
71
|
-
|
|
70
|
+
assert(promise:IsPending(), "Not pending")
|
|
72
71
|
|
|
73
72
|
-- stylua: ignore
|
|
74
73
|
maid:GivePromise(transitionModel:PromiseShow())
|
|
75
74
|
:Then(function()
|
|
76
|
-
if transitionModel.PromiseSustain then
|
|
77
|
-
return maid:GivePromise(transitionModel:PromiseSustain())
|
|
75
|
+
if (transitionModel :: any).PromiseSustain then
|
|
76
|
+
return maid:GivePromise((transitionModel :: any):PromiseSustain())
|
|
78
77
|
end
|
|
79
78
|
|
|
80
79
|
return nil
|
|
@@ -129,7 +128,7 @@ function PromptQueue.Queue(self: PromptQueue, transitionModel: TransitionModel.T
|
|
|
129
128
|
end))
|
|
130
129
|
|
|
131
130
|
promise:Finally(function()
|
|
132
|
-
self._maid[maid
|
|
131
|
+
self._maid[maid] = nil
|
|
133
132
|
end)
|
|
134
133
|
maid:GiveTask(function()
|
|
135
134
|
if self._currentProcessingEntry == entry then
|
|
@@ -141,10 +140,10 @@ function PromptQueue.Queue(self: PromptQueue, transitionModel: TransitionModel.T
|
|
|
141
140
|
table.remove(self._queue, index)
|
|
142
141
|
end
|
|
143
142
|
|
|
144
|
-
self._maid[maid
|
|
143
|
+
self._maid[maid] = nil
|
|
145
144
|
end)
|
|
146
145
|
|
|
147
|
-
self._maid[maid
|
|
146
|
+
self._maid[maid] = maid
|
|
148
147
|
|
|
149
148
|
self:_startQueueProcessing()
|
|
150
149
|
|