diff --git a/src/lib/components/refactor/ComposerCharly.svelte b/src/lib/components/refactor/ComposerCharly.svelte new file mode 100644 index 0000000..2347aac --- /dev/null +++ b/src/lib/components/refactor/ComposerCharly.svelte @@ -0,0 +1,52 @@ + + +{#if isStoreLoaded} +
+

+ {#if $store.title}{$store.title}{/if} +

+

+ {#if $store.description}{$store.description}{/if} +

+

Wallet Address

+ {#if $store.pkpWallet} +

{$store.pkpWallet.address}

+ {/if} + +

store: hello (init default)

+ {#if $store.hello}{$store.hello}{/if} +

map: hello2 : "@hello:helloMapMe"

+ {#if $store.hello2}{$store.hello2}{/if} + +

map: "todos": "@data:queryTodos"

+ {#if $store.todos} +
+ {#each $store.todos as todo} +
+ +
{todo.text}
+
+
+ {/each} +
+ {/if} +
+{:else} +
+

Loading...

+
+{/if} diff --git a/src/lib/components/refactor/ComposerWrap.svelte b/src/lib/components/refactor/ComposerWrap.svelte new file mode 100644 index 0000000..f52b440 --- /dev/null +++ b/src/lib/components/refactor/ComposerWrap.svelte @@ -0,0 +1,107 @@ + + + diff --git a/src/lib/core/refactor/Composer.svelte b/src/lib/core/refactor/Composer.svelte index 27f2c92..1bd2670 100644 --- a/src/lib/core/refactor/Composer.svelte +++ b/src/lib/core/refactor/Composer.svelte @@ -2,7 +2,7 @@ import { onDestroy } from 'svelte'; import Composer from './Composer.svelte'; import FallBack from './FallBack.svelte'; - import components from '$lib/core/componentLoader'; + import components from './componentLoader'; import services from '$lib/core/servicesLoader'; import { dataStore } from '$lib/core/dataLoader'; import { createComposerStore, getComposerStore } from './composerStores'; diff --git a/src/lib/core/refactor/ComposerComponent.svelte b/src/lib/core/refactor/ComposerComponent.svelte new file mode 100644 index 0000000..65c10c6 --- /dev/null +++ b/src/lib/core/refactor/ComposerComponent.svelte @@ -0,0 +1,16 @@ + + + + diff --git a/src/lib/core/refactor/componentLoader.ts b/src/lib/core/refactor/componentLoader.ts new file mode 100644 index 0000000..bf61f76 --- /dev/null +++ b/src/lib/core/refactor/componentLoader.ts @@ -0,0 +1,10 @@ +import componentNames from 'virtual:components-list'; + +const components = {}; + +componentNames.forEach(path => { + const name = path.split('/').pop(); // Extract just the file name from the path + components[name] = () => import( /* @vite-ignore */ `/src/lib/components/${path}.svelte`); +}); + +export default components; \ No newline at end of file diff --git a/src/routes/composer/+page.svelte b/src/routes/composer/+page.svelte index 03bc9ca..2785c63 100644 --- a/src/routes/composer/+page.svelte +++ b/src/routes/composer/+page.svelte @@ -1,59 +1,5 @@ - + diff --git a/src/routes/helloearth/+page.svelte b/src/routes/helloearth/+page.svelte index eacbac0..9f43e40 100644 --- a/src/routes/helloearth/+page.svelte +++ b/src/routes/helloearth/+page.svelte @@ -11,12 +11,11 @@ }, layout: { areas: ` - "main aside" "main aside" "footer footer"; `, columns: '1fr 1fr', - rows: '1fr 1fr auto' + rows: '1fr auto' }, children: [ {