@adonisjs/inertia 1.1.0 → 1.2.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/README.md +7 -2
- package/build/app.css.stub +1 -27
- package/build/{chunk-QKSM72AR.js → chunk-TSAZ2E7H.js} +3 -6
- package/build/index.js +3 -5
- package/build/providers/inertia_provider.js +2 -3
- package/build/react/home.tsx.stub +335 -7
- package/build/react/root.edge.stub +54 -1
- package/build/solid/home.tsx.stub +347 -7
- package/build/solid/root.edge.stub +53 -2
- package/build/src/inertia_middleware.js +1 -1
- package/build/src/plugins/edge/plugin.js +1 -2
- package/build/src/plugins/vite.js +1 -2
- package/build/svelte/home.svelte.stub +330 -10
- package/build/svelte/root.edge.stub +54 -1
- package/build/vue/home.vue.stub +331 -9
- package/build/vue/root.edge.stub +54 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
Official [Inertia.js](https://inertiajs.com/) adapter for AdonisJS.
|
|
9
9
|
|
|
10
10
|
## Official Documentation
|
|
11
|
-
The documentation is available on the [AdonisJS website](https://docs.adonisjs.com/guides/inertia
|
|
11
|
+
The documentation is available on the [AdonisJS website](https://docs.adonisjs.com/guides/views-and-templates/inertia).
|
|
12
|
+
|
|
13
|
+
## Starter Kit
|
|
14
|
+
The AdonisJS team maintains an Inertia starter kit. This starter kit provides a configurable base application using AdonisJS with Inertia and your favorite frontend framework (e.g. React, Vue.js, Svelte).
|
|
15
|
+
|
|
16
|
+
- [adonisjs/inertia-starter-kit](https://github.com/adonisjs/inertia-starter-kit)
|
|
12
17
|
|
|
13
18
|
## Contributing
|
|
14
19
|
One of the primary goals of AdonisJS is to have a vibrant community of users and contributors who believes in the principles of the framework.
|
|
@@ -19,7 +24,7 @@ We encourage you to read the [contribution guide](https://github.com/adonisjs/.g
|
|
|
19
24
|
In order to ensure that the AdonisJS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/adonisjs/.github/blob/main/docs/CODE_OF_CONDUCT.md).
|
|
20
25
|
|
|
21
26
|
## License
|
|
22
|
-
AdonisJS
|
|
27
|
+
AdonisJS Inertia is open-sourced software licensed under the [MIT license](LICENSE.md).
|
|
23
28
|
|
|
24
29
|
[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adonisjs/inertia/checks.yml?style=for-the-badge
|
|
25
30
|
[gh-workflow-url]: https://github.com/adonisjs/inertia/actions/workflows/checks.yml "Github action"
|
package/build/app.css.stub
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
{{{
|
|
2
2
|
exports({ to: app.makePath('inertia/css/app.css') })
|
|
3
3
|
}}}
|
|
4
|
-
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');
|
|
5
|
-
|
|
6
4
|
* {
|
|
7
5
|
margin: 0;
|
|
8
6
|
padding: 0;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
html,
|
|
12
|
-
body
|
|
13
|
-
#app {
|
|
14
|
-
background-color: #F7F8FA;
|
|
15
|
-
font-family: 'Poppins', sans-serif;
|
|
16
|
-
color: #46444c;
|
|
10
|
+
body {
|
|
17
11
|
height: 100%;
|
|
18
12
|
width: 100%;
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
.title {
|
|
22
|
-
font-size: 42px;
|
|
23
|
-
font-weight: 500;
|
|
24
|
-
color: #5a45ff;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.container {
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
align-items: center;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
height: 100%;
|
|
33
|
-
width: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
a {
|
|
37
|
-
text-decoration: underline;
|
|
38
|
-
color: #5a45ff;
|
|
39
|
-
}
|
|
@@ -97,8 +97,7 @@ var Inertia = class {
|
|
|
97
97
|
*/
|
|
98
98
|
async #shouldRenderOnServer(component) {
|
|
99
99
|
const isSsrEnabled = this.config.ssr.enabled;
|
|
100
|
-
if (!isSsrEnabled)
|
|
101
|
-
return false;
|
|
100
|
+
if (!isSsrEnabled) return false;
|
|
102
101
|
let isSsrEnabledForPage = false;
|
|
103
102
|
if (typeof this.config.ssr.pages === "function") {
|
|
104
103
|
isSsrEnabledForPage = await this.config.ssr.pages(this.ctx, component);
|
|
@@ -140,8 +139,7 @@ var Inertia = class {
|
|
|
140
139
|
const isInertiaRequest = !!this.ctx.request.header("x-inertia");
|
|
141
140
|
if (!isInertiaRequest) {
|
|
142
141
|
const shouldRenderOnServer = await this.#shouldRenderOnServer(component);
|
|
143
|
-
if (shouldRenderOnServer)
|
|
144
|
-
return this.#renderOnServer(pageObject, viewProps);
|
|
142
|
+
if (shouldRenderOnServer) return this.#renderOnServer(pageObject, viewProps);
|
|
145
143
|
return this.ctx.view.render(this.#resolveRootView(), { ...viewProps, page: pageObject });
|
|
146
144
|
}
|
|
147
145
|
this.ctx.response.header("x-inertia", "true");
|
|
@@ -181,8 +179,7 @@ var InertiaMiddleware = class {
|
|
|
181
179
|
ctx.inertia = new Inertia(ctx, this.config, this.vite);
|
|
182
180
|
await next();
|
|
183
181
|
const isInertiaRequest = !!request.header("x-inertia");
|
|
184
|
-
if (!isInertiaRequest)
|
|
185
|
-
return;
|
|
182
|
+
if (!isInertiaRequest) return;
|
|
186
183
|
response.header("Vary", "Accept");
|
|
187
184
|
const method = request.method();
|
|
188
185
|
if (response.getStatus() === 302 && ["PUT", "PATCH", "DELETE"].includes(method)) {
|
package/build/index.js
CHANGED
|
@@ -87,7 +87,7 @@ async function defineExampleRoute(command, codemods) {
|
|
|
87
87
|
const action = command.logger.action("update start/routes.ts file");
|
|
88
88
|
try {
|
|
89
89
|
routesFile?.addStatements((writer) => {
|
|
90
|
-
writer.writeLine(`router.on('/').renderInertia('home'
|
|
90
|
+
writer.writeLine(`router.on('/').renderInertia('home')`);
|
|
91
91
|
});
|
|
92
92
|
await tsMorph?.save();
|
|
93
93
|
action.succeeded();
|
|
@@ -211,16 +211,14 @@ var VersionCache = class {
|
|
|
211
211
|
* Pre-compute the version
|
|
212
212
|
*/
|
|
213
213
|
async computeVersion() {
|
|
214
|
-
if (!this.assetsVersion)
|
|
215
|
-
await this.#getManifestHash();
|
|
214
|
+
if (!this.assetsVersion) await this.#getManifestHash();
|
|
216
215
|
return this;
|
|
217
216
|
}
|
|
218
217
|
/**
|
|
219
218
|
* Returns the current assets version
|
|
220
219
|
*/
|
|
221
220
|
getVersion() {
|
|
222
|
-
if (!this.#cachedVersion)
|
|
223
|
-
throw new Error("Version has not been computed yet");
|
|
221
|
+
if (!this.#cachedVersion) throw new Error("Version has not been computed yet");
|
|
224
222
|
return this.#cachedVersion;
|
|
225
223
|
}
|
|
226
224
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InertiaMiddleware
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TSAZ2E7H.js";
|
|
4
4
|
|
|
5
5
|
// providers/inertia_provider.ts
|
|
6
6
|
import { configProvider } from "@adonisjs/core";
|
|
@@ -14,8 +14,7 @@ var InertiaProvider = class {
|
|
|
14
14
|
* Registers edge plugin when edge is installed
|
|
15
15
|
*/
|
|
16
16
|
async registerEdgePlugin() {
|
|
17
|
-
if (!this.app.usingEdgeJS)
|
|
18
|
-
return;
|
|
17
|
+
if (!this.app.usingEdgeJS) return;
|
|
19
18
|
const edgeExports = await import("edge.js");
|
|
20
19
|
const { edgePluginInertia } = await import("../src/plugins/edge/plugin.js");
|
|
21
20
|
edgeExports.default.use(edgePluginInertia());
|
|
@@ -3,18 +3,346 @@
|
|
|
3
3
|
}}}
|
|
4
4
|
import { Head } from '@inertiajs/react'
|
|
5
5
|
|
|
6
|
-
export default function Home(
|
|
6
|
+
export default function Home() {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
9
|
<Head title="Homepage" />
|
|
10
10
|
|
|
11
|
-
<div className="
|
|
12
|
-
<div className="title">AdonisJS {props.version} x Inertia x React</div>
|
|
11
|
+
<div className="fixed xl:absolute left-8 right-8 top-0 bottom-0 xl:inset-0 max-w-screen-xl mx-auto before:content-[''] before:[background:repeating-linear-gradient(0deg,var(--sand-5)_0_4px,transparent_0_8px)] before:absolute before:top-0 before:left-0 before:h-full before:w-px after:content-[''] after:[background:repeating-linear-gradient(0deg,var(--sand-5)_0_4px,transparent_0_8px)] after:absolute after:top-0 after:right-0 after:h-full after:w-px"></div>
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
<div className="pt-4 h-full flex flex-col">
|
|
14
|
+
{/* Header */}
|
|
15
|
+
<div className="grow pb-4 bg-gradient-to-b from-sand-1 to-sand-2 flex justify-center items-center">
|
|
16
|
+
<a href="https://adonisjs.com" target="_blank" className="isolate">
|
|
17
|
+
<svg className="w-16 h-16 fill-primary" viewBox="0 0 33 33">
|
|
18
|
+
<path
|
|
19
|
+
fillRule="evenodd"
|
|
20
|
+
d="M0 16.333c0 13.173 3.16 16.333 16.333 16.333 13.173 0 16.333-3.16 16.333-16.333C32.666 3.16 29.506 0 16.333 0 3.16 0 0 3.16 0 16.333Zm6.586 3.393L11.71 8.083c.865-1.962 2.528-3.027 4.624-3.027 2.096 0 3.759 1.065 4.624 3.027l5.123 11.643c.233.566.432 1.297.432 1.93 0 2.893-2.029 4.923-4.923 4.923-.986 0-1.769-.252-2.561-.506-.812-.261-1.634-.526-2.695-.526-1.048 0-1.89.267-2.718.529-.801.253-1.59.503-2.538.503-2.894 0-4.923-2.03-4.923-4.924 0-.632.2-1.363.432-1.929Zm9.747-9.613-5.056 11.443c1.497-.699 3.227-1.032 5.056-1.032 1.763 0 3.56.333 4.99 1.032l-4.99-11.444Z"
|
|
21
|
+
clipRule="evenodd"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{/* Bento with documentation, Adocasts, packages and Discord */}
|
|
28
|
+
<div className="isolate mt-10 max-w-screen-xl mx-auto px-16 xl:px-8 grid grid-cols-1 xl:grid-cols-2 xl:grid-rows-3 gap-8">
|
|
29
|
+
<article className="row-span-3 relative p-6 shadow-sm hover:shadow border border-sand-7 hover:border-sand-8 rounded-2xl transition ease-in-out duration-700 group flex flex-col gap-8">
|
|
30
|
+
<div className="relative opacity-80">
|
|
31
|
+
<svg fill="none" viewBox="0 0 240 105">
|
|
32
|
+
<path fill="#F9F9F8" d="M0 4a4 4 0 0 1 4-4h232a4 4 0 0 1 4 4v101H0V4Z" />
|
|
33
|
+
<g fill="#000" fill-rule="evenodd" clipPath="url(#a)" clipRule="evenodd">
|
|
34
|
+
<path d="M24 11.444c0 4.391 1.053 5.445 5.444 5.445s5.445-1.054 5.445-5.445c0-4.39-1.054-5.444-5.445-5.444C25.054 6 24 7.053 24 11.444Zm2.195 1.131 1.708-3.88c.288-.655.843-1.01 1.541-1.01.699 0 1.253.355 1.542 1.01l1.707 3.88c.078.189.144.433.144.644 0 .964-.676 1.64-1.64 1.64-.33 0-.59-.083-.854-.168-.271-.087-.545-.175-.899-.175-.35 0-.63.089-.906.176-.267.085-.53.168-.846.168-.964 0-1.64-.677-1.64-1.641 0-.211.066-.455.143-.644Zm3.25-3.204-1.686 3.814c.499-.233 1.075-.344 1.685-.344.588 0 1.187.111 1.664.344l-1.664-3.814Zm26.473-.678c-.378 0-.65.268-.65.64 0 .374.272.641.65.641s.651-.267.651-.64-.273-.64-.65-.64Zm-11.907 5.502c-1.009 0-1.738-.745-1.738-1.91 0-1.187.73-1.933 1.737-1.933.468 0 .814.158 1.019.468V8.86h1.05v5.25h-1.05v-.372c-.2.304-.546.456-1.019.456Zm-.667-1.91c0-.652.352-1.077.887-1.077.54 0 .887.42.887 1.071 0 .64-.346 1.056-.887 1.056-.535 0-.887-.415-.887-1.05Zm4.384-.011c0-.646.351-1.06.877-1.06.53 0 .882.414.882 1.06 0 .646-.352 1.06-.883 1.06-.525 0-.876-.414-.876-1.06Zm11.571.835c0 .194-.147.31-.52.31-.42 0-.682-.221-.682-.489h-1.05c.026.725.714 1.265 1.711 1.265.946 0 1.55-.42 1.55-1.165 0-.557-.358-.945-1.066-1.087l-.762-.152c-.23-.047-.367-.163-.367-.315 0-.226.23-.347.525-.347.42 0 .583.195.583.426h.997c-.026-.683-.562-1.203-1.56-1.203-.929 0-1.559.468-1.559 1.176 0 .64.415.93 1.035 1.06l.756.164c.247.052.41.157.41.357Zm-2.85 1.002h-1.05v-3.675h1.05v3.675Zm-4.264-3.675v.384c.268-.31.625-.468 1.066-.468.824 0 1.36.536 1.36 1.365v2.394h-1.05v-2.173c0-.446-.252-.714-.688-.714-.436 0-.688.268-.688.714v2.173h-1.05v-3.675h1.05Zm-3.58-.084c-1.119 0-1.948.809-1.948 1.922s.83 1.921 1.948 1.921c1.123 0 1.953-.808 1.953-1.921s-.83-1.922-1.953-1.922Zm-8.758.856c-.535 0-.887.425-.887 1.076 0 .636.352 1.05.887 1.05.54 0 .887-.414.887-1.055 0-.65-.346-1.07-.887-1.07Zm-1.958 1.076c0 1.166.73 1.911 1.732 1.911.478 0 .82-.152 1.024-.456v.372h1.05v-3.675h-1.05v.384c-.21-.31-.556-.468-1.024-.468-1.003 0-1.732.746-1.732 1.932Z" />
|
|
35
|
+
</g>
|
|
36
|
+
<rect width="8" height="3" x="162" y="9.944" fill="#DAD9D6" rx="1" />
|
|
37
|
+
<rect width="14" height="3" x="174" y="9.944" fill="#DAD9D6" rx="1" />
|
|
38
|
+
<rect width="10" height="3" x="192" y="9.944" fill="#DAD9D6" rx="1" />
|
|
39
|
+
<rect width="10" height="3" x="206" y="9.944" fill="#DAD9D6" rx="1" />
|
|
40
|
+
<rect width="81" height="6" x="24" y="32" fill="#DAD9D6" rx="2" />
|
|
41
|
+
<rect width="95" height="6" x="24" y="44" fill="#DAD9D6" rx="2" />
|
|
42
|
+
<rect width="16" height="5" x="24" y="60" fill="#21201C" rx="1" />
|
|
43
|
+
<path fill="#DAD9D6" d="M24 85a4 4 0 0 1 4-4h184a4 4 0 0 1 4 4v20H24V85Z" />
|
|
44
|
+
<path
|
|
45
|
+
fill="url(#b)"
|
|
46
|
+
fillOpacity=".2"
|
|
47
|
+
d="M24 85a4 4 0 0 1 4-4h184a4 4 0 0 1 4 4v20H24V85Z"
|
|
48
|
+
/>
|
|
49
|
+
<defs>
|
|
50
|
+
<linearGradient
|
|
51
|
+
id="b"
|
|
52
|
+
x1="120"
|
|
53
|
+
x2="120"
|
|
54
|
+
y1="81"
|
|
55
|
+
y2="105"
|
|
56
|
+
gradientUnits="userSpaceOnUse"
|
|
57
|
+
>
|
|
58
|
+
<stop stopOpacity="0" />
|
|
59
|
+
<stop offset="1" stopColor="#82827C" />
|
|
60
|
+
</linearGradient>
|
|
61
|
+
<clipPath id="a">
|
|
62
|
+
<path fill="#fff" d="M24 6h36.307v10.889H24z" />
|
|
63
|
+
</clipPath>
|
|
64
|
+
</defs>
|
|
65
|
+
</svg>
|
|
66
|
+
|
|
67
|
+
<div className="absolute left-0 right-0 bottom-0 h-16 bg-gradient-to-b from-white/0 to-white"></div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div className="flex flex-row gap-4">
|
|
71
|
+
<div className="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
|
|
72
|
+
<svg className="h-6 w-6 fill-primary" viewBox="0 0 256 256">
|
|
73
|
+
<path
|
|
74
|
+
fill="currentColor"
|
|
75
|
+
d="M208 24H72a32 32 0 0 0-32 32v168a8 8 0 0 0 8 8h144a8 8 0 0 0 0-16H56a16 16 0 0 1 16-16h136a8 8 0 0 0 8-8V32a8 8 0 0 0-8-8m-88 16h48v72l-19.21-14.4a8 8 0 0 0-9.6 0L120 112Zm80 144H72a31.8 31.8 0 0 0-16 4.29V56a16 16 0 0 1 16-16h32v88a8 8 0 0 0 12.8 6.4L144 114l27.21 20.4A8 8 0 0 0 176 136a8 8 0 0 0 8-8V40h16Z"
|
|
76
|
+
/>
|
|
77
|
+
</svg>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div className="mt-1.5 space-y-1">
|
|
81
|
+
<h2 className="text-lg font-semibold">
|
|
82
|
+
<a href="https://docs.adonisjs.com" target="_blank">
|
|
83
|
+
<span>Documentation</span>
|
|
84
|
+
<span className="absolute inset-0"></span>
|
|
85
|
+
</a>
|
|
86
|
+
</h2>
|
|
87
|
+
|
|
88
|
+
<p className="text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-700">
|
|
89
|
+
Dive into the official documentation to learn AdonisJS. Read carefully to discover
|
|
90
|
+
an unmatched set of features, best practices and developer experience. Through
|
|
91
|
+
examples, guides and API references, you'll find everything you need to build your
|
|
92
|
+
next project. From installation to deployment, we've got you covered.
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</article>
|
|
97
|
+
|
|
98
|
+
<article className="relative p-6 shadow-sm hover:shadow border border-sand-7 hover:border-sand-8 rounded-2xl transition ease-in-out duration-700 group flex flex-row gap-4">
|
|
99
|
+
<div className="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
|
|
100
|
+
<svg className="h-6 w-6 fill-primary" viewBox="0 0 256 256">
|
|
101
|
+
<path
|
|
102
|
+
fill="currentColor"
|
|
103
|
+
d="m164.44 105.34-48-32A8 8 0 0 0 104 80v64a8 8 0 0 0 12.44 6.66l48-32a8 8 0 0 0 0-13.32M120 129.05V95l25.58 17ZM216 40H40a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 128H40V56h176zm16 40a8 8 0 0 1-8 8H32a8 8 0 0 1 0-16h192a8 8 0 0 1 8 8"
|
|
104
|
+
/>
|
|
105
|
+
</svg>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div className="space-y-1">
|
|
109
|
+
<h2 className="text-lg font-semibold">
|
|
110
|
+
<a href="https://adocasts.com" target="_blank">
|
|
111
|
+
<span>Adocasts</span>
|
|
112
|
+
<span className="absolute inset-0"></span>
|
|
113
|
+
</a>
|
|
114
|
+
</h2>
|
|
115
|
+
|
|
116
|
+
<p className="text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-700">
|
|
117
|
+
Level up your development and Adonis skills with hours of video content, from
|
|
118
|
+
beginner to advanced, through databases, testing, and more.
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
</article>
|
|
122
|
+
|
|
123
|
+
<article className="relative p-6 shadow-sm hover:shadow border border-sand-7 hover:border-sand-8 rounded-2xl transition ease-in-out duration-700 group flex flex-row gap-4">
|
|
124
|
+
<div className="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
|
|
125
|
+
<svg className="h-6 w-6 fill-primary" viewBox="0 0 256 256">
|
|
126
|
+
<path
|
|
127
|
+
fill="currentColor"
|
|
128
|
+
d="M208 96a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16h-32a16 16 0 0 0-16 16v8H96v-8a16 16 0 0 0-16-16H48a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h8v64h-8a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-8h64v8a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-8V96Zm-32-48h32v32h-32ZM48 48h32v15.9a.5.5 0 0 0 0 .2V80H48Zm32 160H48v-32h32v15.9a.5.5 0 0 0 0 .2zm128 0h-32v-32h32Zm-24-48h-8a16 16 0 0 0-16 16v8H96v-8a16 16 0 0 0-16-16h-8V96h8a16 16 0 0 0 16-16v-8h64v8a16 16 0 0 0 16 16h8Z"
|
|
129
|
+
/>
|
|
130
|
+
</svg>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div className="space-y-1">
|
|
134
|
+
<h2 className="text-lg font-semibold">
|
|
135
|
+
<a href="https://packages.adonisjs.com" target="_blank">
|
|
136
|
+
<span>Packages</span>
|
|
137
|
+
<span className="absolute inset-0"></span>
|
|
138
|
+
</a>
|
|
139
|
+
</h2>
|
|
140
|
+
|
|
141
|
+
<p className="text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-700">
|
|
142
|
+
Supercharge your AdonisJS application with packages built and maintained by both the
|
|
143
|
+
core team and the community.
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
</article>
|
|
147
|
+
|
|
148
|
+
<article className="relative p-6 shadow-sm hover:shadow border border-sand-7 hover:border-sand-8 rounded-2xl transition ease-in-out duration-700 group flex flex-row gap-4">
|
|
149
|
+
<div className="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
|
|
150
|
+
<svg className="h-6 w-6 fill-primary" viewBox="0 0 256 256">
|
|
151
|
+
<path
|
|
152
|
+
fill="currentColor"
|
|
153
|
+
d="M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88m44.42-143.16-64 32a8.05 8.05 0 0 0-3.58 3.58l-32 64A8 8 0 0 0 80 184a8.1 8.1 0 0 0 3.58-.84l64-32a8.05 8.05 0 0 0 3.58-3.58l32-64a8 8 0 0 0-10.74-10.74M138 138l-40.11 20.11L118 118l40.15-20.07Z"
|
|
154
|
+
/>
|
|
155
|
+
</svg>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div className="space-y-1">
|
|
159
|
+
<h2 className="text-lg font-semibold">
|
|
160
|
+
<a href="https://discord.gg/vDcEjq6" target="_blank">
|
|
161
|
+
<span>Discord</span>
|
|
162
|
+
<span className="absolute inset-0"></span>
|
|
163
|
+
</a>
|
|
164
|
+
</h2>
|
|
165
|
+
|
|
166
|
+
<p className="text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-700">
|
|
167
|
+
Never get lost again, ask questions, and share your knowledge or projects with a
|
|
168
|
+
growing and supportive community. Join us.
|
|
169
|
+
</p>
|
|
170
|
+
</div>
|
|
171
|
+
</article>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
{/* Features */}
|
|
175
|
+
<div className="grow mt-10 mb-8 px-16 xl:px-8 max-w-screen-xl mx-auto">
|
|
176
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4">
|
|
177
|
+
<article className="relative py-4 px-5 bg-white border border-transparent rounded-lg hover:border-sand-8 hover:shadow-sm transition duration-100 ease-in-out group">
|
|
178
|
+
<h2 className="font-semibold text-sand-12">
|
|
179
|
+
<a
|
|
180
|
+
href="https://lucid.adonisjs.com"
|
|
181
|
+
target="_blank"
|
|
182
|
+
className="flex flex-row gap-2"
|
|
183
|
+
>
|
|
184
|
+
<span className="bg-[#D5EAE7] h-6 w-6 flex justify-center items-center rounded">
|
|
185
|
+
<svg className="h-4 w-4 fill-[#0E766E]" viewBox="0 0 24 24">
|
|
186
|
+
<g
|
|
187
|
+
fill="none"
|
|
188
|
+
stroke="currentColor"
|
|
189
|
+
stroke-linecap="round"
|
|
190
|
+
stroke-linejoin="round"
|
|
191
|
+
stroke-width="2"
|
|
192
|
+
>
|
|
193
|
+
<path d="M4 6a8 3 0 1 0 16 0A8 3 0 1 0 4 6" />
|
|
194
|
+
<path d="M4 6v6a8 3 0 0 0 16 0V6" />
|
|
195
|
+
<path d="M4 12v6a8 3 0 0 0 16 0v-6" />
|
|
196
|
+
</g>
|
|
197
|
+
</svg>
|
|
198
|
+
</span>
|
|
199
|
+
<span>Lucid</span>
|
|
200
|
+
<span className="absolute inset-0"></span>
|
|
201
|
+
</a>
|
|
202
|
+
</h2>
|
|
203
|
+
|
|
204
|
+
<p className="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
|
|
205
|
+
A SQL ORM with a powerful query builder, active record, migrations, and model
|
|
206
|
+
factories. Everything you need to work with databases.
|
|
207
|
+
</p>
|
|
208
|
+
|
|
209
|
+
<svg
|
|
210
|
+
className="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
|
|
211
|
+
viewBox="0 0 24 24"
|
|
212
|
+
>
|
|
213
|
+
<path
|
|
214
|
+
fill="none"
|
|
215
|
+
stroke="currentColor"
|
|
216
|
+
strokeLinecap="round"
|
|
217
|
+
strokeLinejoin="round"
|
|
218
|
+
strokeWidth="2"
|
|
219
|
+
d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1 9-9m-5 0h5v5"
|
|
220
|
+
/>
|
|
221
|
+
</svg>
|
|
222
|
+
</article>
|
|
223
|
+
|
|
224
|
+
<article className="relative py-4 px-5 bg-white border border-transparent rounded-lg hover:border-sand-8 hover:shadow-sm transition duration-100 ease-in-out group">
|
|
225
|
+
<h2 className="font-semibold text-sand-12">
|
|
226
|
+
<a href="https://vinejs.dev/" target="_blank" className="flex flex-row gap-2">
|
|
227
|
+
<span className="bg-[#F3DBFC] h-6 w-6 flex justify-center items-center rounded">
|
|
228
|
+
<svg className="h-4 w-4 fill-[#CA5AF2]" viewBox="0 0 24 24">
|
|
229
|
+
<path
|
|
230
|
+
fill="none"
|
|
231
|
+
stroke="currentColor"
|
|
232
|
+
strokeLinecap="round"
|
|
233
|
+
strokeLinejoin="round"
|
|
234
|
+
strokeWidth="2"
|
|
235
|
+
d="M12 3a12 12 0 0 0 8.5 3A12 12 0 0 1 12 21 12 12 0 0 1 3.5 6 12 12 0 0 0 12 3"
|
|
236
|
+
/>
|
|
237
|
+
</svg>
|
|
238
|
+
</span>
|
|
239
|
+
<span>Vine</span>
|
|
240
|
+
<span className="absolute inset-0"></span>
|
|
241
|
+
</a>
|
|
242
|
+
</h2>
|
|
243
|
+
|
|
244
|
+
<p className="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
|
|
245
|
+
A yet simple but feature rich and type-safe form data validation. It comes with 50+
|
|
246
|
+
built-in rules and an expressive API to define custom rules.
|
|
247
|
+
</p>
|
|
248
|
+
|
|
249
|
+
<svg
|
|
250
|
+
className="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
|
|
251
|
+
viewBox="0 0 24 24"
|
|
252
|
+
>
|
|
253
|
+
<path
|
|
254
|
+
fill="none"
|
|
255
|
+
stroke="currentColor"
|
|
256
|
+
strokeLinecap="round"
|
|
257
|
+
strokeLinejoin="round"
|
|
258
|
+
strokeWidth="2"
|
|
259
|
+
d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1 9-9m-5 0h5v5"
|
|
260
|
+
/>
|
|
261
|
+
</svg>
|
|
262
|
+
</article>
|
|
263
|
+
|
|
264
|
+
<article className="relative py-4 px-5 bg-white border border-transparent rounded-lg hover:border-sand-8 hover:shadow-sm transition duration-100 ease-in-out group">
|
|
265
|
+
<h2 className="font-semibold text-sand-12">
|
|
266
|
+
<a href="https://inertiajs.com/" target="_blank" className="flex flex-row gap-2">
|
|
267
|
+
<span className="bg-[#B8EAE0] h-6 w-6 flex justify-center items-center rounded">
|
|
268
|
+
<svg className="h-4 w-4 fill-[#4BBBA5]" viewBox="0 0 24 24">
|
|
269
|
+
<path
|
|
270
|
+
fill="none"
|
|
271
|
+
stroke="currentColor"
|
|
272
|
+
strokeLinecap="round"
|
|
273
|
+
strokeLinejoin="round"
|
|
274
|
+
strokeWidth="2"
|
|
275
|
+
d="m12.5 8l4 4l-4 4H17l4-4l-4-4zm-9 0l4 4l-4 4H8l4-4l-4-4z"
|
|
276
|
+
/>
|
|
277
|
+
</svg>
|
|
278
|
+
</span>
|
|
279
|
+
<span>InertiaJS</span>
|
|
280
|
+
<span className="absolute inset-0"></span>
|
|
281
|
+
</a>
|
|
282
|
+
</h2>
|
|
283
|
+
|
|
284
|
+
<p className="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
|
|
285
|
+
The modern monolithic application architecture. It allows you to build single-page
|
|
286
|
+
applications without building an API.
|
|
287
|
+
</p>
|
|
288
|
+
|
|
289
|
+
<svg
|
|
290
|
+
className="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
|
|
291
|
+
viewBox="0 0 24 24"
|
|
292
|
+
>
|
|
293
|
+
<path
|
|
294
|
+
fill="none"
|
|
295
|
+
stroke="currentColor"
|
|
296
|
+
strokeLinecap="round"
|
|
297
|
+
strokeLinejoin="round"
|
|
298
|
+
strokeWidth="2"
|
|
299
|
+
d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1 9-9m-5 0h5v5"
|
|
300
|
+
/>
|
|
301
|
+
</svg>
|
|
302
|
+
</article>
|
|
303
|
+
|
|
304
|
+
<article className="relative py-4 px-5 bg-white border border-transparent rounded-lg hover:border-sand-8 hover:shadow-sm transition duration-100 ease-in-out group">
|
|
305
|
+
<h2 className="font-semibold text-sand-12">
|
|
306
|
+
<a href="https://japa.dev" target="_blank" className="flex flex-row gap-2">
|
|
307
|
+
<span className="bg-[#FACDDC] h-6 w-6 flex justify-center items-center rounded">
|
|
308
|
+
<svg className="h-4 w-4 fill-[#DD3074]" viewBox="0 0 256 256">
|
|
309
|
+
<path
|
|
310
|
+
fill="currentColor"
|
|
311
|
+
d="m240.49 83.51-60-60a12 12 0 0 0-17 0L34.28 152.75a48.77 48.77 0 0 0 69 69l111.2-111.26 21.31-7.11a12 12 0 0 0 4.7-19.87M86.28 204.75a24.77 24.77 0 0 1-35-35l28.13-28.13c7.73-2.41 19.58-3 35.06 5a84 84 0 0 0 21.95 8ZM204.2 88.62a12.15 12.15 0 0 0-4.69 2.89l-38.89 38.9c-7.73 2.41-19.58 3-35.06-5a84 84 0 0 0-21.94-8L172 49l37.79 37.79Z"
|
|
312
|
+
/>
|
|
313
|
+
</svg>
|
|
314
|
+
</span>
|
|
315
|
+
<span>Japa</span>
|
|
316
|
+
<span className="absolute inset-0"></span>
|
|
317
|
+
</a>
|
|
318
|
+
</h2>
|
|
319
|
+
|
|
320
|
+
<p className="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
|
|
321
|
+
From JSON API tests using Open API schema to browser tests with Playwrighht, it
|
|
322
|
+
comes with everything you need to test your application.
|
|
323
|
+
</p>
|
|
324
|
+
|
|
325
|
+
<svg
|
|
326
|
+
className="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
|
|
327
|
+
viewBox="0 0 24 24"
|
|
328
|
+
>
|
|
329
|
+
<path
|
|
330
|
+
fill="none"
|
|
331
|
+
stroke="currentColor"
|
|
332
|
+
strokeLinecap="round"
|
|
333
|
+
strokeLinejoin="round"
|
|
334
|
+
strokeWidth="2"
|
|
335
|
+
d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1 9-9m-5 0h5v5"
|
|
336
|
+
/>
|
|
337
|
+
</svg>
|
|
338
|
+
</article>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
<div className="text-sm text-center [&>code]:font-medium [&>code]:text-[#a599ff] bg-sand-12 text-sand-1 relative py-2">
|
|
343
|
+
Route for this page is registered in <code>start/routes.ts</code> file, rendering{' '}
|
|
344
|
+
<code>inertia/pages/home.tsx</code> template
|
|
345
|
+
</div>
|
|
18
346
|
</div>
|
|
19
347
|
</>
|
|
20
348
|
)
|
|
@@ -10,12 +10,65 @@
|
|
|
10
10
|
|
|
11
11
|
<title inertia>AdonisJS x Inertia x React</title>
|
|
12
12
|
|
|
13
|
+
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
14
|
+
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,400i,500,500i,600,600i,700,700i" rel="stylesheet" />
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
:root {
|
|
18
|
+
--sand-1: #fdfdfc;
|
|
19
|
+
--sand-2: #f9f9f8;
|
|
20
|
+
--sand-3: #f1f0ef;
|
|
21
|
+
--sand-4: #e9e8e6;
|
|
22
|
+
--sand-5: #e2e1de;
|
|
23
|
+
--sand-6: #dad9d6;
|
|
24
|
+
--sand-7: #cfceca;
|
|
25
|
+
--sand-8: #bcbbb5;
|
|
26
|
+
--sand-9: #8d8d86;
|
|
27
|
+
--sand-10: #82827c;
|
|
28
|
+
--sand-11: #63635e;
|
|
29
|
+
--sand-12: #21201c;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
32
|
+
|
|
33
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
tailwind.config = {
|
|
37
|
+
theme: {
|
|
38
|
+
extend: {
|
|
39
|
+
fontFamily: {
|
|
40
|
+
sans: ['Instrument Sans', 'sans-serif'],
|
|
41
|
+
},
|
|
42
|
+
colors: {
|
|
43
|
+
primary: {
|
|
44
|
+
DEFAULT: '#5A45FF',
|
|
45
|
+
},
|
|
46
|
+
sand: {
|
|
47
|
+
1: 'var(--sand-1)',
|
|
48
|
+
2: 'var(--sand-2)',
|
|
49
|
+
3: 'var(--sand-3)',
|
|
50
|
+
4: 'var(--sand-4)',
|
|
51
|
+
5: 'var(--sand-5)',
|
|
52
|
+
6: 'var(--sand-6)',
|
|
53
|
+
7: 'var(--sand-7)',
|
|
54
|
+
8: 'var(--sand-8)',
|
|
55
|
+
9: 'v and import it herear(--sand-9)',
|
|
56
|
+
10: 'var(--sand-10)',
|
|
57
|
+
11: 'var(--sand-11)',
|
|
58
|
+
12: 'var(--sand-12)',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
|
|
13
66
|
@viteReactRefresh()
|
|
14
67
|
@inertiaHead()
|
|
15
68
|
{{ "@vite(['inertia/app/app.tsx', `inertia/pages/${page.component}.tsx`])" }}
|
|
16
69
|
</head>
|
|
17
70
|
|
|
18
|
-
<body>
|
|
71
|
+
<body class="min-h-screen w-screen font-sans">
|
|
19
72
|
@inertia()
|
|
20
73
|
</body>
|
|
21
74
|
|