From 2ca67e098118f6d42cdc4861dd9919a4586e285e Mon Sep 17 00:00:00 2001 From: Samuel Andert Date: Mon, 7 Aug 2023 17:51:14 +0200 Subject: [PATCH] Cleaning Up files --- .../Recipies/machines/recipeMachine.ts | 1 - src/lib/components/examples/HelloEarth.svelte | 52 -------------- src/lib/components/examples/UserForm.svelte | 69 ------------------- src/lib/components/maschines/SignIn.svelte | 50 -------------- src/lib/components/maschines/signInMachine.ts | 35 ---------- .../components/refactor/ComposerForm.svelte | 1 + .../components/refactor/ComposerGraph.svelte | 2 +- ...erCharly.svelte => ComposerQueries.svelte} | 0 src/lib/core/refactor/Composer.svelte | 6 +- src/lib/core/refactor/FallBack.svelte | 4 -- src/routes/composer/+page.svelte | 62 ++--------------- src/routes/{ => composer}/graphql/+page.gql | 0 src/routes/composer/graphql/+page.svelte | 44 ++++++++++++ src/routes/composer/stateToState/+page.svelte | 57 +++++++++++++++ src/routes/graphql/+page.svelte | 60 ---------------- 15 files changed, 110 insertions(+), 333 deletions(-) delete mode 100644 src/lib/components/examples/HelloEarth.svelte delete mode 100644 src/lib/components/examples/UserForm.svelte delete mode 100644 src/lib/components/maschines/SignIn.svelte delete mode 100644 src/lib/components/maschines/signInMachine.ts rename src/lib/components/refactor/{ComposerCharly.svelte => ComposerQueries.svelte} (100%) delete mode 100644 src/lib/core/refactor/FallBack.svelte rename src/routes/{ => composer}/graphql/+page.gql (100%) create mode 100644 src/routes/composer/graphql/+page.svelte create mode 100644 src/routes/composer/stateToState/+page.svelte delete mode 100644 src/routes/graphql/+page.svelte diff --git a/src/lib/components/Recipies/machines/recipeMachine.ts b/src/lib/components/Recipies/machines/recipeMachine.ts index 2798391..97a7ed4 100644 --- a/src/lib/components/Recipies/machines/recipeMachine.ts +++ b/src/lib/components/Recipies/machines/recipeMachine.ts @@ -1,6 +1,5 @@ // src/lib/components/Recipies/machines/authMachine.ts import { createMachine } from 'xstate'; -import { formMachine } from './formMachine'; export const recipeMachine = createMachine( { diff --git a/src/lib/components/examples/HelloEarth.svelte b/src/lib/components/examples/HelloEarth.svelte deleted file mode 100644 index 2347aac..0000000 --- a/src/lib/components/examples/HelloEarth.svelte +++ /dev/null @@ -1,52 +0,0 @@ - - -{#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/examples/UserForm.svelte b/src/lib/components/examples/UserForm.svelte deleted file mode 100644 index caf9b8e..0000000 --- a/src/lib/components/examples/UserForm.svelte +++ /dev/null @@ -1,69 +0,0 @@ - - -
-
- {#if $errors.name} - {$errors.name} - {:else} - - {/if} - - -
- -
- {#if $errors.email} - {$errors.email} - {:else} - - {/if} - - -
- - -
diff --git a/src/lib/components/maschines/SignIn.svelte b/src/lib/components/maschines/SignIn.svelte deleted file mode 100644 index 9f01321..0000000 --- a/src/lib/components/maschines/SignIn.svelte +++ /dev/null @@ -1,50 +0,0 @@ - - - -{#if $state.matches('notSignedIn')} - -{:else if $state.matches('email')} -
- - - {#if errors.email}{$errors.email}{/if} - -
-{:else if $state.matches('name')} -
- - - {#if errors.name}{$errors.name}{/if} - -
-{:else if $state.matches('signedIn')} - account signed in -{/if} diff --git a/src/lib/components/maschines/signInMachine.ts b/src/lib/components/maschines/signInMachine.ts deleted file mode 100644 index 5324dab..0000000 --- a/src/lib/components/maschines/signInMachine.ts +++ /dev/null @@ -1,35 +0,0 @@ -// src/lib/components/machines/SignInMachine.ts -import { createMachine, assign } from 'xstate'; - -export const SignInMachine = createMachine({ - id: 'signIn', - initial: 'notSignedIn', - context: { - email: '', - name: '' - }, - states: { - notSignedIn: { - on: { START: 'email' } - }, - email: { - on: { - NEXT: { - target: 'name', - actions: assign({ email: (_, event) => event.value }) - } - } - }, - name: { - on: { - NEXT: { - target: 'signedIn', - actions: assign({ name: (_, event) => event.value }) - } - } - }, - signedIn: { - type: 'final' - } - } -}); \ No newline at end of file diff --git a/src/lib/components/refactor/ComposerForm.svelte b/src/lib/components/refactor/ComposerForm.svelte index dda5c9f..275343c 100644 --- a/src/lib/components/refactor/ComposerForm.svelte +++ b/src/lib/components/refactor/ComposerForm.svelte @@ -70,6 +70,7 @@
+ My ID is: {$me.id}
My state is: {$me.state} {#if $successMessage}