This is kindof annoying with all of the other stuff you have to do. Need to change it. We need some magic 🪄
There are a couple of ways we can do this.
I'm thinking that components in packages can have a special field added to them if they are a gradio component and we can autogenerate everything. Then the process of adding a new component to core will just be a case of adding a new package with this fields, respecting the documented structure and nothing else.
The alternative is adding a method (which we'll need for custom components anyway), something like register` would be magical but requires more work for devs and could introduce more tooling issues (typescript in particular).
This will need some TS declaration files either way I think.
Currently we register each component like this:
This is kindof annoying with all of the other stuff you have to do. Need to change it. We need some magic 🪄
There are a couple of ways we can do this.
I'm thinking that components in packages can have a special field added to them if they are a gradio component and we can autogenerate everything. Then the process of adding a new component to core will just be a case of adding a new package with this fields, respecting the documented structure and nothing else.
The alternative is adding a method (which we'll need for custom components anyway), something like register` would be magical but requires more work for devs and could introduce more tooling issues (typescript in particular).
This will need some TS declaration files either way I think.