@dr.pogodin/react-utils 1.40.9 → 1.40.11
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/bin/setup.js +38 -10
- package/build/development/client/index.js +2 -1
- package/build/development/client/index.js.map +1 -1
- package/build/development/server/renderer.js +2 -1
- package/build/development/server/renderer.js.map +1 -1
- package/build/development/server/utils/errors.js.map +1 -1
- package/build/development/shared/components/GenericLink/index.js +0 -4
- package/build/development/shared/components/GenericLink/index.js.map +1 -1
- package/build/development/shared/components/Link.js.map +1 -1
- package/build/development/shared/components/NavLink.js.map +1 -1
- package/build/development/shared/utils/webpack.js +12 -9
- package/build/development/shared/utils/webpack.js.map +1 -1
- package/build/development/style.css +0 -78
- package/build/development/web.bundle.js +3 -3
- package/build/production/client/index.js +1 -1
- package/build/production/client/index.js.map +1 -1
- package/build/production/server/renderer.js +1 -1
- package/build/production/server/renderer.js.map +1 -1
- package/build/production/server/utils/errors.js.map +1 -1
- package/build/production/shared/components/GenericLink/index.js +1 -1
- package/build/production/shared/components/GenericLink/index.js.map +1 -1
- package/build/production/shared/components/Link.js.map +1 -1
- package/build/production/shared/components/NavLink.js.map +1 -1
- package/build/production/shared/utils/webpack.js +1 -1
- package/build/production/shared/utils/webpack.js.map +1 -1
- package/build/production/style.css.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/build/types-code/server/utils/errors.d.ts +1 -1
- package/build/types-code/shared/components/GenericLink/index.d.ts +7 -7
- package/build/types-code/shared/components/Link.d.ts +2 -1
- package/build/types-code/shared/components/NavLink.d.ts +2 -1
- package/build/types-code/shared/utils/webpack.d.ts +1 -1
- package/config/stylelint/default.js +1 -0
- package/package.json +35 -35
- package/src/client/index.tsx +6 -1
- package/src/server/renderer.tsx +4 -1
- package/src/server/utils/errors.ts +1 -1
- package/src/shared/components/GenericLink/index.tsx +15 -11
- package/src/shared/components/Link.tsx +2 -2
- package/src/shared/components/Modal/base-theme.scss +1 -1
- package/src/shared/components/NavLink.tsx +2 -2
- package/src/shared/components/PageLayout/base-theme.scss +1 -1
- package/src/shared/components/TextArea/style.scss +0 -1
- package/src/shared/components/selectors/NativeDropdown/theme.scss +0 -2
- package/src/shared/utils/webpack.ts +14 -9
- package/src/styles/global.scss +1 -1
- package/src/styles/mixins.scss +3 -3
|
@@ -80,7 +80,7 @@ export declare function newError(message: string, statusCode?: CODES): ErrorWith
|
|
|
80
80
|
/**
|
|
81
81
|
* Throws an error with given message and HTTP status code.
|
|
82
82
|
*/
|
|
83
|
-
export declare function fail(message: string, statusCode?: CODES):
|
|
83
|
+
export declare function fail(message: string, statusCode?: CODES): Error;
|
|
84
84
|
/**
|
|
85
85
|
* ```js
|
|
86
86
|
* import { server } from '@dr.pogodin/react-utils';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Link, LinkProps, NavLink, NavLinkProps } from 'react-router-dom';
|
|
3
3
|
import './style.scss';
|
|
4
|
+
type LinkT = typeof Link;
|
|
5
|
+
type NavLinkT = typeof NavLink;
|
|
4
6
|
type ToT = Parameters<typeof Link>[0]['to'];
|
|
5
|
-
interface LinkI {
|
|
6
|
-
}
|
|
7
7
|
export type PropsT = {
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
className?: string;
|
|
@@ -14,8 +14,8 @@ export type PropsT = {
|
|
|
14
14
|
onMouseDown?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
15
15
|
openNewTab?: boolean;
|
|
16
16
|
replace?: boolean;
|
|
17
|
-
routerLinkType:
|
|
18
|
-
to
|
|
17
|
+
routerLinkType: LinkT | NavLinkT;
|
|
18
|
+
to: ToT;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* The `<Link>` component, and almost identical `<NavLink>` component, are
|
|
@@ -57,5 +57,5 @@ export type PropsT = {
|
|
|
57
57
|
* determining if the location matches the current URL. See the `<Route strict>`
|
|
58
58
|
* documentation for more information.
|
|
59
59
|
*/
|
|
60
|
-
declare const GenericLink:
|
|
60
|
+
declare const GenericLink: ({ children, className, disabled, enforceA, keepScrollPosition, onClick, onMouseDown, openNewTab, replace, routerLinkType, to, ...rest }: (LinkProps | NavLinkProps) & PropsT) => ReactNode;
|
|
61
61
|
export default GenericLink;
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* - User opts to open the reference in a new tab;
|
|
6
6
|
* - User explicitely opts to use <a>.
|
|
7
7
|
*/
|
|
8
|
+
import { type LinkProps } from 'react-router-dom';
|
|
8
9
|
import { type PropsT as GenericLinkPropsT } from './GenericLink';
|
|
9
|
-
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'
|
|
10
|
+
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & LinkProps;
|
|
10
11
|
declare const Link: React.FunctionComponent<PropsT>;
|
|
11
12
|
export default Link;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type NavLinkProps } from 'react-router-dom';
|
|
1
2
|
import { type PropsT as GenericLinkPropsT } from './GenericLink';
|
|
2
|
-
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'
|
|
3
|
+
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & NavLinkProps;
|
|
3
4
|
declare const NavLink: React.FunctionComponent<PropsT>;
|
|
4
5
|
export default NavLink;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param [basePath]
|
|
6
6
|
* @return Required module.
|
|
7
7
|
*/
|
|
8
|
-
export declare function requireWeak(modulePath: string, basePath?: string):
|
|
8
|
+
export declare function requireWeak<Module extends NodeJS.Module>(modulePath: string, basePath?: string): Module | null;
|
|
9
9
|
/**
|
|
10
10
|
* Resolves specified module path with help of Babel's module resolver.
|
|
11
11
|
* Yes, the function itself just returns its argument to the caller, but Babel
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.40.
|
|
2
|
+
"version": "1.40.11",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/birdofpreyru/react-utils/issues"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@babel/runtime": "^7.
|
|
11
|
+
"@babel/runtime": "^7.26.0",
|
|
12
12
|
"@dr.pogodin/babel-plugin-react-css-modules": "^6.13.2",
|
|
13
13
|
"@dr.pogodin/csurf": "^1.14.0",
|
|
14
14
|
"@dr.pogodin/js-utils": "^0.0.12",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@jest/environment": "^29.7.0",
|
|
18
18
|
"axios": "^1.7.7",
|
|
19
19
|
"commander": "^12.1.0",
|
|
20
|
-
"compression": "^1.7.
|
|
20
|
+
"compression": "^1.7.5",
|
|
21
21
|
"config": "^3.3.12",
|
|
22
22
|
"cookie": "^1.0.1",
|
|
23
23
|
"cookie-parser": "^1.4.7",
|
|
@@ -35,46 +35,46 @@
|
|
|
35
35
|
"react": "^18.3.1",
|
|
36
36
|
"react-dom": "^18.3.1",
|
|
37
37
|
"react-helmet": "^6.1.0",
|
|
38
|
-
"react-router-dom": "^6.
|
|
38
|
+
"react-router-dom": "^6.28.0",
|
|
39
39
|
"request-ip": "^3.3.0",
|
|
40
40
|
"rimraf": "^6.0.0",
|
|
41
41
|
"serialize-javascript": "^6.0.2",
|
|
42
42
|
"serve-favicon": "^2.5.0",
|
|
43
43
|
"source-map-support": "^0.5.21",
|
|
44
|
-
"uuid": "^
|
|
45
|
-
"winston": "^3.
|
|
44
|
+
"uuid": "^11.0.2",
|
|
45
|
+
"winston": "^3.17.0"
|
|
46
46
|
},
|
|
47
47
|
"description": "Collection of generic ReactJS components and utils",
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@babel/cli": "^7.25.
|
|
50
|
-
"@babel/core": "^7.
|
|
51
|
-
"@babel/eslint-parser": "^7.25.
|
|
52
|
-
"@babel/eslint-plugin": "^7.25.
|
|
53
|
-
"@babel/node": "^7.
|
|
54
|
-
"@babel/plugin-transform-runtime": "^7.25.
|
|
55
|
-
"@babel/preset-env": "^7.
|
|
56
|
-
"@babel/preset-react": "^7.25.
|
|
57
|
-
"@babel/preset-typescript": "^7.
|
|
58
|
-
"@babel/register": "^7.25.
|
|
49
|
+
"@babel/cli": "^7.25.9",
|
|
50
|
+
"@babel/core": "^7.26.0",
|
|
51
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
52
|
+
"@babel/eslint-plugin": "^7.25.9",
|
|
53
|
+
"@babel/node": "^7.26.0",
|
|
54
|
+
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
55
|
+
"@babel/preset-env": "^7.26.0",
|
|
56
|
+
"@babel/preset-react": "^7.25.9",
|
|
57
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
58
|
+
"@babel/register": "^7.25.9",
|
|
59
59
|
"@dr.pogodin/babel-plugin-transform-assets": "^1.2.2",
|
|
60
60
|
"@dr.pogodin/babel-preset-svgr": "^1.8.0",
|
|
61
61
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
62
62
|
"@testing-library/dom": "^10.4.0",
|
|
63
63
|
"@testing-library/react": "^16.0.1",
|
|
64
64
|
"@testing-library/user-event": "^14.5.2",
|
|
65
|
-
"@tsconfig/recommended": "^1.0.
|
|
65
|
+
"@tsconfig/recommended": "^1.0.8",
|
|
66
66
|
"@types/compression": "^1.7.5",
|
|
67
67
|
"@types/config": "^3.3.5",
|
|
68
68
|
"@types/cookie": "^0.6.0",
|
|
69
69
|
"@types/cookie-parser": "^1.4.7",
|
|
70
70
|
"@types/csurf": "^1.11.5",
|
|
71
71
|
"@types/express": "^4.17.21",
|
|
72
|
-
"@types/jest": "^29.5.
|
|
73
|
-
"@types/lodash": "^4.17.
|
|
72
|
+
"@types/jest": "^29.5.14",
|
|
73
|
+
"@types/lodash": "^4.17.13",
|
|
74
74
|
"@types/morgan": "^1.9.9",
|
|
75
75
|
"@types/node-forge": "^1.3.11",
|
|
76
76
|
"@types/pretty": "^2.0.3",
|
|
77
|
-
"@types/react": "^18.3.
|
|
77
|
+
"@types/react": "^18.3.12",
|
|
78
78
|
"@types/react-dom": "^18.3.1",
|
|
79
79
|
"@types/react-helmet": "^6.1.11",
|
|
80
80
|
"@types/request-ip": "^0.0.41",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"babel-jest": "^29.7.0",
|
|
88
88
|
"babel-loader": "^9.2.1",
|
|
89
89
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
90
|
-
"core-js": "^3.
|
|
90
|
+
"core-js": "^3.39.0",
|
|
91
91
|
"css-loader": "^7.1.2",
|
|
92
92
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
93
93
|
"eslint": "^8.57.1",
|
|
@@ -95,43 +95,43 @@
|
|
|
95
95
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
96
96
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
97
97
|
"eslint-plugin-import": "^2.31.0",
|
|
98
|
-
"eslint-plugin-jest": "^28.
|
|
99
|
-
"eslint-plugin-jsx-a11y": "^6.10.
|
|
100
|
-
"eslint-plugin-react": "^7.37.
|
|
98
|
+
"eslint-plugin-jest": "^28.9.0",
|
|
99
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
100
|
+
"eslint-plugin-react": "^7.37.2",
|
|
101
101
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
102
102
|
"identity-obj-proxy": "^3.0.0",
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"jest-environment-jsdom": "^29.7.0",
|
|
105
|
-
"memfs": "^4.
|
|
106
|
-
"mini-css-extract-plugin": "^2.9.
|
|
105
|
+
"memfs": "^4.14.0",
|
|
106
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
107
107
|
"mockdate": "^3.0.5",
|
|
108
108
|
"nodelist-foreach-polyfill": "^1.2.0",
|
|
109
|
-
"postcss": "^8.4.
|
|
109
|
+
"postcss": "^8.4.49",
|
|
110
110
|
"postcss-loader": "^8.1.1",
|
|
111
111
|
"postcss-scss": "^4.0.9",
|
|
112
112
|
"pretty": "^2.0.0",
|
|
113
113
|
"react-refresh": "^0.14.2",
|
|
114
114
|
"regenerator-runtime": "^0.14.1",
|
|
115
115
|
"resolve-url-loader": "^5.0.0",
|
|
116
|
-
"sass": "^1.
|
|
117
|
-
"sass-loader": "^16.0.
|
|
116
|
+
"sass": "^1.80.6",
|
|
117
|
+
"sass-loader": "^16.0.3",
|
|
118
118
|
"sitemap": "^8.0.0",
|
|
119
119
|
"source-map-loader": "^5.0.0",
|
|
120
120
|
"stylelint": "^16.10.0",
|
|
121
121
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
122
122
|
"supertest": "^7.0.0",
|
|
123
123
|
"tsc-alias": "^1.8.10",
|
|
124
|
-
"tstyche": "^
|
|
124
|
+
"tstyche": "^3.0.0",
|
|
125
125
|
"typed-scss-modules": "^8.0.1",
|
|
126
126
|
"typescript": "^5.6.3",
|
|
127
|
-
"typescript-eslint": "^8.
|
|
128
|
-
"webpack": "^5.
|
|
127
|
+
"typescript-eslint": "^8.14.0",
|
|
128
|
+
"webpack": "^5.96.1",
|
|
129
129
|
"webpack-dev-middleware": "^7.4.2",
|
|
130
130
|
"webpack-hot-middleware": "^2.26.1",
|
|
131
131
|
"webpack-merge": "^6.0.1",
|
|
132
|
-
"workbox-core": "^7.
|
|
133
|
-
"workbox-precaching": "^7.
|
|
134
|
-
"workbox-webpack-plugin": "^7.
|
|
132
|
+
"workbox-core": "^7.3.0",
|
|
133
|
+
"workbox-precaching": "^7.3.0",
|
|
134
|
+
"workbox-webpack-plugin": "^7.3.0"
|
|
135
135
|
},
|
|
136
136
|
"engines": {
|
|
137
137
|
"node": ">=18",
|
package/src/client/index.tsx
CHANGED
|
@@ -28,7 +28,12 @@ export default function Launch(
|
|
|
28
28
|
if (!container) throw Error('Failed to find container for React app');
|
|
29
29
|
const scene = (
|
|
30
30
|
<GlobalStateProvider initialState={getInj().ISTATE || options.initialState}>
|
|
31
|
-
<BrowserRouter
|
|
31
|
+
<BrowserRouter
|
|
32
|
+
future={{
|
|
33
|
+
v7_relativeSplatPath: true,
|
|
34
|
+
v7_startTransition: true,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
32
37
|
<Application />
|
|
33
38
|
</BrowserRouter>
|
|
34
39
|
</GlobalStateProvider>
|
package/src/server/renderer.tsx
CHANGED
|
@@ -443,7 +443,10 @@ export default function factory(
|
|
|
443
443
|
ssrContext={ssrContext}
|
|
444
444
|
>
|
|
445
445
|
<StaticRouter
|
|
446
|
-
future={{
|
|
446
|
+
future={{
|
|
447
|
+
v7_relativeSplatPath: true,
|
|
448
|
+
v7_startTransition: true,
|
|
449
|
+
}}
|
|
447
450
|
location={req.url}
|
|
448
451
|
>
|
|
449
452
|
<App2 />
|
|
@@ -101,7 +101,7 @@ export function newError(message: string, statusCode = CODES.INTERNAL_SERVER_ERR
|
|
|
101
101
|
export function fail(
|
|
102
102
|
message: string,
|
|
103
103
|
statusCode: CODES = CODES.INTERNAL_SERVER_ERROR,
|
|
104
|
-
):
|
|
104
|
+
): Error {
|
|
105
105
|
throw newError(message, statusCode);
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type {
|
|
4
|
+
Link,
|
|
5
|
+
LinkProps,
|
|
6
|
+
NavLink,
|
|
7
|
+
NavLinkProps,
|
|
8
|
+
} from 'react-router-dom';
|
|
6
9
|
|
|
7
10
|
import './style.scss';
|
|
8
11
|
|
|
9
|
-
type
|
|
12
|
+
type LinkT = typeof Link;
|
|
13
|
+
type NavLinkT = typeof NavLink;
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
type ToT = Parameters<typeof Link>[0]['to'];
|
|
12
16
|
|
|
13
17
|
export type PropsT = {
|
|
14
18
|
children?: ReactNode;
|
|
@@ -20,8 +24,8 @@ export type PropsT = {
|
|
|
20
24
|
onMouseDown?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
21
25
|
openNewTab?: boolean;
|
|
22
26
|
replace?: boolean;
|
|
23
|
-
routerLinkType:
|
|
24
|
-
to
|
|
27
|
+
routerLinkType: LinkT | NavLinkT;
|
|
28
|
+
to: ToT;
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
/**
|
|
@@ -64,7 +68,7 @@ export type PropsT = {
|
|
|
64
68
|
* determining if the location matches the current URL. See the `<Route strict>`
|
|
65
69
|
* documentation for more information.
|
|
66
70
|
*/
|
|
67
|
-
const GenericLink
|
|
71
|
+
const GenericLink = ({
|
|
68
72
|
children,
|
|
69
73
|
className,
|
|
70
74
|
disabled,
|
|
@@ -77,7 +81,7 @@ const GenericLink: React.FunctionComponent<PropsT> = ({
|
|
|
77
81
|
routerLinkType,
|
|
78
82
|
to,
|
|
79
83
|
...rest
|
|
80
|
-
}) => {
|
|
84
|
+
}: (LinkProps | NavLinkProps) & PropsT): ReactNode => {
|
|
81
85
|
/* Renders Link as <a> element if:
|
|
82
86
|
* - It is opted explicitely by `enforceA` prop;
|
|
83
87
|
* - It should be opened in a new tab;
|
|
@@ -103,7 +107,7 @@ const GenericLink: React.FunctionComponent<PropsT> = ({
|
|
|
103
107
|
);
|
|
104
108
|
}
|
|
105
109
|
|
|
106
|
-
const L = routerLinkType
|
|
110
|
+
const L = routerLinkType;
|
|
107
111
|
|
|
108
112
|
return (
|
|
109
113
|
<L
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* - User explicitely opts to use <a>.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Link as RrLink } from 'react-router-dom';
|
|
9
|
+
import { type LinkProps, Link as RrLink } from 'react-router-dom';
|
|
10
10
|
|
|
11
11
|
import GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';
|
|
12
12
|
|
|
13
|
-
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'
|
|
13
|
+
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & LinkProps;
|
|
14
14
|
|
|
15
15
|
const Link: React.FunctionComponent<PropsT> = (props) => (
|
|
16
16
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NavLink as RrNavLink } from 'react-router-dom';
|
|
1
|
+
import { type NavLinkProps, NavLink as RrNavLink } from 'react-router-dom';
|
|
2
2
|
|
|
3
3
|
import GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';
|
|
4
4
|
|
|
5
|
-
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'
|
|
5
|
+
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & NavLinkProps;
|
|
6
6
|
|
|
7
7
|
const NavLink: React.FunctionComponent<PropsT> = (props) => (
|
|
8
8
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
@@ -7,29 +7,34 @@ import { IS_CLIENT_SIDE } from './isomorphy';
|
|
|
7
7
|
* @param [basePath]
|
|
8
8
|
* @return Required module.
|
|
9
9
|
*/
|
|
10
|
-
export function requireWeak(
|
|
10
|
+
export function requireWeak<Module extends NodeJS.Module>(
|
|
11
11
|
modulePath: string,
|
|
12
12
|
basePath?: string,
|
|
13
|
-
):
|
|
13
|
+
): Module | null {
|
|
14
14
|
if (IS_CLIENT_SIDE) return null;
|
|
15
15
|
|
|
16
16
|
try {
|
|
17
17
|
/* eslint-disable no-eval */
|
|
18
18
|
const { resolve } = eval('require')('path');
|
|
19
19
|
const path = basePath ? resolve(basePath, modulePath) : modulePath;
|
|
20
|
-
const
|
|
20
|
+
const module = eval('require')(path) as Module;
|
|
21
21
|
/* eslint-enable no-eval */
|
|
22
22
|
|
|
23
|
-
if (!
|
|
23
|
+
if (!('default' in module)) return module;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const { default: def, ...named } = module;
|
|
26
|
+
|
|
27
|
+
const res = def as Module;
|
|
28
|
+
|
|
29
|
+
Object.entries(named).forEach(([name, value]) => {
|
|
30
|
+
const assigned = res[name as keyof Module];
|
|
31
|
+
if (assigned !== undefined) {
|
|
32
|
+
if (assigned !== value) {
|
|
28
33
|
throw Error('Conflict between default and named exports');
|
|
29
34
|
}
|
|
30
|
-
} else
|
|
35
|
+
} else res[name as keyof Module] = value;
|
|
31
36
|
});
|
|
32
|
-
return
|
|
37
|
+
return res;
|
|
33
38
|
} catch {
|
|
34
39
|
return null;
|
|
35
40
|
}
|
package/src/styles/global.scss
CHANGED
package/src/styles/mixins.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Collection of standard mixins, being used all around. */
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
2
|
+
@forward "_mixins/fonts";
|
|
3
|
+
@forward "_mixins/media";
|
|
4
|
+
@forward "_mixins/typography";
|
|
5
5
|
|
|
6
6
|
$zIndexOfDefaultModalOverlay: 998;
|