@quenty/inputmode 13.18.3 → 13.18.4-canary.559.339cfa7.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 +10 -10
- package/src/Client/InputMode.lua +6 -6
- package/src/Client/InputModeProcessor.lua +6 -6
- package/src/Client/InputModeServiceClient.lua +8 -8
- package/src/Client/InputModeTypeSelector.lua +11 -11
- package/src/Shared/InputModeType.lua +1 -1
- package/src/Shared/InputModeTypes.lua +1 -1
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
|
+
## [13.18.4-canary.559.339cfa7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputmode@13.18.3...@quenty/inputmode@13.18.4-canary.559.339cfa7.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
|
## [13.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputmode@13.18.2...@quenty/inputmode@13.18.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/inputmode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/inputmode",
|
|
3
|
-
"version": "13.18.
|
|
3
|
+
"version": "13.18.4-canary.559.339cfa7.0",
|
|
4
4
|
"description": "Trace input mode state and trigger changes correctly",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/ducktype": "
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/maid": "
|
|
31
|
-
"@quenty/rx": "
|
|
32
|
-
"@quenty/servicebag": "
|
|
33
|
-
"@quenty/signal": "
|
|
34
|
-
"@quenty/table": "
|
|
35
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/ducktype": "5.8.5-canary.559.339cfa7.0",
|
|
29
|
+
"@quenty/loader": "10.8.4-canary.559.339cfa7.0",
|
|
30
|
+
"@quenty/maid": "3.4.4-canary.559.339cfa7.0",
|
|
31
|
+
"@quenty/rx": "13.17.4-canary.559.339cfa7.0",
|
|
32
|
+
"@quenty/servicebag": "11.11.5-canary.559.339cfa7.0",
|
|
33
|
+
"@quenty/signal": "7.10.4-canary.559.339cfa7.0",
|
|
34
|
+
"@quenty/table": "3.7.5-canary.559.339cfa7.0",
|
|
35
|
+
"@quenty/valueobject": "13.17.4-canary.559.339cfa7.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "339cfa778736f08768ed7305041f6221faa35bfc"
|
|
41
41
|
}
|
package/src/Client/InputMode.lua
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
local require = require(script.Parent.loader).load(script)
|
|
10
10
|
|
|
11
|
-
local Signal = require("Signal")
|
|
12
11
|
local DuckTypeUtils = require("DuckTypeUtils")
|
|
13
|
-
local
|
|
12
|
+
local InputModeType = require("InputModeType")
|
|
13
|
+
local Signal = require("Signal")
|
|
14
14
|
|
|
15
15
|
--[=[
|
|
16
16
|
Fires off when the mode is enabled
|
|
@@ -30,7 +30,7 @@ InputMode.ClassName = "InputMode"
|
|
|
30
30
|
|
|
31
31
|
export type InputMode = typeof(setmetatable(
|
|
32
32
|
{} :: {
|
|
33
|
-
_inputModeType:
|
|
33
|
+
_inputModeType: InputModeType.InputModeType,
|
|
34
34
|
_lastEnabled: number,
|
|
35
35
|
Enabled: Signal.Signal<()>,
|
|
36
36
|
},
|
|
@@ -43,7 +43,7 @@ export type InputMode = typeof(setmetatable(
|
|
|
43
43
|
@param inputModeType InputModeType
|
|
44
44
|
@return InputMode
|
|
45
45
|
]=]
|
|
46
|
-
function InputMode.new(inputModeType:
|
|
46
|
+
function InputMode.new(inputModeType: InputModeType.InputModeType): InputMode
|
|
47
47
|
local self = setmetatable({}, InputMode)
|
|
48
48
|
|
|
49
49
|
self._inputModeType = assert(inputModeType, "Bad inputModeType")
|
|
@@ -86,7 +86,7 @@ end
|
|
|
86
86
|
@param inputType { UserInputType | KeyCode | string }
|
|
87
87
|
@return boolean
|
|
88
88
|
]=]
|
|
89
|
-
function InputMode.IsValid(self: InputMode, inputType:
|
|
89
|
+
function InputMode.IsValid(self: InputMode, inputType: InputModeType.InputModeKey): boolean
|
|
90
90
|
assert(inputType, "Must send in inputType")
|
|
91
91
|
|
|
92
92
|
return self._inputModeType:IsValid(inputType)
|
|
@@ -117,4 +117,4 @@ function InputMode.Destroy(self: InputMode)
|
|
|
117
117
|
self.Enabled:Destroy()
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
return InputMode
|
|
120
|
+
return InputMode
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
-
local
|
|
9
|
+
local InputMode = require("InputMode")
|
|
10
10
|
|
|
11
11
|
local InputModeProcessor = {}
|
|
12
12
|
InputModeProcessor.__index = InputModeProcessor
|
|
@@ -14,7 +14,7 @@ InputModeProcessor.ClassName = InputModeProcessor
|
|
|
14
14
|
|
|
15
15
|
export type InputModeProcessor = typeof(setmetatable(
|
|
16
16
|
{} :: {
|
|
17
|
-
_inputModes: {
|
|
17
|
+
_inputModes: { InputMode.InputMode },
|
|
18
18
|
},
|
|
19
19
|
{} :: typeof({ __index = InputModeProcessor })
|
|
20
20
|
))
|
|
@@ -24,7 +24,7 @@ export type InputModeProcessor = typeof(setmetatable(
|
|
|
24
24
|
@param inputModes { InputMode }?
|
|
25
25
|
@return InputModeProcessor
|
|
26
26
|
]=]
|
|
27
|
-
function InputModeProcessor.new(inputModes: {
|
|
27
|
+
function InputModeProcessor.new(inputModes: { InputMode.InputMode }?): InputModeProcessor
|
|
28
28
|
local self = setmetatable({}, InputModeProcessor)
|
|
29
29
|
|
|
30
30
|
self._inputModes = {}
|
|
@@ -42,7 +42,7 @@ end
|
|
|
42
42
|
Adds an input mode to the inputModeProcessor
|
|
43
43
|
@param inputMode InputMode
|
|
44
44
|
]=]
|
|
45
|
-
function InputModeProcessor.AddInputMode(self: InputModeProcessor, inputMode:
|
|
45
|
+
function InputModeProcessor.AddInputMode(self: InputModeProcessor, inputMode: InputMode.InputMode)
|
|
46
46
|
table.insert(self._inputModes, inputMode)
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ end
|
|
|
50
50
|
Gets all input mode inputModes being used
|
|
51
51
|
@return { InputMode }
|
|
52
52
|
]=]
|
|
53
|
-
function InputModeProcessor.GetStates(self: InputModeProcessor): {
|
|
53
|
+
function InputModeProcessor.GetStates(self: InputModeProcessor): { InputMode.InputMode }
|
|
54
54
|
return self._inputModes
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -64,4 +64,4 @@ function InputModeProcessor.Evaluate(self: InputModeProcessor, inputObject: Inpu
|
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
return InputModeProcessor
|
|
67
|
+
return InputModeProcessor
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
-
local UserInputService = game:GetService("UserInputService")
|
|
10
9
|
local GuiService = game:GetService("GuiService")
|
|
11
10
|
local RunService = game:GetService("RunService")
|
|
11
|
+
local UserInputService = game:GetService("UserInputService")
|
|
12
12
|
|
|
13
|
-
local
|
|
14
|
-
local Maid = require("Maid")
|
|
13
|
+
local InputMode = require("InputMode")
|
|
15
14
|
local InputModeProcessor = require("InputModeProcessor")
|
|
15
|
+
local InputModeType = require("InputModeType")
|
|
16
16
|
local InputModeTypes = require("InputModeTypes")
|
|
17
|
-
local
|
|
18
|
-
local
|
|
17
|
+
local Maid = require("Maid")
|
|
18
|
+
local ServiceBag = require("ServiceBag")
|
|
19
19
|
|
|
20
20
|
local THUMBSTICK_DEADZONE = 0.14
|
|
21
21
|
|
|
@@ -28,12 +28,12 @@ export type InputModeServiceClient = typeof(setmetatable(
|
|
|
28
28
|
_inputModes: { [InputModeType.InputModeType]: InputMode.InputMode },
|
|
29
29
|
_inputModeProcessor: InputModeProcessor.InputModeProcessor,
|
|
30
30
|
_lastMousePosition: Vector3?,
|
|
31
|
-
_serviceBag:
|
|
31
|
+
_serviceBag: ServiceBag.ServiceBag,
|
|
32
32
|
},
|
|
33
33
|
{} :: typeof({ __index = InputModeServiceClient })
|
|
34
34
|
))
|
|
35
35
|
|
|
36
|
-
function InputModeServiceClient.Init(self: InputModeServiceClient, serviceBag:
|
|
36
|
+
function InputModeServiceClient.Init(self: InputModeServiceClient, serviceBag: ServiceBag.ServiceBag)
|
|
37
37
|
assert(not self._serviceBag, "Already initialized")
|
|
38
38
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
39
39
|
|
|
@@ -178,4 +178,4 @@ function InputModeServiceClient.Destroy(self: InputModeServiceClient)
|
|
|
178
178
|
self._maid:DoCleaning()
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
-
return InputModeServiceClient
|
|
181
|
+
return InputModeServiceClient
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
+
local Brio = require("Brio")
|
|
10
|
+
local InputModeServiceClient = require("InputModeServiceClient")
|
|
11
|
+
local InputModeType = require("InputModeType")
|
|
9
12
|
local InputModeTypes = require("InputModeTypes")
|
|
10
13
|
local Maid = require("Maid")
|
|
11
|
-
local
|
|
12
|
-
local InputModeServiceClient = require("InputModeServiceClient")
|
|
13
|
-
local ServiceBag = require("ServiceBag")
|
|
14
|
+
local Observable = require("Observable")
|
|
14
15
|
local Rx = require("Rx")
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local
|
|
18
|
-
local _Brio = require("Brio")
|
|
16
|
+
local ServiceBag = require("ServiceBag")
|
|
17
|
+
local Signal = require("Signal")
|
|
18
|
+
local ValueObject = require("ValueObject")
|
|
19
19
|
|
|
20
20
|
local InputModeTypeSelector = {}
|
|
21
21
|
InputModeTypeSelector.ClassName = "InputModeTypeSelector"
|
|
@@ -34,7 +34,7 @@ export type InputModeTypeSelector = typeof(setmetatable(
|
|
|
34
34
|
_inputModeServiceClient: InputModeServiceClient.InputModeServiceClient,
|
|
35
35
|
|
|
36
36
|
Value: InputModeType.InputModeType?,
|
|
37
|
-
Changed:
|
|
37
|
+
Changed: Signal.Signal<InputModeType.InputModeType, InputModeType.InputModeType>,
|
|
38
38
|
},
|
|
39
39
|
{} :: typeof({ __index = InputModeTypeSelector })
|
|
40
40
|
))
|
|
@@ -88,7 +88,7 @@ end
|
|
|
88
88
|
]=]
|
|
89
89
|
function InputModeTypeSelector.fromObservableBrio(
|
|
90
90
|
serviceBag: ServiceBag.ServiceBag,
|
|
91
|
-
observeInputModesBrio:
|
|
91
|
+
observeInputModesBrio: Observable.Observable<Brio.Brio<InputModeType.InputModeType>>
|
|
92
92
|
): InputModeTypeSelector
|
|
93
93
|
local selector = InputModeTypeSelector.new(serviceBag, {})
|
|
94
94
|
|
|
@@ -148,7 +148,7 @@ end
|
|
|
148
148
|
function InputModeTypeSelector.ObserveIsActive(
|
|
149
149
|
self: InputModeTypeSelector,
|
|
150
150
|
inputModeType: InputModeType.InputModeType
|
|
151
|
-
):
|
|
151
|
+
): Observable.Observable<boolean>
|
|
152
152
|
assert(InputModeType.isInputModeType(inputModeType), "Bad inputModeType")
|
|
153
153
|
|
|
154
154
|
return self:ObserveActiveInputType():Pipe({
|
|
@@ -309,4 +309,4 @@ function InputModeTypeSelector.Destroy(self: InputModeTypeSelector)
|
|
|
309
309
|
setmetatable(self :: any, nil)
|
|
310
310
|
end
|
|
311
311
|
|
|
312
|
-
return InputModeTypeSelector
|
|
312
|
+
return InputModeTypeSelector
|