create-next-imagicma 0.1.11 → 0.1.13
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 +0 -2
- package/package.json +1 -1
- package/template-hono/AGENTS.md +53 -95
- package/template-hono/README.md +3 -31
- package/template-hono/client/public/imagicma-picker-bridge.js +6 -2
- package/template-hono/client/public/imagicma-preview-feedback.js +1 -0
- package/template-hono/client/src/lib/imagicma-preview-bridge.ts +1 -1
- package/template-hono/client/src/lib/imagicma-preview-picker.ts +130 -28
- package/template-hono/vite.config.ts +1 -1
- package/template/.env.example +0 -10
- package/template/AGENTS.md +0 -225
- package/template/README.md +0 -34
- package/template/app/_components/DevPreviewShield.tsx +0 -638
- package/template/app/api/greeting/route.ts +0 -27
- package/template/app/error.tsx +0 -93
- package/template/app/favicon.ico +0 -0
- package/template/app/globals.css +0 -767
- package/template/app/hello/_components/HelloClient.tsx +0 -94
- package/template/app/hello/page.tsx +0 -23
- package/template/app/layout.tsx +0 -32
- package/template/app/page.tsx +0 -27
- package/template/app/providers.tsx +0 -25
- package/template/components/ui/accordion.tsx +0 -58
- package/template/components/ui/alert-dialog.tsx +0 -141
- package/template/components/ui/alert.tsx +0 -61
- package/template/components/ui/aspect-ratio.tsx +0 -7
- package/template/components/ui/avatar.tsx +0 -51
- package/template/components/ui/badge.tsx +0 -40
- package/template/components/ui/breadcrumb.tsx +0 -117
- package/template/components/ui/button.tsx +0 -64
- package/template/components/ui/calendar.tsx +0 -72
- package/template/components/ui/card.tsx +0 -87
- package/template/components/ui/carousel.tsx +0 -262
- package/template/components/ui/chart.tsx +0 -365
- package/template/components/ui/checkbox.tsx +0 -30
- package/template/components/ui/collapsible.tsx +0 -11
- package/template/components/ui/command.tsx +0 -153
- package/template/components/ui/context-menu.tsx +0 -200
- package/template/components/ui/dialog.tsx +0 -122
- package/template/components/ui/drawer.tsx +0 -118
- package/template/components/ui/dropdown-menu.tsx +0 -200
- package/template/components/ui/form.tsx +0 -178
- package/template/components/ui/hover-card.tsx +0 -29
- package/template/components/ui/input-otp.tsx +0 -71
- package/template/components/ui/input.tsx +0 -25
- package/template/components/ui/label.tsx +0 -26
- package/template/components/ui/menubar.tsx +0 -256
- package/template/components/ui/navigation-menu.tsx +0 -130
- package/template/components/ui/pagination.tsx +0 -119
- package/template/components/ui/popover.tsx +0 -31
- package/template/components/ui/progress.tsx +0 -28
- package/template/components/ui/radio-group.tsx +0 -44
- package/template/components/ui/resizable.tsx +0 -45
- package/template/components/ui/scroll-area.tsx +0 -48
- package/template/components/ui/select.tsx +0 -160
- package/template/components/ui/separator.tsx +0 -31
- package/template/components/ui/sheet.tsx +0 -140
- package/template/components/ui/sidebar.tsx +0 -732
- package/template/components/ui/skeleton.tsx +0 -17
- package/template/components/ui/slider.tsx +0 -28
- package/template/components/ui/switch.tsx +0 -29
- package/template/components/ui/table.tsx +0 -119
- package/template/components/ui/tabs.tsx +0 -55
- package/template/components/ui/textarea.tsx +0 -24
- package/template/components/ui/toast.tsx +0 -129
- package/template/components/ui/toaster.tsx +0 -35
- package/template/components/ui/toggle-group.tsx +0 -61
- package/template/components/ui/toggle.tsx +0 -45
- package/template/components/ui/tooltip.tsx +0 -30
- package/template/drizzle.config.ts +0 -50
- package/template/eslint.config.mjs +0 -18
- package/template/gitignore +0 -46
- package/template/hooks/use-greeting.ts +0 -15
- package/template/hooks/use-mobile.ts +0 -21
- package/template/hooks/use-toast.ts +0 -194
- package/template/lib/queryClient.ts +0 -59
- package/template/lib/theme/default-theme.ts +0 -11
- package/template/lib/utils.ts +0 -6
- package/template/next.config.ts +0 -8
- package/template/package.json +0 -76
- package/template/pnpm-lock.yaml +0 -6937
- package/template/postcss.config.mjs +0 -7
- package/template/process-compose.yaml +0 -13
- package/template/public/file.svg +0 -1
- package/template/public/globe.svg +0 -1
- package/template/public/imagicma-picker-bridge.js +0 -374
- package/template/public/next.svg +0 -1
- package/template/public/vercel.svg +0 -1
- package/template/public/window.svg +0 -1
- package/template/server/db.ts +0 -24
- package/template/server/storage.ts +0 -41
- package/template/shared/routes.ts +0 -13
- package/template/shared/schema.ts +0 -17
- package/template/tailwind.config.mjs +0 -96
- package/template/tsconfig.json +0 -35
- package/template/types/pg.d.ts +0 -19
package/template/app/error.tsx
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
|
|
5
|
-
export default function Error({
|
|
6
|
-
error,
|
|
7
|
-
reset,
|
|
8
|
-
}: {
|
|
9
|
-
error: Error & { digest?: string };
|
|
10
|
-
reset: () => void;
|
|
11
|
-
}) {
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
// 保持 Next.js 默认的错误日志行为
|
|
14
|
-
console.error(error);
|
|
15
|
-
}, [error]);
|
|
16
|
-
|
|
17
|
-
const isDev = process.env.NODE_ENV === "development";
|
|
18
|
-
const digest = error?.digest;
|
|
19
|
-
const message = isDev ? (error?.message || "发生未知错误").trim() : "";
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className="relative flex min-h-screen items-center justify-center overflow-hidden bg-gradient-to-br from-indigo-600 via-purple-600 to-sky-600 px-6 py-16 text-white"
|
|
24
|
-
role="alert"
|
|
25
|
-
>
|
|
26
|
-
<div className="absolute inset-0 bg-[radial-gradient(60%_60%_at_50%_40%,rgba(255,255,255,0.20),transparent_60%)]" />
|
|
27
|
-
<main className="relative w-full max-w-xl rounded-3xl border border-white/15 bg-white/10 p-10 shadow-2xl backdrop-blur-xl">
|
|
28
|
-
<div className="flex flex-col items-center text-center">
|
|
29
|
-
<div className="flex h-16 w-16 items-center justify-center rounded-2xl bg-white/10">
|
|
30
|
-
<svg
|
|
31
|
-
viewBox="0 0 24 24"
|
|
32
|
-
className="h-9 w-9 text-white/90"
|
|
33
|
-
fill="none"
|
|
34
|
-
aria-hidden="true"
|
|
35
|
-
>
|
|
36
|
-
<path
|
|
37
|
-
d="M12 9v5"
|
|
38
|
-
stroke="currentColor"
|
|
39
|
-
strokeWidth="1.8"
|
|
40
|
-
strokeLinecap="round"
|
|
41
|
-
/>
|
|
42
|
-
<path
|
|
43
|
-
d="M12 17.5h.01"
|
|
44
|
-
stroke="currentColor"
|
|
45
|
-
strokeWidth="2.2"
|
|
46
|
-
strokeLinecap="round"
|
|
47
|
-
/>
|
|
48
|
-
<path
|
|
49
|
-
d="M10.3 4.7 2.4 18.3a1.3 1.3 0 0 0 1.1 2h16.9a1.3 1.3 0 0 0 1.1-2L13.7 4.7a1.3 1.3 0 0 0-2.3 0Z"
|
|
50
|
-
stroke="currentColor"
|
|
51
|
-
strokeWidth="1.2"
|
|
52
|
-
strokeLinejoin="round"
|
|
53
|
-
opacity="0.85"
|
|
54
|
-
/>
|
|
55
|
-
</svg>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<h1 className="mt-6 text-3xl font-semibold tracking-tight">
|
|
59
|
-
预览暂时不可用
|
|
60
|
-
</h1>
|
|
61
|
-
<p className="mt-4 max-w-md text-base leading-7 text-white/80">
|
|
62
|
-
检测到错误。修复后可点击“重试”恢复,或直接刷新页面。
|
|
63
|
-
</p>
|
|
64
|
-
|
|
65
|
-
{isDev && message ? (
|
|
66
|
-
<pre className="mt-6 w-full max-h-40 overflow-auto rounded-2xl border border-white/10 bg-black/25 p-4 text-left text-sm leading-6 text-white/85 shadow-inner">
|
|
67
|
-
<code>{message}</code>
|
|
68
|
-
</pre>
|
|
69
|
-
) : digest ? (
|
|
70
|
-
<p className="mt-6 text-sm text-white/70">{`Digest: ${digest}`}</p>
|
|
71
|
-
) : null}
|
|
72
|
-
|
|
73
|
-
<div className="mt-8 flex w-full flex-col gap-3 sm:flex-row sm:justify-center">
|
|
74
|
-
<button
|
|
75
|
-
type="button"
|
|
76
|
-
className="inline-flex h-11 w-full items-center justify-center rounded-full bg-white px-5 text-sm font-medium text-black transition-colors hover:bg-white/90 sm:w-auto"
|
|
77
|
-
onClick={() => reset()}
|
|
78
|
-
>
|
|
79
|
-
重试
|
|
80
|
-
</button>
|
|
81
|
-
<button
|
|
82
|
-
type="button"
|
|
83
|
-
className="inline-flex h-11 w-full items-center justify-center rounded-full border border-white/20 bg-white/10 px-5 text-sm font-medium text-white transition-colors hover:bg-white/15 sm:w-auto"
|
|
84
|
-
onClick={() => window.location.reload()}
|
|
85
|
-
>
|
|
86
|
-
刷新页面
|
|
87
|
-
</button>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</main>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
}
|
package/template/app/favicon.ico
DELETED
|
Binary file
|