feat: move some implementations from the app setup to extensions instead
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com> Co-authored-by: Johan Haals <johan@haals.se> Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -25,7 +25,7 @@ const iconsDataRef = createExtensionDataRef<{
|
||||
export const IconBundleBlueprint = createExtensionBlueprint({
|
||||
kind: 'icon-bundle',
|
||||
namespace: 'app',
|
||||
attachTo: { id: 'app', input: 'icons' },
|
||||
attachTo: { id: 'api:icons', input: 'icons' },
|
||||
output: [iconsDataRef],
|
||||
config: {
|
||||
schema: {
|
||||
|
||||
@@ -29,7 +29,7 @@ const themeDataRef = createExtensionDataRef<AppTheme>().with({
|
||||
export const ThemeBlueprint = createExtensionBlueprint({
|
||||
kind: 'theme',
|
||||
namespace: 'app',
|
||||
attachTo: { id: 'app', input: 'themes' },
|
||||
attachTo: { id: 'api:app-theme', input: 'themes' },
|
||||
output: [themeDataRef],
|
||||
dataRefs: {
|
||||
theme: themeDataRef,
|
||||
|
||||
@@ -28,7 +28,7 @@ const translationDataRef = createExtensionDataRef<
|
||||
*/
|
||||
export const TranslationBlueprint = createExtensionBlueprint({
|
||||
kind: 'translation',
|
||||
attachTo: { id: 'app', input: 'translations' },
|
||||
attachTo: { id: 'api:translations', input: 'translations' },
|
||||
output: [translationDataRef],
|
||||
dataRefs: {
|
||||
translation: translationDataRef,
|
||||
|
||||
@@ -35,7 +35,7 @@ export function createComponentExtension<TProps extends {}>(options: {
|
||||
kind: 'component',
|
||||
namespace: options.ref.id,
|
||||
name: options.name,
|
||||
attachTo: { id: 'app', input: 'components' },
|
||||
attachTo: { id: 'api:components', input: 'components' },
|
||||
disabled: options.disabled,
|
||||
output: [createComponentExtension.componentDataRef],
|
||||
factory() {
|
||||
|
||||
Reference in New Issue
Block a user