nuxt-typed-router 1.0.3 → 1.0.4

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/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "1.0.3"
8
+ "version": "1.0.4"
9
9
  }
package/dist/module.mjs CHANGED
@@ -330,8 +330,6 @@ function createRuntimeHookFile(routesDeclTemplate) {
330
330
  };
331
331
  };
332
332
 
333
- export default {};
334
-
335
333
  `;
336
334
  }
337
335
  function createRuntimeRoutesFile({
@@ -4,12 +4,32 @@ import { useNuxtApp } from '#app';
4
4
  export const useTypedRouter = () => {
5
5
  const { $router } = useNuxtApp();
6
6
 
7
- const routesList = {};
7
+ const routesList = {
8
+ activate: 'activate',
9
+ index: 'index',
10
+ childOne: {
11
+ childOneChildOneSubOne: 'parent-child-one-child-one-sub-one',
12
+ user: { index: 'parent-child-one-child-one-sub-one-user' },
13
+ childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two',
14
+ index: 'parent-child-one',
15
+ },
16
+ childTwo: {
17
+ childTwoId: 'parent-child-two-id',
18
+ childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one',
19
+ index: 'parent-child-two',
20
+ profile: {
21
+ id: {
22
+ slug: { index: 'parent-child-two-profile-id-slug' },
23
+ index: 'parent-child-two-profile-id',
24
+ },
25
+ index: 'parent-child-two-profile',
26
+ },
27
+ },
28
+ rootPage: 'rootPage',
29
+ };
8
30
 
9
31
  return {
10
32
  router: $router,
11
33
  routes: routesList,
12
34
  };
13
35
  };
14
-
15
- export default {};
@@ -4,12 +4,32 @@ import { useNuxtApp } from '#app';
4
4
  export const useTypedRouter = () => {
5
5
  const { $router } = useNuxtApp();
6
6
 
7
- const routesList = {};
7
+ const routesList = {
8
+ activate: 'activate',
9
+ index: 'index',
10
+ childOne: {
11
+ childOneChildOneSubOne: 'parent-child-one-child-one-sub-one',
12
+ user: { index: 'parent-child-one-child-one-sub-one-user' },
13
+ childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two',
14
+ index: 'parent-child-one',
15
+ },
16
+ childTwo: {
17
+ childTwoId: 'parent-child-two-id',
18
+ childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one',
19
+ index: 'parent-child-two',
20
+ profile: {
21
+ id: {
22
+ slug: { index: 'parent-child-two-profile-id-slug' },
23
+ index: 'parent-child-two-profile-id',
24
+ },
25
+ index: 'parent-child-two-profile',
26
+ },
27
+ },
28
+ rootPage: 'rootPage',
29
+ };
8
30
 
9
31
  return {
10
32
  router: $router,
11
33
  routes: routesList,
12
34
  };
13
35
  };
14
-
15
- export default {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-typed-router",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Provide autocompletion for pages route names generated by Nuxt router",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- export { useTypedRouter } from './useTypedRouter';
@@ -1 +0,0 @@
1
- export { useTypedRouter } from "./useTypedRouter.mjs";