@quenty/contentproviderutils 12.31.0 → 12.32.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,16 @@
|
|
|
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
|
+
# [12.32.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@12.31.1...@quenty/contentproviderutils@12.32.0) (2026-07-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **contentproviderutils:** convert package to --!strict ([3e5fe61](https://github.com/Quenty/NevermoreEngine/commit/3e5fe613f68975b9ca4acd42d2806402f2ddbc58))
|
|
11
|
+
|
|
12
|
+
## [12.31.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@12.31.0...@quenty/contentproviderutils@12.31.1) (2026-05-30)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @quenty/contentproviderutils
|
|
15
|
+
|
|
6
16
|
# [12.31.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@12.30.2...@quenty/contentproviderutils@12.31.0) (2026-05-29)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @quenty/contentproviderutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/contentproviderutils",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.32.0",
|
|
4
4
|
"description": "Utility functions to ensure that content is preloaded (wrapping calls in promises)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@quenty/baseobject": "10.13.0",
|
|
34
|
-
"@quenty/instanceutils": "13.30.
|
|
34
|
+
"@quenty/instanceutils": "13.30.1",
|
|
35
35
|
"@quenty/loader": "10.11.0",
|
|
36
36
|
"@quenty/maid": "3.9.0",
|
|
37
|
-
"@quenty/promise": "10.18.
|
|
38
|
-
"@quenty/rx": "13.28.
|
|
39
|
-
"@quenty/signal": "7.13.
|
|
40
|
-
"@quenty/valueobject": "13.31.
|
|
37
|
+
"@quenty/promise": "10.18.1",
|
|
38
|
+
"@quenty/rx": "13.28.3",
|
|
39
|
+
"@quenty/signal": "7.13.1",
|
|
40
|
+
"@quenty/valueobject": "13.31.1"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "13f0162f4971a77378e55e9b7236aea94f0dd3a8"
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
Utility functions to ensure that content is preloaded (wrapping calls in promises)
|
|
4
4
|
@class ContentProviderUtils
|
|
@@ -21,7 +21,7 @@ local ContentProviderUtils = {}
|
|
|
21
21
|
@param contentIdList { Instance | string }
|
|
22
22
|
@return Promise
|
|
23
23
|
]=]
|
|
24
|
-
function ContentProviderUtils.promisePreload(contentIdList: { Instance | string })
|
|
24
|
+
function ContentProviderUtils.promisePreload(contentIdList: { Instance | string }): Promise.Promise<()>
|
|
25
25
|
assert(type(contentIdList) == "table", "Bad contentIdList")
|
|
26
26
|
|
|
27
27
|
return Promise.spawn(function(resolve, reject)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
@class ImageLabelLoaded
|
|
4
4
|
]=]
|
|
@@ -18,8 +18,21 @@ local ImageLabelLoaded = setmetatable({}, BaseObject)
|
|
|
18
18
|
ImageLabelLoaded.ClassName = "ImageLabelLoaded"
|
|
19
19
|
ImageLabelLoaded.__index = ImageLabelLoaded
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
export type ImageLabelLoaded =
|
|
22
|
+
typeof(setmetatable(
|
|
23
|
+
{} :: {
|
|
24
|
+
_isLoaded: ValueObject.ValueObject<boolean>,
|
|
25
|
+
_preloadImage: ValueObject.ValueObject<boolean>,
|
|
26
|
+
_defaultTimeout: number?,
|
|
27
|
+
_imageLabel: ImageLabel?,
|
|
28
|
+
ImageChanged: Signal.Signal<boolean?>,
|
|
29
|
+
},
|
|
30
|
+
{} :: typeof({ __index = ImageLabelLoaded })
|
|
31
|
+
))
|
|
32
|
+
& BaseObject.BaseObject
|
|
33
|
+
|
|
34
|
+
function ImageLabelLoaded.new(): ImageLabelLoaded
|
|
35
|
+
local self: ImageLabelLoaded = setmetatable(BaseObject.new() :: any, ImageLabelLoaded)
|
|
23
36
|
|
|
24
37
|
self._isLoaded = self._maid:Add(ValueObject.new(false, "boolean"))
|
|
25
38
|
self._preloadImage = self._maid:Add(ValueObject.new(true, "boolean"))
|
|
@@ -31,23 +44,23 @@ function ImageLabelLoaded.new()
|
|
|
31
44
|
return self
|
|
32
45
|
end
|
|
33
46
|
|
|
34
|
-
function ImageLabelLoaded
|
|
47
|
+
function ImageLabelLoaded.SetDefaultTimeout(self: ImageLabelLoaded, defaultTimeout: number?): ()
|
|
35
48
|
assert(type(defaultTimeout) == "number" or defaultTimeout == nil, "Bad defaultTimeout")
|
|
36
49
|
|
|
37
50
|
self._defaultTimeout = defaultTimeout
|
|
38
51
|
end
|
|
39
52
|
|
|
40
|
-
function ImageLabelLoaded
|
|
53
|
+
function ImageLabelLoaded.IsLoaded(self: ImageLabelLoaded): boolean
|
|
41
54
|
return self._isLoaded.Value
|
|
42
55
|
end
|
|
43
56
|
|
|
44
|
-
function ImageLabelLoaded
|
|
57
|
+
function ImageLabelLoaded.SetPreloadImage(self: ImageLabelLoaded, preloadImage: boolean): ()
|
|
45
58
|
assert(type(preloadImage) == "boolean", "Bad preloadImage")
|
|
46
59
|
|
|
47
60
|
self._preloadImage.Value = preloadImage
|
|
48
61
|
end
|
|
49
62
|
|
|
50
|
-
function ImageLabelLoaded
|
|
63
|
+
function ImageLabelLoaded.PromiseLoaded(self: ImageLabelLoaded, timeout: number?): Promise.Promise<()>
|
|
51
64
|
assert(type(timeout) == "number" or timeout == nil, "Bad timeout")
|
|
52
65
|
|
|
53
66
|
local originalTimeout = timeout
|
|
@@ -91,7 +104,7 @@ function ImageLabelLoaded:PromiseLoaded(timeout: number?)
|
|
|
91
104
|
return promise
|
|
92
105
|
end
|
|
93
106
|
|
|
94
|
-
function ImageLabelLoaded
|
|
107
|
+
function ImageLabelLoaded.SetImageLabel(self: ImageLabelLoaded, imageLabel: ImageLabel?): ()
|
|
95
108
|
assert(typeof(imageLabel) == "Instance" and imageLabel:IsA("ImageLabel") or imageLabel == nil, "Bad imageLabel")
|
|
96
109
|
if self._imageLabel == imageLabel then
|
|
97
110
|
return
|
|
@@ -105,14 +118,14 @@ function ImageLabelLoaded:SetImageLabel(imageLabel: ImageLabel?)
|
|
|
105
118
|
self._isLoaded.Value = self._imageLabel.IsLoaded
|
|
106
119
|
|
|
107
120
|
maid:GiveTask(self._imageLabel:GetPropertyChangedSignal("IsLoaded"):Connect(function()
|
|
108
|
-
self._isLoaded.Value = self._imageLabel.IsLoaded
|
|
121
|
+
self._isLoaded.Value = (self._imageLabel :: ImageLabel).IsLoaded
|
|
109
122
|
end))
|
|
110
123
|
|
|
111
124
|
-- Setup preloading as necessary
|
|
112
|
-
maid:GiveTask(self._preloadImage
|
|
125
|
+
maid:GiveTask((self._preloadImage :: any)
|
|
113
126
|
:Observe()
|
|
114
127
|
:Pipe({
|
|
115
|
-
Rx.switchMap(function(preload)
|
|
128
|
+
Rx.switchMap(function(preload): any
|
|
116
129
|
if preload then
|
|
117
130
|
return Rx.combineLatest({
|
|
118
131
|
isLoaded = self._isLoaded:Observe(),
|