arcanajs 2.5.0 → 2.5.2
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/framework/cli/index.d.ts +1 -0
- package/framework/cli/index.js +204 -0
- package/framework/cli/templates.d.ts +6 -0
- package/framework/cli/templates.js +60 -0
- package/framework/cli/webpack.config.d.ts +3 -0
- package/framework/cli/webpack.config.js +310 -0
- package/framework/lib/client/index.d.ts +59 -0
- package/framework/lib/client/index.js +97 -0
- package/framework/lib/config/index.d.ts +46 -0
- package/framework/lib/config/index.js +115 -0
- package/framework/lib/global.d.ts +65 -0
- package/framework/lib/index.d.ts +19 -0
- package/framework/lib/index.js +59 -0
- package/framework/lib/server/ArcanaJSMiddleware.d.ts +24 -0
- package/framework/lib/server/ArcanaJSMiddleware.js +114 -0
- package/framework/lib/server/ArcanaJSServer.d.ts +55 -0
- package/framework/lib/server/ArcanaJSServer.js +441 -0
- package/framework/lib/server/ControllerBinder.d.ts +4 -0
- package/framework/lib/server/ControllerBinder.js +32 -0
- package/framework/lib/server/CsrfMiddleware.d.ts +2 -0
- package/framework/lib/server/CsrfMiddleware.js +34 -0
- package/framework/lib/server/DynamicRouter.d.ts +2 -0
- package/framework/lib/server/DynamicRouter.js +50 -0
- package/framework/lib/server/ResponseHandlerMiddleware.d.ts +27 -0
- package/framework/lib/server/ResponseHandlerMiddleware.js +30 -0
- package/framework/lib/server/Router.d.ts +94 -0
- package/framework/lib/server/Router.js +203 -0
- package/framework/lib/server/default-index.html +12 -0
- package/framework/lib/server.d.ts +33 -0
- package/framework/lib/server.js +69 -0
- package/framework/lib/shared/components/Body.d.ts +6 -0
- package/framework/lib/shared/components/Body.js +8 -0
- package/framework/lib/shared/components/Head.d.ts +4 -0
- package/framework/lib/shared/components/Head.js +125 -0
- package/framework/lib/shared/components/Link.d.ts +7 -0
- package/framework/lib/shared/components/Link.js +27 -0
- package/framework/lib/shared/components/NavLink.d.ts +9 -0
- package/framework/lib/shared/components/NavLink.js +13 -0
- package/framework/lib/shared/components/Page.d.ts +6 -0
- package/framework/lib/shared/components/Page.js +10 -0
- package/framework/lib/shared/context/HeadContext.d.ts +6 -0
- package/framework/lib/shared/context/HeadContext.js +5 -0
- package/framework/lib/shared/context/PageContext.d.ts +1 -0
- package/framework/lib/shared/context/PageContext.js +5 -0
- package/framework/lib/shared/context/RouterContext.d.ts +15 -0
- package/framework/lib/shared/context/RouterContext.js +10 -0
- package/framework/lib/shared/core/ArcanaJSApp.d.ts +14 -0
- package/framework/lib/shared/core/ArcanaJSApp.js +153 -0
- package/framework/lib/shared/hooks/useHead.d.ts +1 -0
- package/framework/lib/shared/hooks/useHead.js +7 -0
- package/framework/lib/shared/hooks/useLocation.d.ts +5 -0
- package/framework/lib/shared/hooks/useLocation.js +13 -0
- package/framework/lib/shared/hooks/usePage.d.ts +1 -0
- package/framework/lib/shared/hooks/usePage.js +7 -0
- package/framework/lib/shared/hooks/useParams.d.ts +1 -0
- package/framework/lib/shared/hooks/useParams.js +13 -0
- package/framework/lib/shared/hooks/useQuery.d.ts +1 -0
- package/framework/lib/shared/hooks/useQuery.js +9 -0
- package/framework/lib/shared/hooks/useRouter.d.ts +1 -0
- package/framework/lib/shared/hooks/useRouter.js +13 -0
- package/framework/lib/shared/utils/createSingletonContext.d.ts +11 -0
- package/framework/lib/shared/utils/createSingletonContext.js +21 -0
- package/framework/lib/shared/views/ErrorPage.d.ts +7 -0
- package/framework/lib/shared/views/ErrorPage.js +12 -0
- package/framework/lib/shared/views/NotFoundPage.d.ts +5 -0
- package/framework/lib/shared/views/NotFoundPage.js +11 -0
- package/framework/lib/types.d.ts +174 -0
- package/framework/lib/types.js +8 -0
- package/framework/templates/arcanajs.config.ts +44 -0
- package/framework/templates/package.json +15 -0
- package/framework/templates/postcss.config.js +6 -0
- package/framework/templates/public/arcanajs.png +0 -0
- package/framework/templates/public/arcanajs.svg +12 -0
- package/framework/templates/public/favicon.ico +0 -0
- package/framework/templates/src/arcanajs.d.ts +8 -0
- package/framework/templates/src/client/globals.css +199 -0
- package/framework/templates/src/client/index.tsx +7 -0
- package/framework/templates/src/db/mongo.ts +10 -0
- package/framework/templates/src/db/mongoose.ts +12 -0
- package/framework/templates/src/db/mysql.ts +15 -0
- package/framework/templates/src/db/postgres.ts +8 -0
- package/framework/templates/src/server/controllers/HomeController.ts +7 -0
- package/framework/templates/src/server/controllers/UsersController.ts +37 -0
- package/framework/templates/src/server/index.ts +35 -0
- package/framework/templates/src/server/routes/api.ts +6 -0
- package/framework/templates/src/server/routes/web.ts +7 -0
- package/framework/templates/src/views/ErrorPage.tsx +136 -0
- package/framework/templates/src/views/HomePage.tsx +344 -0
- package/framework/templates/src/views/NotFoundPage.tsx +108 -0
- package/framework/templates/tsconfig.json +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Body, Head, Link, Page } from "arcanajs";
|
|
2
|
+
|
|
3
|
+
interface NotFoundPageProps {
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default function NotFoundPage({ url }: NotFoundPageProps) {
|
|
8
|
+
return (
|
|
9
|
+
<Page>
|
|
10
|
+
<Head>
|
|
11
|
+
<title>404 - Page Not Found</title>
|
|
12
|
+
<meta
|
|
13
|
+
name="description"
|
|
14
|
+
content="The page you're looking for doesn't exist"
|
|
15
|
+
/>
|
|
16
|
+
</Head>
|
|
17
|
+
<Body>
|
|
18
|
+
<div className="relative min-h-screen overflow-hidden bg-black text-white flex flex-col justify-center items-center px-4 font-sans">
|
|
19
|
+
{/* Animated Background */}
|
|
20
|
+
<div className="fixed inset-0 z-0 overflow-hidden pointer-events-none">
|
|
21
|
+
<div className="absolute inset-0 grid-pattern opacity-30"></div>
|
|
22
|
+
<div className="absolute top-1/4 left-1/4 w-96 h-96 bg-orange-500 rounded-full opacity-20 blur-3xl animate-glow"></div>
|
|
23
|
+
<div
|
|
24
|
+
className="absolute bottom-1/4 right-1/4 w-96 h-96 bg-purple-500 rounded-full opacity-10 blur-3xl animate-glow"
|
|
25
|
+
style={{ animationDelay: "2s" }}
|
|
26
|
+
></div>
|
|
27
|
+
<div className="absolute inset-0 hero-gradient"></div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div className="relative z-10 max-w-lg w-full text-center animate-scale-in">
|
|
31
|
+
<div className="glass-card rounded-3xl p-12 border border-white/10 shadow-2xl">
|
|
32
|
+
<div className="mb-8">
|
|
33
|
+
<h1 className="text-9xl font-bold text-transparent bg-clip-text bg-gradient-to-br from-white to-gray-500 mb-4 animate-float">
|
|
34
|
+
404
|
|
35
|
+
</h1>
|
|
36
|
+
<h2 className="text-3xl font-bold text-white mb-4">
|
|
37
|
+
Page Not Found
|
|
38
|
+
</h2>
|
|
39
|
+
<p className="text-gray-400 text-lg leading-relaxed">
|
|
40
|
+
{url ? (
|
|
41
|
+
<>
|
|
42
|
+
The page <span className="text-orange-400">"{url}"</span>{" "}
|
|
43
|
+
you're looking for doesn't exist.
|
|
44
|
+
</>
|
|
45
|
+
) : (
|
|
46
|
+
"The page you're looking for doesn't exist."
|
|
47
|
+
)}
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
|
52
|
+
<Link
|
|
53
|
+
href="/"
|
|
54
|
+
className="btn-primary px-8 py-3.5 text-white font-semibold rounded-xl inline-flex items-center justify-center gap-2 w-full sm:w-auto"
|
|
55
|
+
>
|
|
56
|
+
<svg
|
|
57
|
+
className="w-5 h-5"
|
|
58
|
+
fill="none"
|
|
59
|
+
stroke="currentColor"
|
|
60
|
+
viewBox="0 0 24 24"
|
|
61
|
+
>
|
|
62
|
+
<path
|
|
63
|
+
strokeLinecap="round"
|
|
64
|
+
strokeLinejoin="round"
|
|
65
|
+
strokeWidth={2}
|
|
66
|
+
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
|
67
|
+
/>
|
|
68
|
+
</svg>
|
|
69
|
+
Go Home
|
|
70
|
+
</Link>
|
|
71
|
+
|
|
72
|
+
<button
|
|
73
|
+
onClick={() => window.history.back()}
|
|
74
|
+
className="btn-secondary px-8 py-3.5 text-white font-semibold rounded-xl inline-flex items-center justify-center gap-2 w-full sm:w-auto"
|
|
75
|
+
>
|
|
76
|
+
<svg
|
|
77
|
+
className="w-5 h-5"
|
|
78
|
+
fill="none"
|
|
79
|
+
stroke="currentColor"
|
|
80
|
+
viewBox="0 0 24 24"
|
|
81
|
+
>
|
|
82
|
+
<path
|
|
83
|
+
strokeLinecap="round"
|
|
84
|
+
strokeLinejoin="round"
|
|
85
|
+
strokeWidth={2}
|
|
86
|
+
d="M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
87
|
+
/>
|
|
88
|
+
</svg>
|
|
89
|
+
Go Back
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div className="mt-8 text-gray-500 text-sm">
|
|
94
|
+
If you believe this is an error, please{" "}
|
|
95
|
+
<Link
|
|
96
|
+
href="/contact"
|
|
97
|
+
className="text-orange-400 hover:text-orange-300 underline transition-colors"
|
|
98
|
+
>
|
|
99
|
+
contact support
|
|
100
|
+
</Link>
|
|
101
|
+
.
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</Body>
|
|
106
|
+
</Page>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["src/**/*"],
|
|
26
|
+
"exclude": ["node_modules", "dist"]
|
|
27
|
+
}
|
package/package.json
CHANGED