fuma 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,7 @@ px prisma init --datasource-provider mysql
25
25
  mkdir -p ./src/lib/server
26
26
  source="https://raw.githubusercontent.com/peufo/fuma/main"
27
27
  curl "$source/prisma/schema.prisma" -o ./prisma/schema.prisma
28
- curl "$source/src/lib/server/prisma.ts" -o ./src/lib/server/prisma.ts
28
+ curl "$source/src/lib/private/prisma.ts" -o ./src/lib/server/prisma.ts
29
29
 
30
30
  echo "DATABASE_URL=\"mysql://$mysql_username@localhost:3306/$project_name\"" > .env
31
31
  cp .env .env.example
@@ -1,9 +1,19 @@
1
1
  <script lang="ts">
2
2
  import { browser } from '$app/environment'
3
3
  import { ModeWatcher, toggleMode, mode } from 'mode-watcher'
4
+ import { mdiWeatherNight, mdiWhiteBalanceSunny } from '@mdi/js'
4
5
 
5
6
  import { Icon } from '../icon/index.js'
6
- import { mdiWeatherNight, mdiWhiteBalanceSunny } from '@mdi/js'
7
+ import { onMount } from 'svelte'
8
+
9
+ let klass = ''
10
+ export { klass as class }
11
+
12
+ onMount(() => {
13
+ const [html] = document.getElementsByTagName('html')
14
+ if (!html || !$mode) return
15
+ html.setAttribute('data-theme', $mode)
16
+ })
7
17
 
8
18
  mode.subscribe((_mode) => {
9
19
  if (!browser) return
@@ -15,10 +25,10 @@
15
25
  $: path = $mode === 'light' ? mdiWhiteBalanceSunny : mdiWeatherNight
16
26
  </script>
17
27
 
18
- <ModeWatcher />
28
+ <ModeWatcher defaultMode="light" />
19
29
 
20
30
  <slot {toggleMode} {path}>
21
- <button class="btn btn-square btn-sm" on:click={toggleMode}>
31
+ <button class="btn btn-square btn-sm {klass}" on:click={toggleMode}>
22
32
  <Icon {path} />
23
33
  </button>
24
34
  </slot>
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import { toggleMode } from 'mode-watcher';
3
3
  declare const __propDef: {
4
4
  props: {
5
+ class?: string | undefined;
5
6
  children?: import("svelte").Snippet<[{
6
7
  toggleMode: typeof toggleMode;
7
8
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",