@rbxts/app-forge 0.6.0-alpha.35 → 0.6.0-alpha.36
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/out/vide/index.d.ts +2 -1
- package/out/vide/init.luau +7 -13
- package/package.json +1 -1
package/out/vide/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export default class AppForge {
|
|
|
5
5
|
loaded: Map<string, Vide.Node>;
|
|
6
6
|
private rulesManager;
|
|
7
7
|
getSource(name: AppNames): Vide.Source<boolean>;
|
|
8
|
-
|
|
8
|
+
bind(name: AppNames, value: Vide.Source<boolean>): void;
|
|
9
|
+
set(name: AppNames, value: boolean): void;
|
|
9
10
|
open(name: AppNames): void;
|
|
10
11
|
close(name: AppNames): void;
|
|
11
12
|
toggle(name: AppNames): void;
|
package/out/vide/init.luau
CHANGED
|
@@ -38,21 +38,15 @@ do
|
|
|
38
38
|
local _name_1 = name
|
|
39
39
|
return _sources_1[_name_1]
|
|
40
40
|
end
|
|
41
|
+
function AppForge:bind(name, value)
|
|
42
|
+
if not RunService:IsRunning() then
|
|
43
|
+
effect(function()
|
|
44
|
+
self:set(name, value())
|
|
45
|
+
end)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
41
48
|
function AppForge:set(name, value)
|
|
42
49
|
self.rulesManager:applyRules(name)
|
|
43
|
-
local _value = value
|
|
44
|
-
if type(_value) == "function" then
|
|
45
|
-
local _sources = self.sources
|
|
46
|
-
local _name = name
|
|
47
|
-
local _value_1 = value
|
|
48
|
-
_sources[_name] = _value_1
|
|
49
|
-
if not RunService:IsRunning() then
|
|
50
|
-
effect(function()
|
|
51
|
-
self:set(name, value)
|
|
52
|
-
end)
|
|
53
|
-
end
|
|
54
|
-
return nil
|
|
55
|
-
end
|
|
56
50
|
local _sources = self.sources
|
|
57
51
|
local _name = name
|
|
58
52
|
local src = _sources[_name]
|