@koine/next 1.0.2 → 1.0.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/app.js +19 -4
- package/motion-features.js +10 -0
- package/package.json +7 -6
package/app.js
CHANGED
|
@@ -13,6 +13,7 @@ var react$1 = require('@koine/react');
|
|
|
13
13
|
var emotion = require('./emotion.js');
|
|
14
14
|
var Theme = require('./Theme.js');
|
|
15
15
|
var router = require('next/router');
|
|
16
|
+
var framerMotion = require('framer-motion');
|
|
16
17
|
require('./es.string.replace.js');
|
|
17
18
|
require('@koine/utils');
|
|
18
19
|
var styledComponents = require('styled-components');
|
|
@@ -62,6 +63,11 @@ const AppThemeEmotion = ({
|
|
|
62
63
|
}));
|
|
63
64
|
};
|
|
64
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @see https://www.framer.com/docs/guide-reduce-bundle-size/
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
const loadMotionFeatures = () => Promise.resolve().then(function () { return require('./motion-features.js'); }).then(m => m.default);
|
|
65
71
|
/**
|
|
66
72
|
* App main
|
|
67
73
|
*
|
|
@@ -94,13 +100,22 @@ const AppMain = ({
|
|
|
94
100
|
const {
|
|
95
101
|
pathname
|
|
96
102
|
} = router.useRouter();
|
|
97
|
-
return jsxRuntime.jsxs(
|
|
103
|
+
return jsxRuntime.jsxs(framerMotion.LazyMotion, Object.assign({
|
|
104
|
+
features: loadMotionFeatures
|
|
105
|
+
}, {
|
|
98
106
|
children: [jsxRuntime.jsx(Theme.SeoDefaults, Object.assign({}, seo)), pre, jsxRuntime.jsx(Theme.NextProgress, {}), jsxRuntime.jsx(Layout, {
|
|
99
|
-
children:
|
|
100
|
-
|
|
107
|
+
children: jsxRuntime.jsx(framerMotion.AnimatePresence, Object.assign({
|
|
108
|
+
exitBeforeEnter: true,
|
|
109
|
+
initial: false
|
|
110
|
+
}, {
|
|
111
|
+
children: jsxRuntime.jsx(framerMotion.m.div, Object.assign({}, _transition, {
|
|
112
|
+
children: /*#__PURE__*/React.createElement(Component, Object.assign({}, pageProps, {
|
|
113
|
+
key: pathname
|
|
114
|
+
}))
|
|
115
|
+
}), pathname)
|
|
101
116
|
}))
|
|
102
117
|
}), post]
|
|
103
|
-
});
|
|
118
|
+
}));
|
|
104
119
|
};
|
|
105
120
|
|
|
106
121
|
/**
|
package/package.json
CHANGED
|
@@ -7,19 +7,16 @@
|
|
|
7
7
|
"./config": "./config.js",
|
|
8
8
|
"./document": "./document.js"
|
|
9
9
|
},
|
|
10
|
-
"version": "1.0.2",
|
|
11
|
-
"main": "./index.umd.js",
|
|
12
|
-
"module": "./index.esm.js",
|
|
13
|
-
"typings": "./index.d.ts",
|
|
14
10
|
"dependencies": {
|
|
11
|
+
"@emotion/styled": "^11.8.1",
|
|
15
12
|
"react": "^17.0.2",
|
|
16
13
|
"next": "^12.1.4",
|
|
17
|
-
"@koine/utils": "1.0.
|
|
14
|
+
"@koine/utils": "1.0.3",
|
|
18
15
|
"next-auth": "^4.3.1",
|
|
19
16
|
"framer-motion": "^6.2.9",
|
|
20
17
|
"@mui/material": "^5.6.0",
|
|
21
18
|
"@emotion/react": "^11.9.0",
|
|
22
|
-
"@koine/react": "1.0.
|
|
19
|
+
"@koine/react": "1.0.3",
|
|
23
20
|
"styled-components": "^5.3.5",
|
|
24
21
|
"react-hook-form": "^7.29.0",
|
|
25
22
|
"@emotion/server": "^11.4.0",
|
|
@@ -30,5 +27,9 @@
|
|
|
30
27
|
"next-translate": "^1.3.5",
|
|
31
28
|
"next-seo": "^5.4.0"
|
|
32
29
|
},
|
|
30
|
+
"version": "1.0.3",
|
|
31
|
+
"main": "./index.umd.js",
|
|
32
|
+
"module": "./index.esm.js",
|
|
33
|
+
"typings": "./index.d.ts",
|
|
33
34
|
"peerDependencies": {}
|
|
34
35
|
}
|