@rbxts/app-forge 0.6.0-alpha.72 → 0.6.0-alpha.74
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 +1 -1
- package/out/vide/init.luau +43 -1
- package/package.json +1 -1
package/out/vide/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default class AppForge extends Renders {
|
|
|
14
14
|
set(name: AppNames, value: boolean, rules?: boolean): void;
|
|
15
15
|
open(name: AppNames, rules?: boolean): void;
|
|
16
16
|
close(name: AppNames, rules?: boolean): void;
|
|
17
|
-
mount(callback: () => Vide.Node, props: Types.Props.Main, target: Instance):
|
|
17
|
+
mount(callback: () => Vide.Node, props: Types.Props.Main, target: Instance): Instance;
|
|
18
18
|
unMount(): void;
|
|
19
19
|
toggle(name: AppNames, rules?: boolean): void;
|
|
20
20
|
}
|
package/out/vide/init.luau
CHANGED
|
@@ -4,6 +4,7 @@ local TS = _G[script]
|
|
|
4
4
|
local RunService = TS.import(script, TS.getModule(script, "@rbxts", "services")).RunService
|
|
5
5
|
-- Packages
|
|
6
6
|
local _vide = TS.import(script, TS.getModule(script, "@rbxts", "vide").src)
|
|
7
|
+
local apply = _vide.apply
|
|
7
8
|
local effect = _vide.effect
|
|
8
9
|
local mount = _vide.mount
|
|
9
10
|
local source = _vide.source
|
|
@@ -129,6 +130,7 @@ do
|
|
|
129
130
|
function AppForge:mount(callback, props, target)
|
|
130
131
|
local _binding = props
|
|
131
132
|
local config = _binding.config
|
|
133
|
+
local render = _binding.render
|
|
132
134
|
if not self.__px then
|
|
133
135
|
local _result = config
|
|
134
136
|
if _result ~= nil then
|
|
@@ -147,7 +149,47 @@ do
|
|
|
147
149
|
else
|
|
148
150
|
warn("Rendering twice making a second px")
|
|
149
151
|
end
|
|
150
|
-
|
|
152
|
+
local children
|
|
153
|
+
if render then
|
|
154
|
+
local _condition = render.name
|
|
155
|
+
if _condition ~= "" and _condition then
|
|
156
|
+
_condition = render.group
|
|
157
|
+
end
|
|
158
|
+
if _condition ~= "" and _condition then
|
|
159
|
+
children = self:renderGroupByName(props)
|
|
160
|
+
else
|
|
161
|
+
local _value = render.names and render.group
|
|
162
|
+
if _value ~= "" and _value then
|
|
163
|
+
children = self:renderGroupByNames(props)
|
|
164
|
+
else
|
|
165
|
+
local _result = render
|
|
166
|
+
if _result ~= nil then
|
|
167
|
+
_result = _result.name
|
|
168
|
+
end
|
|
169
|
+
if _result ~= "" and _result then
|
|
170
|
+
children = self:renderApp(props)
|
|
171
|
+
elseif render.names then
|
|
172
|
+
children = self:renderApps(props)
|
|
173
|
+
else
|
|
174
|
+
local _value_1 = render.group
|
|
175
|
+
if _value_1 ~= "" and _value_1 then
|
|
176
|
+
children = self:renderGroup(props)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
children = self:renderAll(props)
|
|
183
|
+
local Container = callback()
|
|
184
|
+
apply(Container)({
|
|
185
|
+
[0] = children,
|
|
186
|
+
})
|
|
187
|
+
if RunService:IsRunning() then
|
|
188
|
+
self.innerMount = mount(function()
|
|
189
|
+
return Container
|
|
190
|
+
end, target)
|
|
191
|
+
end
|
|
192
|
+
return Container
|
|
151
193
|
end
|
|
152
194
|
function AppForge:unMount()
|
|
153
195
|
local _result = self.innerMount
|