@lobehub/ui 1.137.3 → 1.137.5

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.
@@ -2,9 +2,9 @@ import { type SplineProps } from '@splinetool/react-spline';
2
2
  import { CSSProperties } from 'react';
3
3
  export interface LogoSplineProps extends Partial<SplineProps> {
4
4
  className?: string;
5
- height?: number | string;
5
+ height?: number;
6
6
  style?: CSSProperties;
7
- width?: number | string;
7
+ width?: number;
8
8
  }
9
9
  declare const LogoSpline: import("react").NamedExoticComponent<LogoSplineProps>;
10
10
  export default LogoSpline;
@@ -7,7 +7,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import Spline from '@splinetool/react-spline';
8
8
  import { useThemeMode } from 'antd-style';
9
9
  import { memo, useState } from 'react';
10
- import Loading from "./Loading";
10
+ import { Flexbox } from 'react-layout-kit';
11
+ import { useCdnFn } from "../ConfigProvider";
12
+ import Img from "../Img";
13
+ import { LOGO_3D } from "../Logo/style";
11
14
  import { jsx as _jsx } from "react/jsx-runtime";
12
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
16
  var LIGHT = 'https://gw.alipayobjects.com/os/kitchen/J9jiHITGrs/scene.splinecode';
@@ -15,29 +18,49 @@ var DARK = 'https://gw.alipayobjects.com/os/kitchen/CzQKKvSE8a/scene.splinecode'
15
18
  var LogoSpline = /*#__PURE__*/memo(function (_ref) {
16
19
  var className = _ref.className,
17
20
  style = _ref.style,
18
- width = _ref.width,
19
- height = _ref.height,
21
+ _ref$width = _ref.width,
22
+ width = _ref$width === void 0 ? 640 : _ref$width,
23
+ _ref$height = _ref.height,
24
+ height = _ref$height === void 0 ? 400 : _ref$height,
20
25
  _onLoad = _ref.onLoad,
21
26
  rest = _objectWithoutProperties(_ref, _excluded);
27
+ var genCdnUrl = useCdnFn();
22
28
  var _useThemeMode = useThemeMode(),
23
29
  isDarkMode = _useThemeMode.isDarkMode;
24
30
  var _useState = useState(true),
25
31
  _useState2 = _slicedToArray(_useState, 2),
26
32
  loading = _useState2[0],
27
33
  setLoading = _useState2[1];
28
- return /*#__PURE__*/_jsxs("div", {
34
+ return /*#__PURE__*/_jsxs(Flexbox, {
35
+ align: 'center',
29
36
  className: className,
37
+ flex: 'none',
38
+ justify: 'center',
30
39
  style: _objectSpread({
31
40
  height: height,
41
+ overflow: 'hidden',
32
42
  position: 'relative',
33
43
  width: width
34
44
  }, style),
35
- children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, _objectSpread({
45
+ children: [loading && /*#__PURE__*/_jsx(Img, {
46
+ alt: 'logo',
47
+ height: height * 0.5,
48
+ src: genCdnUrl(LOGO_3D),
49
+ style: {
50
+ position: 'absolute'
51
+ },
52
+ width: height * 0.5
53
+ }), /*#__PURE__*/_jsx(Spline, _objectSpread({
36
54
  onLoad: function onLoad(splineApp) {
37
55
  setLoading(false);
38
56
  _onLoad === null || _onLoad === void 0 || _onLoad(splineApp);
39
57
  },
40
- scene: isDarkMode ? DARK : LIGHT
58
+ scene: isDarkMode ? DARK : LIGHT,
59
+ style: {
60
+ flex: 'none',
61
+ height: height,
62
+ width: width
63
+ }
41
64
  }, rest))]
42
65
  });
43
66
  });
@@ -2,7 +2,7 @@ import { type SplineProps } from '@splinetool/react-spline';
2
2
  import { CSSProperties } from 'react';
3
3
  export interface LogoThreeProps extends Partial<SplineProps> {
4
4
  className?: string;
5
- size?: number | string;
5
+ size?: number;
6
6
  style?: CSSProperties;
7
7
  }
8
8
  declare const LogoThree: import("react").NamedExoticComponent<LogoThreeProps>;
@@ -8,32 +8,54 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
8
  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; }
9
9
  import Spline from '@splinetool/react-spline';
10
10
  import { memo, useState } from 'react';
11
- import Loading from "./Loading";
11
+ import { Flexbox } from 'react-layout-kit';
12
+ import { useCdnFn } from "../ConfigProvider";
13
+ import Img from "../Img";
14
+ import { LOGO_3D } from "../Logo/style";
12
15
  import { jsx as _jsx } from "react/jsx-runtime";
13
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
17
  var LogoThree = /*#__PURE__*/memo(function (_ref) {
15
18
  var className = _ref.className,
16
19
  style = _ref.style,
17
- size = _ref.size,
20
+ _ref$size = _ref.size,
21
+ size = _ref$size === void 0 ? 128 : _ref$size,
18
22
  _onLoad = _ref.onLoad,
19
23
  rest = _objectWithoutProperties(_ref, _excluded);
24
+ var genCdnUrl = useCdnFn();
20
25
  var _useState = useState(true),
21
26
  _useState2 = _slicedToArray(_useState, 2),
22
27
  loading = _useState2[0],
23
28
  setLoading = _useState2[1];
24
- return /*#__PURE__*/_jsxs("div", {
29
+ return /*#__PURE__*/_jsxs(Flexbox, {
30
+ align: 'center',
25
31
  className: className,
32
+ flex: 'none',
33
+ justify: 'center',
26
34
  style: _objectSpread({
27
35
  height: size,
36
+ overflow: 'hidden',
28
37
  position: 'relative',
29
38
  width: size
30
39
  }, style),
31
- children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, _objectSpread({
40
+ children: [loading && /*#__PURE__*/_jsx(Img, {
41
+ alt: 'logo',
42
+ height: size * 0.75,
43
+ src: genCdnUrl(LOGO_3D),
44
+ style: {
45
+ position: 'absolute'
46
+ },
47
+ width: size * 0.75
48
+ }), /*#__PURE__*/_jsx(Spline, _objectSpread({
32
49
  onLoad: function onLoad(splineApp) {
33
50
  setLoading(false);
34
51
  _onLoad === null || _onLoad === void 0 || _onLoad(splineApp);
35
52
  },
36
- scene: 'https://gw.alipayobjects.com/os/kitchen/8LH7slSv3s/logo.splinecode'
53
+ scene: 'https://gw.alipayobjects.com/os/kitchen/8LH7slSv3s/logo.splinecode',
54
+ style: {
55
+ flex: 'none',
56
+ height: size,
57
+ width: size
58
+ }
37
59
  }, rest))]
38
60
  });
39
61
  });
@@ -20,7 +20,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
20
20
  blockquote: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n blockquote {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n margin-inline: 0;\n padding-block: 0;\n padding-inline: 1em;\n\n color: ", ";\n\n border-inline-start: solid 4px ", ";\n }\n "])), token.colorTextSecondary, token.colorBorder),
21
21
  code: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n code:not(:has(span)) {\n display: inline;\n\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n\n font-family: ", ";\n font-size: 0.875em;\n line-height: 1;\n word-break: break-word;\n white-space: break-spaces;\n\n background: ", ";\n border: 1px solid var(--lobe-markdown-border-color);\n border-radius: 0.25em;\n }\n "])), token.fontFamilyCode, token.colorFillSecondary),
22
22
  details: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n details {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: 0.75em;\n padding-inline: 1em;\n\n background: ", ";\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n\n summary {\n cursor: pointer;\n display: flex;\n align-items: center;\n list-style: none;\n\n &::before {\n content: '';\n\n position: absolute;\n inset-inline-end: 1.25em;\n transform: rotateZ(-45deg);\n\n display: block;\n\n width: 0.4em;\n height: 0.4em;\n\n font-family: ", ";\n\n border-block-end: 1.5px solid ", ";\n border-inline-end: 1.5px solid ", ";\n\n transition: transform 200ms ", ";\n }\n }\n\n &[open] {\n summary {\n padding-block-end: 0.75em;\n border-block-end: 1px dashed ", ";\n\n &::before {\n transform: rotateZ(45deg);\n }\n }\n }\n }\n "])), token.colorFillTertiary, token.fontFamily, token.colorTextSecondary, token.colorTextSecondary, token.motionEaseOut, token.colorBorder),
23
- header: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n h1,\n h2,\n h3,\n h4,\n h5 {\n margin-block: max(\n calc(\n var(--lobe-markdown-header-multiple) * var(--lobe-markdown-margin-multiple) * 0.4em\n ),\n var(--lobe-markdown-font-size)\n );\n font-weight: 600;\n line-height: 1.25;\n }\n\n h1 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 1.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h2 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + var(--lobe-markdown-header-multiple))\n );\n }\n\n h3 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h4 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.25 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h5 {\n font-size: calc(var(--lobe-markdown-font-size) * 1);\n }\n "]))),
23
+ header: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-block: max(\n calc(\n var(--lobe-markdown-header-multiple) * var(--lobe-markdown-margin-multiple) * 0.4em\n ),\n var(--lobe-markdown-font-size)\n );\n font-weight: bold;\n line-height: 1.25;\n }\n\n h1 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 1.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h2 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + var(--lobe-markdown-header-multiple))\n );\n }\n\n h3 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h4 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.25 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h5,\n h6 {\n font-size: calc(var(--lobe-markdown-font-size) * 1);\n }\n "]))),
24
24
  hr: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n hr {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1.5em);\n\n border-color: ", ";\n border-style: dashed;\n border-width: 1px;\n border-block-start: none;\n border-inline-start: none;\n border-inline-end: none;\n }\n "])), token.colorBorderSecondary),
25
25
  img: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n img {\n max-width: 100%;\n }\n\n > img,\n > p > img {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n }\n "]))),
26
26
  kbd: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n kbd {\n cursor: default;\n\n display: inline-block;\n\n min-width: 1em;\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n\n font-family: ", ";\n font-size: 0.875em;\n font-weight: 500;\n line-height: 1;\n text-align: center;\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: 0.25em;\n }\n "])), token.fontFamily, token.colorBgLayout, token.colorBorderSecondary),
@@ -21,6 +21,7 @@ export interface SelectWithImgProps {
21
21
  styles?: {
22
22
  img?: CSSProperties;
23
23
  };
24
+ unoptimized?: boolean;
24
25
  value?: SelectProps['value'];
25
26
  width?: number;
26
27
  }
@@ -26,7 +26,8 @@ var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
26
26
  _ref$styles = _ref.styles,
27
27
  outStyles = _ref$styles === void 0 ? {} : _ref$styles,
28
28
  _ref$classNames = _ref.classNames,
29
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames;
29
+ classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
30
+ unoptimized = _ref.unoptimized;
30
31
  var _useControlledState = useControlledState(defaultValue, {
31
32
  defaultValue: defaultValue,
32
33
  onChange: onChange,
@@ -64,6 +65,7 @@ var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
64
65
  alt: typeof item.label === 'string' ? item.label : item.ariaLabel,
65
66
  height: height,
66
67
  src: item.img,
68
+ unoptimized: unoptimized,
67
69
  width: width
68
70
  })
69
71
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.137.3",
3
+ "version": "1.137.5",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",