@docusaurus/core 0.0.0-5189 → 0.0.0-5195

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,16 +4,15 @@
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
- const canUseDOM = !!(typeof window !== 'undefined' &&
8
- window.document &&
9
- window.document.createElement);
7
+ const canUseDOM = typeof window !== 'undefined' &&
8
+ 'document' in window &&
9
+ 'createElement' in window.document;
10
10
  const ExecutionEnvironment = {
11
11
  canUseDOM,
12
- canUseEventListeners:
13
- // @ts-expect-error: window.attachEvent is IE specific.
14
- // See https://github.com/Microsoft/TypeScript/issues/3953#issuecomment-123396830
15
- canUseDOM && !!(window.addEventListener || window.attachEvent),
12
+ // window.attachEvent is IE-specific; it's very likely Docusaurus won't work
13
+ // on IE anyway.
14
+ canUseEventListeners: canUseDOM && ('addEventListener' in window || 'attachEvent' in window),
16
15
  canUseIntersectionObserver: canUseDOM && 'IntersectionObserver' in window,
17
- canUseViewport: canUseDOM && !!window.screen,
16
+ canUseViewport: canUseDOM && 'screen' in window,
18
17
  };
19
18
  export default ExecutionEnvironment;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-5189",
4
+ "version": "0.0.0-5195",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.18.6",
44
44
  "@babel/runtime-corejs3": "^7.18.6",
45
45
  "@babel/traverse": "^7.18.8",
46
- "@docusaurus/cssnano-preset": "0.0.0-5189",
47
- "@docusaurus/logger": "0.0.0-5189",
48
- "@docusaurus/mdx-loader": "0.0.0-5189",
46
+ "@docusaurus/cssnano-preset": "0.0.0-5195",
47
+ "@docusaurus/logger": "0.0.0-5195",
48
+ "@docusaurus/mdx-loader": "0.0.0-5195",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "0.0.0-5189",
51
- "@docusaurus/utils-common": "0.0.0-5189",
52
- "@docusaurus/utils-validation": "0.0.0-5189",
50
+ "@docusaurus/utils": "0.0.0-5195",
51
+ "@docusaurus/utils-common": "0.0.0-5195",
52
+ "@docusaurus/utils-validation": "0.0.0-5195",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.7",
54
54
  "@svgr/webpack": "^6.2.1",
55
55
  "autoprefixer": "^10.4.7",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "0.0.0-5189",
110
- "@docusaurus/types": "0.0.0-5189",
109
+ "@docusaurus/module-type-aliases": "0.0.0-5195",
110
+ "@docusaurus/types": "0.0.0-5195",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/react-dom": "^18.0.6",
113
113
  "@types/react-router-config": "^5.0.6",
@@ -127,5 +127,5 @@
127
127
  "engines": {
128
128
  "node": ">=16.14"
129
129
  },
130
- "gitHead": "0a54b0dbe7213db1ee0287b95992c4f4858b1a6c"
130
+ "gitHead": "d785bdfb02c7995d5bc95e82734110c1b79d7174"
131
131
  }