@rbxts/app-forge 0.7.2-prototype.13 → 0.7.2-prototype.15

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.
@@ -25,7 +25,12 @@ local function App(props)
25
25
  _result = _result[_condition] ~= nil
26
26
  end
27
27
  if _result then
28
- error(`Duplicate registered App name "{props.name} in same Group name {props.group}". ` .. `App names must be globally unique.`, 2)
28
+ local _exp = props.name
29
+ local _condition = props.group
30
+ if not (_condition ~= "" and _condition) then
31
+ _condition = "None"
32
+ end
33
+ error(`Duplicate registered App name "{_exp} in same Group name {_condition}". ` .. `App names must be globally unique.`, 2)
29
34
  end
30
35
  local _value = props.name
31
36
  if not (_value ~= "" and _value) then
@@ -43,13 +48,18 @@ local function App(props)
43
48
  if not (_condition ~= "" and _condition) then
44
49
  _condition = "None"
45
50
  end
46
- local _arg1 = {
51
+ local _object = {
47
52
  constructor = constructor,
48
- renderGroup = props.group,
49
- visible = props.visible,
50
- rules = props.rules,
51
53
  }
52
- _result_1[_condition] = _arg1
54
+ local _left = "renderGroup"
55
+ local _condition_1 = props.group
56
+ if not (_condition_1 ~= "" and _condition_1) then
57
+ _condition_1 = "None"
58
+ end
59
+ _object[_left] = _condition_1
60
+ _object.visible = props.visible
61
+ _object.rules = props.rules
62
+ _result_1[_condition] = _object
53
63
  end
54
64
  return constructor
55
65
  end
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,11 +30,68 @@ 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
72
+ end
73
+ end
74
+ function Renders:getGroupEntries(group)
75
+ local entries
76
+ -- ▼ ReadonlyMap.forEach ▼
77
+ local _callback = function(regGroupEntries, regGroup)
78
+ if group ~= regGroup then
79
+ return nil
80
+ end
81
+ entries = regGroupEntries
37
82
  end
83
+ for _k, _v in AppRegistry do
84
+ _callback(_v, _k, AppRegistry)
85
+ end
86
+ -- ▲ ReadonlyMap.forEach ▲
87
+ return entries
88
+ end
89
+ function Renders:createRender(forge, name, group)
90
+ local entry = getAppEntry(forge, name, group)
91
+ print(entry)
92
+ return nil
93
+ end
94
+ function Renders:getChildren()
38
95
  end
39
96
  function Renders:initalize(props, target, root)
40
97
  if not self.__px then
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.13",
3
+ "version": "0.7.2-prototype.15",
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",