- {#each $store.messages as message}
-
-
-
{message.text}
+{#if $me.store.messages}
+
+
+ {#each $me.store.messages as message}
+
+ {#if message.composite}
+
+
- {#if message.composite}
-
-
-
- {/if}
- {/each}
-
-
- {/if}
+ {/if}
+ {/each}
+
+
{:else}
Loading...
{/if}
diff --git a/src/lib/components/Terminal.svelte b/src/lib/components/Terminal.svelte
index 8334d19..fc7b077 100644
--- a/src/lib/components/Terminal.svelte
+++ b/src/lib/components/Terminal.svelte
@@ -27,7 +27,6 @@
}
}
- // Sending message logic
function sendMessage(text) {
if (text && text.trim() !== '') {
const message = {
diff --git a/src/lib/components/examples/Flows.svelte b/src/lib/components/cleanup/Flows.svelte
similarity index 100%
rename from src/lib/components/examples/Flows.svelte
rename to src/lib/components/cleanup/Flows.svelte
diff --git a/src/lib/components/examples/Recipies.svelte b/src/lib/components/cleanup/Recipies.svelte
similarity index 97%
rename from src/lib/components/examples/Recipies.svelte
rename to src/lib/components/cleanup/Recipies.svelte
index 38db8b8..1ee4978 100644
--- a/src/lib/components/examples/Recipies.svelte
+++ b/src/lib/components/cleanup/Recipies.svelte
@@ -1,4 +1,4 @@
-
+
+
diff --git a/src/lib/components/refactor/ComposerQueries.svelte b/src/lib/components/refactor/ComposerQueries.svelte
index b6ca4ab..17889e1 100644
--- a/src/lib/components/refactor/ComposerQueries.svelte
+++ b/src/lib/components/refactor/ComposerQueries.svelte
@@ -1,16 +1,5 @@
@@ -18,19 +7,16 @@
My ID is: {$me.id}
My state is: {$me.state}
+ Todo Query:
{#if $me.store.todos}
{#each $me.store.todos as todo}
{todo.text}
{/each}
{/if}
-
+
+ Messages Query:
{#if $me.store.messages}
{#each $me.store.messages as message}
{message.text}
diff --git a/src/lib/core/Composite.svelte b/src/lib/core/Composite.svelte
deleted file mode 100644
index a657845..0000000
--- a/src/lib/core/Composite.svelte
+++ /dev/null
@@ -1,250 +0,0 @@
-
-
-
- {#if composite?.servicesLoaded}
- {#await loadComponentAndService(composite) then Component}
-
- {/await}
- {/if}
- {#if composite?.children}
- {#each composite.children as child (child.id)}
-
- {#if child.servicesLoaded}
- {#await loadComponentAndService(child) then ChildComponent}
-
- {#if child.children && child.children.length}
-
- {/if}
- {/await}
- {/if}
-
- {/each}
- {/if}
-
diff --git a/src/lib/core/FallBack.svelte b/src/lib/core/FallBack.svelte
deleted file mode 100644
index c4fb85e..0000000
--- a/src/lib/core/FallBack.svelte
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/core/componentLoader.ts b/src/lib/core/componentLoader.ts
deleted file mode 100644
index bf61f76..0000000
--- a/src/lib/core/componentLoader.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-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/lib/core/compositeStores.ts b/src/lib/core/compositeStores.ts
deleted file mode 100644
index 7e586c0..0000000
--- a/src/lib/core/compositeStores.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { writable } from 'svelte/store';
-
-const compositeStores = new Map();
-
-// Create or retrieve a composite store
-export function createCompositeStore(compositeId: string, initialState = {}) {
- if (!compositeStores.has(compositeId)) {
- compositeStores.set(compositeId, writable(initialState));
- }
- return compositeStores.get(compositeId);
-}
-
-// Get composite store or create a default empty one if not exists
-export function getCompositeStore(compositeId: string) {
- return compositeStores.get(compositeId) || createCompositeStore(compositeId);
-}
diff --git a/src/lib/core/coreServices.ts b/src/lib/core/coreServices.ts
deleted file mode 100644
index ea5334d..0000000
--- a/src/lib/core/coreServices.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-// coreServices.ts
-import { getCompositeStore } from './compositeStores';
-
-export const coreServices = {
- updateComposite: (mappings: Record) => {
- for (const [mappingString, value] of Object.entries(mappings)) {
- const [storeID, key] = mappingString.replace('@', '').split(':');
- const store = getCompositeStore(storeID);
- store.update(storeData => {
- storeData[key] = value;
- return storeData;
- });
- }
- },
- subscribeComposite: (mappingString: string) => {
- const [storeID] = mappingString.replace('@', '').split(':');
- const store = getCompositeStore(storeID);
- return store;
- },
- testAlert: () => {
- alert("core service alert")
- }
-};
diff --git a/src/lib/core/dataLoader.ts b/src/lib/core/dataLoader.ts
deleted file mode 100644
index d537c26..0000000
--- a/src/lib/core/dataLoader.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// dataLoader.ts
-import { writable } from 'svelte/store';
-import dataSources from 'virtual:data-sources-list';
-
-// The store that holds the data sets
-export const dataStore = writable({});
-
-// Dynamically import the data modules and assign them to the store
-dataSources.forEach(src => {
- import(`/src/lib/data/${src}.ts`).then(module => {
- // Here, explicitly extract the required data or function from the module
- const moduleData = module[src] || module.default;
-
- dataStore.update(store => ({ ...store, [src]: moduleData }));
- });
-});
\ No newline at end of file
diff --git a/src/lib/core/refactor/Composer.svelte b/src/lib/core/refactor/Composer.svelte
index f45ee75..f9e2c3c 100644
--- a/src/lib/core/refactor/Composer.svelte
+++ b/src/lib/core/refactor/Composer.svelte
@@ -1,7 +1,7 @@
-
+
+
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 6ebb823..de67d85 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,11 +1,11 @@
-
+
diff --git a/src/routes/composer/+page.svelte b/src/routes/composer/+page.svelte
index 5f398bb..b735bf4 100644
--- a/src/routes/composer/+page.svelte
+++ b/src/routes/composer/+page.svelte
@@ -6,75 +6,28 @@
let composer = {
id: 'ComposerParent',
layout: {
- columns: '1fr 1fr',
+ rows: '1fr auto',
areas: `
- "left right"
+ "main"
+ "bottom"
`
},
children: [
{
- id: 'ComposerQueries',
- component: 'ComposerQueries',
- slot: 'right',
+ id: 'ComposerOverview',
+ component: 'ComposerOverview',
+ slot: 'main',
data: {
map: {
todos: queryTodos,
messages: queryMessages
}
- },
- machine: {
- initial: 'LOADING',
- states: {
- LOADING: {
- on: {
- TOGGLE: {
- target: 'READY'
- }
- }
- },
- READY: {
- on: {
- TOGGLE: {
- target: 'LOADING'
- }
- }
- }
- }
}
},
{
- id: 'ComposerForm',
- component: 'ComposerForm',
- slot: 'left',
- machine: {
- id: 'validation',
- initial: 'notValidated',
- context: {
- isValidated: false
- },
- states: {
- notValidated: {
- on: {
- VALIDATE: {
- target: 'isValidated',
- actions: 'setValidated'
- }
- }
- },
- isValidated: {
- on: {
- INVALIDATE: {
- target: 'notValidated',
- actions: 'setNotValidated'
- }
- }
- }
- },
- services: {
- setValidated: (context) => (context.isValidated = true),
- setNotValidated: (context) => (context.isValidated = false)
- }
- }
+ id: 'terminal',
+ component: 'Terminal',
+ slot: 'bottom'
}
]
};
diff --git a/src/routes/composer/form/+page.svelte b/src/routes/composer/form/+page.svelte
new file mode 100644
index 0000000..5194479
--- /dev/null
+++ b/src/routes/composer/form/+page.svelte
@@ -0,0 +1,59 @@
+
+
+
diff --git a/src/routes/composer/queries/+page.svelte b/src/routes/composer/queries/+page.svelte
new file mode 100644
index 0000000..7adfdc8
--- /dev/null
+++ b/src/routes/composer/queries/+page.svelte
@@ -0,0 +1,55 @@
+
+
+
diff --git a/src/routes/composer/recipies/+page.svelte b/src/routes/composer/recipies/+page.svelte
new file mode 100644
index 0000000..9852609
--- /dev/null
+++ b/src/routes/composer/recipies/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/composer/stateToState/+page.svelte b/src/routes/composer/stateToState/+page.svelte
index ee1d48c..6e410fc 100644
--- a/src/routes/composer/stateToState/+page.svelte
+++ b/src/routes/composer/stateToState/+page.svelte
@@ -2,7 +2,7 @@
import Composer from '$lib/core/refactor/Composer.svelte';
let composer = {
- id: 'ComposerParent',
+ id: 'StateToStateContainer',
layout: {
rows: '1fr 1fr',
areas: `
diff --git a/src/routes/messages/+page.svelte b/src/routes/terminal/+page.svelte
similarity index 58%
rename from src/routes/messages/+page.svelte
rename to src/routes/terminal/+page.svelte
index bc35031..4f611fd 100644
--- a/src/routes/messages/+page.svelte
+++ b/src/routes/terminal/+page.svelte
@@ -1,7 +1,8 @@
-
+
diff --git a/src/routes/wallet/+page.svelte b/src/routes/wallet/+page.svelte
index f6bd1a7..7ab317e 100644
--- a/src/routes/wallet/+page.svelte
+++ b/src/routes/wallet/+page.svelte
@@ -1,7 +1,7 @@
-
+