@docusaurus/plugin-pwa 0.0.0-5014 → 0.0.0-5026

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.
@@ -4,35 +4,51 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React, { useState } from 'react';
7
+ import React, {useState} from 'react';
8
8
  import clsx from 'clsx';
9
- import Translate, { translate } from '@docusaurus/Translate';
9
+ import Translate, {translate} from '@docusaurus/Translate';
10
10
  import styles from './styles.module.css';
11
- export default function PwaReloadPopup({ onReload }) {
12
- const [isVisible, setIsVisible] = useState(true);
13
- return (isVisible && (<div className={clsx('alert', 'alert--secondary', styles.popup)}>
11
+ export default function PwaReloadPopup({onReload}) {
12
+ const [isVisible, setIsVisible] = useState(true);
13
+ return (
14
+ isVisible && (
15
+ <div className={clsx('alert', 'alert--secondary', styles.popup)}>
14
16
  <p>
15
- <Translate id="theme.PwaReloadPopup.info" description="The text for PWA reload popup">
17
+ <Translate
18
+ id="theme.PwaReloadPopup.info"
19
+ description="The text for PWA reload popup">
16
20
  New version available
17
21
  </Translate>
18
22
  </p>
19
23
  <div className={styles.buttonContainer}>
20
- <button className="button button--link" type="button" onClick={() => {
21
- setIsVisible(false);
22
- onReload();
23
- }}>
24
- <Translate id="theme.PwaReloadPopup.refreshButtonText" description="The text for PWA reload button">
24
+ <button
25
+ className="button button--link"
26
+ type="button"
27
+ onClick={() => {
28
+ setIsVisible(false);
29
+ onReload();
30
+ }}>
31
+ <Translate
32
+ id="theme.PwaReloadPopup.refreshButtonText"
33
+ description="The text for PWA reload button">
25
34
  Refresh
26
35
  </Translate>
27
36
  </button>
28
37
 
29
- <button aria-label={translate({
30
- id: 'theme.PwaReloadPopup.closeButtonAriaLabel',
31
- message: 'Close',
32
- description: 'The ARIA label for close button of PWA reload popup',
33
- })} className="close" type="button" onClick={() => setIsVisible(false)}>
38
+ <button
39
+ aria-label={translate({
40
+ id: 'theme.PwaReloadPopup.closeButtonAriaLabel',
41
+ message: 'Close',
42
+ description:
43
+ 'The ARIA label for close button of PWA reload popup',
44
+ })}
45
+ className="close"
46
+ type="button"
47
+ onClick={() => setIsVisible(false)}>
34
48
  <span aria-hidden="true">×</span>
35
49
  </button>
36
50
  </div>
37
- </div>));
51
+ </div>
52
+ )
53
+ );
38
54
  }
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-pwa",
3
- "version": "0.0.0-5014",
3
+ "version": "0.0.0-5026",
4
4
  "description": "Docusaurus Plugin to add PWA support.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-pwa.d.ts",
7
7
  "scripts": {
8
- "build": "yarn build:server && yarn build:browser && yarn build:copy",
9
- "build:server": "tsc --project tsconfig.server.json",
10
- "build:browser": "tsc --project tsconfig.browser.json",
11
- "build:copy": "node copyUntypedFiles.mjs"
8
+ "build": "tsc --build && node copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\""
12
9
  },
13
10
  "publishConfig": {
14
11
  "access": "public"
@@ -20,13 +17,13 @@
20
17
  },
21
18
  "license": "MIT",
22
19
  "dependencies": {
23
- "@babel/core": "^7.17.10",
24
- "@babel/preset-env": "^7.17.10",
25
- "@docusaurus/core": "0.0.0-5014",
26
- "@docusaurus/theme-common": "0.0.0-5014",
27
- "@docusaurus/theme-translations": "0.0.0-5014",
28
- "@docusaurus/utils": "0.0.0-5014",
29
- "@docusaurus/utils-validation": "0.0.0-5014",
20
+ "@babel/core": "^7.17.12",
21
+ "@babel/preset-env": "^7.17.12",
22
+ "@docusaurus/core": "0.0.0-5026",
23
+ "@docusaurus/theme-common": "0.0.0-5026",
24
+ "@docusaurus/theme-translations": "0.0.0-5026",
25
+ "@docusaurus/utils": "0.0.0-5026",
26
+ "@docusaurus/utils-validation": "0.0.0-5026",
30
27
  "babel-loader": "^8.2.5",
31
28
  "clsx": "^1.1.1",
32
29
  "core-js": "^3.22.5",
@@ -39,12 +36,12 @@
39
36
  "workbox-window": "^6.5.3"
40
37
  },
41
38
  "devDependencies": {
42
- "@docusaurus/module-type-aliases": "0.0.0-5014",
39
+ "@docusaurus/module-type-aliases": "0.0.0-5026",
43
40
  "fs-extra": "^10.1.0"
44
41
  },
45
42
  "peerDependencies": {
46
43
  "react": "^16.8.4 || ^17.0.0",
47
44
  "react-dom": "^16.8.4 || ^17.0.0"
48
45
  },
49
- "gitHead": "f1ab067eeed93212a8e8034d621924d60aba741d"
46
+ "gitHead": "92c87e08aea2de43e9ac16c5c8aa8112ea1c85ac"
50
47
  }