@matrix-widget-toolkit/mui 1.2.1 → 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
  *
@@ -658,7 +660,7 @@ function ElementMuiThemeProvider(_a) {
658
660
  * limitations under the License.
659
661
  */
660
662
  function createAvatarUrl(url, _a) {
661
- var _b = _a === void 0 ? {} : _a, _c = _b.size, size = _c === void 0 ? 60 : _c;
663
+ var _b = {} , _c = _b.size, size = _c === void 0 ? 60 : _c;
662
664
  var mxcPrefix = 'mxc://';
663
665
  if (url.indexOf(mxcPrefix) !== 0) {
664
666
  return url;
@@ -782,7 +784,7 @@ var ElementAvatar = react$2.forwardRef(function ElementAvatar(_a, ref) {
782
784
  });
783
785
 
784
786
  function LoadingView() {
785
- var id = utils.unstable_useId();
787
+ var id = react$2.useId();
786
788
  var isLongLoad = reactUse.useTimeout(100)[0];
787
789
  var t = reactI18next.useTranslation('widget-toolkit').t;
788
790
  return isLongLoad() ? (jsxRuntime.jsxs(material.Box, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, children: [jsxRuntime.jsx(material.CircularProgress, { "aria-labelledby": id }), jsxRuntime.jsx(material.Typography, { py: 2, variant: "h6", id: id, children: t('loading.message', 'Loading…') })] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}));
@@ -890,10 +892,10 @@ function MissingParametersError(_a) {
890
892
  }
891
893
  });
892
894
  }); }, [widgetApi, widgetRegistration]);
893
- var errorDialogTitleId = utils.unstable_useId();
894
- var errorDialogTextId = utils.unstable_useId();
895
- var successDialogTitleId = utils.unstable_useId();
896
- var successDialogTextId = utils.unstable_useId();
895
+ var errorDialogTitleId = react$2.useId();
896
+ var errorDialogTextId = react$2.useId();
897
+ var successDialogTitleId = react$2.useId();
898
+ var successDialogTextId = react$2.useId();
897
899
  return (jsxRuntime.jsxs(material.Box, { my: 2, children: [jsxRuntime.jsxs(material.Alert, { severity: "error", icon: jsxRuntime.jsx(ErrorIcon__default.default, {}), children: [jsxRuntime.jsx(material.AlertTitle, { children: t('missing-parameters.title', 'Wrong widget registration') }), jsxRuntime.jsx(material.Typography, { variant: "body2", children: t('missing-parameters.instructions', 'The widget is not registered correctly. Make sure to include the correct parameters in the widget URL:') }), jsxRuntime.jsx(material.Box, { my: 1, children: jsxRuntime.jsx(CopyableCode, { code: api.generateWidgetRegistrationUrl() }) }), jsxRuntime.jsx(material.Typography, { variant: "body2", children: t('missing-parameters.repair-instructions', 'You can either modify the widget registration manually or fix it automatically:') }), jsxRuntime.jsx(material.Box, { mt: 1, children: jsxRuntime.jsx(material.Button, { variant: "contained", onClick: handleRepairWidget, children: t('missing-parameters.repair', 'Repair registration') }) })] }), jsxRuntime.jsxs(material.Dialog, { open: isErrorDialogOpen, onClose: function () { return setErrorDialogOpen(false); }, "aria-labelledby": errorDialogTitleId, "aria-describedby": errorDialogTextId, children: [jsxRuntime.jsx(material.DialogTitle, { id: errorDialogTitleId, children: t('missing-parameters.permissions-error.title', 'Error') }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: errorDialogTextId, children: t('missing-parameters.permissions-error.instructions', 'Insufficient permissions, could not configure widget. Only room admins can configure the widget.') }) }), jsxRuntime.jsx(material.DialogActions, { children: jsxRuntime.jsx(material.Button, { onClick: function () { return setErrorDialogOpen(false); }, autoFocus: true, children: t('missing-parameters.permissions-error.close', 'Close') }) })] }), jsxRuntime.jsxs(material.Dialog, { open: isCompleted, "aria-labelledby": successDialogTitleId, "aria-describedby": successDialogTextId, children: [jsxRuntime.jsx(material.DialogTitle, { id: successDialogTitleId, children: t('missing-parameters.completed.title', 'Widget configuration complete') }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: successDialogTextId, children: t('missing-parameters.completed.instructions', 'Configuration completed, reopen the widget to start using it.') }) })] })] }));
898
900
  }
899
901
 
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { createTheme, ThemeProvider, CssBaseline, styled, Avatar, Box, CircularProgress, Typography, Alert, AlertTitle, Button, Paper, IconButton, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
3
- import { useState, useEffect, useMemo, forwardRef, useCallback } from 'react';
3
+ import { useState, useEffect, useMemo, forwardRef, useId, useCallback } from 'react';
4
4
  import '@fontsource/inter/400.css';
5
5
  import '@fontsource/inter/600.css';
6
6
  import { ThemeSelectionProvider, useThemeSelection, CapabilitiesGuard, useWidgetApi, WidgetApiProvider } from '@matrix-widget-toolkit/react';
7
7
  import { deDE, enUS } from '@mui/material/locale';
8
- import { deepmerge, unstable_useId } from '@mui/utils';
8
+ import { deepmerge } from '@mui/utils';
9
9
  import i18n from 'i18next';
10
10
  import createCache from '@emotion/cache';
11
11
  import { CacheProvider } from '@emotion/react';
@@ -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
  *
@@ -646,7 +648,7 @@ function ElementMuiThemeProvider(_a) {
646
648
  * limitations under the License.
647
649
  */
648
650
  function createAvatarUrl(url, _a) {
649
- var _b = _a === void 0 ? {} : _a, _c = _b.size, size = _c === void 0 ? 60 : _c;
651
+ var _b = {} , _c = _b.size, size = _c === void 0 ? 60 : _c;
650
652
  var mxcPrefix = 'mxc://';
651
653
  if (url.indexOf(mxcPrefix) !== 0) {
652
654
  return url;
@@ -770,7 +772,7 @@ var ElementAvatar = forwardRef(function ElementAvatar(_a, ref) {
770
772
  });
771
773
 
772
774
  function LoadingView() {
773
- var id = unstable_useId();
775
+ var id = useId();
774
776
  var isLongLoad = useTimeout(100)[0];
775
777
  var t = useTranslation('widget-toolkit').t;
776
778
  return isLongLoad() ? (jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, children: [jsx(CircularProgress, { "aria-labelledby": id }), jsx(Typography, { py: 2, variant: "h6", id: id, children: t('loading.message', 'Loading…') })] })) : (jsx(Fragment, {}));
@@ -878,10 +880,10 @@ function MissingParametersError(_a) {
878
880
  }
879
881
  });
880
882
  }); }, [widgetApi, widgetRegistration]);
881
- var errorDialogTitleId = unstable_useId();
882
- var errorDialogTextId = unstable_useId();
883
- var successDialogTitleId = unstable_useId();
884
- var successDialogTextId = unstable_useId();
883
+ var errorDialogTitleId = useId();
884
+ var errorDialogTextId = useId();
885
+ var successDialogTitleId = useId();
886
+ var successDialogTextId = useId();
885
887
  return (jsxs(Box, { my: 2, children: [jsxs(Alert, { severity: "error", icon: jsx(ErrorIcon, {}), children: [jsx(AlertTitle, { children: t('missing-parameters.title', 'Wrong widget registration') }), jsx(Typography, { variant: "body2", children: t('missing-parameters.instructions', 'The widget is not registered correctly. Make sure to include the correct parameters in the widget URL:') }), jsx(Box, { my: 1, children: jsx(CopyableCode, { code: generateWidgetRegistrationUrl() }) }), jsx(Typography, { variant: "body2", children: t('missing-parameters.repair-instructions', 'You can either modify the widget registration manually or fix it automatically:') }), jsx(Box, { mt: 1, children: jsx(Button, { variant: "contained", onClick: handleRepairWidget, children: t('missing-parameters.repair', 'Repair registration') }) })] }), jsxs(Dialog, { open: isErrorDialogOpen, onClose: function () { return setErrorDialogOpen(false); }, "aria-labelledby": errorDialogTitleId, "aria-describedby": errorDialogTextId, children: [jsx(DialogTitle, { id: errorDialogTitleId, children: t('missing-parameters.permissions-error.title', 'Error') }), jsx(DialogContent, { children: jsx(DialogContentText, { id: errorDialogTextId, children: t('missing-parameters.permissions-error.instructions', 'Insufficient permissions, could not configure widget. Only room admins can configure the widget.') }) }), jsx(DialogActions, { children: jsx(Button, { onClick: function () { return setErrorDialogOpen(false); }, autoFocus: true, children: t('missing-parameters.permissions-error.close', 'Close') }) })] }), jsxs(Dialog, { open: isCompleted, "aria-labelledby": successDialogTitleId, "aria-describedby": successDialogTextId, children: [jsx(DialogTitle, { id: successDialogTitleId, children: t('missing-parameters.completed.title', 'Widget configuration complete') }), jsx(DialogContent, { children: jsx(DialogContentText, { id: successDialogTextId, children: t('missing-parameters.completed.instructions', 'Configuration completed, reopen the widget to start using it.') }) })] })] }));
886
888
  }
887
889
 
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';
@@ -21,7 +19,7 @@ import { WidgetRegistration } from '@matrix-widget-toolkit/api';
21
19
  * A component to display user and room avatars in the style of Element.
22
20
  * @param param0 - {@link ElementAvatarProps}
23
21
  */
24
- export declare const ElementAvatar: ForwardRefExoticComponent<Pick<ElementAvatarProps, "id" | "userId" | "displayName" | "avatarUrl" | "title" | "results" | "children" | "slot" | "style" | "onReset" | "onError" | "color" | "translate" | "classes" | "className" | "sx" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "variant" | "slotProps" | "slots" | "sizes" | "alt" | "src" | "imgProps" | "srcSet"> & RefAttributes<HTMLDivElement>>;
22
+ export declare const ElementAvatar: ForwardRefExoticComponent<Omit<ElementAvatarProps, "ref"> & RefAttributes<HTMLDivElement>>;
25
23
 
26
24
  /**
27
25
  * Props for the {@link ElementAvatar} component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matrix-widget-toolkit/mui",
3
- "version": "1.2.1",
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.1.4",
13
- "@testing-library/react": "^12.1.5",
14
- "@testing-library/user-event": "^14.5.1",
12
+ "@testing-library/jest-dom": "^6.4.6",
13
+ "@testing-library/react": "^16.0.0",
14
+ "@testing-library/user-event": "^14.5.2",
15
15
  "@types/jest": "^27.5.2",
16
- "@types/jest-axe": "^3.5.6",
17
- "@types/lodash": "^4.14.199",
16
+ "@types/jest-axe": "^3.5.9",
17
+ "@types/lodash": "^4.17.6",
18
18
  "@types/node": "^20.8.6",
19
- "@types/react": "^17.0.45",
19
+ "@types/react": "^18.2.74",
20
20
  "copyfiles": "^2.4.1",
21
- "i18next-parser": "^8.9.0",
22
- "jest-axe": "^8.0.0",
23
- "react": "^17.0.2",
21
+ "i18next-parser": "^9.0.0",
22
+ "jest-axe": "^9.0.0",
23
+ "react": "^18.2.0",
24
24
  "react-scripts": "5.0.1",
25
- "typescript": "^5.2.2"
25
+ "typescript": "^5.5.3"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsc && rollup --config ../../rollup.config.mjs",
@@ -40,20 +40,20 @@
40
40
  "dependencies": {
41
41
  "@emotion/cache": "^11.11.0",
42
42
  "@emotion/react": "^11.11.4",
43
- "@emotion/styled": "^11.11.0",
44
- "@fontsource/inter": "^5.0.17",
45
- "@mui/icons-material": "^5.15.14",
46
- "@mui/material": "^5.15.14",
43
+ "@emotion/styled": "^11.11.5",
44
+ "@fontsource/inter": "^5.0.18",
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",
49
- "@matrix-widget-toolkit/react": "^1.0.6",
50
- "i18next": "^23.10.1",
51
- "i18next-browser-languagedetector": "^7.2.0",
52
- "i18next-resources-to-backend": "^1.2.0",
48
+ "@matrix-widget-toolkit/api": "^3.3.2",
49
+ "@matrix-widget-toolkit/react": "^2.0.0",
50
+ "i18next": "^23.12.1",
51
+ "i18next-browser-languagedetector": "^8.0.0",
52
+ "i18next-resources-to-backend": "^1.2.1",
53
53
  "lodash": "^4.17.21",
54
54
  "matrix-widget-api": "^1.6.0",
55
- "react": "^17.0.2",
56
- "react-i18next": "^14.1.0",
55
+ "react": "^18.2.0",
56
+ "react-i18next": "^14.1.2",
57
57
  "react-use": "^17.5.0"
58
58
  },
59
59
  "repository": {