@rbxts/app-forge 0.6.0-alpha.84 → 0.6.0-alpha.86
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/classes/renders.luau +1 -1
- package/out/vide/index.d.ts +1 -1
- package/out/vide/init.luau +21 -22
- package/package.json +1 -1
|
@@ -181,7 +181,7 @@ do
|
|
|
181
181
|
end
|
|
182
182
|
local _condition = _result
|
|
183
183
|
if _condition ~= "" and _condition then
|
|
184
|
-
_condition = not
|
|
184
|
+
_condition = not appClass.rules.detach
|
|
185
185
|
end
|
|
186
186
|
if _condition ~= "" and _condition then
|
|
187
187
|
self:anchor(name, appClass.rules.parent, props)
|
package/out/vide/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export default class AppForge extends Renders {
|
|
|
16
16
|
protected createSource(name: AppNames): typeof Vide.source | undefined;
|
|
17
17
|
isLoaded(name: AppNames): boolean;
|
|
18
18
|
bind(name: AppNames, value: Vide.Source<boolean>): void;
|
|
19
|
-
anchor(name: AppNames,
|
|
19
|
+
anchor(name: AppNames, anchorName: AppNames, props: Types.Props.Main): void;
|
|
20
20
|
getSource(name: AppNames): Vide.Source<boolean>;
|
|
21
21
|
set(name: AppNames, value: boolean, rules?: boolean): void;
|
|
22
22
|
open(name: AppNames, rules?: boolean): void;
|
package/out/vide/init.luau
CHANGED
|
@@ -84,14 +84,14 @@ do
|
|
|
84
84
|
warn("forge.bind is used for studio when game isnt running")
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
|
-
function AppForge:anchor(name,
|
|
88
|
-
if name ==
|
|
87
|
+
function AppForge:anchor(name, anchorName, props)
|
|
88
|
+
if name == anchorName then
|
|
89
89
|
error(`Tried to anchor an App to itself`)
|
|
90
90
|
end
|
|
91
|
-
local
|
|
92
|
-
local anchorApp = AppRegistry[
|
|
91
|
+
local _anchorName = anchorName
|
|
92
|
+
local anchorApp = AppRegistry[_anchorName]
|
|
93
93
|
if not anchorApp then
|
|
94
|
-
error(`Failed to get class for {
|
|
94
|
+
error(`Failed to get class for {anchorName} from AppRegistry for anchor`)
|
|
95
95
|
end
|
|
96
96
|
local _loaded = self.loaded
|
|
97
97
|
local _name = name
|
|
@@ -101,32 +101,31 @@ do
|
|
|
101
101
|
end
|
|
102
102
|
local render = _render
|
|
103
103
|
if not render then
|
|
104
|
-
error(`Failed to get {name} from this.loaded for anchor to {
|
|
104
|
+
error(`Failed to get {name} from this.loaded for anchor to {anchorName}`)
|
|
105
105
|
end
|
|
106
|
-
local
|
|
107
|
-
|
|
106
|
+
local anchor = anchorApp.constructor.new(props, anchorName):render()
|
|
107
|
+
for _, children in anchor:GetDescendants() do
|
|
108
|
+
children:Destroy()
|
|
109
|
+
end
|
|
110
|
+
apply(anchor)({
|
|
108
111
|
Name = "Anchor",
|
|
112
|
+
BackgroundTransparency = 1,
|
|
109
113
|
[0] = render,
|
|
110
114
|
})
|
|
111
115
|
local _loaded_1 = self.loaded
|
|
112
116
|
local _name_1 = name
|
|
113
117
|
local prev = _loaded_1[_name_1]
|
|
118
|
+
if not prev then
|
|
119
|
+
error(`Failed to retreive prev loaded data for {name}`)
|
|
120
|
+
end
|
|
121
|
+
apply(prev.container)({
|
|
122
|
+
[0] = anchor,
|
|
123
|
+
})
|
|
114
124
|
local _loaded_2 = self.loaded
|
|
115
125
|
local _exp = name
|
|
116
|
-
local _object =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if _result ~= nil then
|
|
120
|
-
_result = _result.container
|
|
121
|
-
end
|
|
122
|
-
_object[_left] = _result
|
|
123
|
-
local _left_1 = "render"
|
|
124
|
-
local _result_1 = prev
|
|
125
|
-
if _result_1 ~= nil then
|
|
126
|
-
_result_1 = _result_1.render
|
|
127
|
-
end
|
|
128
|
-
_object[_left_1] = _result_1
|
|
129
|
-
_object.anchor = achorRender
|
|
126
|
+
local _object = table.clone(prev)
|
|
127
|
+
setmetatable(_object, nil)
|
|
128
|
+
_object.anchor = anchor
|
|
130
129
|
_loaded_2[_exp] = _object
|
|
131
130
|
end
|
|
132
131
|
function AppForge:getSource(name)
|