@antdv-next/x 1.2.2 → 1.2.3-beta.1
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/dist/index.d.ts +1 -1
- package/dist/index.umd.js +13111 -748
- package/dist/package.js +1 -1
- package/dist/sender/Sender.d.ts +23 -5
- package/dist/sender/Sender.js +13 -3
- package/dist/sender/components/Skill.d.ts +11 -1
- package/dist/sender/components/Skill.js +31 -3
- package/dist/sender/components/SlotTextAreaProseMirror.js +1144 -0
- package/dist/sender/components/TextArea.js +44 -3
- package/dist/sender/components/prosemirror/model.d.ts +15 -0
- package/dist/sender/components/prosemirror/model.js +276 -0
- package/dist/sender/components/prosemirror/value.d.ts +11 -0
- package/dist/sender/components/prosemirror/value.js +171 -0
- package/dist/sender/index.d.ts +2 -2
- package/dist/sender/interface.d.ts +14 -1
- package/dist/sender/style/slot-textarea.js +9 -2
- package/dist/thought-chain/style/index.d.ts +71 -3
- package/dist/thought-chain/style/index.js +25 -14
- package/dist/thought-chain/style/item.d.ts +5 -5
- package/dist/thought-chain/style/item.js +5 -5
- package/dist/thought-chain/style/thought-chain.d.ts +2 -1
- package/dist/thought-chain/style/thought-chain.js +8 -20
- package/es/antdv-next-x.esm.js +14919 -6911
- package/package.json +7 -1
- package/dist/sender/components/SlotTextArea.js +0 -808
- /package/dist/sender/components/{SlotTextArea.d.ts → SlotTextAreaProseMirror.d.ts} +0 -0
|
@@ -1,23 +1,91 @@
|
|
|
1
1
|
import { GetDefaultToken } from '../../theme/interface';
|
|
2
|
-
export declare const prepareComponentToken: GetDefaultToken<"ThoughtChain">;
|
|
3
2
|
export interface ComponentToken {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @desc 实心的 ThoughtChain.Item 背景色
|
|
5
|
+
* @descEN ThoughtChain.Item `solid`'s background color
|
|
6
|
+
*/
|
|
6
7
|
itemSolidBg: string;
|
|
8
|
+
/**
|
|
9
|
+
* @desc 实心的 ThoughtChain.Item 悬浮态背景色
|
|
10
|
+
* @descEN ThoughtChain.Item `solid`'s hover background color
|
|
11
|
+
*/
|
|
7
12
|
itemSolidHoverBg: string;
|
|
13
|
+
/**
|
|
14
|
+
* @desc 边框模式的 ThoughtChain.Item 背景色
|
|
15
|
+
* @descEN ThoughtChain.Item `outlined`'s background color
|
|
16
|
+
*/
|
|
8
17
|
itemOutlinedBg: string;
|
|
18
|
+
/**
|
|
19
|
+
* @desc 边框模式的 ThoughtChain.Item 悬浮态背景色
|
|
20
|
+
* @descEN ThoughtChain.Item `outlined`'s hover background color
|
|
21
|
+
*/
|
|
9
22
|
itemOutlinedHoverBg: string;
|
|
23
|
+
/**
|
|
24
|
+
* @desc ThoughtChain.Item 圆角
|
|
25
|
+
* @descEN ThoughtChain.Item's border radius
|
|
26
|
+
*/
|
|
10
27
|
itemBorderRadius: number;
|
|
28
|
+
/**
|
|
29
|
+
* @desc 图标容器尺寸
|
|
30
|
+
* @descEN ThoughtChain.Item `outlined`'s hover background color
|
|
31
|
+
*/
|
|
11
32
|
iconSize: number;
|
|
33
|
+
/**
|
|
34
|
+
* @desc 思维链节点描述文字的动画颜色
|
|
35
|
+
* @descEN ThoughtChain node description text animation color
|
|
36
|
+
*/
|
|
12
37
|
itemMotionDescription: string;
|
|
38
|
+
/**
|
|
39
|
+
* @desc 默认打字动画颜色
|
|
40
|
+
* @descEN Default typing animation color
|
|
41
|
+
*/
|
|
42
|
+
colorTextBlinkDefault: string;
|
|
43
|
+
/**
|
|
44
|
+
* @desc 打字动画颜色
|
|
45
|
+
* @descEN Typing animation color
|
|
46
|
+
*/
|
|
47
|
+
colorTextBlink: string;
|
|
48
|
+
/**
|
|
49
|
+
* @desc 错误状态描述文字颜色
|
|
50
|
+
* @descEN Error state description text color
|
|
51
|
+
*/
|
|
13
52
|
colorErrorTextDescription: string;
|
|
53
|
+
/**
|
|
54
|
+
* @desc 错误状态禁用文字颜色
|
|
55
|
+
* @descEN Error state disabled text color
|
|
56
|
+
*/
|
|
14
57
|
colorErrorTextDisabled: string;
|
|
58
|
+
/**
|
|
59
|
+
* @desc 错误状态禁用描述文字颜色
|
|
60
|
+
* @descEN Error state disabled description text color
|
|
61
|
+
*/
|
|
15
62
|
colorErrorTextDescriptionDisabled: string;
|
|
63
|
+
/**
|
|
64
|
+
* @desc 错误状态禁用背景色
|
|
65
|
+
* @descEN Error state disabled background color
|
|
66
|
+
*/
|
|
16
67
|
colorErrorBgDisabled: string;
|
|
68
|
+
/**
|
|
69
|
+
* @desc 禁用描述文字颜色
|
|
70
|
+
* @descEN Disabled description text color
|
|
71
|
+
*/
|
|
17
72
|
colorDescriptionDisabled: string;
|
|
73
|
+
/**
|
|
74
|
+
* @desc 禁用标题文字颜色
|
|
75
|
+
* @descEN Disabled title text color
|
|
76
|
+
*/
|
|
18
77
|
colorTitleDisabled: string;
|
|
78
|
+
/**
|
|
79
|
+
* @desc 成功状态禁用颜色
|
|
80
|
+
* @descEN Success state disabled color
|
|
81
|
+
*/
|
|
19
82
|
colorSuccessDisabled: string;
|
|
83
|
+
/**
|
|
84
|
+
* @desc 主要状态禁用颜色
|
|
85
|
+
* @descEN Primary state disabled color
|
|
86
|
+
*/
|
|
20
87
|
colorPrimaryDisabled: string;
|
|
21
88
|
}
|
|
89
|
+
export declare const prepareComponentToken: GetDefaultToken<"ThoughtChain">;
|
|
22
90
|
declare const _default: (prefixCls: import('vue').Ref<string>, rootCls?: import('vue').Ref<string | undefined>) => readonly [import('vue').Ref<string, string>, import('vue').ComputedRef<string | undefined>];
|
|
23
91
|
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { blinkMotion } from "../../style/motion/blink.js";
|
|
2
2
|
import { genCollapseMotion } from "../../style/motion/collapse.js";
|
|
3
3
|
import { genStyleHooks } from "../../theme/genStyleUtils.js";
|
|
4
|
-
import
|
|
4
|
+
import genThoughtChainItemStyle from "./item.js";
|
|
5
5
|
import genThoughtChainStyle from "./thought-chain.js";
|
|
6
6
|
import { mergeToken } from "@antdv-next/cssinjs/cssinjs-utils";
|
|
7
7
|
import { FastColor } from "@ant-design/fast-color";
|
|
8
8
|
//#region components/thought-chain/style/index.ts
|
|
9
9
|
var prepareComponentToken = (token) => {
|
|
10
10
|
const itemMotionDescription = new FastColor(token.colorTextDescription).setA(.25).toRgbString();
|
|
11
|
+
const colorTextBlinkDefault = token.colorTextDescription;
|
|
12
|
+
const colorTextBlink = token.colorTextBase;
|
|
11
13
|
const colorErrorTextDescription = new FastColor(token.colorErrorText).setA(.45).toRgbString();
|
|
12
14
|
const colorErrorTextDisabled = new FastColor(token.colorErrorText).setA(.45).toRgbString();
|
|
13
15
|
const itemSolidHoverBg = new FastColor(token.colorFillTertiary).setA(.06).toRgbString();
|
|
@@ -15,33 +17,42 @@ var prepareComponentToken = (token) => {
|
|
|
15
17
|
const colorDescriptionDisabled = new FastColor(token.colorTextDescription).setA(.25).toRgbString();
|
|
16
18
|
const colorTitleDisabled = new FastColor(token.colorText).setA(.45).toRgbString();
|
|
17
19
|
const colorErrorBgDisabled = new FastColor(token.colorErrorBg).setA(.25).toRgbString();
|
|
20
|
+
const itemOutlinedHoverBg = itemSolidHoverBg;
|
|
18
21
|
const colorSuccessDisabled = new FastColor(token.colorSuccess).setA(.45).toRgbString();
|
|
19
|
-
const colorPrimaryDisabled = new FastColor(token.colorPrimary).setA(.45).toRgbString();
|
|
20
22
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
colorDescriptionDisabled,
|
|
24
|
+
colorPrimaryDisabled: new FastColor(token.colorPrimary).setA(.45).toRgbString(),
|
|
25
|
+
colorSuccessDisabled,
|
|
26
|
+
colorTitleDisabled,
|
|
27
|
+
colorErrorTextDisabled,
|
|
28
|
+
colorErrorBgDisabled,
|
|
29
|
+
colorErrorTextDescriptionDisabled,
|
|
30
|
+
itemMotionDescription,
|
|
31
|
+
colorTextBlinkDefault,
|
|
32
|
+
colorTextBlink,
|
|
23
33
|
itemSolidBg: token.colorFillTertiary,
|
|
24
34
|
itemSolidHoverBg,
|
|
25
35
|
itemOutlinedBg: token.colorBgContainer,
|
|
26
|
-
itemOutlinedHoverBg
|
|
36
|
+
itemOutlinedHoverBg,
|
|
27
37
|
itemBorderRadius: token.borderRadius,
|
|
28
38
|
iconSize: token.fontSize,
|
|
29
|
-
|
|
39
|
+
titleFontSize: token.fontSize,
|
|
40
|
+
descriptionFontSize: token.fontSize,
|
|
41
|
+
nodePadding: token.paddingSM,
|
|
42
|
+
titleFontWeight: 500,
|
|
43
|
+
borderColor: token.colorBorder,
|
|
44
|
+
borderWidth: token.lineWidth,
|
|
45
|
+
connectorColor: token.colorFillContent,
|
|
46
|
+
connectorWidth: token.lineWidth,
|
|
30
47
|
colorErrorTextDescription,
|
|
31
|
-
|
|
32
|
-
colorErrorTextDescriptionDisabled,
|
|
33
|
-
colorErrorBgDisabled,
|
|
34
|
-
colorDescriptionDisabled,
|
|
35
|
-
colorTitleDisabled,
|
|
36
|
-
colorSuccessDisabled,
|
|
37
|
-
colorPrimaryDisabled
|
|
48
|
+
hoverTransitionDuration: `${token.motionDurationMid} ${token.motionEaseInOut}`
|
|
38
49
|
};
|
|
39
50
|
};
|
|
40
51
|
var style_default = genStyleHooks("ThoughtChain", (token) => {
|
|
41
52
|
const chainToken = mergeToken(token, {});
|
|
42
53
|
return [
|
|
43
54
|
genThoughtChainStyle(chainToken),
|
|
44
|
-
|
|
55
|
+
genThoughtChainItemStyle(chainToken),
|
|
45
56
|
genCollapseMotion(chainToken),
|
|
46
57
|
blinkMotion(chainToken, `${chainToken.componentCls}-motion-blink`)
|
|
47
58
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
1
|
+
import { CSSObject } from '@antdv-next/cssinjs';
|
|
2
|
+
import { GenerateStyle } from '../../theme/interface';
|
|
3
|
+
import { ThoughtChainToken } from './thought-chain';
|
|
4
|
+
declare const genThoughtChainItemStyle: GenerateStyle<ThoughtChainToken, CSSObject>;
|
|
5
|
+
export default genThoughtChainItemStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unit } from "@antdv-next/cssinjs";
|
|
2
2
|
//#region components/thought-chain/style/item.ts
|
|
3
|
-
var
|
|
3
|
+
var genThoughtChainItemStyle = (token) => {
|
|
4
4
|
const { componentCls, calc } = token;
|
|
5
5
|
const itemCls = `${componentCls}-item`;
|
|
6
6
|
return { [itemCls]: {
|
|
@@ -14,7 +14,7 @@ var genItemStyle = (token) => {
|
|
|
14
14
|
paddingInline: token.paddingSM,
|
|
15
15
|
boxSizing: "border-box",
|
|
16
16
|
lineHeight: token.lineHeight,
|
|
17
|
-
borderRadius: token.
|
|
17
|
+
borderRadius: token.itemBorderRadius,
|
|
18
18
|
alignItems: "baseline",
|
|
19
19
|
[`&${itemCls}-rtl`]: { direction: "rtl" },
|
|
20
20
|
[`&${itemCls}-click:not(${itemCls}-disabled)`]: {
|
|
@@ -42,7 +42,7 @@ var genItemStyle = (token) => {
|
|
|
42
42
|
[`${componentCls}-status-loading`]: { color: token.colorPrimaryDisabled }
|
|
43
43
|
},
|
|
44
44
|
[`&${itemCls}-solid`]: {
|
|
45
|
-
background: token.itemSolidBg
|
|
45
|
+
background: token.itemSolidBg,
|
|
46
46
|
[`&${itemCls}-disabled`]: { background: token.colorBgContainerDisabled },
|
|
47
47
|
[`&${itemCls}-click:not(${itemCls}-error):hover`]: { background: token.itemSolidHoverBg },
|
|
48
48
|
[`&${itemCls}-error:not(${itemCls}-disabled)`]: { background: token.colorErrorBg },
|
|
@@ -50,7 +50,7 @@ var genItemStyle = (token) => {
|
|
|
50
50
|
},
|
|
51
51
|
[`&${itemCls}-outlined`]: {
|
|
52
52
|
paddingBlock: token.paddingXXS,
|
|
53
|
-
backgroundColor: token.itemOutlinedBg
|
|
53
|
+
backgroundColor: token.itemOutlinedBg,
|
|
54
54
|
borderWidth: token.lineWidth,
|
|
55
55
|
borderStyle: token.lineType,
|
|
56
56
|
borderColor: token.colorBorder,
|
|
@@ -79,4 +79,4 @@ var genItemStyle = (token) => {
|
|
|
79
79
|
} };
|
|
80
80
|
};
|
|
81
81
|
//#endregion
|
|
82
|
-
export {
|
|
82
|
+
export { genThoughtChainItemStyle as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { CSSObject } from '@antdv-next/cssinjs';
|
|
1
2
|
import { FullToken, GenerateStyle } from '../../theme/interface';
|
|
2
3
|
export interface ThoughtChainToken extends FullToken<"ThoughtChain"> {
|
|
3
4
|
}
|
|
4
|
-
declare const genThoughtChainStyle: GenerateStyle<ThoughtChainToken>;
|
|
5
|
+
declare const genThoughtChainStyle: GenerateStyle<ThoughtChainToken, CSSObject>;
|
|
5
6
|
export default genThoughtChainStyle;
|
|
@@ -2,7 +2,6 @@ import { unit } from "@antdv-next/cssinjs";
|
|
|
2
2
|
//#region components/thought-chain/style/thought-chain.ts
|
|
3
3
|
var genThoughtChainStyle = (token) => {
|
|
4
4
|
const { componentCls, calc } = token;
|
|
5
|
-
const iconSize = token.iconSize ?? token.fontSize;
|
|
6
5
|
return { [componentCls]: {
|
|
7
6
|
[`&${componentCls}-box`]: {
|
|
8
7
|
display: "flex",
|
|
@@ -42,17 +41,16 @@ var genThoughtChainStyle = (token) => {
|
|
|
42
41
|
},
|
|
43
42
|
[`${componentCls}-node-icon`]: {
|
|
44
43
|
lineHeight: 1,
|
|
45
|
-
fontSize: iconSize,
|
|
44
|
+
fontSize: token.iconSize,
|
|
46
45
|
"&:after": {
|
|
47
46
|
content: "\"\"",
|
|
48
47
|
position: "absolute",
|
|
49
|
-
height: unit(calc("100%").sub(calc(iconSize).mul(token.lineHeight)).equal()),
|
|
48
|
+
height: unit(calc("100%").sub(calc(token.iconSize).mul(token.lineHeight)).equal()),
|
|
50
49
|
borderInlineStart: `${unit(token.lineWidth)} solid ${token.colorFillContent}`,
|
|
51
|
-
insetInlineStart: unit(calc(iconSize).sub(1).div(2).equal()),
|
|
52
|
-
top: unit(calc(iconSize).mul(token.lineHeight).equal())
|
|
50
|
+
insetInlineStart: unit(calc(token.iconSize).sub(1).div(2).equal()),
|
|
51
|
+
top: unit(calc(token.iconSize).mul(token.lineHeight).equal())
|
|
53
52
|
}
|
|
54
53
|
},
|
|
55
|
-
[`${componentCls}-node-icon-none`]: { "&:after": { display: "none" } },
|
|
56
54
|
[`${componentCls}-node-icon-dashed`]: { "&:after": { borderInlineStart: `${unit(token.lineWidth)} dashed ${token.colorFillContent}` } },
|
|
57
55
|
[`${componentCls}-node-icon-dotted`]: { "&:after": { borderInlineStart: `${unit(token.lineWidth)} dotted ${token.colorFillContent}` } },
|
|
58
56
|
[`${componentCls}-node-index-icon`]: {
|
|
@@ -62,26 +60,16 @@ var genThoughtChainStyle = (token) => {
|
|
|
62
60
|
lineHeight: 1,
|
|
63
61
|
color: token.colorTextSecondary,
|
|
64
62
|
fontSize: token.fontSizeSM,
|
|
65
|
-
width: iconSize,
|
|
66
|
-
height: iconSize,
|
|
63
|
+
width: token.iconSize,
|
|
64
|
+
height: token.iconSize,
|
|
67
65
|
backgroundColor: token.colorFillContent,
|
|
68
|
-
borderRadius: unit(calc(iconSize).div(2).equal())
|
|
69
|
-
},
|
|
70
|
-
[`${componentCls}-status`]: {
|
|
71
|
-
display: "inline-flex",
|
|
72
|
-
alignItems: "center",
|
|
73
|
-
fontSize: iconSize
|
|
74
|
-
},
|
|
75
|
-
[`${componentCls}-status-abort`]: { color: token.colorTextQuaternary },
|
|
76
|
-
[`${componentCls}-collapse-enter-active, ${componentCls}-collapse-leave-active`]: {
|
|
77
|
-
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, opacity ${token.motionDurationMid} ${token.motionEaseInOut}`,
|
|
78
|
-
overflow: "hidden"
|
|
66
|
+
borderRadius: unit(calc(token.iconSize).div(2).equal())
|
|
79
67
|
},
|
|
80
68
|
[`&${componentCls}-rtl`]: {
|
|
81
69
|
direction: "rtl",
|
|
82
70
|
[`${componentCls}-node-icon`]: { "&:after": {
|
|
83
71
|
insetInlineStart: "unset",
|
|
84
|
-
insetInlineEnd: unit(calc(iconSize).sub(1).div(2).equal())
|
|
72
|
+
insetInlineEnd: unit(calc(token.iconSize).sub(1).div(2).equal())
|
|
85
73
|
} }
|
|
86
74
|
}
|
|
87
75
|
} };
|