@rbxts/app-forge 0.4.6 → 0.4.8
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/container.d.ts +2 -1
- package/out/container.luau +13 -13
- package/out/decorator.luau +2 -3
- package/out/helpers.luau +9 -0
- package/out/index.d.ts +1 -1
- package/out/init.luau +9 -1
- package/out/rules.d.ts +2 -1
- package/out/rules.luau +3 -1
- package/out/types.d.ts +1 -1
- package/package.json +1 -1
package/out/container.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import "@rbxts/vide";
|
|
2
|
+
import Vide from "@rbxts/vide";
|
|
2
3
|
import type Types from "./types";
|
|
3
|
-
export default function AppContainer(props: Types.NameProps & Types.MainProps):
|
|
4
|
+
export default function AppContainer(props: Types.NameProps & Types.MainProps): Vide.Node;
|
package/out/container.luau
CHANGED
|
@@ -4,11 +4,12 @@ TS.import(script, TS.getModule(script, "@rbxts", "vide").src)
|
|
|
4
4
|
-- Services
|
|
5
5
|
local RunService = TS.import(script, TS.getModule(script, "@rbxts", "services")).RunService
|
|
6
6
|
-- Packages
|
|
7
|
-
local
|
|
7
|
+
local _vide = TS.import(script, TS.getModule(script, "@rbxts", "vide").src)
|
|
8
|
+
local Vide = _vide
|
|
9
|
+
local source = _vide.source
|
|
8
10
|
-- Types
|
|
9
11
|
-- Components
|
|
10
12
|
local AppRegistry = TS.import(script, script.Parent, "decorator").AppRegistry
|
|
11
|
-
-- Utility
|
|
12
13
|
local function createSource(name, manager)
|
|
13
14
|
local _name = name
|
|
14
15
|
local app = AppRegistry[_name]
|
|
@@ -57,18 +58,17 @@ local function AppContainer(props)
|
|
|
57
58
|
error(`Failed to create instance for app "{name}"`)
|
|
58
59
|
end
|
|
59
60
|
if RunService:IsRunning() then
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-- );
|
|
61
|
+
return Vide.jsx("screengui", {
|
|
62
|
+
Name = name,
|
|
63
|
+
ZIndexBehavior = "Sibling",
|
|
64
|
+
ResetOnSpawn = false,
|
|
65
|
+
}, element)
|
|
66
66
|
else
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
return Vide.jsx("frame", {
|
|
68
|
+
Name = name,
|
|
69
|
+
BackgroundTransparency = 1,
|
|
70
|
+
Size = UDim2.fromScale(1, 1),
|
|
71
|
+
}, element)
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
return {
|
package/out/decorator.luau
CHANGED
|
@@ -3,7 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
-- Services
|
|
4
4
|
local RunService = TS.import(script, TS.getModule(script, "@rbxts", "services")).RunService
|
|
5
5
|
-- Packages
|
|
6
|
-
local
|
|
6
|
+
local pxScale = TS.import(script, TS.getModule(script, "@rbxts", "loners-pretty-vide-utils").out).px
|
|
7
7
|
-- Types
|
|
8
8
|
local AppRegistry = {}
|
|
9
9
|
local function App(props)
|
|
@@ -27,7 +27,6 @@ do
|
|
|
27
27
|
Args = {}
|
|
28
28
|
function Args:constructor(props)
|
|
29
29
|
local _binding = props
|
|
30
|
-
local target = _binding.target
|
|
31
30
|
local forge = _binding.forge
|
|
32
31
|
local name = _binding.name
|
|
33
32
|
if not (name ~= "" and name) then
|
|
@@ -37,7 +36,7 @@ do
|
|
|
37
36
|
if not source and RunService:IsRunning() then
|
|
38
37
|
error("FAILED TO GET BIND FOR APP!")
|
|
39
38
|
end
|
|
40
|
-
local px =
|
|
39
|
+
local px = pxScale
|
|
41
40
|
self.forge = forge
|
|
42
41
|
local _object = table.clone(props.props)
|
|
43
42
|
setmetatable(_object, nil)
|
package/out/helpers.luau
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
-- Packages
|
|
4
|
+
local usePx = TS.import(script, TS.getModule(script, "@rbxts", "loners-pretty-vide-utils").out).usePx
|
|
2
5
|
-- Types
|
|
6
|
+
local __px = false
|
|
3
7
|
local function Render(props)
|
|
4
8
|
local names = props.names
|
|
5
9
|
local name = props.name
|
|
6
10
|
local forge = props.forge
|
|
11
|
+
if not __px then
|
|
12
|
+
local _exp = usePx()
|
|
13
|
+
__px = true
|
|
14
|
+
local _ = __px
|
|
15
|
+
end
|
|
7
16
|
if name ~= "" and name then
|
|
8
17
|
return forge:renderApp(props)
|
|
9
18
|
elseif names then
|
package/out/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export default class AppForge {
|
|
|
6
6
|
loaded: Map<string, Vide.Node>;
|
|
7
7
|
private rulesManager;
|
|
8
8
|
getSource(name: AppNames[number]): Vide.Source<boolean>;
|
|
9
|
-
set(name: AppNames[number], value: boolean): void;
|
|
9
|
+
set(name: AppNames[number], value: Vide.Source<boolean> | boolean): void;
|
|
10
10
|
open(name: AppNames[number]): void;
|
|
11
11
|
close(name: AppNames[number]): void;
|
|
12
12
|
toggle(name: AppNames[number]): void;
|
package/out/init.luau
CHANGED
|
@@ -50,7 +50,15 @@ do
|
|
|
50
50
|
if not source then
|
|
51
51
|
error(`App "{name}" has no source`)
|
|
52
52
|
end
|
|
53
|
-
|
|
53
|
+
local _value = value
|
|
54
|
+
if type(_value) == "function" then
|
|
55
|
+
local _sources_1 = self.sources
|
|
56
|
+
local _name_1 = name
|
|
57
|
+
local _value_1 = value
|
|
58
|
+
_sources_1[_name_1] = _value_1
|
|
59
|
+
else
|
|
60
|
+
source(value)
|
|
61
|
+
end
|
|
54
62
|
end
|
|
55
63
|
function AppForge:open(name)
|
|
56
64
|
self:set(name, true)
|
package/out/rules.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import Vide from "@rbxts/vide";
|
|
1
2
|
import type AppForge from ".";
|
|
2
3
|
export default class RulesManager {
|
|
3
4
|
private appManager;
|
|
4
5
|
constructor(appManager: AppForge);
|
|
5
|
-
applyRules(name: AppNames[number],
|
|
6
|
+
applyRules(name: AppNames[number], source: Vide.Source<boolean> | boolean): boolean;
|
|
6
7
|
private inSameGroup;
|
|
7
8
|
private blockedBy;
|
|
8
9
|
private blocks;
|
package/out/rules.luau
CHANGED
|
@@ -30,7 +30,7 @@ do
|
|
|
30
30
|
function RulesManager:constructor(appManager)
|
|
31
31
|
self.appManager = appManager
|
|
32
32
|
end
|
|
33
|
-
function RulesManager:applyRules(name,
|
|
33
|
+
function RulesManager:applyRules(name, source)
|
|
34
34
|
local _name = name
|
|
35
35
|
local appData = AppRegistry[_name]
|
|
36
36
|
local _rules = appData
|
|
@@ -38,6 +38,8 @@ do
|
|
|
38
38
|
_rules = _rules.rules
|
|
39
39
|
end
|
|
40
40
|
local rules = _rules
|
|
41
|
+
local _source = source
|
|
42
|
+
local value = if type(_source) == "function" then source() else source
|
|
41
43
|
local _result = rules
|
|
42
44
|
if _result ~= nil then
|
|
43
45
|
_result = _result.groups
|
package/out/types.d.ts
CHANGED