@quenty/adorneedata 7.19.0-canary.ae8d76d.0 → 7.19.1-canary.b24222e.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,7 +3,18 @@
|
|
|
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
|
-
|
|
6
|
+
## [7.19.1-canary.b24222e.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneedata@7.19.0...@quenty/adorneedata@7.19.1-canary.b24222e.0) (2025-07-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Support optional interface as string ([b24222e](https://github.com/Quenty/NevermoreEngine/commit/b24222e512ed2ada0afa98daeb36388313a1eed5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [7.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneedata@7.18.3...@quenty/adorneedata@7.19.0) (2025-05-10)
|
|
7
18
|
|
|
8
19
|
|
|
9
20
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/adorneedata",
|
|
3
|
-
"version": "7.19.
|
|
3
|
+
"version": "7.19.1-canary.b24222e.0",
|
|
4
4
|
"description": "Bridges attributes and serialization",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/attributeutils": "14.18.0
|
|
28
|
+
"@quenty/attributeutils": "14.18.0",
|
|
29
29
|
"@quenty/defaultvalueutils": "1.2.2",
|
|
30
|
-
"@quenty/ducktype": "5.
|
|
31
|
-
"@quenty/loader": "10.
|
|
32
|
-
"@quenty/rx": "13.18.0
|
|
33
|
-
"@quenty/rxsignal": "7.18.0
|
|
34
|
-
"@quenty/table": "3.
|
|
30
|
+
"@quenty/ducktype": "5.9.0",
|
|
31
|
+
"@quenty/loader": "10.9.0",
|
|
32
|
+
"@quenty/rx": "13.18.0",
|
|
33
|
+
"@quenty/rxsignal": "7.18.0",
|
|
34
|
+
"@quenty/table": "3.8.0",
|
|
35
35
|
"@quentystudios/t": "^3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "b24222e512ed2ada0afa98daeb36388313a1eed5"
|
|
41
41
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
-
local DuckTypeUtils = require("DuckTypeUtils")
|
|
10
|
-
local t = require("t")
|
|
11
|
-
local DefaultValueUtils = require("DefaultValueUtils")
|
|
12
9
|
local AttributeValue = require("AttributeValue")
|
|
10
|
+
local DefaultValueUtils = require("DefaultValueUtils")
|
|
11
|
+
local DuckTypeUtils = require("DuckTypeUtils")
|
|
13
12
|
local Observable = require("Observable")
|
|
14
13
|
local ValueObject = require("ValueObject")
|
|
14
|
+
local t = require("t")
|
|
15
15
|
|
|
16
16
|
local AdorneeDataEntry = {}
|
|
17
17
|
AdorneeDataEntry.ClassName = "AdorneeDataEntry"
|
|
@@ -63,9 +63,18 @@ function AdorneeDataEntry.new<T>(interface: string | ValueInterface, createValue
|
|
|
63
63
|
return self
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
--[=[
|
|
67
|
+
Sets up an optional attribute which can be nil to begin with.
|
|
68
|
+
|
|
69
|
+
@return AdorneeDataEntry<T>
|
|
70
|
+
]=]
|
|
71
|
+
function AdorneeDataEntry.optionalAttribute<T>(interface: string | ValueInterface, name: string): AdorneeDataEntry<T>
|
|
67
72
|
assert(type(interface) == "string" or type(interface) == "function", "Bad interface")
|
|
68
73
|
|
|
74
|
+
if type(interface) == "string" then
|
|
75
|
+
interface = t.typeof(interface)
|
|
76
|
+
end
|
|
77
|
+
|
|
69
78
|
return AdorneeDataEntry.new(t.optional(interface), function(instance)
|
|
70
79
|
return AttributeValue.new(instance, name, nil)
|
|
71
80
|
end, nil)
|
|
@@ -162,4 +171,4 @@ function AdorneeDataEntry.IsValid<T>(self: AdorneeDataEntry<T>, value: any): (bo
|
|
|
162
171
|
return self._interface(value)
|
|
163
172
|
end
|
|
164
173
|
|
|
165
|
-
return AdorneeDataEntry
|
|
174
|
+
return AdorneeDataEntry
|
|
@@ -43,9 +43,9 @@ function AdorneeDataValue.new(adornee, prototype)
|
|
|
43
43
|
assert(type(prototype) == "table", "Bad prototype")
|
|
44
44
|
|
|
45
45
|
local self = {
|
|
46
|
-
_adornee = adornee
|
|
47
|
-
_defaultValues = prototype
|
|
48
|
-
_valueObjects = {}
|
|
46
|
+
_adornee = adornee,
|
|
47
|
+
_defaultValues = prototype,
|
|
48
|
+
_valueObjects = {},
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
for key, value in prototype do
|
|
@@ -149,4 +149,4 @@ function AdorneeDataValue:_getOrCreateAttributeValue(key)
|
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
-
return AdorneeDataValue
|
|
152
|
+
return AdorneeDataValue
|