accomadesc 0.3.7 → 0.3.9

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.
@@ -16,7 +16,7 @@
16
16
  import { page } from '$app/state';
17
17
  import Button from './basic/Button.svelte';
18
18
  import { onMount } from 'svelte';
19
- import { fallbackCSS } from './style';
19
+ import { fallbackCSS } from './style.js';
20
20
 
21
21
  let {
22
22
  hero,
@@ -27,6 +27,7 @@
27
27
  content,
28
28
  nav,
29
29
  css,
30
+ selectedTheme = $bindable('light'),
30
31
  showFooter = true,
31
32
  footerRef = 'footer_html',
32
33
  fixedHamburger = true,
@@ -60,21 +61,20 @@
60
61
  }
61
62
  };
62
63
 
63
- let selectedTheme = $state('light');
64
64
  onMount(() => {
65
65
  if (window) {
66
66
  const prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)');
67
67
  if (prefersDarkMode) {
68
- theme = 'dark';
68
+ selectedTheme = 'dark';
69
69
  }
70
70
  }
71
71
  });
72
72
 
73
- let theme = $state(fallbackCSS);
73
+ let theme = $state(fallbackCSS.themes.light);
74
74
  $effect(() => {
75
- if (selectedTheme == 'light') {
75
+ if (!!css && selectedTheme == 'light') {
76
76
  theme = css?.themes.light;
77
- } else if (selectedTheme == 'dark') {
77
+ } else if (!!css && selectedTheme == 'dark') {
78
78
  theme = css?.themes.dark;
79
79
  }
80
80
  });
@@ -241,7 +241,6 @@
241
241
  div.section-wrapper {
242
242
  margin-bottom: 2rem;
243
243
  width: 100%;
244
- overflow-y: clip;
245
244
  display: flex;
246
245
  flex-direction: column;
247
246
  align-items: center;
@@ -1,5 +1,5 @@
1
1
  import { type PageProps, type I18nFacade } from './types.js';
2
2
  type $$ComponentProps = PageProps & I18nFacade;
3
- declare const PageComponent: import("svelte").Component<$$ComponentProps, {}, "">;
3
+ declare const PageComponent: import("svelte").Component<$$ComponentProps, {}, "selectedTheme">;
4
4
  type PageComponent = ReturnType<typeof PageComponent>;
5
5
  export default PageComponent;
package/dist/types.d.ts CHANGED
@@ -363,6 +363,7 @@ export interface PageProps {
363
363
  footerRef?: string;
364
364
  fixedHamburger?: boolean;
365
365
  navbarOverHamburger?: boolean;
366
+ selectedTheme: 'light' | 'dark';
366
367
  content?: Section[];
367
368
  }
368
369
  export interface NavItem {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accomadesc",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build --minify false && npm run package",