@real-router/browser-plugin 0.1.16 → 0.1.18

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/README.md CHANGED
@@ -169,7 +169,7 @@ router.usePlugin(
169
169
  }),
170
170
  );
171
171
 
172
- router.canDeactivate("checkout", () => (toState, fromState, done) => {
172
+ router.addDeactivateGuard("checkout", () => (toState, fromState, done) => {
173
173
  if (hasUnsavedChanges()) {
174
174
  done({ error: new Error("Unsaved changes") });
175
175
  } else {
@@ -382,7 +382,7 @@ interface NavigationOptions {
382
382
  *
383
383
  * @example
384
384
  * // Accessing redirect flag in lifecycle
385
- * router.canActivate('dashboard', (toState, fromState) => {
385
+ * router.addActivateGuard('dashboard', (toState, fromState) => {
386
386
  * if (toState.meta?.redirected) {
387
387
  * console.log('This navigation is from a redirect');
388
388
  * }
@@ -382,7 +382,7 @@ interface NavigationOptions {
382
382
  *
383
383
  * @example
384
384
  * // Accessing redirect flag in lifecycle
385
- * router.canActivate('dashboard', (toState, fromState) => {
385
+ * router.addActivateGuard('dashboard', (toState, fromState) => {
386
386
  * if (toState.meta?.redirected) {
387
387
  * console.log('This navigation is from a redirect');
388
388
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/browser-plugin",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "type": "commonjs",
5
5
  "description": "Browser integration plugin with History API, hash routing, and popstate support",
6
6
  "main": "./dist/cjs/index.js",
@@ -43,13 +43,13 @@
43
43
  },
44
44
  "sideEffects": false,
45
45
  "dependencies": {
46
- "@real-router/core": "^0.13.0",
46
+ "@real-router/core": "^0.15.0",
47
47
  "@real-router/logger": "^0.2.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@testing-library/jest-dom": "6.9.1",
51
51
  "jsdom": "27.4.0",
52
- "type-guards": "^0.1.7"
52
+ "type-guards": "^0.1.9"
53
53
  },
54
54
  "scripts": {
55
55
  "test": "vitest",