@quenty/selectionutils 8.17.0 → 8.17.1-canary.545.2374fb2.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 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
+ ## [8.17.1-canary.545.2374fb2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/selectionutils@8.17.0...@quenty/selectionutils@8.17.1-canary.545.2374fb2.0) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/selectionutils@8.16.2...@quenty/selectionutils@8.17.0) (2025-04-02)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/selectionutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/selectionutils",
3
- "version": "8.17.0",
3
+ "version": "8.17.1-canary.545.2374fb2.0",
4
4
  "description": "Utility methods around Selection service. Useful for plugins and stories.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,17 +25,17 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/baseobject": "^10.8.0",
29
- "@quenty/brio": "^14.17.0",
30
- "@quenty/loader": "^10.8.0",
31
- "@quenty/maid": "^3.4.0",
32
- "@quenty/rx": "^13.17.0",
33
- "@quenty/signal": "^7.10.0",
34
- "@quenty/table": "^3.7.1",
35
- "@quenty/valueobject": "^13.17.0"
28
+ "@quenty/baseobject": "10.8.1-canary.545.2374fb2.0",
29
+ "@quenty/brio": "14.17.1-canary.545.2374fb2.0",
30
+ "@quenty/loader": "10.8.1-canary.545.2374fb2.0",
31
+ "@quenty/maid": "3.4.1-canary.545.2374fb2.0",
32
+ "@quenty/rx": "13.17.1-canary.545.2374fb2.0",
33
+ "@quenty/signal": "7.10.1-canary.545.2374fb2.0",
34
+ "@quenty/table": "3.7.2-canary.545.2374fb2.0",
35
+ "@quenty/valueobject": "13.17.1-canary.545.2374fb2.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "e8ea56930e65322fcffc05a1556d5df988068f0b"
40
+ "gitHead": "2374fb2b043cfbe0e9b507b3316eec46a4e353a0"
41
41
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  @class RxSelectionUtils
3
4
  ]=]
@@ -27,7 +28,7 @@ local RxSelectionUtils = {}
27
28
  @param className string
28
29
  @return Observable<Instance?>
29
30
  ]=]
30
- function RxSelectionUtils.observeFirstSelectionWhichIsA(className: string)
31
+ function RxSelectionUtils.observeFirstSelectionWhichIsA(className: string): Observable.Observable<Instance?>
31
32
  assert(type(className) == "string", "Bad className")
32
33
 
33
34
  return RxSelectionUtils.observeFirstSelection(function(inst)
@@ -51,12 +52,14 @@ end
51
52
  @param className string
52
53
  @return Observable<Brio<Instance>>
53
54
  ]=]
54
- function RxSelectionUtils.observeFirstSelectionWhichIsABrio(className: string)
55
+ function RxSelectionUtils.observeFirstSelectionWhichIsABrio(
56
+ className: string
57
+ ): Observable.Observable<Brio.Brio<Instance>>
55
58
  assert(type(className) == "string", "Bad className")
56
59
 
57
60
  return RxSelectionUtils.observeFirstSelectionBrio(function(inst)
58
61
  return inst:IsA(className)
59
- end)
62
+ end) :: any
60
63
  end
61
64
 
62
65
  --[=[
@@ -64,7 +67,7 @@ end
64
67
 
65
68
  @return Observable<Instance?>
66
69
  ]=]
67
- function RxSelectionUtils.observeFirstAdornee()
70
+ function RxSelectionUtils.observeFirstAdornee(): Observable.Observable<Instance?>
68
71
  return RxSelectionUtils.observeFirstSelection(function(inst)
69
72
  return inst:IsA("BasePart") or inst:IsA("Model")
70
73
  end)
@@ -75,12 +78,12 @@ end
75
78
 
76
79
  @return Observable<Brio<Instance>>
77
80
  ]=]
78
- function RxSelectionUtils.observeAdorneesBrio()
81
+ function RxSelectionUtils.observeAdorneesBrio(): Observable.Observable<Brio.Brio<Instance>>
79
82
  return RxSelectionUtils.observeSelectionItemsBrio():Pipe({
80
83
  RxBrioUtils.where(function(inst)
81
84
  return inst:IsA("BasePart") or inst:IsA("Model")
82
- end),
83
- })
85
+ end) :: any,
86
+ }) :: any
84
87
  end
85
88
 
86
89
  --[=[
@@ -107,7 +110,7 @@ function RxSelectionUtils.observeFirstSelection(where)
107
110
  maid:GiveTask(current)
108
111
 
109
112
  local function handleSelectionChanged()
110
- for _, item in pairs(Selection:Get()) do
113
+ for _, item in Selection:Get() do
111
114
  if where(item) then
112
115
  current.Value = item
113
116
  return
@@ -186,12 +189,12 @@ function RxSelectionUtils.observeSelectionItemsBrio()
186
189
  lastSet = currentSet
187
190
 
188
191
  -- Remove first
189
- for toRemove, _ in pairs(toRemoveSet) do
192
+ for toRemove, _ in toRemoveSet do
190
193
  maid[toRemove] = nil
191
194
  end
192
195
 
193
196
  -- Then add
194
- for toAdd, _ in pairs(toAddSet) do
197
+ for toAdd, _ in toAddSet do
195
198
  local brio = Brio.new(toAdd)
196
199
  maid[toAdd] = brio
197
200