@quenty/instanceutils 13.19.1-canary.ff3c47a.0 → 13.20.1-canary.6a5af88.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 +9 -1
- package/package.json +4 -4
- package/src/Shared/RxInstanceUtils.lua +30 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,15 @@
|
|
|
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.
|
|
6
|
+
## [13.20.1-canary.6a5af88.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/instanceutils@13.20.0...@quenty/instanceutils@13.20.1-canary.6a5af88.0) (2025-11-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/instanceutils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [13.20.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/instanceutils@13.19.0...@quenty/instanceutils@13.20.0) (2025-09-26)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/instanceutils
|
|
9
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/instanceutils",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.20.1-canary.6a5af88.0",
|
|
4
4
|
"description": "Utility functions involving instances in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/brio": "14.
|
|
29
|
+
"@quenty/brio": "14.20.0",
|
|
30
30
|
"@quenty/loader": "10.9.0",
|
|
31
31
|
"@quenty/maid": "3.5.0",
|
|
32
|
-
"@quenty/rx": "13.
|
|
32
|
+
"@quenty/rx": "13.20.0",
|
|
33
33
|
"@quenty/symbol": "3.5.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "6a5af88028456bdfcbab401ca38d0c3ecf4a71e8"
|
|
39
39
|
}
|
|
@@ -211,35 +211,54 @@ function RxInstanceUtils.observeLastNamedChildBrio(
|
|
|
211
211
|
|
|
212
212
|
return Observable.new(function(sub)
|
|
213
213
|
local topMaid = Maid.new()
|
|
214
|
+
local validChildren = {}
|
|
215
|
+
local lastEmittedChild = UNSET_VALUE
|
|
216
|
+
|
|
217
|
+
local function emit()
|
|
218
|
+
local current = next(validChildren)
|
|
219
|
+
if current == lastEmittedChild then
|
|
220
|
+
return
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
lastEmittedChild = current
|
|
224
|
+
if current ~= nil then
|
|
225
|
+
local brio = Brio.new(current)
|
|
226
|
+
topMaid._lastBrio = brio
|
|
227
|
+
sub:Fire(brio)
|
|
228
|
+
else
|
|
229
|
+
topMaid._lastBrio = nil
|
|
230
|
+
end
|
|
231
|
+
end
|
|
214
232
|
|
|
215
233
|
local function handleChild(child: Instance)
|
|
216
234
|
if not child:IsA(className) then
|
|
217
235
|
return
|
|
218
236
|
end
|
|
219
237
|
|
|
220
|
-
local maid = Maid.new()
|
|
221
|
-
|
|
222
238
|
local function handleNameChanged()
|
|
223
239
|
if child.Name == name then
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
topMaid._lastBrio = brio
|
|
227
|
-
|
|
228
|
-
sub:Fire(brio)
|
|
240
|
+
validChildren[child] = true
|
|
241
|
+
emit()
|
|
229
242
|
else
|
|
230
|
-
|
|
243
|
+
validChildren[child] = nil
|
|
244
|
+
|
|
245
|
+
if lastEmittedChild == child then
|
|
246
|
+
emit()
|
|
247
|
+
end
|
|
231
248
|
end
|
|
232
249
|
end
|
|
233
250
|
|
|
234
|
-
|
|
251
|
+
topMaid[child] = child:GetPropertyChangedSignal("Name"):Connect(handleNameChanged)
|
|
235
252
|
handleNameChanged()
|
|
236
|
-
|
|
237
|
-
topMaid[child] = maid
|
|
238
253
|
end
|
|
239
254
|
|
|
240
255
|
topMaid:GiveTask(parent.ChildAdded:Connect(handleChild))
|
|
241
256
|
topMaid:GiveTask(parent.ChildRemoved:Connect(function(child)
|
|
242
257
|
topMaid[child] = nil
|
|
258
|
+
validChildren[child] = nil
|
|
259
|
+
if lastEmittedChild == child then
|
|
260
|
+
emit()
|
|
261
|
+
end
|
|
243
262
|
end))
|
|
244
263
|
|
|
245
264
|
for _, child in parent:GetChildren() do
|