@adonisjs/inertia 3.1.1 → 4.0.0-next.1

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 (81) 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-74S2VAL7.js +761 -0
  5. package/build/chunk-DISC5OYC.js +46 -0
  6. package/build/chunk-MLKGABMK.js +9 -0
  7. package/build/chunk-PDP56GPP.js +75 -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/vite.d.ts +63 -0
  16. package/build/src/{plugins → client}/vite.js +9 -13
  17. package/build/src/debug.d.ts +22 -0
  18. package/build/src/define_config.d.ts +29 -0
  19. package/build/src/headers.d.ts +61 -0
  20. package/build/src/index_pages.d.ts +5 -0
  21. package/build/src/inertia.d.ts +253 -0
  22. package/build/src/inertia_manager.d.ts +46 -0
  23. package/build/src/inertia_middleware.d.ts +74 -87
  24. package/build/src/inertia_middleware.js +110 -3
  25. package/build/src/plugins/edge/plugin.d.ts +30 -6
  26. package/build/src/plugins/edge/plugin.js +13 -9
  27. package/build/src/plugins/edge/tags.d.ts +47 -0
  28. package/build/src/plugins/edge/utils.d.ts +26 -0
  29. package/build/src/plugins/japa/api_client.d.ts +136 -22
  30. package/build/src/plugins/japa/api_client.js +36 -48
  31. package/build/src/props.d.ts +269 -0
  32. package/build/src/server_renderer.d.ts +54 -0
  33. package/build/src/symbols.d.ts +25 -0
  34. package/build/src/types.d.ts +404 -4
  35. package/build/tests/helpers.d.ts +35 -0
  36. package/build/tests/index_pages.spec.d.ts +1 -0
  37. package/build/tests/inertia.spec.d.ts +1 -0
  38. package/build/tests/inertia_page.spec.d.ts +1 -0
  39. package/build/tests/middleware.spec.d.ts +1 -0
  40. package/build/tests/plugins/api_client.spec.d.ts +1 -0
  41. package/build/tests/plugins/edge.plugin.spec.d.ts +1 -0
  42. package/build/tests/provider.spec.d.ts +1 -0
  43. package/build/tests/types/shared_props.spec.d.ts +1 -0
  44. package/build/tests/types/to_component_props.spec.d.ts +1 -0
  45. package/build/tests/types/to_page_props.spec.d.ts +1 -0
  46. package/package.json +88 -71
  47. package/build/app.css.stub +0 -13
  48. package/build/chunk-W7TVEB4V.js +0 -412
  49. package/build/config.stub +0 -33
  50. package/build/react/app.tsx.stub +0 -38
  51. package/build/react/errors/not_found.tsx.stub +0 -14
  52. package/build/react/errors/server_error.tsx.stub +0 -14
  53. package/build/react/home.tsx.stub +0 -349
  54. package/build/react/root.edge.stub +0 -76
  55. package/build/react/ssr.tsx.stub +0 -17
  56. package/build/react/tsconfig.json.stub +0 -15
  57. package/build/solid/app.tsx.stub +0 -38
  58. package/build/solid/errors/not_found.tsx.stub +0 -14
  59. package/build/solid/errors/server_error.tsx.stub +0 -14
  60. package/build/solid/home.tsx.stub +0 -358
  61. package/build/solid/root.edge.stub +0 -73
  62. package/build/solid/ssr.tsx.stub +0 -19
  63. package/build/solid/tsconfig.json.stub +0 -16
  64. package/build/src/helpers.d.ts +0 -12
  65. package/build/src/helpers.js +0 -14
  66. package/build/src/plugins/vite.d.ts +0 -26
  67. package/build/svelte/app.ts.stub +0 -32
  68. package/build/svelte/errors/not_found.svelte.stub +0 -10
  69. package/build/svelte/errors/server_error.svelte.stub +0 -14
  70. package/build/svelte/home.svelte.stub +0 -339
  71. package/build/svelte/root.edge.stub +0 -75
  72. package/build/svelte/ssr.ts.stub +0 -19
  73. package/build/svelte/tsconfig.json.stub +0 -14
  74. package/build/types-DVqEHBD1.d.ts +0 -240
  75. package/build/vue/app.ts.stub +0 -41
  76. package/build/vue/errors/not_found.vue.stub +0 -10
  77. package/build/vue/errors/server_error.vue.stub +0 -14
  78. package/build/vue/home.vue.stub +0 -343
  79. package/build/vue/root.edge.stub +0 -75
  80. package/build/vue/ssr.ts.stub +0 -22
  81. package/build/vue/tsconfig.json.stub +0 -16
@@ -1,75 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('resources/views/inertia_layout.edge') })
3
- }}}
4
- <!DOCTYPE html>
5
- <html>
6
-
7
- <head>
8
- <meta charset="utf-8">
9
- <meta name="viewport" content="width=device-width, initial-scale=1">
10
-
11
- <title inertia>AdonisJS x Inertia x VueJS</title>
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: 'var(--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
-
66
- {{ "@vite(['inertia/app/app.ts', `inertia/pages/${page.component}.vue`])" }}
67
- @inertiaHead()
68
- @stack('dumper')
69
- </head>
70
-
71
- <body class="min-h-screen w-screen font-sans">
72
- @inertia()
73
- </body>
74
-
75
- </html>
@@ -1,22 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/app/ssr.ts') })
3
- }}}
4
-
5
- import { createInertiaApp } from '@inertiajs/vue3'
6
- import { renderToString } from '@vue/server-renderer'
7
- import { createSSRApp, h, type DefineComponent } from 'vue'
8
-
9
- export default function render(page: any) {
10
- return createInertiaApp({
11
- page,
12
- render: renderToString,
13
- resolve: (name) => {
14
- const pages = import.meta.glob<DefineComponent>('../pages/**/*.vue', { eager: true })
15
- {{ 'return pages[`../pages/${name}.vue`]' }}
16
- },
17
-
18
- setup({ App, props, plugin }) {
19
- return createSSRApp({ render: () => h(App, props) }).use(plugin)
20
- },
21
- })
22
- }
@@ -1,16 +0,0 @@
1
- {{{
2
- exports({ to: app.makePath('inertia/tsconfig.json') })
3
- }}}
4
- {
5
- "extends": "@adonisjs/tsconfig/tsconfig.client.json",
6
- "compilerOptions": {
7
- "baseUrl": ".",
8
- "jsx": "preserve",
9
- "module": "ESNext",
10
- "jsxImportSource": "vue",
11
- "paths": {
12
- "~/*": ["./*"],
13
- },
14
- },
15
- "include": ["./**/*.ts", "./**/*.vue"],
16
- }