@matrix-widget-toolkit/mui 2.0.0 → 2.0.1

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.
@@ -21,51 +21,15 @@ var api = require('@matrix-widget-toolkit/api');
21
21
  var LanguageDetector = require('i18next-browser-languagedetector');
22
22
  var resourcesToBackend = require('i18next-resources-to-backend');
23
23
 
24
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
24
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
25
25
 
26
- var i18n__default = /*#__PURE__*/_interopDefaultCompat(i18n);
27
- var createCache__default = /*#__PURE__*/_interopDefaultCompat(createCache);
28
- var ErrorIcon__default = /*#__PURE__*/_interopDefaultCompat(ErrorIcon);
29
- var CheckOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(CheckOutlinedIcon);
30
- var ContentCopyOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(ContentCopyOutlinedIcon);
31
- var LanguageDetector__default = /*#__PURE__*/_interopDefaultCompat(LanguageDetector);
32
- var resourcesToBackend__default = /*#__PURE__*/_interopDefaultCompat(resourcesToBackend);
33
-
34
- /*
35
- * Copyright 2022 Nordeck IT + Consulting GmbH
36
- *
37
- * Licensed under the Apache License, Version 2.0 (the "License");
38
- * you may not use this file except in compliance with the License.
39
- * You may obtain a copy of the License at
40
- *
41
- * http://www.apache.org/licenses/LICENSE-2.0
42
- *
43
- * Unless required by applicable law or agreed to in writing, software
44
- * distributed under the License is distributed on an "AS IS" BASIS,
45
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46
- * See the License for the specific language governing permissions and
47
- * limitations under the License.
48
- */
49
- /**
50
- * Retrieve the nonce passed by our Docker base image.
51
- * @returns A nonce that can be used to perform operations that are disabled in
52
- * our CSP by default.
53
- */
54
- function getNonce() {
55
- return window['NONCE'];
56
- }
57
-
58
- function createEmotionCache() {
59
- return createCache__default.default({
60
- key: 'widget',
61
- nonce: getNonce(),
62
- });
63
- }
64
- var cache = createEmotionCache();
65
- function EmotionCacheProvider(_a) {
66
- var children = _a.children;
67
- return jsxRuntime.jsx(react.CacheProvider, { value: cache, children: children });
68
- }
26
+ var i18n__default = /*#__PURE__*/_interopDefault(i18n);
27
+ var createCache__default = /*#__PURE__*/_interopDefault(createCache);
28
+ var ErrorIcon__default = /*#__PURE__*/_interopDefault(ErrorIcon);
29
+ var CheckOutlinedIcon__default = /*#__PURE__*/_interopDefault(CheckOutlinedIcon);
30
+ var ContentCopyOutlinedIcon__default = /*#__PURE__*/_interopDefault(ContentCopyOutlinedIcon);
31
+ var LanguageDetector__default = /*#__PURE__*/_interopDefault(LanguageDetector);
32
+ var resourcesToBackend__default = /*#__PURE__*/_interopDefault(resourcesToBackend);
69
33
 
70
34
  /*
71
35
  * Copyright 2022 Nordeck IT + Consulting GmbH
@@ -104,6 +68,44 @@ function getEnvironment(name, defaultValue) {
104
68
  return value !== null && value !== void 0 ? value : defaultValue;
105
69
  }
106
70
 
71
+ /*
72
+ * Copyright 2022 Nordeck IT + Consulting GmbH
73
+ *
74
+ * Licensed under the Apache License, Version 2.0 (the "License");
75
+ * you may not use this file except in compliance with the License.
76
+ * You may obtain a copy of the License at
77
+ *
78
+ * http://www.apache.org/licenses/LICENSE-2.0
79
+ *
80
+ * Unless required by applicable law or agreed to in writing, software
81
+ * distributed under the License is distributed on an "AS IS" BASIS,
82
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83
+ * See the License for the specific language governing permissions and
84
+ * limitations under the License.
85
+ */
86
+ /**
87
+ * Retrieve the nonce passed by our Docker base image.
88
+ * @returns A nonce that can be used to perform operations that are disabled in
89
+ * our CSP by default.
90
+ */
91
+ function getNonce() {
92
+ return window['NONCE'];
93
+ }
94
+
95
+ // https://mui.com/material-ui/guides/content-security-policy/
96
+ function createEmotionCache() {
97
+ return createCache__default.default({
98
+ key: 'widget',
99
+ nonce: getNonce(),
100
+ prepend: true,
101
+ });
102
+ }
103
+ var cache = createEmotionCache();
104
+ function EmotionCacheProvider(_a) {
105
+ var children = _a.children;
106
+ return jsxRuntime.jsx(react.CacheProvider, { value: cache, children: children });
107
+ }
108
+
107
109
  /*
108
110
  * Copyright 2022 Nordeck IT + Consulting GmbH
109
111
  *
@@ -19,42 +19,6 @@ import { repairWidgetRegistration, generateWidgetRegistrationUrl, extractWidgetP
19
19
  import LanguageDetector from 'i18next-browser-languagedetector';
20
20
  import resourcesToBackend from 'i18next-resources-to-backend';
21
21
 
22
- /*
23
- * Copyright 2022 Nordeck IT + Consulting GmbH
24
- *
25
- * Licensed under the Apache License, Version 2.0 (the "License");
26
- * you may not use this file except in compliance with the License.
27
- * You may obtain a copy of the License at
28
- *
29
- * http://www.apache.org/licenses/LICENSE-2.0
30
- *
31
- * Unless required by applicable law or agreed to in writing, software
32
- * distributed under the License is distributed on an "AS IS" BASIS,
33
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
- * See the License for the specific language governing permissions and
35
- * limitations under the License.
36
- */
37
- /**
38
- * Retrieve the nonce passed by our Docker base image.
39
- * @returns A nonce that can be used to perform operations that are disabled in
40
- * our CSP by default.
41
- */
42
- function getNonce() {
43
- return window['NONCE'];
44
- }
45
-
46
- function createEmotionCache() {
47
- return createCache({
48
- key: 'widget',
49
- nonce: getNonce(),
50
- });
51
- }
52
- var cache = createEmotionCache();
53
- function EmotionCacheProvider(_a) {
54
- var children = _a.children;
55
- return jsx(CacheProvider, { value: cache, children: children });
56
- }
57
-
58
22
  /*
59
23
  * Copyright 2022 Nordeck IT + Consulting GmbH
60
24
  *
@@ -92,6 +56,44 @@ function getEnvironment(name, defaultValue) {
92
56
  return value !== null && value !== void 0 ? value : defaultValue;
93
57
  }
94
58
 
59
+ /*
60
+ * Copyright 2022 Nordeck IT + Consulting GmbH
61
+ *
62
+ * Licensed under the Apache License, Version 2.0 (the "License");
63
+ * you may not use this file except in compliance with the License.
64
+ * You may obtain a copy of the License at
65
+ *
66
+ * http://www.apache.org/licenses/LICENSE-2.0
67
+ *
68
+ * Unless required by applicable law or agreed to in writing, software
69
+ * distributed under the License is distributed on an "AS IS" BASIS,
70
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
+ * See the License for the specific language governing permissions and
72
+ * limitations under the License.
73
+ */
74
+ /**
75
+ * Retrieve the nonce passed by our Docker base image.
76
+ * @returns A nonce that can be used to perform operations that are disabled in
77
+ * our CSP by default.
78
+ */
79
+ function getNonce() {
80
+ return window['NONCE'];
81
+ }
82
+
83
+ // https://mui.com/material-ui/guides/content-security-policy/
84
+ function createEmotionCache() {
85
+ return createCache({
86
+ key: 'widget',
87
+ nonce: getNonce(),
88
+ prepend: true,
89
+ });
90
+ }
91
+ var cache = createEmotionCache();
92
+ function EmotionCacheProvider(_a) {
93
+ var children = _a.children;
94
+ return jsx(CacheProvider, { value: cache, children: children });
95
+ }
96
+
95
97
  /*
96
98
  * Copyright 2022 Nordeck IT + Consulting GmbH
97
99
  *
package/build/index.d.ts CHANGED
@@ -3,8 +3,6 @@
3
3
  * the default Element theme.
4
4
  */
5
5
 
6
- /// <reference types="react" />
7
-
8
6
  import { AvatarProps } from '@mui/material';
9
7
  import { BackendModule } from 'i18next';
10
8
  import { Capability } from 'matrix-widget-api';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matrix-widget-toolkit/mui",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A customized material-ui theme that matches the style of the Element Matrix client",
5
5
  "author": "Nordeck IT + Consulting GmbH",
6
6
  "license": "Apache-2.0",
@@ -9,20 +9,20 @@
9
9
  "types": "./build/index.d.ts",
10
10
  "devDependencies": {
11
11
  "@craco/craco": "^7.1.0",
12
- "@testing-library/jest-dom": "^6.4.2",
13
- "@testing-library/react": "^14.2.2",
12
+ "@testing-library/jest-dom": "^6.4.6",
13
+ "@testing-library/react": "^16.0.0",
14
14
  "@testing-library/user-event": "^14.5.2",
15
15
  "@types/jest": "^27.5.2",
16
16
  "@types/jest-axe": "^3.5.9",
17
- "@types/lodash": "^4.17.0",
17
+ "@types/lodash": "^4.17.6",
18
18
  "@types/node": "^20.8.6",
19
19
  "@types/react": "^18.2.74",
20
20
  "copyfiles": "^2.4.1",
21
- "i18next-parser": "^8.13.0",
22
- "jest-axe": "^8.0.0",
21
+ "i18next-parser": "^9.0.0",
22
+ "jest-axe": "^9.0.0",
23
23
  "react": "^18.2.0",
24
24
  "react-scripts": "5.0.1",
25
- "typescript": "^5.4.5"
25
+ "typescript": "^5.5.3"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsc && rollup --config ../../rollup.config.mjs",
@@ -42,18 +42,18 @@
42
42
  "@emotion/react": "^11.11.4",
43
43
  "@emotion/styled": "^11.11.5",
44
44
  "@fontsource/inter": "^5.0.18",
45
- "@mui/icons-material": "^5.15.15",
46
- "@mui/material": "^5.15.15",
45
+ "@mui/icons-material": "^5.16.1",
46
+ "@mui/material": "^5.16.1",
47
47
  "@mui/utils": "^5.14.13",
48
- "@matrix-widget-toolkit/api": "^3.2.2",
48
+ "@matrix-widget-toolkit/api": "^3.3.2",
49
49
  "@matrix-widget-toolkit/react": "^2.0.0",
50
- "i18next": "^23.11.2",
51
- "i18next-browser-languagedetector": "^7.2.1",
50
+ "i18next": "^23.12.1",
51
+ "i18next-browser-languagedetector": "^8.0.0",
52
52
  "i18next-resources-to-backend": "^1.2.1",
53
53
  "lodash": "^4.17.21",
54
54
  "matrix-widget-api": "^1.6.0",
55
55
  "react": "^18.2.0",
56
- "react-i18next": "^14.1.1",
56
+ "react-i18next": "^14.1.2",
57
57
  "react-use": "^17.5.0"
58
58
  },
59
59
  "repository": {