@quenty/tie 4.22.0 → 4.23.0-canary.5a3bf28.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,22 @@
|
|
|
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
|
+
# [4.23.0-canary.5a3bf28.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/tie@4.22.0...@quenty/tie@4.23.0-canary.5a3bf28.0) (2023-07-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix valueBase assignment and retrieval ([50453dd](https://github.com/Quenty/NevermoreEngine/commit/50453dd1562e00e1a619eb09870097f3deebed46))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add :Observe() API calls to a variety of systems and allow Blend to :Observe() stuff ([ca29c68](https://github.com/Quenty/NevermoreEngine/commit/ca29c68164dfdaf136e9168faf48f487bed26088))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [4.22.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/tie@4.21.0...@quenty/tie@4.22.0) (2023-07-10)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/tie
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/tie",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0-canary.5a3bf28.0",
|
|
4
4
|
"description": "Tie allows interfaces to be defined between Lua OOP and Roblox objects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,26 +28,26 @@
|
|
|
28
28
|
"Quenty"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/attributeutils": "
|
|
32
|
-
"@quenty/baseobject": "
|
|
33
|
-
"@quenty/brio": "
|
|
34
|
-
"@quenty/instanceutils": "
|
|
35
|
-
"@quenty/loader": "
|
|
36
|
-
"@quenty/maid": "
|
|
37
|
-
"@quenty/rx": "
|
|
38
|
-
"@quenty/statestack": "
|
|
39
|
-
"@quenty/string": "
|
|
40
|
-
"@quenty/symbol": "
|
|
41
|
-
"@quenty/table": "
|
|
42
|
-
"@quenty/valuebaseutils": "
|
|
43
|
-
"@quenty/valueobject": "
|
|
31
|
+
"@quenty/attributeutils": "8.17.0-canary.5a3bf28.0",
|
|
32
|
+
"@quenty/baseobject": "6.2.1",
|
|
33
|
+
"@quenty/brio": "8.15.0-canary.5a3bf28.0",
|
|
34
|
+
"@quenty/instanceutils": "7.17.0-canary.5a3bf28.0",
|
|
35
|
+
"@quenty/loader": "6.2.1",
|
|
36
|
+
"@quenty/maid": "2.5.0",
|
|
37
|
+
"@quenty/rx": "7.13.0-canary.5a3bf28.0",
|
|
38
|
+
"@quenty/statestack": "8.18.0-canary.5a3bf28.0",
|
|
39
|
+
"@quenty/string": "3.1.0",
|
|
40
|
+
"@quenty/symbol": "2.2.0",
|
|
41
|
+
"@quenty/table": "3.2.0",
|
|
42
|
+
"@quenty/valuebaseutils": "7.17.0-canary.5a3bf28.0",
|
|
43
|
+
"@quenty/valueobject": "7.18.0-canary.5a3bf28.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@quenty/promise": "
|
|
47
|
-
"@quenty/signal": "
|
|
46
|
+
"@quenty/promise": "6.6.0",
|
|
47
|
+
"@quenty/signal": "2.4.0"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "5a3bf28211375884c176eeed34ff3de2e319653e"
|
|
53
53
|
}
|
|
@@ -196,6 +196,10 @@ function TieDefinition:ObserveLastImplementationBrio(adornee: Instance)
|
|
|
196
196
|
})
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
function TieDefinition:ObserveBrio(adornee: Instance)
|
|
200
|
+
return self:ObserveLastImplementationBrio(adornee)
|
|
201
|
+
end
|
|
202
|
+
|
|
199
203
|
--[=[
|
|
200
204
|
Observes a valid implementation if it exists, or nil
|
|
201
205
|
|
|
@@ -210,6 +214,9 @@ function TieDefinition:ObserveLastImplementation(adornee: Instance)
|
|
|
210
214
|
})
|
|
211
215
|
end
|
|
212
216
|
|
|
217
|
+
function TieDefinition:Observe(adornee: Instance)
|
|
218
|
+
return self:ObserveLastImplementation(adornee)
|
|
219
|
+
end
|
|
213
220
|
|
|
214
221
|
--[=[
|
|
215
222
|
Observes valid implementations wrapped in a brio if it exists.
|
|
@@ -75,7 +75,7 @@ function TiePropertyInterface:_getFolder()
|
|
|
75
75
|
return TieInterfaceUtils.getFolder(self._tieDefinition, self._folder, self._adornee)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
function TiePropertyInterface:
|
|
78
|
+
function TiePropertyInterface:_findValueBase()
|
|
79
79
|
local folder = self:_getFolder()
|
|
80
80
|
if not folder then
|
|
81
81
|
return nil
|
|
@@ -97,7 +97,7 @@ function TiePropertyInterface:_getValueBase()
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
function TiePropertyInterface:_getValueBaseOrError()
|
|
100
|
-
local valueBase = self:
|
|
100
|
+
local valueBase = self:_findValueBase()
|
|
101
101
|
if not valueBase then
|
|
102
102
|
error(("%s.%s is not implemented for %s"):format(
|
|
103
103
|
self._tieDefinition:GetContainerName(),
|
|
@@ -263,7 +263,15 @@ function TiePropertyInterface:__newindex(index, value)
|
|
|
263
263
|
if index == "_adornee" or index == "_folder" or index == "_memberDefinition" or index == "_tieDefinition" then
|
|
264
264
|
rawset(self, index, value)
|
|
265
265
|
elseif index == "Value" then
|
|
266
|
-
|
|
266
|
+
local className = ValueBaseUtils.getClassNameFromType(typeof(value))
|
|
267
|
+
if not className then
|
|
268
|
+
error(("[TiePropertyImplementation] - Bad implementation value type %q, cannot set"):format(typeof(value)))
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
local valueBase = self:_findValueBase()
|
|
272
|
+
if type(valueBase) == "table" or (typeof(valueBase) == "Instance" and valueBase.ClassName == className) then
|
|
273
|
+
valueBase.Value = value
|
|
274
|
+
elseif AttributeUtils.isValidAttributeType(typeof(value)) and value ~= nil then
|
|
267
275
|
local folder = self:_getFolder()
|
|
268
276
|
if folder then
|
|
269
277
|
folder:SetAttribute(self._memberDefinition:GetMemberName(), value)
|
|
@@ -275,16 +283,6 @@ function TiePropertyInterface:__newindex(index, value)
|
|
|
275
283
|
end
|
|
276
284
|
return
|
|
277
285
|
end
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
local className = ValueBaseUtils.getClassNameFromType(typeof(value))
|
|
281
|
-
if not className then
|
|
282
|
-
error(("[TiePropertyImplementation] - Bad implementation value type %q, cannot set"):format(typeof(value)))
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
local valueBase = self:_getValueBase()
|
|
286
|
-
if valueBase and valueBase.ClassName == className then
|
|
287
|
-
valueBase.Value = value
|
|
288
286
|
else
|
|
289
287
|
local folder = self:_getFolder()
|
|
290
288
|
if folder then
|