@rbxts/app-forge 0.7.2-alpha.22 → 0.7.2-alpha.24
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/README.md +84 -213
- package/out/{decorator.d.ts → appRegistry.d.ts} +1 -1
- package/out/{decorator.luau → appRegistry.luau} +1 -1
- package/out/context.d.ts +1 -1
- package/out/hooks/useAppContext.luau +1 -1
- package/out/hooks/useEventListener.luau +1 -1
- package/out/hooks/usePx.luau +1 -1
- package/out/index.d.ts +2 -2
- package/out/init.luau +4 -4
- package/out/{main.d.ts → mount.d.ts} +4 -3
- package/out/{main.luau → mount.luau} +7 -9
- package/out/{classes/renders.d.ts → renderManager.d.ts} +3 -3
- package/out/{classes/renders.luau → renderManager.luau} +3 -3
- package/out/{classes/rules → ruleEngine}/exclusiveGroup.d.ts +1 -1
- package/out/{classes/rules → ruleEngine}/exclusiveGroup.luau +1 -1
- package/out/{classes/rules → ruleEngine}/index.d.ts +2 -2
- package/out/{classes/rules → ruleEngine}/init.luau +4 -4
- package/out/{classes/rules → ruleEngine}/parent.d.ts +1 -1
- package/out/{classes/rules → ruleEngine}/parent.luau +1 -1
- package/out/types.d.ts +4 -4
- package/package.json +1 -1
- package/out/debug/index.d.ts +0 -3
- package/out/debug/init.luau +0 -8
- /package/out/{debug/debugger.d.ts → debugger.d.ts} +0 -0
- /package/out/{debug/debugger.luau → debugger.luau} +0 -0
- /package/out/{debug/logger.d.ts → logger.d.ts} +0 -0
- /package/out/{debug/logger.luau → logger.luau} +0 -0
package/README.md
CHANGED
|
@@ -1,183 +1,124 @@
|
|
|
1
1
|
# AppForge
|
|
2
2
|
|
|
3
|
-
> ⚠️ **Documentation Notice**
|
|
4
|
-
>
|
|
5
|
-
> This README was written with the assistance of **AI tooling**.
|
|
6
|
-
> I do not currently have the time to write a fully hand-crafted documentation site, so there may be typos, rough wording, or missing explanations.
|
|
7
|
-
>
|
|
8
|
-
> If you find an issue, inconsistency, or bug in the docs or API, please **@ me on Discord** in the **roblox-ts Discord**: `@loner71x`.
|
|
9
|
-
>
|
|
10
|
-
> Thank you for your patience ❤️
|
|
3
|
+
> ⚠️ **Documentation Notice**
|
|
4
|
+
> Written with AI assistance. Please report any issues in [GitHub Issues](https://github.com/Loner1536/AppForge/issues) or on Discord: `@loner71x`.
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
AppForge is a **declarative UI application manager** built on top of [Vide](https://github.com/centau/vide) for **roblox-ts**. It provides a structured way to register, mount, show/hide, group, and coordinate UI "apps" using rules instead of ad‑hoc state wiring.
|
|
15
|
-
|
|
16
|
-
If you’ve ever ended up with tangled UI state, duplicated visibility logic, or brittle parent/child UI dependencies — AppForge is meant to solve that without forcing you into complex patterns.
|
|
6
|
+
**AppForge** is a **declarative UI application manager** for [Vide](https://github.com/centau/vide) in **roblox-ts**. It allows you to structure, mount, and control UI “apps” with centralized visibility, parent-child relationships, exclusive groups, and ZIndex rules — without tangled state.
|
|
17
7
|
|
|
18
8
|
---
|
|
19
9
|
|
|
20
10
|
## ✨ Features
|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* **Story / sandbox rendering**
|
|
29
|
-
* **Built-in debug logger & performance tracing**
|
|
30
|
-
* Fully typed with **roblox-ts**
|
|
12
|
+
- **App-based UI architecture**: self-contained UI units
|
|
13
|
+
- **Centralized visibility** per app
|
|
14
|
+
- **Rules system**: parent/child, exclusive groups, ZIndex
|
|
15
|
+
- **Render groups** for selective mounting
|
|
16
|
+
- **Built-in debug logger & performance tracing**
|
|
17
|
+
- **Fully typed with roblox-ts**
|
|
31
18
|
|
|
32
19
|
---
|
|
33
20
|
|
|
34
21
|
## 📦 Installation
|
|
35
22
|
|
|
36
|
-
### Using **bun**
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
bun add @rbxts/app-forge
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Peer dependencies (choose one renderer):
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
bun add @rbxts/vide
|
|
46
|
-
# or
|
|
47
|
-
bun add @rbxts/react
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
### Using **npm**
|
|
53
|
-
|
|
54
23
|
```bash
|
|
55
24
|
npm install @rbxts/app-forge
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Peer dependencies (choose one renderer):
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
25
|
npm install @rbxts/vide
|
|
62
|
-
# or
|
|
63
|
-
npm install @rbxts/react
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## 🧠 Core Concepts
|
|
69
|
-
|
|
70
|
-
### App
|
|
71
|
-
|
|
72
|
-
An **App** is a self-contained UI unit:
|
|
73
|
-
|
|
74
|
-
* owns its own visibility source
|
|
75
|
-
* renders a Vide tree
|
|
76
|
-
* can depend on other apps via rules
|
|
77
26
|
|
|
78
|
-
|
|
27
|
+
Or using Bun:
|
|
79
28
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### Forge
|
|
83
|
-
|
|
84
|
-
`AppForge` is the runtime manager. It:
|
|
29
|
+
bun add @rbxts/app-forge
|
|
30
|
+
bun add @rbxts/vide
|
|
85
31
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* enforces rules
|
|
89
|
-
* exposes imperative helpers (`open`, `close`, `toggle`)
|
|
90
|
-
* owns the **debugger & logger** instance
|
|
32
|
+
🧠 Core Concepts
|
|
33
|
+
App
|
|
91
34
|
|
|
92
|
-
|
|
35
|
+
An App is a self-contained UI unit:
|
|
93
36
|
|
|
94
|
-
|
|
37
|
+
Owns its visibility source
|
|
95
38
|
|
|
96
|
-
|
|
39
|
+
Renders a Vide tree
|
|
97
40
|
|
|
98
|
-
|
|
41
|
+
Can have rules: parent/child, exclusive groups, ZIndex
|
|
99
42
|
|
|
100
|
-
|
|
43
|
+
Apps are defined using the @App decorator and must extend Args.
|
|
44
|
+
Forge
|
|
101
45
|
|
|
102
|
-
|
|
103
|
-
| ---------------- | -------------------------------------- |
|
|
104
|
-
| `parent` | Child app closes when parent closes |
|
|
105
|
-
| `detach` | Prevents automatic anchoring to parent |
|
|
106
|
-
| `exclusiveGroup` | Only one app in the group may be open |
|
|
107
|
-
| `index` | Sets ZIndex of the app container |
|
|
46
|
+
AppForge is the runtime manager:
|
|
108
47
|
|
|
109
|
-
|
|
48
|
+
Holds all visibility sources
|
|
110
49
|
|
|
111
|
-
|
|
50
|
+
Mounts/unmounts apps in the UI
|
|
112
51
|
|
|
113
|
-
|
|
52
|
+
Applies rules automatically
|
|
114
53
|
|
|
115
|
-
|
|
54
|
+
Exposes imperative helpers: open, close, toggle
|
|
116
55
|
|
|
117
|
-
|
|
56
|
+
Owns debugger & logger
|
|
118
57
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
58
|
+
One Forge per UI root is recommended.
|
|
59
|
+
Rules
|
|
60
|
+
Rule Description
|
|
61
|
+
parent Child app closes automatically when parent closes
|
|
62
|
+
detach Prevents automatic anchoring to parent
|
|
63
|
+
exclusiveGroup Only one app in the group may be open
|
|
64
|
+
index Sets ZIndex of the app container
|
|
122
65
|
|
|
123
|
-
|
|
66
|
+
Rules are reactively enforced when visibility changes.
|
|
67
|
+
Render Groups
|
|
124
68
|
|
|
125
|
-
|
|
69
|
+
Render groups let you mount selective apps:
|
|
126
70
|
|
|
127
|
-
|
|
71
|
+
Example: Lobby UI vs In-Game UI
|
|
128
72
|
|
|
129
|
-
|
|
130
|
-
const forge = new CreateVideForge();
|
|
131
|
-
```
|
|
73
|
+
Example: HUD vs Menus
|
|
132
74
|
|
|
133
|
-
|
|
75
|
+
Apps can be rendered by group, name, or multiple names using the Forge’s internal rendering methods.
|
|
76
|
+
🧩 Basic Usage
|
|
77
|
+
Creating a Forge
|
|
134
78
|
|
|
135
|
-
|
|
79
|
+
import { CreateForge } from "@rbxts/app-forge";
|
|
136
80
|
|
|
137
|
-
|
|
81
|
+
const forge = new CreateForge();
|
|
138
82
|
|
|
139
|
-
|
|
140
|
-
const forge = new CreateVideForge();
|
|
83
|
+
Mounting to the PlayerGui
|
|
141
84
|
|
|
142
85
|
forge.mount(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
)
|
|
150
|
-
props,
|
|
151
|
-
Players.LocalPlayer.WaitForChild("PlayerGui"),
|
|
86
|
+
<screengui
|
|
87
|
+
Name="AppRoot"
|
|
88
|
+
ZIndexBehavior="Sibling"
|
|
89
|
+
ResetOnSpawn={false}
|
|
90
|
+
/>,
|
|
91
|
+
{ props: {}, forge },
|
|
92
|
+
Players.LocalPlayer.WaitForChild("PlayerGui")
|
|
152
93
|
);
|
|
153
|
-
```
|
|
154
94
|
|
|
155
|
-
|
|
95
|
+
⚠️ Note: You pass the root node directly, not a function.
|
|
156
96
|
|
|
157
|
-
|
|
97
|
+
Controlling Apps
|
|
158
98
|
|
|
159
|
-
```ts
|
|
160
99
|
forge.open("Inventory");
|
|
161
100
|
forge.close("Inventory");
|
|
162
101
|
forge.toggle("Inventory");
|
|
163
|
-
```
|
|
164
102
|
|
|
165
|
-
|
|
103
|
+
open(name): Shows the app
|
|
104
|
+
|
|
105
|
+
close(name): Hides the app
|
|
166
106
|
|
|
167
|
-
|
|
107
|
+
toggle(name): Toggles visibility
|
|
168
108
|
|
|
169
|
-
|
|
170
|
-
|
|
109
|
+
Defining an App
|
|
110
|
+
|
|
111
|
+
import { App, Args } from "@rbxts/app-forge";
|
|
112
|
+
|
|
113
|
+
@App({
|
|
171
114
|
name: "Inventory",
|
|
172
115
|
renderGroup: "Lobby",
|
|
173
116
|
visible: false,
|
|
174
|
-
rules: {
|
|
175
|
-
index: 2,
|
|
176
|
-
},
|
|
117
|
+
rules: { zIndex: 2 },
|
|
177
118
|
})
|
|
178
|
-
export class Inventory extends
|
|
119
|
+
export class Inventory extends Args {
|
|
179
120
|
render() {
|
|
180
|
-
const { px } = this.props;
|
|
121
|
+
const { px } = this.props; // px comes from the Forge
|
|
181
122
|
|
|
182
123
|
return (
|
|
183
124
|
<frame
|
|
@@ -187,81 +128,28 @@ export class Inventory extends VideArgs {
|
|
|
187
128
|
);
|
|
188
129
|
}
|
|
189
130
|
}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## 🐞 Debugging & Logging
|
|
195
131
|
|
|
196
|
-
|
|
132
|
+
@App registers the app with the Forge
|
|
197
133
|
|
|
198
|
-
|
|
134
|
+
px provides scaling helpers automatically
|
|
199
135
|
|
|
200
|
-
|
|
136
|
+
rules define relationships (parent, exclusive group, ZIndex)
|
|
201
137
|
|
|
202
|
-
|
|
203
|
-
type DebugTag =
|
|
204
|
-
| "render"
|
|
205
|
-
| "rules"
|
|
206
|
-
| "state"
|
|
207
|
-
| "px"
|
|
208
|
-
| "lifecycle";
|
|
209
|
-
```
|
|
138
|
+
🐞 Debugging
|
|
210
139
|
|
|
211
|
-
|
|
140
|
+
AppForge provides Studio-only debug logging:
|
|
212
141
|
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
### Enabling Debug Tags
|
|
216
|
-
|
|
217
|
-
```ts
|
|
218
142
|
forge.debug.enable("render");
|
|
219
143
|
forge.debug.enable("rules");
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
Enable everything at once:
|
|
223
|
-
|
|
224
|
-
```ts
|
|
225
|
-
forge.debug.enableAll();
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
Disable:
|
|
229
|
-
|
|
230
|
-
```ts
|
|
144
|
+
forge.debug.enableAll(); // everything
|
|
231
145
|
forge.debug.disable("render");
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Debug logging only runs in **Roblox Studio**.
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
### Performance Tracing
|
|
239
|
-
|
|
240
|
-
Certain systems emit **timing logs** when enabled:
|
|
241
146
|
|
|
242
|
-
|
|
243
|
-
forge.debug.enable("render");
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Output example:
|
|
147
|
+
Performance tracing example:
|
|
247
148
|
|
|
248
|
-
```
|
|
249
149
|
[PERF][render][Inventory] 1.243ms
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
### Static Registration Logs
|
|
255
|
-
|
|
256
|
-
App registration (decorators) run **before a Forge exists**.
|
|
257
|
-
|
|
258
|
-
These use an internal **static logger** and will still emit warnings and errors during Studio load (e.g. duplicate app names).
|
|
259
|
-
|
|
260
|
-
---
|
|
261
150
|
|
|
262
|
-
|
|
151
|
+
🧱 Architecture Overview
|
|
263
152
|
|
|
264
|
-
```
|
|
265
153
|
AppForge
|
|
266
154
|
├─ AppRegistry (static)
|
|
267
155
|
├─ Visibility Sources
|
|
@@ -271,42 +159,25 @@ AppForge
|
|
|
271
159
|
│ └─ Exclusive Group Rule
|
|
272
160
|
├─ Debugger / Logger
|
|
273
161
|
└─ Vide Mount
|
|
274
|
-
```
|
|
275
162
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
## ⚠️ Notes
|
|
279
|
-
|
|
280
|
-
* Apps are **singletons per Forge**
|
|
281
|
-
* Rendering twice will warn if px is re‑initialized
|
|
282
|
-
* Rules are enforced **reactively**
|
|
283
|
-
* Debug logging is **Studio-only**
|
|
284
|
-
* This package is currently **alpha** — APIs may change
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## 🛣 Roadmap
|
|
163
|
+
⚠️ Notes
|
|
289
164
|
|
|
290
|
-
|
|
291
|
-
* [ ] Async app loading
|
|
292
|
-
* [ ] Better dev warnings
|
|
293
|
-
* [ ] Debug inspector
|
|
165
|
+
Apps are singletons per Forge
|
|
294
166
|
|
|
295
|
-
|
|
167
|
+
Rendering twice warns if px is re-initialized
|
|
296
168
|
|
|
297
|
-
|
|
169
|
+
Rules are reactive
|
|
298
170
|
|
|
299
|
-
|
|
171
|
+
Debug logging only runs in Studio
|
|
300
172
|
|
|
301
|
-
|
|
173
|
+
API is alpha — may change
|
|
302
174
|
|
|
303
|
-
|
|
304
|
-
* 🚧 **React renderer** exists but is **very early / experimental**
|
|
175
|
+
🛣 Roadmap
|
|
305
176
|
|
|
306
|
-
|
|
177
|
+
Better developer warnings
|
|
307
178
|
|
|
308
|
-
|
|
179
|
+
Debug inspector
|
|
309
180
|
|
|
310
|
-
|
|
181
|
+
📜 License
|
|
311
182
|
|
|
312
|
-
MIT
|
|
183
|
+
MIT
|
|
@@ -5,7 +5,7 @@ local TS = _G[script]
|
|
|
5
5
|
-- Hooks
|
|
6
6
|
local px = TS.import(script, script.Parent, "hooks", "usePx").px
|
|
7
7
|
-- Debug
|
|
8
|
-
local Logger = TS.import(script, script.Parent, "
|
|
8
|
+
local Logger = TS.import(script, script.Parent, "logger").default
|
|
9
9
|
local logger = Logger.new("AppRegistry")
|
|
10
10
|
local AppRegistry = {}
|
|
11
11
|
--[[
|
package/out/context.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ local TS = _G[script]
|
|
|
3
3
|
-- Components
|
|
4
4
|
local Contexts = TS.import(script, script.Parent.Parent, "context").default
|
|
5
5
|
-- Debug
|
|
6
|
-
local Logger = TS.import(script, script.Parent.Parent, "
|
|
6
|
+
local Logger = TS.import(script, script.Parent.Parent, "logger").default
|
|
7
7
|
local logger = Logger.new("useAppContext")
|
|
8
8
|
local default = function()
|
|
9
9
|
local context = Contexts.App()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local cleanup = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).cleanup
|
|
4
4
|
-- Debug
|
|
5
|
-
local Logger = TS.import(script, script.Parent.Parent, "
|
|
5
|
+
local Logger = TS.import(script, script.Parent.Parent, "logger").default
|
|
6
6
|
local logger = Logger.new("useEventListener")
|
|
7
7
|
local connect = function(event, callback)
|
|
8
8
|
local _event = event
|
package/out/hooks/usePx.luau
CHANGED
|
@@ -7,7 +7,7 @@ local source = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).sou
|
|
|
7
7
|
-- Helpers
|
|
8
8
|
local useEventListener = TS.import(script, script.Parent, "useEventListener").useEventListener
|
|
9
9
|
-- Debug
|
|
10
|
-
local Logger = TS.import(script, script.Parent.Parent, "
|
|
10
|
+
local Logger = TS.import(script, script.Parent.Parent, "logger").default
|
|
11
11
|
local logger = Logger.new("usePx")
|
|
12
12
|
--* Default reference resolution for px calculations
|
|
13
13
|
local BASE_RESOLUTION = source(Vector2.new(1920, 1080))
|
package/out/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { App, Args } from "./
|
|
2
|
-
export { default as CreateForge } from "./
|
|
1
|
+
export { App, Args } from "./appRegistry";
|
|
2
|
+
export { default as CreateForge } from "./mount";
|
|
3
3
|
export type { ForgeProps, ClassProps, RenderProps, } from "./types";
|
|
4
4
|
export { default as useAppContext } from "./hooks/useAppContext";
|
|
5
5
|
export { default as Contexts } from "./context";
|
package/out/init.luau
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
4
|
-- Decorators
|
|
5
|
-
local
|
|
6
|
-
exports.App =
|
|
7
|
-
exports.Args =
|
|
5
|
+
local _appRegistry = TS.import(script, script, "appRegistry")
|
|
6
|
+
exports.App = _appRegistry.App
|
|
7
|
+
exports.Args = _appRegistry.Args
|
|
8
8
|
-- Creators
|
|
9
|
-
exports.CreateForge = TS.import(script, script, "
|
|
9
|
+
exports.CreateForge = TS.import(script, script, "mount").default
|
|
10
10
|
-- Types
|
|
11
11
|
exports.useAppContext = TS.import(script, script, "hooks", "useAppContext").default
|
|
12
12
|
exports.Contexts = TS.import(script, script, "context").default
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Vide from "@rbxts/vide";
|
|
2
|
-
import Renders from "./
|
|
2
|
+
import Renders from "./renderManager";
|
|
3
|
+
import Debugger from "./debugger";
|
|
4
|
+
import Logger from "./logger";
|
|
3
5
|
import Types from "./types";
|
|
4
|
-
import { Logger, Debugger } from "./debug";
|
|
5
6
|
type Destructor = () => void;
|
|
6
7
|
type Loaded = {
|
|
7
8
|
container: Vide.Node;
|
|
@@ -26,7 +27,7 @@ export default class AppForge extends Renders {
|
|
|
26
27
|
open(name: AppNames, rules?: boolean): void;
|
|
27
28
|
close(name: AppNames, rules?: boolean): void;
|
|
28
29
|
toggle(name: AppNames, rules?: boolean): void;
|
|
29
|
-
story(props: AppProps,
|
|
30
|
+
story(props: AppProps, target: GuiObject, render?: Types.Props.Render): Frame;
|
|
30
31
|
mount(node: Vide.Node, props: Types.Props.Main, target: Instance): Destructor;
|
|
31
32
|
unMount(): void;
|
|
32
33
|
}
|
|
@@ -12,13 +12,11 @@ local mount = _vide.mount
|
|
|
12
12
|
local source = _vide.source
|
|
13
13
|
local untrack = _vide.untrack
|
|
14
14
|
-- Classes
|
|
15
|
-
local Renders = TS.import(script, script.Parent, "
|
|
15
|
+
local Renders = TS.import(script, script.Parent, "renderManager").default
|
|
16
16
|
-- Helpers
|
|
17
|
-
local AppRegistry = TS.import(script, script.Parent, "
|
|
18
|
-
|
|
19
|
-
local
|
|
20
|
-
local Logger = _debug.Logger
|
|
21
|
-
local Debugger = _debug.Debugger
|
|
17
|
+
local AppRegistry = TS.import(script, script.Parent, "appRegistry").AppRegistry
|
|
18
|
+
local Debugger = TS.import(script, script.Parent, "debugger").default
|
|
19
|
+
local Logger = TS.import(script, script.Parent, "logger").default
|
|
22
20
|
local AppForge
|
|
23
21
|
do
|
|
24
22
|
local super = Renders
|
|
@@ -65,7 +63,7 @@ do
|
|
|
65
63
|
if _sources[_name_1] ~= nil then
|
|
66
64
|
return nil
|
|
67
65
|
end
|
|
68
|
-
local
|
|
66
|
+
local _debug = self.debug
|
|
69
67
|
local _exp = name
|
|
70
68
|
local _object = {}
|
|
71
69
|
local _left = "default"
|
|
@@ -74,7 +72,7 @@ do
|
|
|
74
72
|
_condition = false
|
|
75
73
|
end
|
|
76
74
|
_object[_left] = _condition
|
|
77
|
-
|
|
75
|
+
_debug:logTag("state", _exp, "Creating visibility source", _object)
|
|
78
76
|
local _sources_1 = self.sources
|
|
79
77
|
local _exp_1 = name
|
|
80
78
|
local _condition_1 = app.visible
|
|
@@ -263,7 +261,7 @@ do
|
|
|
263
261
|
end
|
|
264
262
|
self:set(name, not self:getSource(name)(), rules)
|
|
265
263
|
end
|
|
266
|
-
function AppForge:story(props,
|
|
264
|
+
function AppForge:story(props, target, render)
|
|
267
265
|
self.debug:logTag("lifecycle", "story", "Creating story mount")
|
|
268
266
|
local Container = create("Frame")({
|
|
269
267
|
Name = "Story Container",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Vide from "@rbxts/vide";
|
|
2
|
-
import type Types from "
|
|
3
|
-
import type AppForge from "
|
|
4
|
-
import Rules from "./
|
|
2
|
+
import type Types from "./types";
|
|
3
|
+
import type AppForge from "./mount";
|
|
4
|
+
import Rules from "./ruleEngine";
|
|
5
5
|
export default class Renders extends Rules {
|
|
6
6
|
protected anchored: Map<string, {
|
|
7
7
|
id: AppNames;
|
|
@@ -6,11 +6,11 @@ local apply = _vide.apply
|
|
|
6
6
|
local create = _vide.create
|
|
7
7
|
-- Types
|
|
8
8
|
-- Components
|
|
9
|
-
local AppRegistry = TS.import(script, script.Parent
|
|
9
|
+
local AppRegistry = TS.import(script, script.Parent, "appRegistry").AppRegistry
|
|
10
10
|
-- Hooks
|
|
11
|
-
local usePx = TS.import(script, script.Parent
|
|
11
|
+
local usePx = TS.import(script, script.Parent, "hooks", "usePx").usePx
|
|
12
12
|
-- Classes
|
|
13
|
-
local Rules = TS.import(script, script.Parent, "
|
|
13
|
+
local Rules = TS.import(script, script.Parent, "ruleEngine").default
|
|
14
14
|
local Renders
|
|
15
15
|
do
|
|
16
16
|
local super = Rules
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type AppForge from "
|
|
1
|
+
import type AppForge from "../mount";
|
|
2
2
|
export default function ExclusiveGroupRule(entry: AppNames, forge: AppForge): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
-- Types
|
|
4
4
|
-- Components
|
|
5
|
-
local AppRegistry = TS.import(script, script.Parent.Parent
|
|
5
|
+
local AppRegistry = TS.import(script, script.Parent.Parent, "appRegistry").AppRegistry
|
|
6
6
|
local function ExclusiveGroupRule(entry, forge)
|
|
7
7
|
local _entry = entry
|
|
8
8
|
local entryApp = AppRegistry[_entry]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import type AppForge from "../mount";
|
|
2
|
+
import type Types from "../types";
|
|
3
3
|
export default class Rules {
|
|
4
4
|
protected processing: Set<string>;
|
|
5
5
|
protected renderRules(this: AppForge, name: AppNames, props: Types.Props.Main): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
-- Types
|
|
4
4
|
-- Components
|
|
5
|
-
local AppRegistry = TS.import(script, script.Parent
|
|
5
|
+
local AppRegistry = TS.import(script, script.Parent, "appRegistry").AppRegistry
|
|
6
6
|
-- Rules
|
|
7
7
|
local ExclusiveGroupRule = TS.import(script, script, "exclusiveGroup").default
|
|
8
8
|
local ParentRule = TS.import(script, script, "parent").default
|
|
@@ -43,9 +43,9 @@ do
|
|
|
43
43
|
self:anchor(name, rules.parent, props)
|
|
44
44
|
end
|
|
45
45
|
-- Index
|
|
46
|
-
if rules.
|
|
47
|
-
self.debug:logTag("rules", name, "Applying ZIndex", rules.
|
|
48
|
-
self:index(name, rules.
|
|
46
|
+
if rules.zIndex ~= nil then
|
|
47
|
+
self.debug:logTag("rules", name, "Applying ZIndex", rules.zIndex)
|
|
48
|
+
self:index(name, rules.zIndex)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
function Rules:checkRules(name)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type AppForge from "
|
|
1
|
+
import type AppForge from "../mount";
|
|
2
2
|
export default function ParentRule(entry: AppNames, forge: AppForge): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
-- Types
|
|
4
4
|
-- Components
|
|
5
|
-
local AppRegistry = TS.import(script, script.Parent.Parent
|
|
5
|
+
local AppRegistry = TS.import(script, script.Parent.Parent, "appRegistry").AppRegistry
|
|
6
6
|
local function ParentRule(entry, forge)
|
|
7
7
|
local entryVisible = forge:getSource(entry)()
|
|
8
8
|
-- ▼ ReadonlyMap.forEach ▼
|
package/out/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Types
|
|
2
|
-
import type { Args } from "./
|
|
3
|
-
import type AppForge from "./
|
|
2
|
+
import type { Args } from "./appRegistry";
|
|
3
|
+
import type AppForge from "./mount";
|
|
4
4
|
|
|
5
5
|
declare namespace Types {
|
|
6
6
|
namespace Props {
|
|
@@ -68,12 +68,12 @@ declare namespace Types {
|
|
|
68
68
|
|
|
69
69
|
export type Static = {
|
|
70
70
|
exclusiveGroup?: string;
|
|
71
|
-
|
|
71
|
+
zIndex?: number;
|
|
72
72
|
} & (WithParent<string> | WithoutParent);
|
|
73
73
|
|
|
74
74
|
export type Generic<N extends AppNames = AppNames> = {
|
|
75
75
|
exclusiveGroup?: AppGroups;
|
|
76
|
-
|
|
76
|
+
zIndex?: number;
|
|
77
77
|
} & (WithParent<Exclude<AppNames, N>> | WithoutParent);
|
|
78
78
|
}
|
|
79
79
|
}
|
package/package.json
CHANGED
package/out/debug/index.d.ts
DELETED
package/out/debug/init.luau
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|