@breautek/router 4.1.2 → 4.1.3
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/router.js +32 -33
- package/dist/src/Route.d.ts +9 -0
- package/dist/src/RouteMatcher.d.ts +0 -1
- package/dist/src/RouterStrategy.d.ts +0 -1
- package/dist/src/View.d.ts +1 -1
- package/package.json +18 -18
- package/src/Route.tsx +12 -0
- package/src/View.tsx +1 -1
package/dist/router.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function ___$insertStyle(css) {
|
|
6
|
-
if (!css || typeof window === 'undefined') {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const style = document.createElement('style');
|
|
10
|
-
style.setAttribute('type', 'text/css');
|
|
11
|
-
style.innerHTML = css;
|
|
12
|
-
document.head.appendChild(style);
|
|
13
|
-
return css;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
3
|
var React = require('react');
|
|
17
4
|
var events = require('events');
|
|
18
5
|
|
|
@@ -733,7 +720,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
733
720
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
734
721
|
PERFORMANCE OF THIS SOFTWARE.
|
|
735
722
|
***************************************************************************** */
|
|
736
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
723
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
737
724
|
|
|
738
725
|
|
|
739
726
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
@@ -751,7 +738,18 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
751
738
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
752
739
|
};
|
|
753
740
|
|
|
754
|
-
|
|
741
|
+
function insertStyle(css) {
|
|
742
|
+
if (typeof window === 'undefined') {
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const style = document.createElement('style');
|
|
746
|
+
style.setAttribute('type', 'text/css');
|
|
747
|
+
style.innerHTML = css;
|
|
748
|
+
document.head.appendChild(style);
|
|
749
|
+
return css;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
insertStyle(".View {\n position: static;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n z-index: 1;\n}");
|
|
755
753
|
|
|
756
754
|
class View extends React__namespace.Component {
|
|
757
755
|
/**
|
|
@@ -866,6 +864,7 @@ class Route extends React__namespace.Component {
|
|
|
866
864
|
$getChildren(component) {
|
|
867
865
|
let children = null;
|
|
868
866
|
if (!component) {
|
|
867
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
869
868
|
component = this;
|
|
870
869
|
}
|
|
871
870
|
if (!component.props.children) {
|
|
@@ -1019,7 +1018,7 @@ class TransitionSlide extends TransitionStrategy {
|
|
|
1019
1018
|
}
|
|
1020
1019
|
|
|
1021
1020
|
var name = "@breautek/router";
|
|
1022
|
-
var version = "4.1.
|
|
1021
|
+
var version = "4.1.3";
|
|
1023
1022
|
var description = "An alternate react router.";
|
|
1024
1023
|
var main = "dist/router.js";
|
|
1025
1024
|
var types = "dist/src/api.d.ts";
|
|
@@ -1055,33 +1054,33 @@ var peerDependencies = {
|
|
|
1055
1054
|
"react-dom": "16.x || 17.x || 18.x"
|
|
1056
1055
|
};
|
|
1057
1056
|
var devDependencies = {
|
|
1058
|
-
"@rollup/plugin-commonjs": "
|
|
1057
|
+
"@rollup/plugin-commonjs": "28.0.1",
|
|
1059
1058
|
"@rollup/plugin-json": "6.1.0",
|
|
1060
|
-
"@rollup/plugin-node-resolve": "15.
|
|
1061
|
-
"@testing-library/jest-dom": "6.
|
|
1062
|
-
"@testing-library/react": "
|
|
1063
|
-
"@types/jest": "29.5.
|
|
1064
|
-
"@types/react": "18.3.
|
|
1065
|
-
"@types/react-dom": "18.3.
|
|
1066
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
1067
|
-
"@typescript-eslint/parser": "7.
|
|
1068
|
-
ajv: "8.
|
|
1069
|
-
eslint: "8.
|
|
1070
|
-
"eslint-plugin-react": "7.
|
|
1071
|
-
glob: "
|
|
1059
|
+
"@rollup/plugin-node-resolve": "15.3.0",
|
|
1060
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
1061
|
+
"@testing-library/react": "16.0.1",
|
|
1062
|
+
"@types/jest": "29.5.14",
|
|
1063
|
+
"@types/react": "18.3.12",
|
|
1064
|
+
"@types/react-dom": "18.3.1",
|
|
1065
|
+
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
1066
|
+
"@typescript-eslint/parser": "7.18.0",
|
|
1067
|
+
ajv: "8.17.1",
|
|
1068
|
+
eslint: "8.57.1",
|
|
1069
|
+
"eslint-plugin-react": "7.37.2",
|
|
1070
|
+
glob: "11.0.0",
|
|
1072
1071
|
"ignore-styles": "5.0.1",
|
|
1073
1072
|
jest: "29.7.0",
|
|
1074
1073
|
"jest-environment-jsdom": "29.7.0",
|
|
1075
1074
|
"node-sass": "9.0.0",
|
|
1076
1075
|
react: "18.3.1",
|
|
1077
1076
|
"react-dom": "18.3.1",
|
|
1078
|
-
rollup: "4.
|
|
1077
|
+
rollup: "4.24.4",
|
|
1079
1078
|
"rollup-plugin-progress": "1.1.2",
|
|
1080
|
-
"rollup-plugin-sass": "1.
|
|
1079
|
+
"rollup-plugin-sass": "1.14.0",
|
|
1081
1080
|
"rollup-plugin-typescript2": "0.36.0",
|
|
1082
|
-
"ts-jest": "29.
|
|
1081
|
+
"ts-jest": "29.2.5",
|
|
1083
1082
|
"ts-node": "10.9.2",
|
|
1084
|
-
typescript: "5.4
|
|
1083
|
+
typescript: "5.5.4"
|
|
1085
1084
|
};
|
|
1086
1085
|
var packageInfo = {
|
|
1087
1086
|
name: name,
|
package/dist/src/Route.d.ts
CHANGED
|
@@ -9,8 +9,17 @@ export interface IRouteProps<T> {
|
|
|
9
9
|
index?: boolean;
|
|
10
10
|
entryTransition?: TransitionStrategy;
|
|
11
11
|
exitTransition?: TransitionStrategy;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
12
15
|
base?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
13
19
|
componentProps?: T;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
14
23
|
matcher?: RouteMatcher;
|
|
15
24
|
}
|
|
16
25
|
export interface IComponentProps {
|
package/dist/src/View.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare abstract class View<TPageProps extends IViewProps = IViewProps> e
|
|
|
38
38
|
* Get the inline styles for this view.
|
|
39
39
|
* Use React style notation.
|
|
40
40
|
*/
|
|
41
|
-
getViewStyles():
|
|
41
|
+
getViewStyles(): React.CSSProperties;
|
|
42
42
|
protected abstract _renderView(): React.ReactNode;
|
|
43
43
|
render(): React.ReactNode;
|
|
44
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breautek/router",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "An alternate react router.",
|
|
5
5
|
"main": "dist/router.js",
|
|
6
6
|
"types": "dist/src/api.d.ts",
|
|
@@ -36,32 +36,32 @@
|
|
|
36
36
|
"react-dom": "16.x || 17.x || 18.x"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@rollup/plugin-commonjs": "
|
|
39
|
+
"@rollup/plugin-commonjs": "28.0.1",
|
|
40
40
|
"@rollup/plugin-json": "6.1.0",
|
|
41
|
-
"@rollup/plugin-node-resolve": "15.
|
|
42
|
-
"@testing-library/jest-dom": "6.
|
|
43
|
-
"@testing-library/react": "
|
|
44
|
-
"@types/jest": "29.5.
|
|
45
|
-
"@types/react": "18.3.
|
|
46
|
-
"@types/react-dom": "18.3.
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
48
|
-
"@typescript-eslint/parser": "7.
|
|
49
|
-
"ajv": "8.
|
|
50
|
-
"eslint": "8.
|
|
51
|
-
"eslint-plugin-react": "7.
|
|
52
|
-
"glob": "
|
|
41
|
+
"@rollup/plugin-node-resolve": "15.3.0",
|
|
42
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
43
|
+
"@testing-library/react": "16.0.1",
|
|
44
|
+
"@types/jest": "29.5.14",
|
|
45
|
+
"@types/react": "18.3.12",
|
|
46
|
+
"@types/react-dom": "18.3.1",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
48
|
+
"@typescript-eslint/parser": "7.18.0",
|
|
49
|
+
"ajv": "8.17.1",
|
|
50
|
+
"eslint": "8.57.1",
|
|
51
|
+
"eslint-plugin-react": "7.37.2",
|
|
52
|
+
"glob": "11.0.0",
|
|
53
53
|
"ignore-styles": "5.0.1",
|
|
54
54
|
"jest": "29.7.0",
|
|
55
55
|
"jest-environment-jsdom": "29.7.0",
|
|
56
56
|
"node-sass": "9.0.0",
|
|
57
57
|
"react": "18.3.1",
|
|
58
58
|
"react-dom": "18.3.1",
|
|
59
|
-
"rollup": "4.
|
|
59
|
+
"rollup": "4.24.4",
|
|
60
60
|
"rollup-plugin-progress": "1.1.2",
|
|
61
|
-
"rollup-plugin-sass": "1.
|
|
61
|
+
"rollup-plugin-sass": "1.14.0",
|
|
62
62
|
"rollup-plugin-typescript2": "0.36.0",
|
|
63
|
-
"ts-jest": "29.
|
|
63
|
+
"ts-jest": "29.2.5",
|
|
64
64
|
"ts-node": "10.9.2",
|
|
65
|
-
"typescript": "5.4
|
|
65
|
+
"typescript": "5.5.4"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/Route.tsx
CHANGED
|
@@ -12,8 +12,19 @@ export interface IRouteProps<T> {
|
|
|
12
12
|
entryTransition?: TransitionStrategy;
|
|
13
13
|
exitTransition?: TransitionStrategy;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
15
18
|
base?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
16
23
|
componentProps?: T;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
17
28
|
matcher?: RouteMatcher;
|
|
18
29
|
}
|
|
19
30
|
|
|
@@ -90,6 +101,7 @@ export class Route<TComponentProps extends IComponentProps = IComponentProps, TR
|
|
|
90
101
|
let children: React.ReactElement[] = null;
|
|
91
102
|
|
|
92
103
|
if (!component) {
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
93
105
|
component = this;
|
|
94
106
|
}
|
|
95
107
|
|
package/src/View.tsx
CHANGED
|
@@ -87,7 +87,7 @@ export abstract class View<TPageProps extends IViewProps = IViewProps> extends R
|
|
|
87
87
|
* Get the inline styles for this view.
|
|
88
88
|
* Use React style notation.
|
|
89
89
|
*/
|
|
90
|
-
public getViewStyles():
|
|
90
|
+
public getViewStyles(): React.CSSProperties {
|
|
91
91
|
return {};
|
|
92
92
|
}
|
|
93
93
|
|