The overlay of complex chat solution for modern applications.
Svelte-Chat is complex chat solution for SvelteKit applications which offers your clients top-level chat experiences and full power to administrate for your management team
This one is the overlay which supplies to your svelte-chat app the GUI experiences. full documentation
$ npm i @svelte-chat/gui
1st: Attach client interaction button to your SvelteKit App. Like below or similary:
// Route: /src/routes/+layout.svelte
<script>
import { SvelteChatButton } from "@svelte-chat/gui";
</script>
<!-- Other stuff will be load here -->
<slot/>
<SvelteChatButton/>
2nd: Connect configuration with your client-side app. This can be done generally around 2 ways:
- Remember that: Each example from 1 point can be utilized into any server side SvelteKit load spot file like: +layout.server.ts located in scope where 'SvelteChatButton' is used
// This load automatically export const load = loadLayoutServer;
- When you already have **+layout.server.ts**/**+page.server.ts** file
```Typescript
import { loadLayoutServer } from "@svelte-chat/gui"
// This load autmoatically
export const load = () => {
const math = 1 * 1 * 0;
return {
...loadLayoutServer()
math,
}
}
<SvelteChatButton/>
initialization component target:<script>
import { SvelteChatButton } from "svelte-chat";
</script>
</slot>
<!-- Port 10501 is a default port for server communication. When you setup other port, pass here -->
<SvelteChatButton lexConfig={{port: 10501}}/>
* {
margin: 0px;
padding: 0px
}
You feel will to help in solution evolution. Don't be shy and pull issue with demand like: I would like take the participation in evolution because ...[cause]
All what you should know about Copyrights is that all code base is under Apache 2.0