@newt-app/templates 0.4.1 → 0.5.0
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/dist/index.js +37 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -178,7 +178,7 @@ Open [http://localhost:3000](http://localhost:3000).
|
|
|
178
178
|
// src/root/templates/env-example.ts
|
|
179
179
|
var env_example_default = {
|
|
180
180
|
filename: ".env",
|
|
181
|
-
template: `DATABASE_URL=postgresql://
|
|
181
|
+
template: `DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
|
|
182
182
|
BETTER_AUTH_URL=http://localhost:3000
|
|
183
183
|
BETTER_AUTH_SECRET=your-secret-here`
|
|
184
184
|
};
|
|
@@ -1976,6 +1976,7 @@ import { AuthForm } from '@/app/auth-form';
|
|
|
1976
1976
|
import { Link } from '@<%= projectName %>/ui/link';
|
|
1977
1977
|
import { Logo } from '@<%= projectName %>/ui/logo';
|
|
1978
1978
|
import { TodoList } from '@/app/todo-list';
|
|
1979
|
+
import { ModeToggle } from '@<%= projectName %>/ui/mode-toggle';
|
|
1979
1980
|
import { Card, CardContent, CardHeader, CardTitle } from '@<%= projectName %>/ui/card';
|
|
1980
1981
|
|
|
1981
1982
|
export default function Home() {
|
|
@@ -1988,9 +1989,12 @@ export default function Home() {
|
|
|
1988
1989
|
|
|
1989
1990
|
return (
|
|
1990
1991
|
<main className="max-w-lg mx-auto min-h-full px-4 py-8 space-y-4">
|
|
1991
|
-
<div className="pb-4 border-b">
|
|
1992
|
-
<
|
|
1993
|
-
|
|
1992
|
+
<div className="pb-4 border-b flex items-start justify-between">
|
|
1993
|
+
<div>
|
|
1994
|
+
<p className="font-mono text-sm text-muted-foreground">apps/web/page.tsx</p>
|
|
1995
|
+
<p className="text-sm text-muted-foreground">Delete me to get started!</p>
|
|
1996
|
+
</div>
|
|
1997
|
+
<ModeToggle />
|
|
1994
1998
|
</div>
|
|
1995
1999
|
|
|
1996
2000
|
<div className="flex items-center gap-3 py-2">
|
|
@@ -7872,6 +7876,33 @@ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
|
7872
7876
|
`
|
|
7873
7877
|
};
|
|
7874
7878
|
|
|
7879
|
+
// src/shadcn-ui/templates/mode-toggle.ts
|
|
7880
|
+
var mode_toggle_default = {
|
|
7881
|
+
filename: "packages/ui/src/components/mode-toggle.tsx",
|
|
7882
|
+
template: `'use client';
|
|
7883
|
+
|
|
7884
|
+
import { Moon, Sun } from 'lucide-react';
|
|
7885
|
+
import { useTheme } from 'next-themes';
|
|
7886
|
+
import { Button } from '@<%= projectName %>/ui/button';
|
|
7887
|
+
|
|
7888
|
+
export function ModeToggle() {
|
|
7889
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
7890
|
+
|
|
7891
|
+
return (
|
|
7892
|
+
<Button
|
|
7893
|
+
variant="ghost"
|
|
7894
|
+
size="icon"
|
|
7895
|
+
onClick={() => setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')}
|
|
7896
|
+
>
|
|
7897
|
+
<Sun className="hidden dark:block" />
|
|
7898
|
+
<Moon className="block dark:hidden" />
|
|
7899
|
+
<span className="sr-only">Toggle theme</span>
|
|
7900
|
+
</Button>
|
|
7901
|
+
);
|
|
7902
|
+
}
|
|
7903
|
+
`
|
|
7904
|
+
};
|
|
7905
|
+
|
|
7875
7906
|
// src/shadcn-ui/index.ts
|
|
7876
7907
|
var shadcnUi = {
|
|
7877
7908
|
templates: [
|
|
@@ -7934,7 +7965,8 @@ var shadcnUi = {
|
|
|
7934
7965
|
textarea_default,
|
|
7935
7966
|
toggle_group_default,
|
|
7936
7967
|
toggle_default,
|
|
7937
|
-
tooltip_default
|
|
7968
|
+
tooltip_default,
|
|
7969
|
+
mode_toggle_default
|
|
7938
7970
|
],
|
|
7939
7971
|
packages: [
|
|
7940
7972
|
{ package: "next-themes", module: "apps/web", version: "^0.4.6" }
|