@unif/react-native-chat 3.0.0 → 3.2.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.
Files changed (76) hide show
  1. package/lib/module/components/Composer/Composer.js +12 -7
  2. package/lib/module/components/Composer/Composer.js.map +1 -1
  3. package/lib/module/components/Composer/ComposerIconAction.js +2 -2
  4. package/lib/module/components/Composer/ComposerIconAction.js.map +1 -1
  5. package/lib/module/components/Composer/ComposerVoiceWave.js +44 -0
  6. package/lib/module/components/Composer/ComposerVoiceWave.js.map +1 -0
  7. package/lib/module/components/Composer/constants.js +20 -1
  8. package/lib/module/components/Composer/constants.js.map +1 -1
  9. package/lib/module/components/Composer/styles.js +30 -3
  10. package/lib/module/components/Composer/styles.js.map +1 -1
  11. package/lib/module/components/Message/MarkdownContent/MarkdownContent.js +9 -3
  12. package/lib/module/components/Message/MarkdownContent/MarkdownContent.js.map +1 -1
  13. package/lib/module/components/Message/MarkdownContent/styles.js +21 -11
  14. package/lib/module/components/Message/MarkdownContent/styles.js.map +1 -1
  15. package/lib/module/components/Message/Message.js +16 -4
  16. package/lib/module/components/Message/Message.js.map +1 -1
  17. package/lib/module/components/Message/styles.js +20 -14
  18. package/lib/module/components/Message/styles.js.map +1 -1
  19. package/lib/module/components/MessageList/MessageList.js +29 -8
  20. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  21. package/lib/module/components/MessageList/styles.js +14 -4
  22. package/lib/module/components/MessageList/styles.js.map +1 -1
  23. package/lib/module/components/Process/Process.js +11 -3
  24. package/lib/module/components/Process/Process.js.map +1 -1
  25. package/lib/module/components/Process/ProcessCompactStep.js +81 -0
  26. package/lib/module/components/Process/ProcessCompactStep.js.map +1 -0
  27. package/lib/module/components/Process/styles.js +31 -1
  28. package/lib/module/components/Process/styles.js.map +1 -1
  29. package/lib/typescript/src/components/Composer/Composer.d.ts.map +1 -1
  30. package/lib/typescript/src/components/Composer/ComposerIconAction.d.ts.map +1 -1
  31. package/lib/typescript/src/components/Composer/ComposerVoiceWave.d.ts +2 -0
  32. package/lib/typescript/src/components/Composer/ComposerVoiceWave.d.ts.map +1 -0
  33. package/lib/typescript/src/components/Composer/constants.d.ts +29 -0
  34. package/lib/typescript/src/components/Composer/constants.d.ts.map +1 -1
  35. package/lib/typescript/src/components/Composer/styles.d.ts +27 -0
  36. package/lib/typescript/src/components/Composer/styles.d.ts.map +1 -1
  37. package/lib/typescript/src/components/Message/MarkdownContent/MarkdownContent.d.ts +1 -1
  38. package/lib/typescript/src/components/Message/MarkdownContent/MarkdownContent.d.ts.map +1 -1
  39. package/lib/typescript/src/components/Message/MarkdownContent/styles.d.ts +104 -0
  40. package/lib/typescript/src/components/Message/MarkdownContent/styles.d.ts.map +1 -1
  41. package/lib/typescript/src/components/Message/MarkdownContent/types.d.ts +1 -0
  42. package/lib/typescript/src/components/Message/MarkdownContent/types.d.ts.map +1 -1
  43. package/lib/typescript/src/components/Message/Message.d.ts.map +1 -1
  44. package/lib/typescript/src/components/Message/styles.d.ts +11 -5
  45. package/lib/typescript/src/components/Message/styles.d.ts.map +1 -1
  46. package/lib/typescript/src/components/MessageList/MessageList.d.ts +1 -1
  47. package/lib/typescript/src/components/MessageList/MessageList.d.ts.map +1 -1
  48. package/lib/typescript/src/components/MessageList/styles.d.ts +26 -1
  49. package/lib/typescript/src/components/MessageList/styles.d.ts.map +1 -1
  50. package/lib/typescript/src/components/MessageList/types.d.ts +6 -2
  51. package/lib/typescript/src/components/MessageList/types.d.ts.map +1 -1
  52. package/lib/typescript/src/components/Process/Process.d.ts.map +1 -1
  53. package/lib/typescript/src/components/Process/ProcessCompactStep.d.ts +3 -0
  54. package/lib/typescript/src/components/Process/ProcessCompactStep.d.ts.map +1 -0
  55. package/lib/typescript/src/components/Process/styles.d.ts +30 -0
  56. package/lib/typescript/src/components/Process/styles.d.ts.map +1 -1
  57. package/lib/typescript/src/components/Process/types.d.ts +8 -0
  58. package/lib/typescript/src/components/Process/types.d.ts.map +1 -1
  59. package/package.json +3 -3
  60. package/src/components/Composer/Composer.tsx +21 -14
  61. package/src/components/Composer/ComposerIconAction.tsx +6 -1
  62. package/src/components/Composer/ComposerVoiceWave.tsx +67 -0
  63. package/src/components/Composer/constants.ts +14 -1
  64. package/src/components/Composer/styles.ts +23 -2
  65. package/src/components/Message/MarkdownContent/MarkdownContent.tsx +15 -3
  66. package/src/components/Message/MarkdownContent/styles.ts +23 -11
  67. package/src/components/Message/MarkdownContent/types.ts +1 -0
  68. package/src/components/Message/Message.tsx +46 -15
  69. package/src/components/Message/styles.ts +23 -12
  70. package/src/components/MessageList/MessageList.tsx +33 -12
  71. package/src/components/MessageList/styles.ts +22 -6
  72. package/src/components/MessageList/types.ts +6 -2
  73. package/src/components/Process/Process.tsx +17 -3
  74. package/src/components/Process/ProcessCompactStep.tsx +110 -0
  75. package/src/components/Process/styles.ts +27 -1
  76. package/src/components/Process/types.ts +9 -0
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/MarkdownContent.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,YAAS,CAAC;AAG3E,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,oBAAoB,+BAwE1E"}
1
+ {"version":3,"file":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/MarkdownContent.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,YAAS,CAAC;AAG3E,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,WAAW,EACX,QAAgB,GACjB,EAAE,oBAAoB,+BAgFtB"}
@@ -25,6 +25,7 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
25
25
  };
26
26
  link: {
27
27
  color: string;
28
+ textDecorationLine: "underline";
28
29
  fontSize: number;
29
30
  lineHeight: number;
30
31
  };
@@ -35,11 +36,108 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
35
36
  };
36
37
  codespan: {
37
38
  fontFamily: string;
39
+ color: string;
38
40
  backgroundColor: string;
39
41
  fontSize: number;
40
42
  lineHeight: number;
43
+ };
44
+ h1: {
45
+ fontSize: number;
46
+ lineHeight: number;
47
+ color: string;
48
+ borderBottomColor: string;
49
+ };
50
+ h2: {
51
+ fontSize: number;
52
+ lineHeight: number;
53
+ color: string;
54
+ borderBottomColor: string;
55
+ };
56
+ h3: {
57
+ fontSize: number;
58
+ lineHeight: number;
59
+ color: string;
60
+ };
61
+ h4: {
62
+ fontSize: number;
63
+ lineHeight: number;
64
+ color: string;
65
+ };
66
+ h5: {
67
+ fontSize: number;
68
+ lineHeight: number;
69
+ color: string;
70
+ };
71
+ h6: {
72
+ fontSize: number;
73
+ lineHeight: number;
41
74
  color: string;
42
75
  };
76
+ paragraph: {
77
+ paddingVertical: number;
78
+ };
79
+ code: {
80
+ padding: number;
81
+ backgroundColor: string;
82
+ };
83
+ codeText: {
84
+ color: string;
85
+ fontFamily: string;
86
+ fontSize: number;
87
+ lineHeight: number;
88
+ };
89
+ blockquote: {
90
+ borderLeftColor: string;
91
+ };
92
+ hr: {
93
+ borderBottomColor: string;
94
+ };
95
+ table: {
96
+ borderColor: string;
97
+ };
98
+ }>;
99
+ export declare const createOutgoingStyles: (colors: ColorTokens) => Readonly<{
100
+ text: {
101
+ fontSize: number;
102
+ lineHeight: number;
103
+ color: string;
104
+ };
105
+ em: {
106
+ fontStyle: "italic";
107
+ fontSize: number;
108
+ lineHeight: number;
109
+ color: string;
110
+ };
111
+ strong: {
112
+ fontWeight: "bold";
113
+ fontSize: number;
114
+ lineHeight: number;
115
+ color: string;
116
+ };
117
+ strikethrough: {
118
+ textDecorationLine: "line-through";
119
+ fontSize: number;
120
+ lineHeight: number;
121
+ color: string;
122
+ };
123
+ link: {
124
+ color: string;
125
+ textDecorationLine: "underline";
126
+ fontSize: number;
127
+ lineHeight: number;
128
+ };
129
+ li: {
130
+ fontSize: number;
131
+ lineHeight: number;
132
+ color: string;
133
+ };
134
+ codespan: {
135
+ fontFamily: string;
136
+ color: string;
137
+ backgroundColor: string;
138
+ fontSize: number;
139
+ lineHeight: number;
140
+ };
43
141
  h1: {
44
142
  fontSize: number;
45
143
  lineHeight: number;
@@ -79,6 +177,12 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
79
177
  padding: number;
80
178
  backgroundColor: string;
81
179
  };
180
+ codeText: {
181
+ color: string;
182
+ fontFamily: string;
183
+ fontSize: number;
184
+ lineHeight: number;
185
+ };
82
186
  blockquote: {
83
187
  borderLeftColor: string;
84
188
  };
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwD/C,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EACb,CAAC;AACpC,eAAO,MAAM,oBAAoB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EACtB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export interface MarkdownContentProps {
2
2
  text: string;
3
3
  onLinkPress?(url: string): void;
4
+ outgoing?: boolean;
4
5
  }
5
6
  export interface MarkdownSvgLabelProps {
6
7
  alt?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAE5C,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAiI1C"}
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAE5C,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BA0J1C"}
@@ -5,13 +5,12 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
5
5
  alignItems: "flex-start";
6
6
  gap: number;
7
7
  minWidth: number;
8
- paddingVertical: number;
9
8
  };
10
9
  end: {
11
10
  flexDirection: "row-reverse";
12
11
  };
13
12
  column: {
14
- flexShrink: number;
13
+ flex: number;
15
14
  maxWidth: string;
16
15
  gap: number;
17
16
  alignItems: "flex-start";
@@ -20,8 +19,8 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
20
19
  alignItems: "flex-end";
21
20
  };
22
21
  fullWidth: {
23
- flex: number;
24
22
  alignSelf: "stretch";
23
+ maxWidth: string;
25
24
  };
26
25
  content: {
27
26
  minWidth: number;
@@ -29,15 +28,20 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
29
28
  gap: number;
30
29
  };
31
30
  bubble: {
32
- padding: number;
31
+ paddingHorizontal: number;
32
+ paddingVertical: number;
33
33
  borderRadius: number;
34
34
  backgroundColor: string;
35
35
  };
36
36
  outgoing: {
37
37
  backgroundColor: string;
38
38
  };
39
+ outgoingText: {
40
+ color: string;
41
+ };
39
42
  outlined: {
40
- padding: number;
43
+ paddingHorizontal: number;
44
+ paddingVertical: number;
41
45
  borderRadius: number;
42
46
  borderWidth: number;
43
47
  borderColor: string;
@@ -48,6 +52,7 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
48
52
  };
49
53
  text: {
50
54
  fontSize: number;
55
+ lineHeight: number;
51
56
  color: string;
52
57
  };
53
58
  name: {
@@ -65,6 +70,7 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
65
70
  flexDirection: "row";
66
71
  flexWrap: "wrap";
67
72
  gap: number;
73
+ marginTop: number;
68
74
  };
69
75
  }>;
70
76
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC5C,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgD5C,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { RefAttributes } from 'react';
2
2
  import type { MessageListHandle, MessageListProps } from './types.js';
3
- export declare function MessageList<T>({ items, keyExtractor, renderItem, extraData, header, footer, empty, renderSeparator, initialPosition, followOutput, endThreshold, showScrollToEnd, onAtEndChange, hasEarlier, loadingEarlier, onRequestEarlier, keyboardDismissMode, style, testID, ref, }: MessageListProps<T> & RefAttributes<MessageListHandle>): import("react").JSX.Element;
3
+ export declare function MessageList<T>({ items, keyExtractor, renderItem, extraData, header, footer, empty, renderSeparator, initialPosition, followOutput, endThreshold, showScrollToEnd, scrollToEndBusy, onAtEndChange, hasEarlier, loadingEarlier, onRequestEarlier, keyboardDismissMode, contentContainerStyle, showsVerticalScrollIndicator, style, testID, ref, }: MessageListProps<T> & RefAttributes<MessageListHandle>): import("react").JSX.Element;
4
4
  //# sourceMappingURL=MessageList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/MessageList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAInE,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EACL,eAAe,EACf,eAAuB,EACvB,YAA0B,EAC1B,YAAoC,EACpC,eAAsB,EACtB,aAAa,EACb,UAAkB,EAClB,cAAsB,EACtB,gBAAgB,EAChB,mBAA+B,EAC/B,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,iBAAiB,CAAC,+BAuGxD"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/MessageList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAc3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAInE,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EACL,eAAe,EACf,eAAuB,EACvB,YAA0B,EAC1B,YAAoC,EACpC,eAAsB,EACtB,eAAuB,EACvB,aAAa,EACb,UAAkB,EAClB,cAAsB,EACtB,gBAAgB,EAChB,mBAA+B,EAC/B,qBAAqB,EACrB,4BAAoC,EACpC,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,iBAAiB,CAAC,+BAoHxD"}
@@ -1,4 +1,5 @@
1
- export declare const styles: Readonly<{
1
+ import type { ColorTokens, ShadowTokens } from '@unif/react-native-design';
2
+ export declare const createStyles: (colors: ColorTokens, shadows: ShadowTokens) => Readonly<{
2
3
  root: {
3
4
  flex: number;
4
5
  minHeight: number;
@@ -11,6 +12,30 @@ export declare const styles: Readonly<{
11
12
  position: "absolute";
12
13
  bottom: number;
13
14
  alignSelf: "center";
15
+ width: number;
16
+ height: number;
17
+ alignItems: "center";
18
+ justifyContent: "center";
19
+ };
20
+ returnProgress: Readonly<{
21
+ position: "absolute";
22
+ left: 0;
23
+ right: 0;
24
+ top: 0;
25
+ bottom: 0;
26
+ }>;
27
+ returnButton: {
28
+ shadowColor: string;
29
+ shadowOffset: {
30
+ readonly width: number;
31
+ readonly height: number;
32
+ };
33
+ shadowOpacity: number;
34
+ shadowRadius: number;
35
+ elevation: number;
36
+ alignSelf: "center";
37
+ borderRadius: number;
38
+ backgroundColor: string;
14
39
  };
15
40
  }>;
16
41
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;EAIjB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3E,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW,EAAE,SAAS,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBnE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { StyleProp, ViewStyle } from 'react-native';
2
+ import type { ScrollViewProps, StyleProp, ViewStyle } from 'react-native';
3
3
  export interface MessageListScrollOptions {
4
4
  animated?: boolean;
5
5
  }
@@ -19,11 +19,15 @@ export interface MessageListProps<T> {
19
19
  followOutput?: 'whenAtEnd' | 'never';
20
20
  endThreshold?: number;
21
21
  showScrollToEnd?: boolean;
22
+ /** 外部仍在生成内容时显示返回入口的进度外环,不影响滚动操作。 */
23
+ scrollToEndBusy?: boolean;
22
24
  onAtEndChange?(atEnd: boolean): void;
23
25
  hasEarlier?: boolean;
24
26
  loadingEarlier?: boolean;
25
27
  onRequestEarlier?(): void;
26
- keyboardDismissMode?: 'none' | 'on-drag';
28
+ keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
29
+ contentContainerStyle?: StyleProp<ViewStyle>;
30
+ showsVerticalScrollIndicator?: boolean;
27
31
  style?: StyleProp<ViewStyle>;
28
32
  testID?: string;
29
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACvD;AACD,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IACpB,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC;IAC9B,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC;IAClD,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAClC,YAAY,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAA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AClC,YAAY,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oCAAoC;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,IAAI,IAAI,CAAC;IAC1B,mBAAmB,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC7D,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,YAAS,CAAC;AAkCzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmH9D"}
1
+ {"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,YAAS,CAAC;AAkCzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgI9D"}
@@ -0,0 +1,3 @@
1
+ import type { ProcessCompactStepProps } from './types.js';
2
+ export declare function ProcessCompactStep({ step, expanded, elapsed, onToggle, }: ProcessCompactStepProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=ProcessCompactStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessCompactStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/ProcessCompactStep.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAS,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,+BAyFzB"}
@@ -1,5 +1,35 @@
1
1
  import type { ColorTokens } from '@unif/react-native-design';
2
2
  export declare const createStyles: (colors: ColorTokens) => Readonly<{
3
+ compactRoot: {
4
+ gap: number;
5
+ };
6
+ compactSteps: {
7
+ gap: number;
8
+ };
9
+ compactHeader: {
10
+ flexDirection: "row";
11
+ alignItems: "center";
12
+ gap: number;
13
+ minHeight: number;
14
+ paddingVertical: number;
15
+ };
16
+ compactTitle: {
17
+ flex: number;
18
+ minWidth: number;
19
+ color: string;
20
+ fontSize: number;
21
+ fontWeight: "500";
22
+ };
23
+ compactDescription: {
24
+ color: string;
25
+ fontSize: number;
26
+ lineHeight: number;
27
+ };
28
+ compactDetails: {
29
+ maxHeight: number;
30
+ paddingTop: number;
31
+ paddingBottom: number;
32
+ };
3
33
  root: {
4
34
  gap: number;
5
35
  padding: number;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwE5C,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5C,CAAC"}
@@ -12,12 +12,20 @@ export interface ProcessStep {
12
12
  actions?: readonly ChatAction[];
13
13
  }
14
14
  export interface ProcessBaseProps {
15
+ /** card 为完整步骤面板;compact 为可整行展开、有界详情的轻量过程展示。 */
16
+ variant?: 'card' | 'compact';
15
17
  steps: readonly ProcessStep[];
16
18
  title?: string;
17
19
  identity?: ReactNode;
18
20
  style?: StyleProp<ViewStyle>;
19
21
  testID?: string;
20
22
  }
23
+ export interface ProcessCompactStepProps {
24
+ step: ProcessStep;
25
+ expanded: boolean;
26
+ elapsed?: string;
27
+ onToggle(): void;
28
+ }
21
29
  export interface ProcessControlledExpansion {
22
30
  expandedIds: readonly string[];
23
31
  onExpandedChange(ids: readonly string[]): void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAe,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAC3B,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,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 @@
1
1
  {
2
2
  "name": "@unif/react-native-chat",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "description": "Unif React Native 聊天组件:消息、输入、附件和交互展示",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -68,7 +68,7 @@
68
68
  "@release-it/conventional-changelog": "^12.0.0",
69
69
  "@testing-library/react-native": "13.3.3",
70
70
  "@types/react": "^19.2.0",
71
- "@unif/react-native-design": "0.35.0",
71
+ "@unif/react-native-design": "0.36.0",
72
72
  "commitlint": "^21.2.1",
73
73
  "del-cli": "^7.0.0",
74
74
  "eslint": "^9.39.5",
@@ -96,7 +96,7 @@
96
96
  "typescript": "^6.0.3"
97
97
  },
98
98
  "peerDependencies": {
99
- "@unif/react-native-design": "^0.35.0",
99
+ "@unif/react-native-design": ">=0.36.0",
100
100
  "react": ">=19.2.3 <20.0.0",
101
101
  "react-native": ">=0.86.0",
102
102
  "react-native-svg": ">=15"
@@ -22,6 +22,7 @@ import {
22
22
  } from './constants';
23
23
  import { ComposerIconAction } from './ComposerIconAction';
24
24
  import { ComposerMenuItem } from './ComposerMenuItem';
25
+ import { ComposerVoiceWave } from './ComposerVoiceWave';
25
26
  import { createStyles } from './styles';
26
27
  import type { ComposerHandle, ComposerProps } from './types';
27
28
 
@@ -122,7 +123,9 @@ export const Composer = forwardRef<ComposerHandle, ComposerProps>(
122
123
  }
123
124
  }}
124
125
  >
125
- {header != null ? <View style={styles.accessory}>{header}</View> : null}
126
+ {header != null ? (
127
+ <View style={[styles.accessory, styles.header]}>{header}</View>
128
+ ) : null}
126
129
  {menuOpen && !disabled && !voiceActive && actions.length > 0 ? (
127
130
  <>
128
131
  <Pressable
@@ -175,6 +178,7 @@ export const Composer = forwardRef<ComposerHandle, ComposerProps>(
175
178
  <Textarea
176
179
  ref={inputRef}
177
180
  surface="plain"
181
+ contentAlignment="center"
178
182
  value={value}
179
183
  onChangeText={onChangeText}
180
184
  editable={editable}
@@ -247,19 +251,22 @@ export const Composer = forwardRef<ComposerHandle, ComposerProps>(
247
251
  disabled={disabled || voice.disabled}
248
252
  onPress={voice.onCancel}
249
253
  />
250
- <Text
251
- numberOfLines={1}
252
- ellipsizeMode="head"
253
- style={[
254
- styles.transcript,
255
- !voice.transcript && styles.transcriptPlaceholder,
256
- ]}
257
- accessibilityLiveRegion="polite"
258
- >
259
- {voice.status === 'starting'
260
- ? VOICE_LABELS.starting
261
- : voice.transcript || VOICE_LABELS[voice.status]}
262
- </Text>
254
+ <View style={styles.voiceBody}>
255
+ {voice.status !== 'starting' ? <ComposerVoiceWave /> : null}
256
+ <Text
257
+ numberOfLines={1}
258
+ ellipsizeMode="head"
259
+ style={[
260
+ styles.transcript,
261
+ !voice.transcript && styles.transcriptPlaceholder,
262
+ ]}
263
+ accessibilityLiveRegion="polite"
264
+ >
265
+ {voice.status === 'starting'
266
+ ? VOICE_LABELS.starting
267
+ : voice.transcript || VOICE_LABELS[voice.status]}
268
+ </Text>
269
+ </View>
263
270
  {voice.status === 'listening' ? (
264
271
  <ComposerIconAction
265
272
  icon="stop"
@@ -3,6 +3,7 @@ import { Icon, useColors, useThemedStyles } from '@unif/react-native-design';
3
3
  import {
4
4
  COMPOSER_ACTION_ICON_SIZE,
5
5
  COMPOSER_PRIMARY_ICON_SIZE,
6
+ COMPOSER_CANCEL_ICON_SIZE,
6
7
  } from './constants';
7
8
  import { createStyles } from './styles';
8
9
  import { useMousePress } from './useMousePress';
@@ -56,7 +57,11 @@ export function ComposerIconAction({
56
57
  <Icon
57
58
  name={icon}
58
59
  size={
59
- primary ? COMPOSER_PRIMARY_ICON_SIZE : COMPOSER_ACTION_ICON_SIZE
60
+ primary
61
+ ? COMPOSER_PRIMARY_ICON_SIZE
62
+ : visual === 'cancel'
63
+ ? COMPOSER_CANCEL_ICON_SIZE
64
+ : COMPOSER_ACTION_ICON_SIZE
60
65
  }
61
66
  color={color}
62
67
  style={
@@ -0,0 +1,67 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { Animated, Easing, Platform, View } from 'react-native';
3
+ import {
4
+ usePrefersReducedMotion,
5
+ useThemedStyles,
6
+ } from '@unif/react-native-design';
7
+ import {
8
+ COMPOSER_VOICE_WAVE_PATTERN,
9
+ COMPOSER_VOICE_WAVE_STAGGER_MS,
10
+ } from './constants';
11
+ import { createStyles } from './styles';
12
+
13
+ export function ComposerVoiceWave() {
14
+ const styles = useThemedStyles(createStyles);
15
+ const reducedMotion = usePrefersReducedMotion();
16
+ const [values] = useState(() =>
17
+ COMPOSER_VOICE_WAVE_PATTERN.map(
18
+ (group) => new Animated.Value(group.from / Math.max(group.from, group.to))
19
+ )
20
+ );
21
+ useEffect(() => {
22
+ const animations = COMPOSER_VOICE_WAVE_PATTERN.map((group, index) => {
23
+ const value = values[index]!;
24
+ const maximum = Math.max(group.from, group.to);
25
+ value.setValue((reducedMotion ? group.to : group.from) / maximum);
26
+ return Animated.sequence([
27
+ Animated.delay(index * COMPOSER_VOICE_WAVE_STAGGER_MS),
28
+ Animated.loop(
29
+ Animated.sequence(
30
+ [group.to, group.from].map((height) =>
31
+ Animated.timing(value, {
32
+ toValue: height / maximum,
33
+ duration: group.duration / 2,
34
+ easing: Easing.inOut(Easing.ease),
35
+ useNativeDriver: Platform.OS !== 'web',
36
+ })
37
+ )
38
+ )
39
+ ),
40
+ ]);
41
+ });
42
+ if (!reducedMotion) animations.forEach((animation) => animation.start());
43
+ return () => animations.forEach((animation) => animation.stop());
44
+ // 波形规格固定,输入文字更新不重启装饰动画。
45
+ }, [reducedMotion, values]);
46
+ return (
47
+ <View
48
+ style={styles.wave}
49
+ pointerEvents="none"
50
+ accessibilityElementsHidden
51
+ importantForAccessibility="no-hide-descendants"
52
+ >
53
+ {COMPOSER_VOICE_WAVE_PATTERN.map((group, index) => (
54
+ <Animated.View
55
+ key={index}
56
+ style={[
57
+ styles.waveBar,
58
+ {
59
+ height: Math.max(group.from, group.to),
60
+ transform: [{ scaleY: values[index]! }],
61
+ },
62
+ ]}
63
+ />
64
+ ))}
65
+ </View>
66
+ );
67
+ }
@@ -2,10 +2,23 @@ import { space, type } from '@unif/react-native-design';
2
2
 
3
3
  export const COMPOSER_INPUT_LINE_HEIGHT = Math.round(type.body * 1.4);
4
4
  export const COMPOSER_INPUT_MAX_LINES = 4;
5
- export const COMPOSER_PLAIN_VERTICAL_INSET = 2 * space[4];
5
+ export const COMPOSER_PLAIN_VERTICAL_INSET = 2 * space[3];
6
6
  export const COMPOSER_ACTION_VISUAL_SIZE = 34;
7
7
  export const COMPOSER_ACTION_ICON_SIZE = 22;
8
8
  export const COMPOSER_PRIMARY_ICON_SIZE = 18;
9
+ export const COMPOSER_CANCEL_ICON_SIZE = 20;
10
+ export const COMPOSER_VOICE_WAVE_COUNT = 5;
11
+ export const COMPOSER_VOICE_WAVE_STAGGER_MS = 90;
12
+ export const COMPOSER_VOICE_WAVE_GROUPS = [
13
+ { from: 6, to: 20, duration: 1100 },
14
+ { from: 14, to: 5, duration: 1000 },
15
+ { from: 8, to: 18, duration: 900 },
16
+ ] as const;
17
+ export const COMPOSER_VOICE_WAVE_PATTERN = Array.from(
18
+ { length: COMPOSER_VOICE_WAVE_COUNT },
19
+ (_, index) =>
20
+ COMPOSER_VOICE_WAVE_GROUPS[index % COMPOSER_VOICE_WAVE_GROUPS.length]!
21
+ );
9
22
  export const COMPOSER_MENU_ICON_CONTAINER_SIZE = 40;
10
23
  export const COMPOSER_MENU_ICON_SIZE = 20;
11
24
  export const PRIMARY_LABELS = {