Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 3699f57

Browse files
committed
chore: update @qwik.dev/core and @qwik.dev/router to beta versions, upgrade rollup to 4.41.1, and update peer dependencies
1 parent 02ddcd0 commit 3699f57

7 files changed

Lines changed: 285 additions & 88 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Enhance your Qwik development experience with DevTools that provide real-time in
66

77
## Installation
88

9-
> Qwik DevTools requires **Qwik v2.0.0-alpha.9 or higher**.
9+
> Qwik DevTools requires **Qwik v2.0.0-beta.1 or higher**.
1010
1111
```shell copy
1212
npm install @qwik.dev/devtools -D

packages/devtools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Enhance your Qwik development experience with DevTools that provide real-time in
66

77
## Installation
88

9-
> Qwik DevTools requires **Qwik v2.0.0-alpha.9 or higher**.
9+
> Qwik DevTools requires **Qwik v2.0.0-beta.1 or higher**.
1010
1111
```shell copy
1212
npm install @qwik.dev/devtools -D

packages/devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
],
2323
"peerDependencies": {
2424
"vite": "^6.2.6",
25-
"@qwik.dev/core": "^2.0.0-alpha.9",
26-
"@qwik.dev/router": "^2.0.0-alpha.9"
25+
"@qwik.dev/core": "^2.0.0-beta.1",
26+
"@qwik.dev/router": "^2.0.0-beta.1"
2727
},
2828
"dependencies": {
2929
"birpc": "^0.2.19",

packages/playgrounds/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"devDependencies": {
3030
"@devtools/plugin": "workspace:*",
3131
"@devtools/ui": "workspace:*",
32-
"@qwik.dev/core": "^2.0.0-alpha.9",
33-
"@qwik.dev/router": "^2.0.0-alpha.9",
32+
"@qwik.dev/core": "^2.0.0-beta.1",
33+
"@qwik.dev/router": "^2.0.0-beta.1",
3434
"@types/eslint": "8.56.10",
3535
"@types/node": "20.14.11",
3636
"@typescript-eslint/eslint-plugin": "7.16.1",

packages/ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"qwik": "qwik"
3535
},
3636
"peerDependencies": {
37-
"@qwik.dev/core": "^2.0.0-alpha.9",
37+
"@qwik.dev/core": "^2.0.0-beta.1",
3838
"@devtools/plugin": "workspace:*"
3939
},
4040
"devDependencies": {
4141
"@devtools/kit": "workspace:*",
42-
"@qwik.dev/react": "^2.0.0-alpha.9",
42+
"@qwik.dev/react": "^2.0.0-beta.1",
4343
"react-complex-tree": "^2.4.6",
4444
"@qwikest/icons": "^0.0.13",
4545
"@types/eslint": "8.56.10",

packages/ui/src/components/ThemeToggle/ThemeToggle.tsx

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import {
66
isServer,
77
} from '@qwik.dev/core';
88
import { themeStorageKey } from '../router-head/theme-script';
9+
import {
10+
HiSunOutline,
11+
HiMoonOutline,
12+
HiStopCircleOutline,
13+
} from '@qwikest/icons/heroicons';
914

1015
type ThemeName = 'dark' | 'light' | 'auto';
1116

@@ -23,7 +28,7 @@ export const getTheme = (): ThemeName => {
2328
return theme as ThemeName;
2429
} else {
2530
// should be 'auto' when no theme is set
26-
return 'auto'
31+
return 'auto';
2732
}
2833
};
2934

@@ -59,30 +64,44 @@ export const setTheme = (theme: ThemeName) => {
5964

6065
export const ThemeToggle = component$(() => {
6166
const themeValue = createSignal(getTheme());
62-
const onClick$ = event$((_: any, e: any) => {
63-
setTheme(e.value);
64-
themeValue.value = e.value;
67+
const onClick$ = event$(() => {
68+
let newTheme = getTheme();
69+
console.log('Theme changed to:', newTheme);
70+
if (newTheme === 'dark') {
71+
newTheme = 'light';
72+
setTheme(newTheme);
73+
} else if (newTheme === 'light') {
74+
newTheme = 'auto';
75+
setTheme(newTheme);
76+
} else {
77+
newTheme = window.matchMedia('(prefers-color-scheme: dark)').matches
78+
? 'light'
79+
: 'dark';
80+
setTheme(newTheme);
81+
}
82+
console.log('New theme set:', newTheme);
83+
84+
themeValue.value = newTheme;
6585
});
6686

6787
return (
68-
<div class="theme-control">
69-
<label for="theme-select" class="sr-only">
70-
Choose a theme
71-
</label>
72-
<select
73-
class="w-10 rounded-lg border border-border bg-background px-1 py-2 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring"
74-
onInput$={onClick$}
88+
<>
89+
<button
90+
onClick$={onClick$}
91+
class="group flex h-8 w-8 items-center justify-center rounded-md bg-background text-foreground hover:opacity-60"
7592
>
76-
<option value="dark" selected={themeValue.value === 'dark'}>
77-
Dark
78-
</option>
79-
<option value="light" selected={themeValue.value === 'light'}>
80-
Light
81-
</option>
82-
<option value="auto" selected={themeValue.value === 'auto'}>
83-
Auto
84-
</option>
85-
</select>
86-
</div>
93+
<div class="transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-75">
94+
{themeValue.value === 'light' && (
95+
<HiSunOutline class="animate-in zoom-in-50 h-5 w-5 duration-300 ease-out" />
96+
)}
97+
{themeValue.value === 'dark' && (
98+
<HiMoonOutline class="animate-in zoom-in-50 h-5 w-5 duration-300 ease-out" />
99+
)}
100+
{themeValue.value === 'auto' && (
101+
<HiStopCircleOutline class="animate-in zoom-in-50 h-5 w-5 duration-300 ease-out" />
102+
)}
103+
</div>
104+
</button>
105+
</>
87106
);
88107
});

0 commit comments

Comments
 (0)