@adonisjs/inertia 4.0.0-next.0 → 4.0.0-next.10

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.
Files changed (89) hide show
  1. package/README.md +8 -5
  2. package/build/bin/test.d.ts +1 -0
  3. package/build/chunk-4EZ2J6OA.js +7 -0
  4. package/build/chunk-5QRJHXXQ.js +91 -0
  5. package/build/chunk-DISC5OYC.js +46 -0
  6. package/build/chunk-MLKGABMK.js +9 -0
  7. package/build/chunk-YQ72YL64.js +813 -0
  8. package/build/factories/inertia_factory.d.ts +137 -0
  9. package/build/factories/main.d.ts +1 -0
  10. package/build/factories/main.js +175 -0
  11. package/build/index.d.ts +7 -19
  12. package/build/index.js +21 -307
  13. package/build/providers/inertia_provider.d.ts +86 -13
  14. package/build/providers/inertia_provider.js +48 -18
  15. package/build/src/client/helpers.d.ts +27 -0
  16. package/build/src/client/helpers.js +30 -0
  17. package/build/src/client/react/context.d.ts +24 -0
  18. package/build/src/client/react/index.d.ts +3 -0
  19. package/build/src/client/react/index.js +72 -0
  20. package/build/src/client/react/link.d.ts +64 -0
  21. package/build/src/client/react/router.d.ts +33 -0
  22. package/build/src/client/vite.d.ts +65 -0
  23. package/build/src/{plugins → client}/vite.js +6 -2
  24. package/build/src/debug.d.ts +22 -0
  25. package/build/src/define_config.d.ts +30 -0
  26. package/build/src/headers.d.ts +61 -0
  27. package/build/src/index_pages.d.ts +32 -0
  28. package/build/src/inertia.d.ts +261 -0
  29. package/build/src/inertia_manager.d.ts +47 -0
  30. package/build/src/inertia_middleware.d.ts +76 -86
  31. package/build/src/inertia_middleware.js +110 -3
  32. package/build/src/plugins/edge/plugin.d.ts +30 -6
  33. package/build/src/plugins/edge/plugin.js +13 -9
  34. package/build/src/plugins/edge/tags.d.ts +47 -0
  35. package/build/src/plugins/edge/utils.d.ts +26 -0
  36. package/build/src/plugins/japa/api_client.d.ts +136 -22
  37. package/build/src/plugins/japa/api_client.js +36 -48
  38. package/build/src/props.d.ts +276 -0
  39. package/build/src/server_renderer.d.ts +54 -0
  40. package/build/src/symbols.d.ts +25 -0
  41. package/build/src/types.d.ts +400 -4
  42. package/build/tests/helpers.d.ts +35 -0
  43. package/build/tests/index_pages.spec.d.ts +1 -0
  44. package/build/tests/inertia.spec.d.ts +1 -0
  45. package/build/tests/inertia_page.spec.d.ts +1 -0
  46. package/build/tests/middleware.spec.d.ts +1 -0
  47. package/build/tests/plugins/api_client.spec.d.ts +1 -0
  48. package/build/tests/plugins/edge.plugin.spec.d.ts +1 -0
  49. package/build/tests/provider.spec.d.ts +1 -0
  50. package/build/tests/types/react.spec.d.ts +65 -0
  51. package/build/tests/types/shared_props.spec.d.ts +1 -0
  52. package/build/tests/types/to_component_props.spec.d.ts +1 -0
  53. package/build/tests/types/to_page_props.spec.d.ts +1 -0
  54. package/package.json +99 -71
  55. package/build/app.css.stub +0 -13
  56. package/build/chunk-AWCR2NAY.js +0 -412
  57. package/build/config.stub +0 -33
  58. package/build/react/app.tsx.stub +0 -38
  59. package/build/react/errors/not_found.tsx.stub +0 -14
  60. package/build/react/errors/server_error.tsx.stub +0 -14
  61. package/build/react/home.tsx.stub +0 -349
  62. package/build/react/root.edge.stub +0 -76
  63. package/build/react/ssr.tsx.stub +0 -17
  64. package/build/react/tsconfig.json.stub +0 -15
  65. package/build/solid/app.tsx.stub +0 -38
  66. package/build/solid/errors/not_found.tsx.stub +0 -14
  67. package/build/solid/errors/server_error.tsx.stub +0 -14
  68. package/build/solid/home.tsx.stub +0 -358
  69. package/build/solid/root.edge.stub +0 -73
  70. package/build/solid/ssr.tsx.stub +0 -19
  71. package/build/solid/tsconfig.json.stub +0 -16
  72. package/build/src/helpers.d.ts +0 -12
  73. package/build/src/helpers.js +0 -14
  74. package/build/src/plugins/vite.d.ts +0 -26
  75. package/build/svelte/app.ts.stub +0 -32
  76. package/build/svelte/errors/not_found.svelte.stub +0 -10
  77. package/build/svelte/errors/server_error.svelte.stub +0 -14
  78. package/build/svelte/home.svelte.stub +0 -339
  79. package/build/svelte/root.edge.stub +0 -75
  80. package/build/svelte/ssr.ts.stub +0 -19
  81. package/build/svelte/tsconfig.json.stub +0 -14
  82. package/build/types-DVqEHBD1.d.ts +0 -240
  83. package/build/vue/app.ts.stub +0 -41
  84. package/build/vue/errors/not_found.vue.stub +0 -10
  85. package/build/vue/errors/server_error.vue.stub +0 -14
  86. package/build/vue/home.vue.stub +0 -343
  87. package/build/vue/root.edge.stub +0 -75
  88. package/build/vue/ssr.ts.stub +0 -22
  89. package/build/vue/tsconfig.json.stub +0 -16
@@ -1,240 +0,0 @@
1
- import { ConfigProvider } from '@adonisjs/core/types';
2
- import { HttpContext } from '@adonisjs/core/http';
3
- import { Simplify, Serialize } from '@tuyau/utils/types';
4
-
5
- /**
6
- * VersionCache is used to cache the version of the assets.
7
- *
8
- * If the user has provided a version, it will be used.
9
- * Otherwise, we will compute a hash from the manifest file
10
- * and cache it.
11
- */
12
- declare class VersionCache {
13
- #private;
14
- protected appRoot: URL;
15
- protected assetsVersion?: AssetsVersion;
16
- constructor(appRoot: URL, assetsVersion?: AssetsVersion);
17
- /**
18
- * Pre-compute the version
19
- */
20
- computeVersion(): Promise<this>;
21
- /**
22
- * Returns the current assets version
23
- */
24
- getVersion(): string | number;
25
- /**
26
- * Set the assets version
27
- */
28
- setVersion(version: AssetsVersion): Promise<void>;
29
- }
30
-
31
- declare const ignoreFirstLoadSymbol: unique symbol;
32
- /**
33
- * Base class for Mergeable props
34
- */
35
- declare abstract class MergeableProp {
36
- shouldMerge: boolean;
37
- merge(): this;
38
- }
39
- /**
40
- * Optional prop
41
- */
42
- declare class OptionalProp<T extends MaybePromise<any>> {
43
- callback: T;
44
- [ignoreFirstLoadSymbol]: boolean;
45
- constructor(callback: T);
46
- }
47
- /**
48
- * Defer prop
49
- */
50
- declare class DeferProp<T extends MaybePromise<any>> extends MergeableProp {
51
- callback: T;
52
- private group;
53
- [ignoreFirstLoadSymbol]: true;
54
- constructor(callback: T, group: string);
55
- getGroup(): string;
56
- }
57
- /**
58
- * Merge prop
59
- */
60
- declare class MergeProp<T extends MaybePromise<any>> extends MergeableProp {
61
- callback: T;
62
- constructor(callback: T);
63
- }
64
- /**
65
- * Always prop
66
- */
67
- declare class AlwaysProp<T extends MaybePromise<any>> extends MergeableProp {
68
- callback: T;
69
- constructor(callback: T);
70
- }
71
-
72
- type MaybePromise<T> = T | Promise<T>;
73
- /**
74
- * Props that will be passed to inertia render method
75
- */
76
- type PageProps = Record<string, unknown>;
77
- /**
78
- * Shared data types
79
- */
80
- type Data = string | number | object | boolean;
81
- type SharedDatumFactory = (ctx: HttpContext) => MaybePromise<Data>;
82
- type SharedData = Record<string, Data | SharedDatumFactory>;
83
- /**
84
- * Allowed values for the assets version
85
- */
86
- type AssetsVersion = string | number | undefined;
87
- interface InertiaConfig<T extends SharedData = SharedData> {
88
- /**
89
- * Path to the Edge view that will be used as the root view for Inertia responses.
90
- * @default root (resources/views/inertia_layout.edge)
91
- */
92
- rootView?: string | ((ctx: HttpContext) => string);
93
- /**
94
- * Path to your client-side entrypoint file.
95
- */
96
- entrypoint?: string;
97
- /**
98
- * The version of your assets. Every client request will be checked against this version.
99
- * If the version is not the same, the client will do a full reload.
100
- */
101
- assetsVersion?: AssetsVersion;
102
- /**
103
- * Data that should be shared with all rendered pages
104
- */
105
- sharedData?: T;
106
- /**
107
- * History encryption
108
- *
109
- * See https://v2.inertiajs.com/history-encryption
110
- */
111
- history?: {
112
- encrypt?: boolean;
113
- };
114
- /**
115
- * Options to configure SSR
116
- */
117
- ssr?: {
118
- /**
119
- * Enable or disable SSR
120
- */
121
- enabled: boolean;
122
- /**
123
- * List of components that should be rendered on the server
124
- */
125
- pages?: string[] | ((ctx: HttpContext, page: string) => MaybePromise<boolean>);
126
- /**
127
- * Path to the SSR entrypoint file
128
- */
129
- entrypoint?: string;
130
- /**
131
- * Path to the SSR bundled file that will be used in production
132
- */
133
- bundle?: string;
134
- };
135
- }
136
- /**
137
- * Resolved inertia configuration
138
- */
139
- interface ResolvedConfig<T extends SharedData = SharedData> {
140
- rootView: string | ((ctx: HttpContext) => string);
141
- versionCache: VersionCache;
142
- sharedData: T;
143
- history: {
144
- encrypt: boolean;
145
- };
146
- ssr: {
147
- enabled: boolean;
148
- entrypoint: string;
149
- pages?: string[] | ((ctx: HttpContext, page: string) => MaybePromise<boolean>);
150
- bundle: string;
151
- };
152
- }
153
- interface PageObject<TPageProps extends PageProps = PageProps> {
154
- ssrHead?: string;
155
- ssrBody?: string;
156
- /**
157
- * The name of the JavaScript page component.
158
- */
159
- component: string;
160
- /**
161
- * The current asset version.
162
- */
163
- version: string | number;
164
- /**
165
- * The page props (data).
166
- */
167
- props: TPageProps;
168
- /**
169
- * The page URL.
170
- */
171
- url: string;
172
- /**
173
- * List of deferred props that will be loaded with subsequent requests
174
- */
175
- deferredProps?: Record<string, string[]>;
176
- /**
177
- * List of mergeable props that will be merged with subsequent requests
178
- */
179
- mergeProps?: string[];
180
- /**
181
- * Whether or not to encrypt the current page's history state.
182
- */
183
- encryptHistory?: boolean;
184
- /**
185
- * Whether or not to clear any encrypted history state.
186
- */
187
- clearHistory?: boolean;
188
- }
189
- type IsOptionalProp<T> = T extends OptionalProp<any> ? true : T extends DeferProp<any> ? true : false;
190
- type InferProps<T> = {
191
- [K in keyof T as IsOptionalProp<T[K]> extends true ? K : never]+?: T[K] extends {
192
- callback: () => MaybePromise<infer U>;
193
- } ? U : T[K];
194
- } & {
195
- [K in keyof T as IsOptionalProp<T[K]> extends true ? never : K]: T[K] extends {
196
- callback: () => MaybePromise<infer U>;
197
- } ? U : T[K] extends () => MaybePromise<infer U> ? U : T[K];
198
- };
199
- type ReturnsTypesSharedData<T extends SharedData> = {} extends T ? {} : InferProps<{
200
- [K in keyof T]: T[K] extends (...args: any[]) => MaybePromise<infer U> ? U : T[K];
201
- }>;
202
- /**
203
- * Infer shared data types from the config provider
204
- */
205
- type InferSharedProps<T extends ConfigProvider<ResolvedConfig>> = ReturnsTypesSharedData<Awaited<ReturnType<T['resolver']>>['sharedData']>;
206
- /**
207
- * The shared props inferred from the user config user-land.
208
- * Should be module augmented by the user
209
- */
210
- interface SharedProps {
211
- }
212
- /**
213
- * Helper for infering the page props from a Controller method that returns
214
- * inertia.render
215
- *
216
- * InferPageProps will also include the shared props
217
- *
218
- * ```ts
219
- * // Your Adonis Controller
220
- * class MyController {
221
- * index() {
222
- * return inertia.render('foo', { foo: 1 })
223
- * }
224
- * }
225
- *
226
- * // Your React component
227
- * export default MyReactComponent(props: InferPageProps<Controller, 'index'>) {
228
- * }
229
- * ```
230
- */
231
- type InferPageProps<Controller, Method extends keyof Controller> = Controller[Method] extends (...args: any[]) => any ? Simplify<Serialize<InferProps<Extract<Awaited<ReturnType<Controller[Method]>>, PageObject>['props']> & SharedProps>> : never;
232
- /**
233
- * Signature for the method in the SSR entrypoint file
234
- */
235
- type RenderInertiaSsrApp = (page: PageObject) => Promise<{
236
- head: string[];
237
- body: string;
238
- }>;
239
-
240
- export { AlwaysProp as A, type Data as D, type InertiaConfig as I, type MaybePromise as M, OptionalProp as O, type PageObject as P, type ResolvedConfig as R, type SharedData as S, MergeProp as a, DeferProp as b, type PageProps as c, type SharedDatumFactory as d, type AssetsVersion as e, type InferSharedProps as f, type SharedProps as g, type InferPageProps as h, type RenderInertiaSsrApp as i };
@@ -1,41 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/app/app.ts') })
3
- }}}
4
- /// <reference path="../../adonisrc.ts" />
5
- /// <reference path="../../config/inertia.ts" />
6
-
7
- import '../css/app.css';
8
-
9
- {{#if ssr}}
10
- import { createSSRApp, h } from 'vue'
11
- {{#else}}
12
- import { createApp, h } from 'vue'
13
- {{/if}}
14
- import type { DefineComponent } from 'vue'
15
- import { createInertiaApp } from '@inertiajs/vue3'
16
- import { resolvePageComponent } from '@adonisjs/inertia/helpers'
17
-
18
- const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS'
19
-
20
- createInertiaApp({
21
- progress: { color: '#5468FF' },
22
-
23
- title: (title) => {{ '`${title} - ${appName}`' }},
24
-
25
- resolve: (name) => {
26
- return resolvePageComponent(
27
- {{ '`../pages/${name}.vue`' }},
28
- import.meta.glob<DefineComponent>('../pages/**/*.vue'),
29
- )
30
- },
31
-
32
- setup({ el, App, props, plugin }) {
33
- {{#if ssr}}
34
- createSSRApp({ render: () => h(App, props) })
35
- {{#else}}
36
- createApp({ render: () => h(App, props) })
37
- {{/if}}
38
- .use(plugin)
39
- .mount(el)
40
- },
41
- })
@@ -1,10 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/pages/errors/not_found.vue') })
3
- }}}
4
- <template>
5
- <div class="container">
6
- <div class="title">Page not found</div>
7
-
8
- <span>This page does not exist.</span>
9
- </div>
10
- </template>
@@ -1,14 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/pages/errors/server_error.vue') })
3
- }}}
4
- <script setup lang="ts">
5
- defineProps<{ error: any }>();
6
- </script>
7
-
8
- <template>
9
- <div class="container">
10
- <div class="title">Server Error</div>
11
-
12
- <span>\{\{ error.message \}\}</span>
13
- </div>
14
- </template>
@@ -1,343 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/pages/home.vue') })
3
- }}}
4
- <script setup lang="ts">
5
- import { Head } from '@inertiajs/vue3'
6
- </script>
7
-
8
- <template>
9
- <Head title="Homepage" />
10
-
11
- <div class="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>
12
-
13
- <div class="pt-4 h-full flex flex-col">
14
- <!-- Header -->
15
- <div class="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" class="isolate">
17
- <svg class="w-16 h-16 fill-primary" viewBox="0 0 33 33">
18
- <path
19
- fill-rule="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
- clip-rule="evenodd"
22
- />
23
- </svg>
24
- </a>
25
- </div>
26
-
27
- <!-- Bento with documentation, Adocasts, packages and Discord -->
28
- <div class="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 class="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 class="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" clip-path="url(#a)" clip-rule="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
- fill-opacity=".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 stop-opacity="0" />
59
- <stop offset="1" stop-color="#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 class="absolute left-0 right-0 bottom-0 h-16 bg-gradient-to-b from-white/0 to-white"></div>
68
- </div>
69
-
70
- <div class="flex flex-row gap-4">
71
- <div class="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
72
- <svg class="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 class="space-y-1">
81
- <h2 class="text-lg font-semibold">
82
- <a href="https://docs.adonisjs.com" target="_blank">
83
- <span>Documentation</span>
84
- <span class="absolute inset-0"></span>
85
- </a>
86
- </h2>
87
-
88
- <p class="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 class="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 class="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
100
- <svg class="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 class="space-y-1">
109
- <h2 class="text-lg font-semibold">
110
- <a href="https://adocasts.com" target="_blank">
111
- <span>Adocasts</span>
112
- <span class="absolute inset-0"></span>
113
- </a>
114
- </h2>
115
-
116
- <p class="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 class="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 class="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
125
- <svg class="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 class="space-y-1">
134
- <h2 class="text-lg font-semibold">
135
- <a href="https://packages.adonisjs.com" target="_blank">
136
- <span>Packages</span>
137
- <span class="absolute inset-0"></span>
138
- </a>
139
- </h2>
140
-
141
- <p class="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 class="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 class="shrink-0 w-10 h-10 bg-primary/20 rounded-md flex justify-center items-center">
150
- <svg class="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 class="space-y-1">
159
- <h2 class="text-lg font-semibold">
160
- <a href="https://discord.gg/vDcEjq6" target="_blank">
161
- <span>Discord</span>
162
- <span class="absolute inset-0"></span>
163
- </a>
164
- </h2>
165
-
166
- <p class="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 class="grow mt-10 mb-8 px-16 xl:px-8 max-w-screen-xl mx-auto">
176
- <div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4">
177
- <article class="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 class="font-semibold text-sand-12">
179
- <a href="https://lucid.adonisjs.com" target="_blank" class="flex flex-row gap-2">
180
- <span class="bg-[#D5EAE7] h-6 w-6 flex justify-center items-center rounded">
181
- <svg class="h-4 w-4 fill-[#0E766E]" viewBox="0 0 24 24">
182
- <g
183
- fill="none"
184
- stroke="currentColor"
185
- stroke-linecap="round"
186
- stroke-linejoin="round"
187
- stroke-width="2"
188
- >
189
- <path d="M4 6a8 3 0 1 0 16 0A8 3 0 1 0 4 6" />
190
- <path d="M4 6v6a8 3 0 0 0 16 0V6" />
191
- <path d="M4 12v6a8 3 0 0 0 16 0v-6" />
192
- </g>
193
- </svg>
194
- </span>
195
- <span>Lucid</span>
196
- <span class="absolute inset-0"></span>
197
- </a>
198
- </h2>
199
-
200
- <p class="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
201
- A SQL ORM with a powerful query builder, active record, migrations, and model
202
- factories. Everything you need to work with databases.
203
- </p>
204
-
205
- <svg
206
- class="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
207
- viewBox="0 0 24 24"
208
- >
209
- <path
210
- fill="none"
211
- stroke="currentColor"
212
- stroke-linecap="round"
213
- stroke-linejoin="round"
214
- stroke-width="2"
215
- 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"
216
- />
217
- </svg>
218
- </article>
219
-
220
- <article class="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">
221
- <h2 class="font-semibold text-sand-12">
222
- <a href="https://vinejs.dev/" target="_blank" class="flex flex-row gap-2">
223
- <span class="bg-[#F3DBFC] h-6 w-6 flex justify-center items-center rounded">
224
- <svg class="h-4 w-4 fill-[#CA5AF2]" viewBox="0 0 24 24">
225
- <path
226
- fill="none"
227
- stroke="currentColor"
228
- stroke-linecap="round"
229
- stroke-linejoin="round"
230
- stroke-width="2"
231
- 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"
232
- />
233
- </svg>
234
- </span>
235
- <span>Vine</span>
236
- <span class="absolute inset-0"></span>
237
- </a>
238
- </h2>
239
-
240
- <p class="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
241
- A yet simple but feature rich and type-safe form data validation. It comes with 50+
242
- built-in rules and an expressive API to define custom rules.
243
- </p>
244
-
245
- <svg
246
- class="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
247
- viewBox="0 0 24 24"
248
- >
249
- <path
250
- fill="none"
251
- stroke="currentColor"
252
- stroke-linecap="round"
253
- stroke-linejoin="round"
254
- stroke-width="2"
255
- 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"
256
- />
257
- </svg>
258
- </article>
259
-
260
- <article class="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">
261
- <h2 class="font-semibold text-sand-12">
262
- <a href="https://inertiajs.com/" target="_blank" class="flex flex-row gap-2">
263
- <span class="bg-[#B8EAE0] h-6 w-6 flex justify-center items-center rounded">
264
- <svg class="h-4 w-4 fill-[#4BBBA5]" viewBox="0 0 24 24">
265
- <path
266
- fill="none"
267
- stroke="currentColor"
268
- stroke-linecap="round"
269
- stroke-linejoin="round"
270
- stroke-width="2"
271
- d="m12.5 8l4 4l-4 4H17l4-4l-4-4zm-9 0l4 4l-4 4H8l4-4l-4-4z"
272
- />
273
- </svg>
274
- </span>
275
- <span>InertiaJS</span>
276
- <span class="absolute inset-0"></span>
277
- </a>
278
- </h2>
279
-
280
- <p class="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
281
- The modern monolithic application architecture. It allows you to build single-page
282
- applications without building an API.
283
- </p>
284
-
285
- <svg
286
- class="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
287
- viewBox="0 0 24 24"
288
- >
289
- <path
290
- fill="none"
291
- stroke="currentColor"
292
- stroke-linecap="round"
293
- stroke-linejoin="round"
294
- stroke-width="2"
295
- 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"
296
- />
297
- </svg>
298
- </article>
299
-
300
- <article class="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">
301
- <h2 class="font-semibold text-sand-12">
302
- <a href="https://japa.dev" target="_blank" class="flex flex-row gap-2">
303
- <span class="bg-[#FACDDC] h-6 w-6 flex justify-center items-center rounded">
304
- <svg class="h-4 w-4 fill-[#DD3074]" viewBox="0 0 256 256">
305
- <path
306
- fill="currentColor"
307
- 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"
308
- />
309
- </svg>
310
- </span>
311
- <span>Japa</span>
312
- <span class="absolute inset-0"></span>
313
- </a>
314
- </h2>
315
-
316
- <p class="mt-4 text-sm text-sand-11 group-hover:text-sand-12 transition ease-in-out duration-100">
317
- From JSON API tests using Open API schema to browser tests with Playwrighht, it
318
- comes with everything you need to test your application.
319
- </p>
320
-
321
- <svg
322
- class="absolute top-4 right-5 opacity-0 group-hover:opacity-100 text-sand-9 w-4 h-4 transition ease-in-out duration-100"
323
- viewBox="0 0 24 24"
324
- >
325
- <path
326
- fill="none"
327
- stroke="currentColor"
328
- stroke-linecap="round"
329
- stroke-linejoin="round"
330
- stroke-width="2"
331
- 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"
332
- />
333
- </svg>
334
- </article>
335
- </div>
336
- </div>
337
-
338
- <div class="text-sm text-center [&>code]:font-medium [&>code]:text-[#a599ff] bg-sand-12 text-sand-1 fixed bottom-0 left-0 right-0 py-2">
339
- Route for this page is registered in <code>start/routes.ts</code> file, rendering
340
- <code>inertia/pages/home.vue</code> template
341
- </div>
342
- </div>
343
- </template>