@ionic/react-router 9.0.6 → 9.0.7-dev.11790792026.1963eab3
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/index.js +24 -11
- package/dist/index.js.map +1 -1
- package/dist/types/ReactRouter/IonReactMemoryRouter.d.ts +1 -1
- package/dist/types/ReactRouter/IonRouter.d.ts +1 -2
- package/dist/types/ReactRouter/utils/pathMatching.d.ts +1 -1
- package/dist/types/ReactRouter/utils/transitionDefaults.d.ts +10 -0
- package/package.json +16 -9
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { PropsWithChildren } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type { MemoryRouterProps } from 'react-router';
|
|
8
|
+
import type { MemoryRouterProps } from 'react-router-dom';
|
|
9
9
|
export declare const IonReactMemoryRouter: ({ children, ...routerProps }: PropsWithChildren<MemoryRouterProps>) => React.JSX.Element;
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* and animate.
|
|
7
7
|
*/
|
|
8
8
|
import type { RouterDirection, RouterOptions } from '@ionic/react';
|
|
9
|
-
import type { Action as HistoryAction, Location } from 'history';
|
|
10
9
|
import type { PropsWithChildren } from 'react';
|
|
11
10
|
import React from 'react';
|
|
12
|
-
type HistoryLocation
|
|
11
|
+
import type { Location as HistoryLocation, NavigationType as HistoryAction } from 'react-router-dom';
|
|
13
12
|
export interface LocationState {
|
|
14
13
|
direction?: RouterDirection;
|
|
15
14
|
routerOptions?: RouterOptions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defaults React Router 7's `useTransitions` to `false`, since a transition can defer the
|
|
3
|
+
* commit past Ionic's page-visible signal. React Router 6 ignores the prop.
|
|
4
|
+
*
|
|
5
|
+
* Uses `??` instead of spreading a default first, because an explicit
|
|
6
|
+
* `useTransitions={undefined}` would override it and React Router reads that as on.
|
|
7
|
+
*/
|
|
8
|
+
export declare const withTransitionDefaults: <P extends object>(props: P) => Omit<P, "useTransitions"> & {
|
|
9
|
+
useTransitions: boolean;
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/react-router",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.7-dev.11790792026.1963eab3",
|
|
4
4
|
"description": "React Router wrapper for @ionic/react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
"build.watch": "npm run compile -- --watch",
|
|
25
25
|
"clean": "rimraf dist",
|
|
26
26
|
"compile": "rollup -c",
|
|
27
|
-
"eslint": "eslint src",
|
|
28
|
-
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
|
|
27
|
+
"eslint": "eslint src type-tests",
|
|
28
|
+
"prettier": "prettier \"./{src,type-tests}/**/*.{html,ts,tsx,js,jsx}\"",
|
|
29
29
|
"lint": "npm run eslint && npm run prettier -- --write --cache",
|
|
30
30
|
"lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
|
|
31
|
-
"typecheck": "
|
|
31
|
+
"typecheck": "npm run typecheck.rr6 && npm run typecheck.rr7",
|
|
32
|
+
"typecheck.rr6": "tsc --noEmit",
|
|
33
|
+
"typecheck.rr7": "tsc --noEmit -p tsconfig.rr7.json",
|
|
32
34
|
"sync": "sh ./scripts/sync.sh"
|
|
33
35
|
},
|
|
34
36
|
"main": "dist/index.js",
|
|
@@ -37,15 +39,20 @@
|
|
|
37
39
|
"dist/"
|
|
38
40
|
],
|
|
39
41
|
"dependencies": {
|
|
40
|
-
"@ionic/core": "9.0.
|
|
41
|
-
"@ionic/react": "9.0.
|
|
42
|
+
"@ionic/core": "9.0.7-dev.11790792026.1963eab3",
|
|
43
|
+
"@ionic/react": "9.0.7-dev.11790792026.1963eab3",
|
|
42
44
|
"tslib": "*"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"react": "^18 || ^19",
|
|
46
48
|
"react-dom": "^18 || ^19",
|
|
47
|
-
"react-router": ">=6.4.0 <7",
|
|
48
|
-
"react-router-dom": ">=6.4.0 <7"
|
|
49
|
+
"react-router": ">=6.4.0 <7 || >=7.15.0 <8",
|
|
50
|
+
"react-router-dom": ">=6.4.0 <7 || >=7.15.0 <8"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"react-router": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
49
56
|
},
|
|
50
57
|
"devDependencies": {
|
|
51
58
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -60,12 +67,12 @@
|
|
|
60
67
|
"@typescript-eslint/parser": "^8.0.0",
|
|
61
68
|
"eslint": "^9.0.0",
|
|
62
69
|
"eslint-plugin-import": "^2.31.0",
|
|
63
|
-
"history": "^5.3.0",
|
|
64
70
|
"prettier": "^2.8.3",
|
|
65
71
|
"react": "^18.3.1",
|
|
66
72
|
"react-dom": "^18.3.1",
|
|
67
73
|
"react-router": "^6.30.0",
|
|
68
74
|
"react-router-dom": "^6.30.0",
|
|
75
|
+
"react-router-dom-v7": "npm:react-router-dom@^7.18.4",
|
|
69
76
|
"rimraf": "^3.0.2",
|
|
70
77
|
"rollup": "^4.2.0",
|
|
71
78
|
"typescript": "^6.0.0"
|