@lobehub/ui 1.136.2 → 1.137.0
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.
|
@@ -9,6 +9,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
9
9
|
var loading = _ref.loading,
|
|
10
10
|
avatar = _ref.avatar,
|
|
11
11
|
placement = _ref.placement,
|
|
12
|
+
_ref$unoptimized = _ref.unoptimized,
|
|
13
|
+
unoptimized = _ref$unoptimized === void 0 ? false : _ref$unoptimized,
|
|
12
14
|
addon = _ref.addon,
|
|
13
15
|
onClick = _ref.onClick,
|
|
14
16
|
_ref$size = _ref.size,
|
|
@@ -25,7 +27,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
27
|
background: avatar.backgroundColor,
|
|
26
28
|
onClick: onClick,
|
|
27
29
|
size: size,
|
|
28
|
-
title: avatar.title
|
|
30
|
+
title: avatar.title,
|
|
31
|
+
unoptimized: unoptimized
|
|
29
32
|
}), /*#__PURE__*/_jsx(Loading, {
|
|
30
33
|
loading: loading,
|
|
31
34
|
placement: placement
|
package/es/Img/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
var _excluded = ["unoptimized"];
|
|
4
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
8
|
import { createElement, forwardRef, useContext, useMemo } from 'react';
|
|
@@ -13,13 +15,16 @@ var createContainer = function createContainer(as) {
|
|
|
13
15
|
}));
|
|
14
16
|
});
|
|
15
17
|
};
|
|
16
|
-
var Img = /*#__PURE__*/forwardRef(function (
|
|
18
|
+
var Img = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
19
|
+
var unoptimized = _ref.unoptimized,
|
|
20
|
+
res = _objectWithoutProperties(_ref, _excluded);
|
|
17
21
|
var config = useContext(ConfigContext);
|
|
18
22
|
var ImgContainer = useMemo(function () {
|
|
19
23
|
return createContainer((config === null || config === void 0 ? void 0 : config.imgAs) || 'img');
|
|
20
24
|
}, [config]);
|
|
21
25
|
return /*#__PURE__*/_jsx(ImgContainer, _objectSpread({
|
|
22
|
-
ref: ref
|
|
23
|
-
|
|
26
|
+
ref: ref,
|
|
27
|
+
unoptimized: unoptimized === undefined ? config === null || config === void 0 ? void 0 : config.imgUnoptimized : unoptimized
|
|
28
|
+
}, res));
|
|
24
29
|
});
|
|
25
30
|
export default Img;
|