@rbxts/app-forge 0.7.2-prototype.26 → 0.7.2-prototype.28
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/helpers/hasAppSource.luau +2 -2
- package/out/renders.d.ts +2 -1
- package/out/renders.luau +62 -35
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ local function hasAppSource(name, group)
|
|
|
6
6
|
local _name = name
|
|
7
7
|
local sourceMap = AppSources[_name]
|
|
8
8
|
if not sourceMap then
|
|
9
|
-
|
|
9
|
+
return false
|
|
10
10
|
end
|
|
11
11
|
local _source = sourceMap
|
|
12
12
|
if _source ~= nil then
|
|
@@ -15,7 +15,7 @@ local function hasAppSource(name, group)
|
|
|
15
15
|
end
|
|
16
16
|
local source = _source
|
|
17
17
|
if not source then
|
|
18
|
-
|
|
18
|
+
return false
|
|
19
19
|
end
|
|
20
20
|
return true
|
|
21
21
|
end
|
package/out/renders.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import Rules from "./ruleEngine";
|
|
|
4
4
|
type Render = {
|
|
5
5
|
instance: Instance;
|
|
6
6
|
container: Instance;
|
|
7
|
+
entry: Types.AppRegistry.Static;
|
|
7
8
|
};
|
|
8
9
|
export default class Renders extends Rules {
|
|
9
10
|
private __px;
|
|
10
11
|
protected Loaded: Map<string, Map<string, Render>>;
|
|
11
12
|
constructor();
|
|
12
|
-
|
|
13
|
+
Load: (props: Types.Props.Main) => Instance[];
|
|
13
14
|
private resolveGroupEntries;
|
|
14
15
|
private getGroupEntries;
|
|
15
16
|
private createInstance;
|
package/out/renders.luau
CHANGED
|
@@ -31,11 +31,10 @@ do
|
|
|
31
31
|
super.constructor(self)
|
|
32
32
|
self.__px = false
|
|
33
33
|
self.Loaded = {}
|
|
34
|
-
self.
|
|
34
|
+
self.Load = function(props)
|
|
35
35
|
local _binding = props
|
|
36
|
-
local forge = _binding.forge
|
|
37
36
|
local renders = _binding.renders
|
|
38
|
-
local
|
|
37
|
+
local toLoad = {}
|
|
39
38
|
if not renders then
|
|
40
39
|
return {}
|
|
41
40
|
end
|
|
@@ -45,7 +44,7 @@ do
|
|
|
45
44
|
local _callback = function(group)
|
|
46
45
|
local entries = self:resolveGroupEntries(group, renders.names, renders.name)
|
|
47
46
|
for _, entry in entries do
|
|
48
|
-
table.insert(
|
|
47
|
+
table.insert(toLoad, entry)
|
|
49
48
|
end
|
|
50
49
|
end
|
|
51
50
|
for _k, _v in _exp do
|
|
@@ -57,7 +56,7 @@ do
|
|
|
57
56
|
if _value ~= "" and _value then
|
|
58
57
|
local entries = self:resolveGroupEntries(renders.group, renders.names, renders.name)
|
|
59
58
|
for _, entry in entries do
|
|
60
|
-
table.insert(
|
|
59
|
+
table.insert(toLoad, entry)
|
|
61
60
|
end
|
|
62
61
|
end
|
|
63
62
|
-- ▼ ReadonlyArray.forEach ▼
|
|
@@ -84,7 +83,7 @@ do
|
|
|
84
83
|
return nil
|
|
85
84
|
end
|
|
86
85
|
local _childEntry = childEntry
|
|
87
|
-
table.insert(
|
|
86
|
+
table.insert(toLoad, _childEntry)
|
|
88
87
|
end
|
|
89
88
|
for _k, _v in groupEntries do
|
|
90
89
|
_callback_2(_v, _k, groupEntries)
|
|
@@ -96,44 +95,46 @@ do
|
|
|
96
95
|
end
|
|
97
96
|
-- ▲ ReadonlyMap.forEach ▲
|
|
98
97
|
end
|
|
99
|
-
for _k, _v in
|
|
100
|
-
_callback(_v, _k - 1,
|
|
98
|
+
for _k, _v in toLoad do
|
|
99
|
+
_callback(_v, _k - 1, toLoad)
|
|
101
100
|
end
|
|
102
101
|
-- ▲ ReadonlyArray.forEach ▲
|
|
103
|
-
local
|
|
102
|
+
local load = {}
|
|
104
103
|
-- ▼ ReadonlyArray.forEach ▼
|
|
105
104
|
local _callback_1 = function(entry)
|
|
106
105
|
local name = tostring(entry.constructor)
|
|
107
106
|
local group = entry.group
|
|
108
|
-
|
|
109
|
-
local
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
local _condition = entry.rules.parentGroup
|
|
115
|
-
if not (_condition ~= "" and _condition) then
|
|
116
|
-
_condition = "None"
|
|
107
|
+
self:createInstance(props, name, group)
|
|
108
|
+
local _exp = self.Loaded
|
|
109
|
+
-- ▼ ReadonlyMap.forEach ▼
|
|
110
|
+
local _callback_2 = function(renderGroup, loadedName)
|
|
111
|
+
if name ~= loadedName then
|
|
112
|
+
return nil
|
|
117
113
|
end
|
|
118
|
-
|
|
119
|
-
local
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if parentMap then
|
|
123
|
-
local parentEntry = parentMap[group]
|
|
124
|
-
if parentEntry then
|
|
125
|
-
parent = parentEntry.container
|
|
114
|
+
-- ▼ ReadonlyMap.forEach ▼
|
|
115
|
+
local _callback_3 = function(render, group)
|
|
116
|
+
if group ~= group then
|
|
117
|
+
return nil
|
|
126
118
|
end
|
|
119
|
+
local _container = render.container
|
|
120
|
+
table.insert(load, _container)
|
|
127
121
|
end
|
|
122
|
+
for _k, _v in renderGroup do
|
|
123
|
+
_callback_3(_v, _k, renderGroup)
|
|
124
|
+
end
|
|
125
|
+
-- ▲ ReadonlyMap.forEach ▲
|
|
126
|
+
end
|
|
127
|
+
for _k, _v in _exp do
|
|
128
|
+
_callback_2(_v, _k, _exp)
|
|
128
129
|
end
|
|
129
|
-
|
|
130
|
+
-- ▲ ReadonlyMap.forEach ▲
|
|
130
131
|
end
|
|
131
|
-
for _k, _v in
|
|
132
|
-
_callback_1(_v, _k - 1,
|
|
132
|
+
for _k, _v in toLoad do
|
|
133
|
+
_callback_1(_v, _k - 1, toLoad)
|
|
133
134
|
end
|
|
134
135
|
-- ▲ ReadonlyArray.forEach ▲
|
|
135
|
-
print(
|
|
136
|
-
return
|
|
136
|
+
print(load)
|
|
137
|
+
return load
|
|
137
138
|
end
|
|
138
139
|
end
|
|
139
140
|
function Renders:resolveGroupEntries(group, names, name)
|
|
@@ -197,25 +198,51 @@ do
|
|
|
197
198
|
-- ▲ ReadonlyMap.forEach ▲
|
|
198
199
|
return entries
|
|
199
200
|
end
|
|
200
|
-
function Renders:createInstance(props, name, group
|
|
201
|
+
function Renders:createInstance(props, name, group)
|
|
201
202
|
local entry = getAppEntry(name, group)
|
|
202
203
|
if not entry then
|
|
203
204
|
return nil
|
|
204
205
|
end
|
|
206
|
+
local parentContainer
|
|
207
|
+
local _result = entry.rules
|
|
208
|
+
if _result ~= nil then
|
|
209
|
+
_result = _result.parent
|
|
210
|
+
end
|
|
211
|
+
if _result ~= "" and _result then
|
|
212
|
+
local _value = entry.rules.parent
|
|
213
|
+
if _value ~= "" and _value then
|
|
214
|
+
local _condition = entry.rules.parentGroup
|
|
215
|
+
if not (_condition ~= "" and _condition) then
|
|
216
|
+
_condition = "None"
|
|
217
|
+
end
|
|
218
|
+
local group = _condition
|
|
219
|
+
local _loaded = self.Loaded
|
|
220
|
+
local _parent = entry.rules.parent
|
|
221
|
+
local parentMap = _loaded[_parent]
|
|
222
|
+
if parentMap then
|
|
223
|
+
local parentEntry = parentMap[group]
|
|
224
|
+
if parentEntry then
|
|
225
|
+
parentContainer = parentEntry.container
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
205
230
|
local instance = entry.constructor.new(props, name, group):render()
|
|
231
|
+
instance.Name = "Render"
|
|
206
232
|
local container = (Vide.jsx("frame", {
|
|
207
233
|
Name = name,
|
|
208
234
|
BackgroundTransparency = 1,
|
|
209
235
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
210
236
|
Position = UDim2.fromScale(0.5, 0.5),
|
|
211
237
|
Size = UDim2.fromScale(1, 1),
|
|
212
|
-
Parent =
|
|
238
|
+
Parent = parentContainer,
|
|
213
239
|
}, instance))
|
|
214
240
|
local newMap = {}
|
|
215
241
|
local _group = group
|
|
216
242
|
local _arg1 = {
|
|
217
243
|
container = container,
|
|
218
244
|
instance = instance,
|
|
245
|
+
entry = entry,
|
|
219
246
|
}
|
|
220
247
|
newMap[_group] = _arg1
|
|
221
248
|
local _loaded = self.Loaded
|
|
@@ -251,14 +278,14 @@ do
|
|
|
251
278
|
Name = "App Tree",
|
|
252
279
|
ZIndexBehavior = "Sibling",
|
|
253
280
|
ResetOnSpawn = false,
|
|
254
|
-
}, Vide.jsx(self.
|
|
281
|
+
}, Vide.jsx(self.Load, _attributes)))
|
|
255
282
|
end
|
|
256
283
|
return _result
|
|
257
284
|
end)
|
|
258
285
|
else
|
|
259
286
|
local _attributes = table.clone(props)
|
|
260
287
|
setmetatable(_attributes, nil)
|
|
261
|
-
return Vide.jsx(self.
|
|
288
|
+
return Vide.jsx(self.Load, _attributes)
|
|
262
289
|
end
|
|
263
290
|
end
|
|
264
291
|
end
|