@lobehub/ui 1.145.2 → 1.145.4

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.
@@ -23,7 +23,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
23
23
  actions: cx(css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: none;\n align-self: ", ";\n justify-content: ", ";\n "])), type === 'block' ? 'flex-end' : placement === 'left' ? 'flex-start' : 'flex-end', placement === 'left' ? 'flex-end' : 'flex-start'), editing && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n pointer-events: none !important;\n opacity: 0 !important;\n "])))),
24
24
  avatarContainer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n flex: none;\n width: ", "px;\n height: ", "px;\n "])), avatarSize, avatarSize),
25
25
  avatarGroupContainer: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), avatarSize),
26
- container: cx(type === 'pure' && pureContainerStylish, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n max-width: 100vw;\n padding: 16px;\n\n time {\n display: inline-block;\n white-space: nowrap;\n }\n\n div[role='menubar'] {\n display: flex;\n }\n\n time,\n div[role='menubar'] {\n pointer-events: none;\n opacity: 0;\n transition: opacity 200ms ", ";\n }\n\n &:hover {\n time,\n div[role='menubar'] {\n pointer-events: unset;\n opacity: 1;\n }\n }\n\n ", " {\n padding-block: 4px;\n padding-inline: 8px;\n }\n "])), token.motionEaseOut, responsive.mobile)),
26
+ container: cx(type === 'pure' && pureContainerStylish, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n max-width: 100vw;\n padding: 16px;\n\n time {\n display: inline-block;\n white-space: nowrap;\n }\n\n div[role='menubar'] {\n display: flex;\n }\n\n time,\n div[role='menubar'] {\n pointer-events: none;\n opacity: 0;\n transition: opacity 200ms ", ";\n }\n\n &:hover {\n time,\n div[role='menubar'] {\n pointer-events: unset;\n opacity: 1;\n }\n }\n\n ", " {\n padding-block: ", ";\n padding-inline: 8px;\n }\n "])), token.motionEaseOut, responsive.mobile, type === 'pure' ? '12px' : '6px')),
27
27
  editingContainer: cx(editingStylish, css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding-block: 8px 12px;\n padding-inline: 12px;\n border: 1px solid ", ";\n\n &:active,\n &:hover {\n border-color: ", ";\n }\n "])), token.colorBorderSecondary, token.colorBorder), type === 'pure' && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n "])), token.colorFillQuaternary, token.borderRadius)),
28
28
  editingInput: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 100%;\n "]))),
29
29
  errorContainer: css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n width: 100%;\n "]))),
@@ -32,6 +32,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
32
32
  messageContainer: cx(editingStylish, css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n margin-block-start: ", "px;\n\n ", " {\n overflow-x: auto;\n }\n "])), time ? -16 : 0, responsive.mobile)),
33
33
  messageContent: cx(editingStylish, css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n\n ", " {\n flex-direction: column !important;\n }\n "])), responsive.mobile)),
34
34
  messageExtra: cx('message-extra'),
35
- name: css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-block-end: 6px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-align: ", ";\n "])), token.colorTextDescription, placement === 'left' ? 'left' : 'right')
35
+ name: css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-block-end: 6px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-align: ", ";\n\n pointer-events: none;\n "])), token.colorTextDescription, placement === 'left' ? 'left' : 'right')
36
36
  };
37
37
  });
@@ -1,16 +1,18 @@
1
1
  'use client';
2
2
 
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
6
  var _excluded = ["flip", "reverse", "showBackground", "backgroundColor", "random", "animationDuration", "className", "colorFront", "colorBack", "strokeWidth", "style", "animation"];
6
7
  import { useSize } from 'ahooks';
7
8
  import { shuffle } from 'lodash-es';
8
- import { memo, useCallback, useMemo, useRef } from 'react';
9
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
9
10
  import Grid from "./Grid";
10
11
  import { useStyles } from "./style";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ var initialGroup = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
14
16
  var GridBackground = /*#__PURE__*/memo(function (_ref) {
15
17
  var flip = _ref.flip,
16
18
  reverse = _ref.reverse,
@@ -42,15 +44,21 @@ var GridBackground = /*#__PURE__*/memo(function (_ref) {
42
44
  strokeWidth: strokeWidth
43
45
  };
44
46
  }, [reverse, colorFront, strokeWidth]);
47
+ var _useState = useState(random ? initialGroup : undefined),
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ group = _useState2[0],
50
+ setGroup = _useState2[1];
51
+ useEffect(function () {
52
+ setGroup(random ? shuffle(initialGroup) : undefined);
53
+ }, [random]);
45
54
  var HighlightGrid = useCallback(function () {
46
- if (!random) return /*#__PURE__*/_jsx(Grid, _objectSpread({
55
+ if (!group) return /*#__PURE__*/_jsx(Grid, _objectSpread({
47
56
  style: {
48
57
  '--duration': "".concat(animationDuration, "s")
49
58
  }
50
59
  }, gridProps));
51
- var group = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
52
60
  return /*#__PURE__*/_jsx(_Fragment, {
53
- children: shuffle(group).map(function (item, index) {
61
+ children: group.map(function (item, index) {
54
62
  return /*#__PURE__*/_jsx(Grid, _objectSpread({
55
63
  linePick: item,
56
64
  style: {
@@ -60,7 +68,7 @@ var GridBackground = /*#__PURE__*/memo(function (_ref) {
60
68
  }, gridProps), item);
61
69
  })
62
70
  });
63
- }, [random, animationDuration, gridProps]);
71
+ }, [group, animationDuration, gridProps]);
64
72
  return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
65
73
  className: cx(styles.container, className),
66
74
  ref: ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.145.2",
3
+ "version": "1.145.4",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -75,8 +75,6 @@
75
75
  ]
76
76
  },
77
77
  "dependencies": {
78
- "@ant-design/colors": "^7.0.2",
79
- "@ant-design/icons": "^5.3.7",
80
78
  "@babel/runtime": "^7.24.7",
81
79
  "@dnd-kit/core": "^6.1.0",
82
80
  "@dnd-kit/modifiers": "^7.0.0",
@@ -122,11 +120,12 @@
122
120
  "ts-md5": "^1.3.1",
123
121
  "url-join": "^5.0.0",
124
122
  "use-merge-value": "^1.2.0",
125
- "uuid": "^9.0.1",
123
+ "uuid": "^10.0.0",
126
124
  "zustand": "^4.5.2",
127
125
  "zustand-utils": "^1.3.2"
128
126
  },
129
127
  "devDependencies": {
128
+ "@ant-design/icons": "^5.3.7",
130
129
  "@commitlint/cli": "^19.3.0",
131
130
  "@lobehub/lint": "^1.23.4",
132
131
  "@testing-library/react": "^14.3.1",
@@ -138,9 +137,8 @@
138
137
  "@types/query-string": "^6.3.0",
139
138
  "@types/react": "18.2.40",
140
139
  "@types/react-dom": "^18.3.0",
141
- "@types/uuid": "^9.0.8",
140
+ "@types/uuid": "^10.0.0",
142
141
  "@vitest/coverage-v8": "~1.2.2",
143
- "antd-style": "^3.6.2",
144
142
  "babel-plugin-antd-style": "^1.0.4",
145
143
  "commitlint": "^19.3.0",
146
144
  "concurrently": "^8.2.2",