@lobehub/ui 1.125.9 → 1.126.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.
@@ -1,5 +1,6 @@
1
+ import { type SplineProps } from '@splinetool/react-spline';
1
2
  import { CSSProperties } from 'react';
2
- export interface LogoSplineProps {
3
+ export interface LogoSplineProps extends Partial<SplineProps> {
3
4
  className?: string;
4
5
  height?: number | string;
5
6
  style?: CSSProperties;
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["className", "style", "width", "height", "onLoad"];
3
5
  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; }
4
6
  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; }
5
7
  import Spline from '@splinetool/react-spline';
@@ -14,7 +16,9 @@ var LogoSpline = /*#__PURE__*/memo(function (_ref) {
14
16
  var className = _ref.className,
15
17
  style = _ref.style,
16
18
  width = _ref.width,
17
- height = _ref.height;
19
+ height = _ref.height,
20
+ _onLoad = _ref.onLoad,
21
+ rest = _objectWithoutProperties(_ref, _excluded);
18
22
  var _useThemeMode = useThemeMode(),
19
23
  isDarkMode = _useThemeMode.isDarkMode;
20
24
  var _useState = useState(true),
@@ -28,12 +32,13 @@ var LogoSpline = /*#__PURE__*/memo(function (_ref) {
28
32
  position: 'relative',
29
33
  width: width
30
34
  }, style),
31
- children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, {
32
- onLoad: function onLoad() {
33
- return setLoading(false);
35
+ children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, _objectSpread({
36
+ onLoad: function onLoad(splineApp) {
37
+ setLoading(false);
38
+ _onLoad === null || _onLoad === void 0 || _onLoad(splineApp);
34
39
  },
35
40
  scene: isDarkMode ? DARK : LIGHT
36
- })]
41
+ }, rest))]
37
42
  });
38
43
  });
39
44
  export default LogoSpline;
@@ -1,5 +1,6 @@
1
+ import { type SplineProps } from '@splinetool/react-spline';
1
2
  import { CSSProperties } from 'react';
2
- export interface LogoThreeProps {
3
+ export interface LogoThreeProps extends Partial<SplineProps> {
3
4
  className?: string;
4
5
  size?: number | string;
5
6
  style?: CSSProperties;
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["className", "style", "size", "onLoad"];
3
5
  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; }
4
6
  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; }
5
7
  import Spline from '@splinetool/react-spline';
@@ -10,7 +12,9 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
10
12
  var LogoThree = /*#__PURE__*/memo(function (_ref) {
11
13
  var className = _ref.className,
12
14
  style = _ref.style,
13
- size = _ref.size;
15
+ size = _ref.size,
16
+ _onLoad = _ref.onLoad,
17
+ rest = _objectWithoutProperties(_ref, _excluded);
14
18
  var _useState = useState(true),
15
19
  _useState2 = _slicedToArray(_useState, 2),
16
20
  loading = _useState2[0],
@@ -22,12 +26,13 @@ var LogoThree = /*#__PURE__*/memo(function (_ref) {
22
26
  position: 'relative',
23
27
  width: size
24
28
  }, style),
25
- children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, {
26
- onLoad: function onLoad() {
27
- return setLoading(false);
29
+ children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, _objectSpread({
30
+ onLoad: function onLoad(splineApp) {
31
+ setLoading(false);
32
+ _onLoad === null || _onLoad === void 0 || _onLoad(splineApp);
28
33
  },
29
34
  scene: 'https://gw.alipayobjects.com/os/kitchen/8LH7slSv3s/logo.splinecode'
30
- })]
35
+ }, rest))]
31
36
  });
32
37
  });
33
38
  export default LogoThree;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.125.9",
3
+ "version": "1.126.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",