create-z3 0.0.33 → 0.0.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-z3",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "type": "module",
5
5
  "description": "CLI for scaffolding Z3 Stack applications (TanStack/Next.js + Convex + Better Auth)",
6
6
  "bin": {
@@ -95,7 +95,7 @@ import { ThemeToggle } from './ThemeToggle'
95
95
  export function ComponentExample() {
96
96
  return (
97
97
  <ExampleWrapper>
98
- <ThemeToggle className="absolute -top-10 right-0" />
98
+ <ThemeToggle className="absolute top-10 right-10" />
99
99
  <CardExample />
100
100
  <FormExample />
101
101
  </ExampleWrapper>
@@ -5,6 +5,7 @@ import { HeadContent, Scripts } from '@tanstack/react-router'
5
5
  import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
6
6
  import type { ConvexQueryClient } from "@convex-dev/react-query"
7
7
  import { Providers } from "~/providers"
8
+ import { ThemeProvider, getThemeServerFn } from "~/lib/theme"
8
9
 
9
10
  import appCss from '../styles.css?url'
10
11
  import { createServerFn } from "@tanstack/react-start"
@@ -48,6 +49,7 @@ export const Route = createRootRouteWithContext<{
48
49
  token
49
50
  }
50
51
  },
52
+ loader: () => getThemeServerFn(),
51
53
 
52
54
  component: RootComponent,
53
55
  shellComponent: RootDocument,
@@ -59,15 +61,18 @@ function RootComponent() {
59
61
  }
60
62
 
61
63
  function RootDocument({ children }: { children: React.ReactNode }) {
64
+ const theme = Route.useLoaderData()
62
65
  return (
63
66
  <html lang="en">
64
67
  <head>
65
68
  <HeadContent />
66
69
  </head>
67
70
  <body>
68
- <Providers>
69
- {children}
70
- </Providers>
71
+ <ThemeProvider theme={theme}>
72
+ <Providers>
73
+ {children}
74
+ </Providers>
75
+ </ThemeProvider>
71
76
  <TanStackDevtools
72
77
  config={{
73
78
  position: 'bottom-right',
@@ -11,7 +11,7 @@ import './src/env'
11
11
 
12
12
  const config = defineConfig({
13
13
  server: {
14
- port: 3005
14
+ port: 3000
15
15
  },
16
16
  plugins: [
17
17
  devtools(),