dn-react-router-toolkit 0.4.0 → 0.4.2

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.
@@ -7,7 +7,7 @@ declare class ReactRouterCookieManager implements CookieManager {
7
7
  private store;
8
8
  constructor(name: string);
9
9
  parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | null>;
10
- serialize(value: string, serializeOptions?: SerializeOptions | undefined): Promise<string>;
10
+ serialize(value: string | null, serializeOptions?: SerializeOptions | undefined): Promise<string>;
11
11
  }
12
12
 
13
13
  export { ReactRouterCookieManager };
@@ -7,7 +7,7 @@ declare class ReactRouterCookieManager implements CookieManager {
7
7
  private store;
8
8
  constructor(name: string);
9
9
  parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | null>;
10
- serialize(value: string, serializeOptions?: SerializeOptions | undefined): Promise<string>;
10
+ serialize(value: string | null, serializeOptions?: SerializeOptions | undefined): Promise<string>;
11
11
  }
12
12
 
13
13
  export { ReactRouterCookieManager };
@@ -43,7 +43,11 @@ var ReactRouterCookieManager = class {
43
43
  return this.store.parse(cookieStore, parseOptions);
44
44
  }
45
45
  async serialize(value, serializeOptions) {
46
- return this.store.serialize(value, { ...this.options, ...serializeOptions });
46
+ return this.store.serialize(value, {
47
+ ...this.options,
48
+ maxAge: !value ? 0 : void 0,
49
+ ...serializeOptions
50
+ });
47
51
  }
48
52
  };
49
53
  // Annotate the CommonJS export names for ESM import in node:
@@ -19,7 +19,11 @@ var ReactRouterCookieManager = class {
19
19
  return this.store.parse(cookieStore, parseOptions);
20
20
  }
21
21
  async serialize(value, serializeOptions) {
22
- return this.store.serialize(value, { ...this.options, ...serializeOptions });
22
+ return this.store.serialize(value, {
23
+ ...this.options,
24
+ maxAge: !value ? 0 : void 0,
25
+ ...serializeOptions
26
+ });
23
27
  }
24
28
  };
25
29
  export {
@@ -110,7 +110,11 @@ var ReactRouterCookieManager = class {
110
110
  return this.store.parse(cookieStore, parseOptions);
111
111
  }
112
112
  async serialize(value, serializeOptions) {
113
- return this.store.serialize(value, { ...this.options, ...serializeOptions });
113
+ return this.store.serialize(value, {
114
+ ...this.options,
115
+ maxAge: !value ? 0 : void 0,
116
+ ...serializeOptions
117
+ });
114
118
  }
115
119
  };
116
120
  // Annotate the CommonJS export names for ESM import in node:
@@ -83,7 +83,11 @@ var ReactRouterCookieManager = class {
83
83
  return this.store.parse(cookieStore, parseOptions);
84
84
  }
85
85
  async serialize(value, serializeOptions) {
86
- return this.store.serialize(value, { ...this.options, ...serializeOptions });
86
+ return this.store.serialize(value, {
87
+ ...this.options,
88
+ maxAge: !value ? 0 : void 0,
89
+ ...serializeOptions
90
+ });
87
91
  }
88
92
  };
89
93
  export {
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.ts
17
+ var index_exports = {};
18
+ module.exports = __toCommonJS(index_exports);
package/dist/index.mjs ADDED
File without changes
package/package.json CHANGED
@@ -1,60 +1,65 @@
1
1
  {
2
- "name": "dn-react-router-toolkit",
3
- "version": "0.4.0",
4
- "types": "./dist/index.d.ts",
5
- "main": "./dist/index.mjs",
6
- "module": "./dist/index.js",
7
- "exports": {
8
- "./auth": {
9
- "types": "./dist/auth/index.d.ts",
10
- "import": "./dist/auth/index.mjs",
11
- "require": "./dist/auth/index.js"
12
- },
13
- "./api": {
14
- "types": "./dist/api/index.d.ts",
15
- "import": "./dist/api/index.mjs",
16
- "require": "./dist/api/index.js"
17
- },
18
- "./client": {
19
- "types": "./dist/client/index.d.ts",
20
- "import": "./dist/client/index.mjs",
21
- "require": "./dist/client/index.js"
22
- },
23
- "./seo": {
24
- "types": "./dist/seo/index.d.ts",
25
- "import": "./dist/seo/index.mjs",
26
- "require": "./dist/seo/index.js"
27
- }
2
+ "name": "dn-react-router-toolkit",
3
+ "version": "0.4.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"
28
12
  },
29
- "scripts": {
30
- "build": "tsup",
31
- "dev": "tsup --watch"
13
+ "./auth": {
14
+ "types": "./dist/auth/index.d.ts",
15
+ "import": "./dist/auth/index.mjs",
16
+ "require": "./dist/auth/index.js"
32
17
  },
33
- "repository": {
34
- "type": "git",
35
- "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"
36
22
  },
37
- "author": "",
38
- "license": "MIT",
39
- "bugs": {
40
- "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"
41
27
  },
42
- "homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
43
- "description": "",
44
- "devDependencies": {
45
- "@types/node": "^24.10.1",
46
- "@types/react": "^19",
47
- "@types/react-dom": "^19",
48
- "schema-dts": "^1.1.5",
49
- "tsup": "^8.5.1",
50
- "typescript": "^5.7.3"
51
- },
52
- "dependencies": {
53
- "dn-react-toolkit": "0.2.7"
54
- },
55
- "peerDependencies": {
56
- "react": "^19",
57
- "react-dom": "^19",
58
- "react-router": "^7"
28
+ "./seo": {
29
+ "types": "./dist/seo/index.d.ts",
30
+ "import": "./dist/seo/index.mjs",
31
+ "require": "./dist/seo/index.js"
59
32
  }
33
+ },
34
+ "scripts": {
35
+ "build": "tsup",
36
+ "dev": "tsup --watch"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
41
+ },
42
+ "author": "",
43
+ "license": "MIT",
44
+ "bugs": {
45
+ "url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
46
+ },
47
+ "homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
48
+ "description": "",
49
+ "devDependencies": {
50
+ "@types/node": "^24.10.1",
51
+ "@types/react": "^19",
52
+ "@types/react-dom": "^19",
53
+ "schema-dts": "^1.1.5",
54
+ "tsup": "^8.5.1",
55
+ "typescript": "^5.7.3"
56
+ },
57
+ "dependencies": {
58
+ "dn-react-toolkit": "0.2.7"
59
+ },
60
+ "peerDependencies": {
61
+ "react": "^19",
62
+ "react-dom": "^19",
63
+ "react-router": "^7"
64
+ }
60
65
  }