@quenty/selectionutils 2.16.0 → 2.17.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
+ # [2.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/selectionutils@2.16.0...@quenty/selectionutils@2.17.0) (2023-06-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add RxSelectionUtils.observeFirstSelectionWhichIsABrio(className) ([2771f2c](https://github.com/Quenty/NevermoreEngine/commit/2771f2ce012a55c78c75779800dba1e20c7725a5))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.16.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/selectionutils@2.15.0...@quenty/selectionutils@2.16.0) (2023-06-17)
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": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Utility methods around Selection service. Useful for plugins and stories.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "dc77d6de09e9eb9d3fd6dafd790c052d8393d38f"
40
+ "gitHead": "5d8f00296517b2a1aff2db540728f5e689a0c3e3"
41
41
  }
@@ -35,6 +35,30 @@ function RxSelectionUtils.observeFirstSelectionWhichIsA(className)
35
35
  end)
36
36
  end
37
37
 
38
+ --[=[
39
+ Observes first selection in the selection list which is of a class wrapped in a brio
40
+
41
+ ```lua
42
+ RxSelectionUtils.observeFirstSelectionWhichIsA("BasePart"):Subscribe(function(brio)
43
+ if brio:IsDead() then
44
+ return
45
+ end
46
+
47
+ print("part", brio:GetValue())
48
+ end)
49
+ ```
50
+
51
+ @param className string
52
+ @return Observable<Brio<Instance>>
53
+ ]=]
54
+ function RxSelectionUtils.observeFirstSelectionWhichIsABrio(className)
55
+ assert(type(className) == "string", "Bad className")
56
+
57
+ return RxSelectionUtils.observeFirstSelectionBrio(function(inst)
58
+ return inst:IsA(className)
59
+ end)
60
+ end
61
+
38
62
  --[=[
39
63
  Observes first selection in the selection list which is an "Adornee"
40
64