@rbxts/app-forge 0.1.9 → 0.2.1

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 CHANGED
@@ -110,6 +110,12 @@ export default class SideButtons extends Args {
110
110
  this.Forge // This is the AppForge Manager Created
111
111
  this.name // The Name given on Element Creation
112
112
  this.props // Props passed through Render
113
+ this.bind // This is the visible Bind
114
+
115
+ // Also I added px into the this.props table for you just requires my other lib so you can do this
116
+ const { px } = this.props
117
+
118
+ px.map((s) => (1 * s))
113
119
  ```
114
120
 
115
121
  You never manually `new` apps — AppForge constructs them automatically.
@@ -7,11 +7,12 @@ export declare const AppRegistry: Map<string, Types.AppRegistry>;
7
7
  export declare function App(props: Types.AppRegistryProps): <T extends new (props: Types.MainProps) => Args>(constructor: T) => T;
8
8
  export declare abstract class Args {
9
9
  readonly Forge: AppForge;
10
+ readonly props: AppProps & {
11
+ px: ReturnType<typeof usePx>;
12
+ };
10
13
  readonly root: ReactRoblox.Root | undefined;
11
- readonly props: AppProps;
12
- readonly name: AppNames[number];
13
14
  readonly bind: React.Binding<boolean>;
14
- readonly px: ReturnType<typeof usePx>;
15
+ readonly name: AppNames[number];
15
16
  constructor(props: Types.MainProps);
16
17
  abstract render(): JSX.Element;
17
18
  }
@@ -33,12 +33,15 @@ do
33
33
  if not (name ~= "" and name) then
34
34
  error("App name is required in Args constructor")
35
35
  end
36
+ local px = usePx(target)
36
37
  self.Forge = forge
37
38
  self.root = root
38
- self.props = props
39
+ local _object = table.clone(props)
40
+ setmetatable(_object, nil)
41
+ _object.px = px
42
+ self.props = _object
39
43
  self.name = name
40
44
  self.bind = forge:getBind(name)
41
- self.px = usePx(target)
42
45
  end
43
46
  end
44
47
  return {
package/out/types.d.ts CHANGED
@@ -10,8 +10,8 @@ declare namespace Types {
10
10
  };
11
11
 
12
12
  type MainProps = (
13
- | { name: AppNames[number]; names?: undefined }
14
- | { names: AppNames[number][]; name?: undefined }
13
+ | { name?: AppNames[number]; names?: undefined }
14
+ | { names?: AppNames[number][]; name?: undefined }
15
15
  ) & {
16
16
  props: AppProps;
17
17
  forge: AppForge;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/app-forge",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "An App Manager for react",
5
5
  "main": "out/init.lua",
6
6
  "packageManager": "bun@1.3.1",