@docusaurus/plugin-pwa 0.0.0-5121 → 0.0.0-5124
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/lib/registerSw.js +1 -1
- package/lib/renderReloadPopup.d.ts +1 -1
- package/lib/renderReloadPopup.js +1 -1
- package/package.json +9 -9
- package/src/deps.d.ts +15 -0
- package/src/registerSw.ts +1 -1
- package/src/renderReloadPopup.tsx +1 -1
package/lib/registerSw.js
CHANGED
|
@@ -99,7 +99,7 @@ async function registerSW() {
|
|
|
99
99
|
if (!offlineMode) {
|
|
100
100
|
return sendSkipWaiting();
|
|
101
101
|
}
|
|
102
|
-
return import('./renderReloadPopup').then(({
|
|
102
|
+
return import('./renderReloadPopup.js').then(({ renderReloadPopup }) => renderReloadPopup({
|
|
103
103
|
onReload() {
|
|
104
104
|
wb.addEventListener('controlling', () => {
|
|
105
105
|
window.location.reload();
|
package/lib/renderReloadPopup.js
CHANGED
|
@@ -14,7 +14,7 @@ const createContainer = () => {
|
|
|
14
14
|
document.body.appendChild(container);
|
|
15
15
|
return container;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export function renderReloadPopup(props) {
|
|
18
18
|
const container = getContainer() ?? createContainer();
|
|
19
19
|
return import('@theme/PwaReloadPopup').then(({ default: ReloadPopup }) => {
|
|
20
20
|
ReactDOM.render(<ReloadPopup {...props}/>, container);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-pwa",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5124",
|
|
4
4
|
"description": "Docusaurus Plugin to add PWA support.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-pwa.d.ts",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/core": "^7.18.2",
|
|
24
24
|
"@babel/preset-env": "^7.18.2",
|
|
25
|
-
"@docusaurus/core": "0.0.0-
|
|
26
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
27
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
28
|
-
"@docusaurus/types": "0.0.0-
|
|
29
|
-
"@docusaurus/utils": "0.0.0-
|
|
30
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
25
|
+
"@docusaurus/core": "0.0.0-5124",
|
|
26
|
+
"@docusaurus/theme-common": "0.0.0-5124",
|
|
27
|
+
"@docusaurus/theme-translations": "0.0.0-5124",
|
|
28
|
+
"@docusaurus/types": "0.0.0-5124",
|
|
29
|
+
"@docusaurus/utils": "0.0.0-5124",
|
|
30
|
+
"@docusaurus/utils-validation": "0.0.0-5124",
|
|
31
31
|
"babel-loader": "^8.2.5",
|
|
32
32
|
"clsx": "^1.1.1",
|
|
33
33
|
"core-js": "^3.22.8",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"workbox-window": "^6.5.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
43
|
+
"@docusaurus/module-type-aliases": "0.0.0-5124",
|
|
44
44
|
"fs-extra": "^10.1.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=16.14"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "dba5e8d5a7bc07b946888664f9cc3f07564093e1"
|
|
54
54
|
}
|
package/src/deps.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// TODO incompatible declaration file: https://github.com/unjs/webpackbar/pull/108
|
|
9
|
+
declare module 'webpackbar' {
|
|
10
|
+
import webpack from 'webpack';
|
|
11
|
+
|
|
12
|
+
export default class WebpackBarPlugin extends webpack.ProgressPlugin {
|
|
13
|
+
constructor(options: {name: string; color?: string});
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/registerSw.ts
CHANGED
|
@@ -139,7 +139,7 @@ async function registerSW() {
|
|
|
139
139
|
if (!offlineMode) {
|
|
140
140
|
return sendSkipWaiting();
|
|
141
141
|
}
|
|
142
|
-
return import('./renderReloadPopup').then(({
|
|
142
|
+
return import('./renderReloadPopup.js').then(({renderReloadPopup}) =>
|
|
143
143
|
renderReloadPopup({
|
|
144
144
|
onReload() {
|
|
145
145
|
wb.addEventListener('controlling', () => {
|
|
@@ -20,7 +20,7 @@ const createContainer = () => {
|
|
|
20
20
|
return container;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export
|
|
23
|
+
export function renderReloadPopup(props: Props): Promise<void> {
|
|
24
24
|
const container = getContainer() ?? createContainer();
|
|
25
25
|
return import('@theme/PwaReloadPopup').then(({default: ReloadPopup}) => {
|
|
26
26
|
ReactDOM.render(<ReloadPopup {...props} />, container);
|