@rbxts/app-forge 0.7.2-prototype.23 → 0.7.2-prototype.25
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/renders.d.ts +3 -4
- package/out/renders.luau +30 -32
- package/package.json +1 -1
package/out/renders.d.ts
CHANGED
|
@@ -2,18 +2,17 @@ import Vide from "@rbxts/vide";
|
|
|
2
2
|
import type Types from "./types";
|
|
3
3
|
import Rules from "./ruleEngine";
|
|
4
4
|
type Render = {
|
|
5
|
-
instance
|
|
6
|
-
container
|
|
5
|
+
instance?: Instance;
|
|
6
|
+
container?: Instance;
|
|
7
7
|
};
|
|
8
8
|
export default class Renders extends Rules {
|
|
9
9
|
private __px;
|
|
10
|
-
protected
|
|
10
|
+
protected Loaded: Map<string, Map<string, Render>>;
|
|
11
11
|
constructor();
|
|
12
12
|
Render: (props: Types.Props.Main) => Instance[];
|
|
13
13
|
private resolveGroupEntries;
|
|
14
14
|
private getGroupEntries;
|
|
15
15
|
private createRender;
|
|
16
|
-
private getChildren;
|
|
17
16
|
protected initalize(props: Types.Props.Main, target?: GuiObject | Instance, root?: GuiObject | Instance): Vide.Node;
|
|
18
17
|
}
|
|
19
18
|
export {};
|
package/out/renders.luau
CHANGED
|
@@ -30,12 +30,12 @@ do
|
|
|
30
30
|
function Renders:constructor()
|
|
31
31
|
super.constructor(self)
|
|
32
32
|
self.__px = false
|
|
33
|
-
self.
|
|
33
|
+
self.Loaded = {}
|
|
34
34
|
self.Render = function(props)
|
|
35
35
|
local _binding = props
|
|
36
36
|
local forge = _binding.forge
|
|
37
37
|
local renders = _binding.renders
|
|
38
|
-
local
|
|
38
|
+
local toRender = {}
|
|
39
39
|
if not renders then
|
|
40
40
|
return {}
|
|
41
41
|
end
|
|
@@ -45,7 +45,7 @@ do
|
|
|
45
45
|
local _callback = function(group)
|
|
46
46
|
local entries = self:resolveGroupEntries(forge, group, renders.names, renders.name)
|
|
47
47
|
for _, entry in entries do
|
|
48
|
-
table.insert(
|
|
48
|
+
table.insert(toRender, entry)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
for _k, _v in _exp do
|
|
@@ -57,34 +57,34 @@ do
|
|
|
57
57
|
if _value ~= "" and _value then
|
|
58
58
|
local entries = self:resolveGroupEntries(forge, renders.group, renders.names, renders.name)
|
|
59
59
|
for _, entry in entries do
|
|
60
|
-
table.insert(
|
|
60
|
+
table.insert(toRender, entry)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
-- ▼ ReadonlyArray.forEach ▼
|
|
64
64
|
local _callback = function(entry)
|
|
65
|
-
local
|
|
66
|
-
local
|
|
67
|
-
print(parentName, parentGroup)
|
|
65
|
+
local name = tostring(entry.constructor)
|
|
66
|
+
local group = entry.group
|
|
68
67
|
-- ▼ ReadonlyMap.forEach ▼
|
|
69
|
-
local _callback_1 = function(groupEntries
|
|
68
|
+
local _callback_1 = function(groupEntries)
|
|
70
69
|
-- ▼ ReadonlyMap.forEach ▼
|
|
71
|
-
local _callback_2 = function(childEntry
|
|
70
|
+
local _callback_2 = function(childEntry)
|
|
72
71
|
local _result = childEntry.rules
|
|
73
72
|
if _result ~= nil then
|
|
74
73
|
_result = _result.parent
|
|
75
74
|
end
|
|
76
|
-
local _condition = _result ~=
|
|
75
|
+
local _condition = _result ~= name
|
|
77
76
|
if not _condition then
|
|
78
77
|
local _result_1 = childEntry.rules
|
|
79
78
|
if _result_1 ~= nil then
|
|
80
79
|
_result_1 = _result_1.parentGroup
|
|
81
80
|
end
|
|
82
|
-
_condition = _result_1 ~=
|
|
81
|
+
_condition = _result_1 ~= group
|
|
83
82
|
end
|
|
84
83
|
if _condition then
|
|
85
84
|
return nil
|
|
86
85
|
end
|
|
87
|
-
|
|
86
|
+
local _childEntry = childEntry
|
|
87
|
+
table.insert(toRender, _childEntry)
|
|
88
88
|
end
|
|
89
89
|
for _k, _v in groupEntries do
|
|
90
90
|
_callback_2(_v, _k, groupEntries)
|
|
@@ -96,28 +96,22 @@ do
|
|
|
96
96
|
end
|
|
97
97
|
-- ▲ ReadonlyMap.forEach ▲
|
|
98
98
|
end
|
|
99
|
-
for _k, _v in
|
|
100
|
-
_callback(_v, _k - 1,
|
|
99
|
+
for _k, _v in toRender do
|
|
100
|
+
_callback(_v, _k - 1, toRender)
|
|
101
101
|
end
|
|
102
102
|
-- ▲ ReadonlyArray.forEach ▲
|
|
103
103
|
local rendered = {}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
local _container = entry.container
|
|
110
|
-
table.insert(rendered, _container)
|
|
111
|
-
end
|
|
112
|
-
for _k, _v in entries do
|
|
113
|
-
_callback_2(_v, _k, entries)
|
|
114
|
-
end
|
|
115
|
-
-- ▲ ReadonlyMap.forEach ▲
|
|
104
|
+
-- ▼ ReadonlyArray.forEach ▼
|
|
105
|
+
local _callback_1 = function(entry)
|
|
106
|
+
local name = tostring(entry.constructor)
|
|
107
|
+
local group = entry.group
|
|
108
|
+
self:createRender(forge, name, group)
|
|
116
109
|
end
|
|
117
|
-
for _k, _v in
|
|
118
|
-
_callback_1(_v, _k,
|
|
110
|
+
for _k, _v in toRender do
|
|
111
|
+
_callback_1(_v, _k - 1, toRender)
|
|
119
112
|
end
|
|
120
|
-
-- ▲
|
|
113
|
+
-- ▲ ReadonlyArray.forEach ▲
|
|
114
|
+
print(self.Loaded)
|
|
121
115
|
return rendered
|
|
122
116
|
end
|
|
123
117
|
end
|
|
@@ -186,13 +180,17 @@ do
|
|
|
186
180
|
-- ▲ ReadonlyMap.forEach ▲
|
|
187
181
|
return entries
|
|
188
182
|
end
|
|
189
|
-
function Renders:createRender(forge, name, group)
|
|
183
|
+
function Renders:createRender(forge, name, group, parent)
|
|
190
184
|
local entry = getAppEntry(forge, name, group)
|
|
191
185
|
print(entry)
|
|
186
|
+
local newMap = {}
|
|
187
|
+
local _group = group
|
|
188
|
+
newMap[_group] = {}
|
|
189
|
+
local _loaded = self.Loaded
|
|
190
|
+
local _name = name
|
|
191
|
+
_loaded[_name] = newMap
|
|
192
192
|
return nil
|
|
193
193
|
end
|
|
194
|
-
function Renders:getChildren()
|
|
195
|
-
end
|
|
196
194
|
function Renders:initalize(props, target, root)
|
|
197
195
|
if not self.__px then
|
|
198
196
|
local _result = props.config
|