dn-react-router-toolkit 0.5.2 → 0.5.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.
@@ -24,24 +24,16 @@ __export(item_loader_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(item_loader_exports);
26
26
  var tableItemloader = ({
27
- loader,
28
27
  repository
29
28
  }) => {
30
- return async ({ params }) => {
31
- const body = loader ? await (async () => {
32
- const result = await loader({ params });
33
- if (result instanceof Response) {
34
- return result.json();
35
- }
36
- return result;
37
- })() : {};
29
+ return async (args) => {
30
+ const { params } = args;
38
31
  if (params["itemId"] === "new") {
39
- return { item: void 0, ...body };
32
+ return { item: void 0 };
40
33
  }
41
34
  const item = params["itemId"] ? await repository.find(params["itemId"]) : void 0;
42
35
  return {
43
- item,
44
- ...body
36
+ item
45
37
  };
46
38
  };
47
39
  };
@@ -1,23 +1,15 @@
1
1
  // src/table/item_loader.tsx
2
2
  var tableItemloader = ({
3
- loader,
4
3
  repository
5
4
  }) => {
6
- return async ({ params }) => {
7
- const body = loader ? await (async () => {
8
- const result = await loader({ params });
9
- if (result instanceof Response) {
10
- return result.json();
11
- }
12
- return result;
13
- })() : {};
5
+ return async (args) => {
6
+ const { params } = args;
14
7
  if (params["itemId"] === "new") {
15
- return { item: void 0, ...body };
8
+ return { item: void 0 };
16
9
  }
17
10
  const item = params["itemId"] ? await repository.find(params["itemId"]) : void 0;
18
11
  return {
19
- item,
20
- ...body
12
+ item
21
13
  };
22
14
  };
23
15
  };
package/package.json CHANGED
@@ -1,84 +1,84 @@
1
1
  {
2
- "name": "dn-react-router-toolkit",
3
- "version": "0.5.2",
4
- "types": "./dist/index.d.ts",
5
- "main": "./dist/index.mjs",
6
- "module": "./dist/index.js",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.js"
12
- },
13
- "./auth": {
14
- "types": "./dist/auth/index.d.ts",
15
- "import": "./dist/auth/index.mjs",
16
- "require": "./dist/auth/index.js"
17
- },
18
- "./api": {
19
- "types": "./dist/api/index.d.ts",
20
- "import": "./dist/api/index.mjs",
21
- "require": "./dist/api/index.js"
22
- },
23
- "./client": {
24
- "types": "./dist/client/index.d.ts",
25
- "import": "./dist/client/index.mjs",
26
- "require": "./dist/client/index.js"
27
- },
28
- "./seo": {
29
- "types": "./dist/seo/index.d.ts",
30
- "import": "./dist/seo/index.mjs",
31
- "require": "./dist/seo/index.js"
32
- },
33
- "./db": {
34
- "types": "./dist/db/index.d.ts",
35
- "import": "./dist/db/index.mjs",
36
- "require": "./dist/db/index.js"
37
- },
38
- "./table": {
39
- "types": "./dist/table/index.d.ts",
40
- "import": "./dist/table/index.mjs",
41
- "require": "./dist/table/index.js"
42
- },
43
- "./crud": {
44
- "types": "./dist/crud/index.d.ts",
45
- "import": "./dist/crud/index.mjs",
46
- "require": "./dist/crud/index.js"
47
- }
2
+ "name": "dn-react-router-toolkit",
3
+ "version": "0.5.4",
4
+ "types": "./dist/index.d.ts",
5
+ "main": "./dist/index.mjs",
6
+ "module": "./dist/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js"
48
12
  },
49
- "scripts": {
50
- "build": "tsup",
51
- "dev": "tsup --watch"
13
+ "./auth": {
14
+ "types": "./dist/auth/index.d.ts",
15
+ "import": "./dist/auth/index.mjs",
16
+ "require": "./dist/auth/index.js"
52
17
  },
53
- "repository": {
54
- "type": "git",
55
- "url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
18
+ "./api": {
19
+ "types": "./dist/api/index.d.ts",
20
+ "import": "./dist/api/index.mjs",
21
+ "require": "./dist/api/index.js"
56
22
  },
57
- "author": "",
58
- "license": "MIT",
59
- "bugs": {
60
- "url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
23
+ "./client": {
24
+ "types": "./dist/client/index.d.ts",
25
+ "import": "./dist/client/index.mjs",
26
+ "require": "./dist/client/index.js"
61
27
  },
62
- "homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
63
- "description": "",
64
- "devDependencies": {
65
- "@types/node": "^24.10.1",
66
- "@types/react": "^19",
67
- "@types/react-dom": "^19",
68
- "schema-dts": "^1.1.5",
69
- "tsup": "^8.5.1",
70
- "typescript": "^5.7.3"
28
+ "./seo": {
29
+ "types": "./dist/seo/index.d.ts",
30
+ "import": "./dist/seo/index.mjs",
31
+ "require": "./dist/seo/index.js"
71
32
  },
72
- "dependencies": {
73
- "@react-router/dev": "^7.11.0",
74
- "dn-react-toolkit": "0.2.36",
75
- "pg": "^8.16.3",
76
- "uuid": "^13.0.0"
33
+ "./db": {
34
+ "types": "./dist/db/index.d.ts",
35
+ "import": "./dist/db/index.mjs",
36
+ "require": "./dist/db/index.js"
77
37
  },
78
- "peerDependencies": {
79
- "drizzle-orm": "0.45.1",
80
- "react": "^19",
81
- "react-dom": "^19",
82
- "react-router": "^7"
38
+ "./table": {
39
+ "types": "./dist/table/index.d.ts",
40
+ "import": "./dist/table/index.mjs",
41
+ "require": "./dist/table/index.js"
42
+ },
43
+ "./crud": {
44
+ "types": "./dist/crud/index.d.ts",
45
+ "import": "./dist/crud/index.mjs",
46
+ "require": "./dist/crud/index.js"
83
47
  }
48
+ },
49
+ "scripts": {
50
+ "build": "tsup",
51
+ "dev": "tsup --watch"
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
56
+ },
57
+ "author": "",
58
+ "license": "MIT",
59
+ "bugs": {
60
+ "url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
61
+ },
62
+ "homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
63
+ "description": "",
64
+ "devDependencies": {
65
+ "@types/node": "^24.10.1",
66
+ "@types/react": "^19",
67
+ "@types/react-dom": "^19",
68
+ "schema-dts": "^1.1.5",
69
+ "tsup": "^8.5.1",
70
+ "typescript": "^5.7.3"
71
+ },
72
+ "dependencies": {
73
+ "@react-router/dev": "^7.11.0",
74
+ "pg": "^8.16.3",
75
+ "uuid": "^13.0.0"
76
+ },
77
+ "peerDependencies": {
78
+ "dn-react-toolkit": "^0.2.43",
79
+ "drizzle-orm": "^0.45.1",
80
+ "react": "^19",
81
+ "react-dom": "^19",
82
+ "react-router": "^7"
83
+ }
84
84
  }