@rbxts/app-forge 0.6.0-alpha.28 → 0.6.0-alpha.29
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/global.d.ts +2 -2
- package/out/react/container.d.ts +2 -2
- package/out/react/container.luau +2 -2
- package/out/react/decorator.d.ts +1 -1
- package/out/react/decorator.luau +1 -1
- package/out/react/helpers.d.ts +2 -2
- package/out/react/helpers.luau +1 -1
- package/out/react/index.d.ts +12 -12
- package/out/react/rules.d.ts +1 -1
- package/out/react/rules.luau +7 -7
- package/out/vide/decorator.d.ts +1 -1
- package/out/vide/helpers.d.ts +1 -1
- package/out/vide/index.d.ts +5 -5
- package/out/vide/rules.d.ts +1 -1
- package/out/vide/types.d.ts +7 -7
- package/package.json +1 -1
package/out/global.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ declare global {
|
|
|
2
2
|
// These will be overridden by the user
|
|
3
3
|
// They are only placeholders for your build
|
|
4
4
|
|
|
5
|
-
type AppGroups =
|
|
6
|
-
type AppNames =
|
|
5
|
+
type AppGroups = string;
|
|
6
|
+
type AppNames = string;
|
|
7
7
|
type AppProps = {};
|
|
8
8
|
}
|
|
9
9
|
export {};
|
package/out/react/container.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type Types from "./types";
|
|
2
2
|
export declare function AppContainer(props: Types.NameProps & Types.MainProps): import("@rbxts/react").ReactElement<{
|
|
3
|
-
key:
|
|
3
|
+
key: any;
|
|
4
4
|
ZIndexBehavior: Enum.ZIndexBehavior.Sibling;
|
|
5
5
|
ResetOnSpawn: boolean;
|
|
6
6
|
}, string | import("@rbxts/react").JSXElementConstructor<any>> | import("@rbxts/react").ReactElement<{
|
|
7
|
-
key:
|
|
7
|
+
key: any;
|
|
8
8
|
BackgroundTransparency: number;
|
|
9
9
|
Size: UDim2;
|
|
10
10
|
}, string | import("@rbxts/react").JSXElementConstructor<any>>;
|
package/out/react/container.luau
CHANGED
|
@@ -11,7 +11,7 @@ local function createInstance(props)
|
|
|
11
11
|
local _binding = props
|
|
12
12
|
local name = _binding.name
|
|
13
13
|
local forge = _binding.forge
|
|
14
|
-
if not (name ~= "" and name) then
|
|
14
|
+
if not (name ~= 0 and name == name and name ~= "" and name) then
|
|
15
15
|
error("App name is required to create instance")
|
|
16
16
|
end
|
|
17
17
|
local appClass = AppRegistry[name]
|
|
@@ -34,7 +34,7 @@ end
|
|
|
34
34
|
local function AppContainer(props)
|
|
35
35
|
local _binding = props
|
|
36
36
|
local name = _binding.name
|
|
37
|
-
if not (name ~= "" and name) then
|
|
37
|
+
if not (name ~= 0 and name == name and name ~= "" and name) then
|
|
38
38
|
error("App name is required in AppContainer")
|
|
39
39
|
end
|
|
40
40
|
local element = createInstance(props)
|
package/out/react/decorator.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function App(props: Types.AppRegistryProps): <T extends new (prop
|
|
|
6
6
|
export declare abstract class Args {
|
|
7
7
|
readonly forge: AppForge;
|
|
8
8
|
readonly props: Types.ClassProps;
|
|
9
|
-
readonly name: AppNames
|
|
9
|
+
readonly name: AppNames;
|
|
10
10
|
readonly bind: React.Binding<boolean>;
|
|
11
11
|
readonly state: Boolean;
|
|
12
12
|
constructor(props: Types.NameProps & Types.MainProps);
|
package/out/react/decorator.luau
CHANGED
|
@@ -29,7 +29,7 @@ do
|
|
|
29
29
|
local target = _binding.target
|
|
30
30
|
local forge = _binding.forge
|
|
31
31
|
local name = _binding.name
|
|
32
|
-
if not (name ~= "" and name) then
|
|
32
|
+
if not (name ~= 0 and name == name and name ~= "" and name) then
|
|
33
33
|
error("App name is required in Args constructor")
|
|
34
34
|
end
|
|
35
35
|
local px = usePx(target)
|
package/out/react/helpers.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "@rbxts/react";
|
|
2
2
|
import type Types from "./types";
|
|
3
3
|
import type AppForge from ".";
|
|
4
|
-
export declare function createBinding(name: AppNames
|
|
5
|
-
export declare function createState(name: AppNames
|
|
4
|
+
export declare function createBinding(name: AppNames, forge: AppForge): void;
|
|
5
|
+
export declare function createState(name: AppNames, forge: AppForge): void;
|
|
6
6
|
export declare function Render(props: Types.NameProps & Types.MainProps): React.ReactNode;
|
package/out/react/helpers.luau
CHANGED
|
@@ -60,7 +60,7 @@ local function Render(props)
|
|
|
60
60
|
_callback(_v, _k, AppRegistry)
|
|
61
61
|
end
|
|
62
62
|
-- ▲ ReadonlyMap.forEach ▲
|
|
63
|
-
if name ~= "" and name then
|
|
63
|
+
if name ~= 0 and name == name and name ~= "" and name then
|
|
64
64
|
return forge:renderApp(props)
|
|
65
65
|
elseif names then
|
|
66
66
|
return forge:renderApps(props)
|
package/out/react/index.d.ts
CHANGED
|
@@ -7,36 +7,36 @@ export default class AppForge {
|
|
|
7
7
|
binds: Map<string, Binding>;
|
|
8
8
|
states: Map<string, State>;
|
|
9
9
|
private rulesManager;
|
|
10
|
-
getBind(name: AppNames
|
|
11
|
-
getState(name: AppNames
|
|
12
|
-
set(name: AppNames
|
|
13
|
-
open(name: AppNames
|
|
14
|
-
close(name: AppNames
|
|
15
|
-
toggle(name: AppNames
|
|
10
|
+
getBind(name: AppNames): React.Binding<boolean>;
|
|
11
|
+
getState(name: AppNames): boolean;
|
|
12
|
+
set(name: AppNames, value: boolean): void;
|
|
13
|
+
open(name: AppNames): void;
|
|
14
|
+
close(name: AppNames): void;
|
|
15
|
+
toggle(name: AppNames): void;
|
|
16
16
|
renderApp(props: Types.NameProps & Types.MainProps): React.ReactElement<{
|
|
17
|
-
key:
|
|
17
|
+
key: any;
|
|
18
18
|
ZIndexBehavior: Enum.ZIndexBehavior.Sibling;
|
|
19
19
|
ResetOnSpawn: boolean;
|
|
20
20
|
}, string | React.JSXElementConstructor<any>> | React.ReactElement<{
|
|
21
|
-
key:
|
|
21
|
+
key: any;
|
|
22
22
|
BackgroundTransparency: number;
|
|
23
23
|
Size: UDim2;
|
|
24
24
|
}, string | React.JSXElementConstructor<any>>;
|
|
25
25
|
renderApps(props: Types.NameProps & Types.MainProps): (React.ReactElement<{
|
|
26
|
-
key:
|
|
26
|
+
key: any;
|
|
27
27
|
ZIndexBehavior: Enum.ZIndexBehavior.Sibling;
|
|
28
28
|
ResetOnSpawn: boolean;
|
|
29
29
|
}, string | React.JSXElementConstructor<any>> | React.ReactElement<{
|
|
30
|
-
key:
|
|
30
|
+
key: any;
|
|
31
31
|
BackgroundTransparency: number;
|
|
32
32
|
Size: UDim2;
|
|
33
33
|
}, string | React.JSXElementConstructor<any>>)[];
|
|
34
34
|
renderAll(props: Types.MainProps): (React.ReactElement<{
|
|
35
|
-
key:
|
|
35
|
+
key: any;
|
|
36
36
|
ZIndexBehavior: Enum.ZIndexBehavior.Sibling;
|
|
37
37
|
ResetOnSpawn: boolean;
|
|
38
38
|
}, string | React.JSXElementConstructor<any>> | React.ReactElement<{
|
|
39
|
-
key:
|
|
39
|
+
key: any;
|
|
40
40
|
BackgroundTransparency: number;
|
|
41
41
|
Size: UDim2;
|
|
42
42
|
}, string | React.JSXElementConstructor<any>>)[];
|
package/out/react/rules.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import AppManager from ".";
|
|
|
2
2
|
export default class RulesManager {
|
|
3
3
|
private appManager;
|
|
4
4
|
constructor(appManager: AppManager);
|
|
5
|
-
applyRules(name: AppNames
|
|
5
|
+
applyRules(name: AppNames, value: boolean): boolean;
|
|
6
6
|
private inSameGroup;
|
|
7
7
|
private blockedBy;
|
|
8
8
|
private blocks;
|
package/out/react/rules.luau
CHANGED
|
@@ -61,7 +61,7 @@ do
|
|
|
61
61
|
_result_1 = _result_1.groups
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
|
-
local groups = if _result_1 ~= "" and _result_1 then asTable(otherApp.rules.groups) else {}
|
|
64
|
+
local groups = if _result_1 ~= 0 and _result_1 == _result_1 and _result_1 ~= "" and _result_1 then asTable(otherApp.rules.groups) else {}
|
|
65
65
|
-- ▼ ReadonlyArray.find ▼
|
|
66
66
|
local _callback_1 = function(g)
|
|
67
67
|
return g == "Core"
|
|
@@ -74,7 +74,7 @@ do
|
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
-- ▲ ReadonlyArray.find ▲
|
|
77
|
-
if _result_2 then
|
|
77
|
+
if _result_2 ~= 0 and _result_2 == _result_2 and _result_2 ~= "" and _result_2 then
|
|
78
78
|
return nil
|
|
79
79
|
end
|
|
80
80
|
if self.appManager:getState(n) then
|
|
@@ -92,15 +92,15 @@ do
|
|
|
92
92
|
local _condition = value
|
|
93
93
|
if _condition then
|
|
94
94
|
_condition = rules.blockedBy
|
|
95
|
-
if _condition ~= "" and _condition then
|
|
95
|
+
if _condition ~= 0 and _condition == _condition and _condition ~= "" and _condition then
|
|
96
96
|
_condition = not self:blockedBy(name, rules.blockedBy)
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
|
-
if _condition ~= "" and _condition then
|
|
99
|
+
if _condition ~= 0 and _condition == _condition and _condition ~= "" and _condition then
|
|
100
100
|
return false
|
|
101
101
|
end
|
|
102
102
|
local _value = value and rules.blocks
|
|
103
|
-
if _value ~= "" and _value then
|
|
103
|
+
if _value ~= 0 and _value == _value and _value ~= "" and _value then
|
|
104
104
|
self:blocks(name, rules.blocks)
|
|
105
105
|
end
|
|
106
106
|
if value and rules.layer ~= nil then
|
|
@@ -150,7 +150,7 @@ do
|
|
|
150
150
|
local blockers = asTable(rule)
|
|
151
151
|
for i = 1, #blockers do
|
|
152
152
|
local blocker = blockers[i + 1]
|
|
153
|
-
if self:inSameGroup(name, blocker) or not (blocker ~= "" and blocker) then
|
|
153
|
+
if self:inSameGroup(name, blocker) or not (blocker ~= 0 and blocker == blocker and blocker ~= "" and blocker) then
|
|
154
154
|
continue
|
|
155
155
|
end
|
|
156
156
|
if self.appManager:getState(blocker) then
|
|
@@ -163,7 +163,7 @@ do
|
|
|
163
163
|
local blocked = asTable(rule)
|
|
164
164
|
for i = 1, #blocked do
|
|
165
165
|
local b = blocked[i + 1]
|
|
166
|
-
if self:inSameGroup(name, b) or not (b ~= "" and b) then
|
|
166
|
+
if self:inSameGroup(name, b) or not (b ~= 0 and b == b and b ~= "" and b) then
|
|
167
167
|
continue
|
|
168
168
|
end
|
|
169
169
|
if self.appManager:getState(b) then
|
package/out/vide/decorator.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function App(props: Types.AppRegistryProps): <T extends new (prop
|
|
|
6
6
|
export declare abstract class Args {
|
|
7
7
|
readonly forge: AppForge;
|
|
8
8
|
readonly props: Types.ClassProps;
|
|
9
|
-
readonly name: AppNames
|
|
9
|
+
readonly name: AppNames;
|
|
10
10
|
readonly source: Vide.Source<boolean>;
|
|
11
11
|
constructor(props: Types.NameProps & Types.MainProps);
|
|
12
12
|
abstract render(): Vide.Node;
|
package/out/vide/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Vide from "@rbxts/vide";
|
|
2
2
|
import type Types from "./types";
|
|
3
3
|
import type AppForge from ".";
|
|
4
|
-
export declare function createSource(name: AppNames
|
|
4
|
+
export declare function createSource(name: AppNames, forge: AppForge): typeof Vide.source | undefined;
|
|
5
5
|
export declare function Render(props: Types.NameProps & Types.MainProps): Vide.Node;
|
package/out/vide/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export default class AppForge {
|
|
|
4
4
|
sources: Map<string, Vide.Source<boolean>>;
|
|
5
5
|
loaded: Map<string, Vide.Node>;
|
|
6
6
|
private rulesManager;
|
|
7
|
-
getSource(name: AppNames
|
|
8
|
-
set(name: AppNames
|
|
9
|
-
open(name: AppNames
|
|
10
|
-
close(name: AppNames
|
|
11
|
-
toggle(name: AppNames
|
|
7
|
+
getSource(name: AppNames): Vide.Source<boolean>;
|
|
8
|
+
set(name: AppNames, value: Vide.Source<boolean> | boolean): void;
|
|
9
|
+
open(name: AppNames): void;
|
|
10
|
+
close(name: AppNames): void;
|
|
11
|
+
toggle(name: AppNames): void;
|
|
12
12
|
renderApp(props: Types.NameProps & Types.MainProps): ScreenGui | Frame;
|
|
13
13
|
renderApps(props: Types.NameProps & Types.MainProps): (ScreenGui | Frame)[];
|
|
14
14
|
renderAll(props: Types.MainProps): (ScreenGui | Frame)[];
|
package/out/vide/rules.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type AppForge from ".";
|
|
|
3
3
|
export default class RulesManager {
|
|
4
4
|
private appManager;
|
|
5
5
|
constructor(appManager: AppForge);
|
|
6
|
-
applyRules(name: AppNames
|
|
6
|
+
applyRules(name: AppNames, source: Vide.Source<boolean> | boolean): boolean;
|
|
7
7
|
private inSameGroup;
|
|
8
8
|
private blockedBy;
|
|
9
9
|
private blocks;
|
package/out/vide/types.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import type AppForge from ".";
|
|
|
4
4
|
|
|
5
5
|
declare namespace Types {
|
|
6
6
|
type AppRegistryProps = {
|
|
7
|
-
name: AppNames
|
|
7
|
+
name: AppNames;
|
|
8
8
|
visible?: boolean;
|
|
9
9
|
rules?: Rules.All;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
type NameProps =
|
|
13
|
-
| { name?: AppNames
|
|
14
|
-
| { names?: AppNames[
|
|
13
|
+
| { name?: AppNames; names?: undefined }
|
|
14
|
+
| { names?: AppNames[]; name?: undefined };
|
|
15
15
|
|
|
16
16
|
type MainProps = {
|
|
17
17
|
props: AppProps;
|
|
@@ -37,8 +37,8 @@ declare namespace Types {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
namespace Rules {
|
|
40
|
-
type BlockedBy = AppNames
|
|
41
|
-
type Blocks = AppNames
|
|
40
|
+
type BlockedBy = AppNames | AppNames[];
|
|
41
|
+
type Blocks = AppNames | AppNames[];
|
|
42
42
|
type Exclusive = boolean;
|
|
43
43
|
type Layer = number;
|
|
44
44
|
|
|
@@ -58,8 +58,8 @@ declare namespace Types {
|
|
|
58
58
|
blocks?: Blocks;
|
|
59
59
|
layer?: Layer;
|
|
60
60
|
|
|
61
|
-
parent?: AppNames
|
|
62
|
-
parents?: AppNames[
|
|
61
|
+
parent?: AppNames;
|
|
62
|
+
parents?: AppNames[];
|
|
63
63
|
} & GroupUnion;
|
|
64
64
|
}
|
|
65
65
|
}
|