@rbxts/app-forge 0.7.2-prototype.14 → 0.7.2-prototype.16

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 CHANGED
@@ -1,9 +1,18 @@
1
1
  import Vide from "@rbxts/vide";
2
2
  import type Types from "./types";
3
3
  import Rules from "./ruleEngine";
4
+ type Render = {
5
+ instance: Instance;
6
+ container: Instance;
7
+ };
4
8
  export default class Renders extends Rules {
5
9
  private __px;
10
+ protected Rendered: Map<string, Map<string, Render>>;
6
11
  constructor();
7
- Render: (props: Types.Props.Main) => void;
12
+ Render: (props: Types.Props.Main) => Instance[];
13
+ private getGroupEntries;
14
+ private createRender;
15
+ private getChildren;
8
16
  protected initalize(props: Types.Props.Main, target?: GuiObject | Instance, root?: GuiObject | Instance): Vide.Node;
9
17
  }
18
+ export {};
package/out/renders.luau CHANGED
@@ -6,13 +6,13 @@ local Vide = _vide
6
6
  local mount = _vide.mount
7
7
  -- Types
8
8
  -- Components
9
- local _appRegistry = TS.import(script, script.Parent, "appRegistry")
10
- local AppRegistry = _appRegistry.AppRegistry
11
- local AppSources = _appRegistry.AppSources
9
+ local AppRegistry = TS.import(script, script.Parent, "appRegistry").AppRegistry
12
10
  -- Hooks
13
11
  local usePx = TS.import(script, script.Parent, "hooks", "usePx").usePx
14
12
  -- Classes
15
13
  local Rules = TS.import(script, script.Parent, "ruleEngine").default
14
+ -- Helpers
15
+ local getAppEntry = TS.import(script, script.Parent, "helpers", "getAppEntry").default
16
16
  local Renders
17
17
  do
18
18
  local super = Rules
@@ -30,12 +30,76 @@ do
30
30
  function Renders:constructor()
31
31
  super.constructor(self)
32
32
  self.__px = false
33
+ self.Rendered = {}
33
34
  self.Render = function(props)
34
35
  print(props)
35
- print(AppRegistry)
36
- print(AppSources)
36
+ local _result = props.renders
37
+ if _result ~= nil then
38
+ _result = _result.groups
39
+ end
40
+ if _result then
41
+ local _exp = props.renders.groups
42
+ -- ▼ ReadonlyArray.forEach ▼
43
+ local _callback = function(group)
44
+ local groupEntries = self:getGroupEntries(group)
45
+ print(groupEntries)
46
+ end
47
+ for _k, _v in _exp do
48
+ _callback(_v, _k - 1, _exp)
49
+ end
50
+ -- ▲ ReadonlyArray.forEach ▲
51
+ end
52
+ local rendered = {}
53
+ local _exp = self.Rendered
54
+ -- ▼ ReadonlyMap.forEach ▼
55
+ local _callback = function(entries)
56
+ -- ▼ ReadonlyMap.forEach ▼
57
+ local _callback_1 = function(entry)
58
+ print("Rendering Entry", entry)
59
+ local _container = entry.container
60
+ table.insert(rendered, _container)
61
+ end
62
+ for _k, _v in entries do
63
+ _callback_1(_v, _k, entries)
64
+ end
65
+ -- ▲ ReadonlyMap.forEach ▲
66
+ end
67
+ for _k, _v in _exp do
68
+ _callback(_v, _k, _exp)
69
+ end
70
+ -- ▲ ReadonlyMap.forEach ▲
71
+ return rendered
37
72
  end
38
73
  end
74
+ function Renders:getGroupEntries(group)
75
+ local entries
76
+ -- ▼ ReadonlyMap.forEach ▼
77
+ local _callback = function(regGroupEntries, _)
78
+ -- ▼ ReadonlyMap.forEach ▼
79
+ local _callback_1 = function(_, regGroup)
80
+ if group ~= regGroup then
81
+ return nil
82
+ end
83
+ entries = regGroupEntries
84
+ end
85
+ for _k, _v in regGroupEntries do
86
+ _callback_1(_v, _k, regGroupEntries)
87
+ end
88
+ -- ▲ ReadonlyMap.forEach ▲
89
+ end
90
+ for _k, _v in AppRegistry do
91
+ _callback(_v, _k, AppRegistry)
92
+ end
93
+ -- ▲ ReadonlyMap.forEach ▲
94
+ return entries
95
+ end
96
+ function Renders:createRender(forge, name, group)
97
+ local entry = getAppEntry(forge, name, group)
98
+ print(entry)
99
+ return nil
100
+ end
101
+ function Renders:getChildren()
102
+ end
39
103
  function Renders:initalize(props, target, root)
40
104
  if not self.__px then
41
105
  local _result = props.config
package/out/types.d.ts CHANGED
@@ -4,12 +4,7 @@ import type AppForge from "./mount";
4
4
 
5
5
  declare namespace Types {
6
6
  namespace Props {
7
- type Render =
8
- | { name?: AppNames; names?: never; group?: never }
9
- | { names?: AppNames[]; name?: never; group?: never }
10
- | { group?: AppGroups[] | AppGroups; names?: AppNames[]; name?: never }
11
- | { group?: AppGroups[] | AppGroups; name?: AppNames; names?: never }
12
- | { group?: AppGroups[] | AppGroups; names?: never; name?: never };
7
+ type Render = { name?: AppNames; names?: AppNames[]; group?: AppGroups; groups?: AppGroups[] };
13
8
 
14
9
  type Main = {
15
10
  props: AppProps;
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@rbxts/app-forge",
3
- "version": "0.7.2-prototype.14",
3
+ "version": "0.7.2-prototype.16",
4
4
  "description": "An App Manager for Vide",
5
5
  "main": "out/init.lua",
6
6
  "types": "out/index.d.ts",
7
7
  "packageManager": "bun@1.3.1",
8
+
8
9
  "scripts": {
9
10
  "build": "rbxtsc",
10
11
  "dev": "rbxtsc -w --type game --rojo test.project.json",
11
12
  "login": "bunx npm login --auth-type=legacy"
12
13
  },
14
+
13
15
  "keywords": [
14
16
  "roblox-ts",
15
17
  "react",
@@ -17,6 +19,7 @@
17
19
  ],
18
20
  "author": "loner1536",
19
21
  "license": "MIT",
22
+
20
23
  "repository": {
21
24
  "type": "git",
22
25
  "url": "https://github.com/Loner1536/AppForge"
@@ -24,15 +27,18 @@
24
27
  "bugs": {
25
28
  "url": "https://github.com/Loner1536/AppForge/issues"
26
29
  },
30
+
27
31
  "files": [
28
32
  "out",
29
33
  "!**/*.tsbuildinfo",
30
34
  "!**/*.spec.lua",
31
35
  "!**/*.spec.d.ts"
32
36
  ],
37
+
33
38
  "publishConfig": {
34
39
  "access": "public"
35
40
  },
41
+
36
42
  "dependencies": {
37
43
  "@rbxts/set-timeout": "^1.1.2",
38
44
  "@rbxts/services": "^1.6.0",
@@ -43,6 +49,7 @@
43
49
  "optional": true
44
50
  }
45
51
  },
52
+
46
53
  "devDependencies": {
47
54
  "@rbxts/compiler-types": "3.0.0-types.0",
48
55
  "@biomejs/biome": "^2.3.7",