@quenty/basicpane 8.4.0 → 9.0.0-canary.439.eb597ee.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 +8 -0
- package/package.json +8 -7
- package/src/Shared/BasicPane.lua +7 -10
- package/src/Shared/BasicPaneUtils.lua +1 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
# [9.0.0-canary.439.eb597ee.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/basicpane@8.4.0...@quenty/basicpane@9.0.0-canary.439.eb597ee.0) (2024-01-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/basicpane
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [8.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/basicpane@8.3.0...@quenty/basicpane@8.4.0) (2024-01-08)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/basicpane
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/basicpane",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-canary.439.eb597ee.0",
|
|
4
4
|
"description": "Base UI object with visibility and a maid",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,14 +25,15 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/brio": "
|
|
29
|
-
"@quenty/
|
|
30
|
-
"@quenty/
|
|
31
|
-
"@quenty/
|
|
32
|
-
"@quenty/
|
|
28
|
+
"@quenty/brio": "10.0.0-canary.439.eb597ee.0",
|
|
29
|
+
"@quenty/ducktype": "3.0.0-canary.439.eb597ee.0",
|
|
30
|
+
"@quenty/loader": "8.0.0-canary.439.eb597ee.0",
|
|
31
|
+
"@quenty/maid": "2.6.0",
|
|
32
|
+
"@quenty/rx": "9.0.0-canary.439.eb597ee.0",
|
|
33
|
+
"@quenty/signal": "4.0.0-canary.439.eb597ee.0"
|
|
33
34
|
},
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "eb597ee01e62e4dd91190bb7abd1d1404652d5ff"
|
|
38
39
|
}
|
package/src/Shared/BasicPane.lua
CHANGED
|
@@ -24,6 +24,7 @@ local require = require(script.Parent.loader).load(script)
|
|
|
24
24
|
local Signal = require("Signal")
|
|
25
25
|
local Maid = require("Maid")
|
|
26
26
|
local Observable = require("Observable")
|
|
27
|
+
local DuckTypeUtils = require("DuckTypeUtils")
|
|
27
28
|
|
|
28
29
|
local BasicPane = {}
|
|
29
30
|
BasicPane.__index = BasicPane
|
|
@@ -35,16 +36,7 @@ BasicPane.ClassName = "BasicPane"
|
|
|
35
36
|
@return boolean
|
|
36
37
|
]=]
|
|
37
38
|
function BasicPane.isBasicPane(value)
|
|
38
|
-
return
|
|
39
|
-
and Maid.isMaid(value._maid)
|
|
40
|
-
and Signal.isSignal(value.VisibleChanged)
|
|
41
|
-
and type(value.SetVisible) == "function"
|
|
42
|
-
and type(value.IsVisible) == "function"
|
|
43
|
-
and type(value.Show) == "function"
|
|
44
|
-
and type(value.ObserveVisible) == "function"
|
|
45
|
-
and type(value.Hide) == "function"
|
|
46
|
-
and type(value.Toggle) == "function"
|
|
47
|
-
and type(value.Destroy) == "function"
|
|
39
|
+
return DuckTypeUtils.isImplementation(BasicPane, value)
|
|
48
40
|
end
|
|
49
41
|
|
|
50
42
|
--[=[
|
|
@@ -108,6 +100,11 @@ function BasicPane:SetVisible(isVisible, doNotAnimate)
|
|
|
108
100
|
end
|
|
109
101
|
end
|
|
110
102
|
|
|
103
|
+
--[=[
|
|
104
|
+
Returns an observable that observes visibility
|
|
105
|
+
|
|
106
|
+
@return Observable<boolean>
|
|
107
|
+
]=]
|
|
111
108
|
function BasicPane:ObserveVisible()
|
|
112
109
|
return Observable.new(function(sub)
|
|
113
110
|
local maid = Maid.new()
|
|
@@ -27,16 +27,7 @@ local BasicPaneUtils = {}
|
|
|
27
27
|
function BasicPaneUtils.observeVisible(basicPane)
|
|
28
28
|
assert(BasicPane.isBasicPane(basicPane), "Bad BasicPane")
|
|
29
29
|
|
|
30
|
-
return
|
|
31
|
-
local maid = Maid.new()
|
|
32
|
-
|
|
33
|
-
maid:GiveTask(basicPane.VisibleChanged:Connect(function(isVisible)
|
|
34
|
-
sub:Fire(isVisible)
|
|
35
|
-
end))
|
|
36
|
-
sub:Fire(basicPane:IsVisible())
|
|
37
|
-
|
|
38
|
-
return maid
|
|
39
|
-
end)
|
|
30
|
+
return basicPane:ObserveVisible()
|
|
40
31
|
end
|
|
41
32
|
|
|
42
33
|
--[=[
|