@lobehub/ui 1.145.1 → 1.145.3
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.
package/es/ChatItem/style.js
CHANGED
|
@@ -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:
|
|
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,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps, SvgProps } from "../types";
|
|
3
|
-
|
|
3
|
+
type IconProps = SvgProps & DivProps;
|
|
4
|
+
export interface FileTypeIconProps extends IconProps {
|
|
4
5
|
color?: string;
|
|
5
6
|
filetype?: string;
|
|
6
7
|
size?: number;
|
|
7
8
|
type?: 'file' | 'folder';
|
|
8
9
|
variant?: 'color' | 'mono';
|
|
9
10
|
}
|
|
10
|
-
declare const FileTypeIcon: import("react").NamedExoticComponent<FileTypeIconProps
|
|
11
|
+
declare const FileTypeIcon: import("react").NamedExoticComponent<FileTypeIconProps>;
|
|
11
12
|
export default FileTypeIcon;
|
|
@@ -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 (!
|
|
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:
|
|
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
|
-
}, [
|
|
71
|
+
}, [group, animationDuration, gridProps]);
|
|
64
72
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
65
73
|
className: cx(styles.container, className),
|
|
66
74
|
ref: ref,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
|
-
export interface MaterialFileTypeIconProps {
|
|
3
|
+
export interface MaterialFileTypeIconProps extends DivProps {
|
|
4
4
|
filename: string;
|
|
5
5
|
open?: boolean;
|
|
6
6
|
size?: number;
|
|
7
7
|
type?: 'file' | 'folder';
|
|
8
8
|
variant?: 'pure' | 'file' | 'folder';
|
|
9
9
|
}
|
|
10
|
-
declare const MaterialFileTypeIcon: import("react").NamedExoticComponent<MaterialFileTypeIconProps
|
|
10
|
+
declare const MaterialFileTypeIcon: import("react").NamedExoticComponent<MaterialFileTypeIconProps>;
|
|
11
11
|
export default MaterialFileTypeIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.145.
|
|
3
|
+
"version": "1.145.3",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"ts-md5": "^1.3.1",
|
|
123
123
|
"url-join": "^5.0.0",
|
|
124
124
|
"use-merge-value": "^1.2.0",
|
|
125
|
-
"uuid": "^
|
|
125
|
+
"uuid": "^10.0.0",
|
|
126
126
|
"zustand": "^4.5.2",
|
|
127
127
|
"zustand-utils": "^1.3.2"
|
|
128
128
|
},
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@types/query-string": "^6.3.0",
|
|
139
139
|
"@types/react": "18.2.40",
|
|
140
140
|
"@types/react-dom": "^18.3.0",
|
|
141
|
-
"@types/uuid": "^
|
|
141
|
+
"@types/uuid": "^10.0.0",
|
|
142
142
|
"@vitest/coverage-v8": "~1.2.2",
|
|
143
143
|
"antd-style": "^3.6.2",
|
|
144
144
|
"babel-plugin-antd-style": "^1.0.4",
|