@unif/react-native-chat 2.0.0 → 2.1.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/README.md +39 -30
- package/lib/module/components/Composer/Composer.js +131 -83
- package/lib/module/components/Composer/Composer.js.map +1 -1
- package/lib/module/components/Composer/ComposerIconAction.js +60 -0
- package/lib/module/components/Composer/ComposerIconAction.js.map +1 -0
- package/lib/module/components/Composer/ComposerMenuItem.js +57 -0
- package/lib/module/components/Composer/ComposerMenuItem.js.map +1 -0
- package/lib/module/components/Composer/constants.js +9 -1
- package/lib/module/components/Composer/constants.js.map +1 -1
- package/lib/module/components/Composer/styles.js +144 -13
- package/lib/module/components/Composer/styles.js.map +1 -1
- package/lib/module/components/Composer/useMousePress.js +28 -0
- package/lib/module/components/Composer/useMousePress.js.map +1 -0
- package/lib/module/components/Suggestions/Suggestions.js +6 -2
- package/lib/module/components/Suggestions/Suggestions.js.map +1 -1
- package/lib/module/components/Suggestions/constants.js +4 -0
- package/lib/module/components/Suggestions/constants.js.map +1 -0
- package/lib/typescript/src/components/Composer/Composer.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/ComposerIconAction.d.ts +3 -0
- package/lib/typescript/src/components/Composer/ComposerIconAction.d.ts.map +1 -0
- package/lib/typescript/src/components/Composer/ComposerMenuItem.d.ts +3 -0
- package/lib/typescript/src/components/Composer/ComposerMenuItem.d.ts.map +1 -0
- package/lib/typescript/src/components/Composer/constants.d.ts +8 -1
- package/lib/typescript/src/components/Composer/constants.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/styles.d.ts +150 -7
- package/lib/typescript/src/components/Composer/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/types.d.ts +19 -1
- package/lib/typescript/src/components/Composer/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/useMousePress.d.ts +9 -0
- package/lib/typescript/src/components/Composer/useMousePress.d.ts.map +1 -0
- package/lib/typescript/src/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/typescript/src/components/Suggestions/constants.d.ts +2 -0
- package/lib/typescript/src/components/Suggestions/constants.d.ts.map +1 -0
- package/lib/typescript/src/components/Suggestions/types.d.ts +1 -0
- package/lib/typescript/src/components/Suggestions/types.d.ts.map +1 -1
- package/package.json +10 -10
- package/src/components/Composer/Composer.tsx +165 -95
- package/src/components/Composer/ComposerIconAction.tsx +71 -0
- package/src/components/Composer/ComposerMenuItem.tsx +56 -0
- package/src/components/Composer/constants.ts +10 -1
- package/src/components/Composer/styles.ts +123 -13
- package/src/components/Composer/types.ts +21 -1
- package/src/components/Composer/useMousePress.ts +32 -0
- package/src/components/Suggestions/Suggestions.tsx +12 -2
- package/src/components/Suggestions/constants.ts +1 -0
- package/src/components/Suggestions/types.ts +1 -0
|
@@ -1,43 +1,174 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
-
import { radius, space, type } from '@unif/react-native-design';
|
|
5
|
-
|
|
4
|
+
import { fixed, r, radius, space, type } from '@unif/react-native-design';
|
|
5
|
+
import { COMPOSER_ACTION_VISUAL_SIZE, COMPOSER_MENU_ICON_CONTAINER_SIZE } from "./constants.js";
|
|
6
|
+
export const createStyles = (colors, shadows) => StyleSheet.create({
|
|
6
7
|
root: {
|
|
7
|
-
|
|
8
|
+
position: 'relative',
|
|
8
9
|
minWidth: 0
|
|
9
10
|
},
|
|
10
11
|
card: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
borderRadius: r(20),
|
|
13
|
+
borderWidth: 0.5,
|
|
14
|
+
borderColor: colors.outline,
|
|
15
|
+
backgroundColor: colors.surface,
|
|
16
|
+
...shadows.card
|
|
17
|
+
},
|
|
18
|
+
accessory: {
|
|
19
|
+
padding: space[3]
|
|
14
20
|
},
|
|
15
21
|
regular: {
|
|
16
|
-
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
alignItems: 'flex-end',
|
|
24
|
+
gap: space[1],
|
|
25
|
+
paddingVertical: space[1],
|
|
26
|
+
paddingHorizontal: space[2]
|
|
27
|
+
},
|
|
28
|
+
expanded: {
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
alignItems: 'stretch',
|
|
31
|
+
gap: 0
|
|
17
32
|
},
|
|
18
33
|
hidden: {
|
|
19
34
|
display: 'none'
|
|
20
35
|
},
|
|
36
|
+
input: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
minWidth: 0
|
|
39
|
+
},
|
|
40
|
+
inputExpanded: {
|
|
41
|
+
flex: 0,
|
|
42
|
+
width: '100%'
|
|
43
|
+
},
|
|
44
|
+
// 保持原生堆叠特征稳定,避免聚焦展开时重排输入所在的原生视图树。
|
|
45
|
+
more: {
|
|
46
|
+
width: fixed.hitTarget,
|
|
47
|
+
height: fixed.hitTarget,
|
|
48
|
+
zIndex: 1
|
|
49
|
+
},
|
|
50
|
+
moreExpanded: {
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
left: space[2],
|
|
53
|
+
bottom: space[1]
|
|
54
|
+
},
|
|
21
55
|
toolbar: {
|
|
22
56
|
flexDirection: 'row',
|
|
23
|
-
|
|
57
|
+
alignItems: 'center'
|
|
58
|
+
},
|
|
59
|
+
toolbarExpanded: {
|
|
60
|
+
width: '100%',
|
|
61
|
+
minHeight: fixed.hitTarget,
|
|
62
|
+
justifyContent: 'flex-end'
|
|
63
|
+
},
|
|
64
|
+
toolbarWithMore: {
|
|
65
|
+
paddingStart: fixed.hitTarget + space[1]
|
|
66
|
+
},
|
|
67
|
+
trailingActions: {
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
gap: space[1],
|
|
71
|
+
marginStart: 'auto'
|
|
72
|
+
},
|
|
73
|
+
action: {
|
|
74
|
+
width: fixed.hitTarget,
|
|
75
|
+
height: fixed.hitTarget,
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
justifyContent: 'center'
|
|
78
|
+
},
|
|
79
|
+
actionVisual: {
|
|
80
|
+
width: COMPOSER_ACTION_VISUAL_SIZE,
|
|
81
|
+
height: COMPOSER_ACTION_VISUAL_SIZE,
|
|
82
|
+
borderRadius: COMPOSER_ACTION_VISUAL_SIZE / 2,
|
|
24
83
|
alignItems: 'center',
|
|
25
|
-
|
|
84
|
+
justifyContent: 'center'
|
|
85
|
+
},
|
|
86
|
+
actionPressed: {
|
|
87
|
+
backgroundColor: colors.surfaceContainerHigh
|
|
88
|
+
},
|
|
89
|
+
actionDisabled: {
|
|
90
|
+
opacity: 0.4
|
|
26
91
|
},
|
|
27
92
|
primary: {
|
|
28
|
-
|
|
93
|
+
backgroundColor: colors.primary
|
|
94
|
+
},
|
|
95
|
+
primaryPressed: {
|
|
96
|
+
backgroundColor: colors.primaryPressed
|
|
97
|
+
},
|
|
98
|
+
primaryDisabled: {
|
|
99
|
+
backgroundColor: colors.surfaceContainerHighest
|
|
100
|
+
},
|
|
101
|
+
cancel: {
|
|
102
|
+
backgroundColor: colors.surfaceContainer
|
|
103
|
+
},
|
|
104
|
+
backdrop: {
|
|
105
|
+
position: 'absolute',
|
|
106
|
+
bottom: '100%',
|
|
107
|
+
left: 0,
|
|
108
|
+
right: 0,
|
|
109
|
+
zIndex: 1
|
|
29
110
|
},
|
|
30
111
|
menu: {
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
bottom: '100%',
|
|
114
|
+
left: space[6],
|
|
115
|
+
width: r(200),
|
|
116
|
+
maxWidth: '100%',
|
|
117
|
+
marginBottom: space[2],
|
|
118
|
+
borderRadius: r(20),
|
|
119
|
+
borderWidth: 0.5,
|
|
120
|
+
borderColor: colors.outline,
|
|
121
|
+
backgroundColor: colors.surface,
|
|
122
|
+
zIndex: 2,
|
|
123
|
+
...shadows.card
|
|
124
|
+
},
|
|
125
|
+
menuClip: {
|
|
126
|
+
borderRadius: r(20),
|
|
127
|
+
overflow: 'hidden',
|
|
128
|
+
paddingVertical: space[2]
|
|
129
|
+
},
|
|
130
|
+
menuRow: {
|
|
131
|
+
minHeight: fixed.hitTarget,
|
|
31
132
|
flexDirection: 'row',
|
|
32
|
-
|
|
33
|
-
gap: space[
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
gap: space[5],
|
|
135
|
+
paddingVertical: space[3],
|
|
136
|
+
paddingHorizontal: space[6]
|
|
137
|
+
},
|
|
138
|
+
menuRowPressed: {
|
|
139
|
+
backgroundColor: colors.surfaceContainer
|
|
140
|
+
},
|
|
141
|
+
menuIcon: {
|
|
142
|
+
width: COMPOSER_MENU_ICON_CONTAINER_SIZE,
|
|
143
|
+
height: COMPOSER_MENU_ICON_CONTAINER_SIZE,
|
|
144
|
+
borderRadius: COMPOSER_MENU_ICON_CONTAINER_SIZE / 2,
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
justifyContent: 'center',
|
|
147
|
+
backgroundColor: colors.surfaceContainer
|
|
148
|
+
},
|
|
149
|
+
menuLabel: {
|
|
150
|
+
flex: 1,
|
|
151
|
+
minWidth: 0,
|
|
152
|
+
fontSize: type.body,
|
|
153
|
+
color: colors.foreground
|
|
34
154
|
},
|
|
35
155
|
voice: {
|
|
36
|
-
|
|
156
|
+
flexDirection: 'row',
|
|
157
|
+
alignItems: 'center',
|
|
158
|
+
gap: space[2],
|
|
159
|
+
paddingVertical: space[1],
|
|
160
|
+
paddingHorizontal: space[2],
|
|
161
|
+
borderRadius: radius['3xl'],
|
|
162
|
+
backgroundColor: colors.primaryContainerSubtle
|
|
37
163
|
},
|
|
38
164
|
transcript: {
|
|
165
|
+
flex: 1,
|
|
166
|
+
minWidth: 0,
|
|
39
167
|
color: colors.foreground,
|
|
40
168
|
fontSize: type.body
|
|
169
|
+
},
|
|
170
|
+
transcriptPlaceholder: {
|
|
171
|
+
color: colors.foregroundSubtle
|
|
41
172
|
}
|
|
42
173
|
});
|
|
43
174
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","radius","space","type","createStyles","colors","create","root","
|
|
1
|
+
{"version":3,"names":["StyleSheet","fixed","r","radius","space","type","COMPOSER_ACTION_VISUAL_SIZE","COMPOSER_MENU_ICON_CONTAINER_SIZE","createStyles","colors","shadows","create","root","position","minWidth","card","borderRadius","borderWidth","borderColor","outline","backgroundColor","surface","accessory","padding","regular","flexDirection","alignItems","gap","paddingVertical","paddingHorizontal","expanded","hidden","display","input","flex","inputExpanded","width","more","hitTarget","height","zIndex","moreExpanded","left","bottom","toolbar","toolbarExpanded","minHeight","justifyContent","toolbarWithMore","paddingStart","trailingActions","marginStart","action","actionVisual","actionPressed","surfaceContainerHigh","actionDisabled","opacity","primary","primaryPressed","primaryDisabled","surfaceContainerHighest","cancel","surfaceContainer","backdrop","right","menu","maxWidth","marginBottom","menuClip","overflow","menuRow","menuRowPressed","menuIcon","menuLabel","fontSize","body","color","foreground","voice","primaryContainerSubtle","transcript","transcriptPlaceholder","foregroundSubtle"],"sourceRoot":"../../../../src","sources":["components/Composer/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,KAAK,EAAEC,CAAC,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,QAAQ,2BAA2B;AAEzE,SACEC,2BAA2B,EAC3BC,iCAAiC,QAC5B,gBAAa;AAEpB,OAAO,MAAMC,YAAY,GAAGA,CAACC,MAAmB,EAAEC,OAAqB,KACrEV,UAAU,CAACW,MAAM,CAAC;EAChBC,IAAI,EAAE;IAAEC,QAAQ,EAAE,UAAU;IAAEC,QAAQ,EAAE;EAAE,CAAC;EAC3CC,IAAI,EAAE;IACJC,YAAY,EAAEd,CAAC,CAAC,EAAE,CAAC;IACnBe,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAET,MAAM,CAACU,OAAO;IAC3BC,eAAe,EAAEX,MAAM,CAACY,OAAO;IAC/B,GAAGX,OAAO,CAACK;EACb,CAAC;EACDO,SAAS,EAAE;IAAEC,OAAO,EAAEnB,KAAK,CAAC,CAAC;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;IAC3BiB,eAAe,EAAEX,MAAM,CAACuE;EAC1B,CAAC;EACDC,UAAU,EAAE;IACV/C,IAAI,EAAE,CAAC;IACPpB,QAAQ,EAAE,CAAC;IACX+D,KAAK,EAAEpE,MAAM,CAACqE,UAAU;IACxBH,QAAQ,EAAEtE,IAAI,CAACuE;EACjB,CAAC;EACDM,qBAAqB,EAAE;IAAEL,KAAK,EAAEpE,MAAM,CAAC0E;EAAiB;AAC1D,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
export function useMousePress(disabled) {
|
|
6
|
+
const [pressed, setPressed] = useState(false);
|
|
7
|
+
const enabled = Platform.OS === 'web' && !disabled;
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (disabled) setPressed(false);
|
|
10
|
+
}, [disabled]);
|
|
11
|
+
function begin(event) {
|
|
12
|
+
if (event.nativeEvent.pointerType !== 'mouse' || event.nativeEvent.button !== 0) return;
|
|
13
|
+
// 阻止默认聚焦后不会产生兼容 mousedown,局部投影按住状态;点击仍交给 SDK。
|
|
14
|
+
event.preventDefault();
|
|
15
|
+
setPressed(true);
|
|
16
|
+
}
|
|
17
|
+
function end(event) {
|
|
18
|
+
if (event.nativeEvent.pointerType === 'mouse') setPressed(false);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
mousePressed: enabled && pressed,
|
|
22
|
+
onPointerDown: enabled ? begin : undefined,
|
|
23
|
+
onPointerUp: enabled ? end : undefined,
|
|
24
|
+
onPointerCancel: enabled ? end : undefined,
|
|
25
|
+
onPointerLeave: enabled ? end : undefined
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=useMousePress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","Platform","useMousePress","disabled","pressed","setPressed","enabled","OS","begin","event","nativeEvent","pointerType","button","preventDefault","end","mousePressed","onPointerDown","undefined","onPointerUp","onPointerCancel","onPointerLeave"],"sourceRoot":"../../../../src","sources":["components/Composer/useMousePress.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,QAAQ,QAAQ,cAAc;AAGvC,OAAO,SAASC,aAAaA,CAACC,QAAiB,EAAE;EAC/C,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAMM,OAAO,GAAGL,QAAQ,CAACM,EAAE,KAAK,KAAK,IAAI,CAACJ,QAAQ;EAClDJ,SAAS,CAAC,MAAM;IACd,IAAII,QAAQ,EAAEE,UAAU,CAAC,KAAK,CAAC;EACjC,CAAC,EAAE,CAACF,QAAQ,CAAC,CAAC;EAEd,SAASK,KAAKA,CAACC,KAAmB,EAAE;IAClC,IACEA,KAAK,CAACC,WAAW,CAACC,WAAW,KAAK,OAAO,IACzCF,KAAK,CAACC,WAAW,CAACE,MAAM,KAAK,CAAC,EAE9B;IACF;IACAH,KAAK,CAACI,cAAc,CAAC,CAAC;IACtBR,UAAU,CAAC,IAAI,CAAC;EAClB;EACA,SAASS,GAAGA,CAACL,KAAmB,EAAE;IAChC,IAAIA,KAAK,CAACC,WAAW,CAACC,WAAW,KAAK,OAAO,EAAEN,UAAU,CAAC,KAAK,CAAC;EAClE;EACA,OAAO;IACLU,YAAY,EAAET,OAAO,IAAIF,OAAO;IAChCY,aAAa,EAAEV,OAAO,GAAGE,KAAK,GAAGS,SAAS;IAC1CC,WAAW,EAAEZ,OAAO,GAAGQ,GAAG,GAAGG,SAAS;IACtCE,eAAe,EAAEb,OAAO,GAAGQ,GAAG,GAAGG,SAAS;IAC1CG,cAAc,EAAEd,OAAO,GAAGQ,GAAG,GAAGG;EAClC,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
-
import { Chip, Icon } from '@unif/react-native-design';
|
|
4
|
+
import { Chip, Icon, useColors } from '@unif/react-native-design';
|
|
5
|
+
import { SUGGESTION_ICON_SIZE } from "./constants.js";
|
|
5
6
|
import { styles } from "./styles.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export function Suggestions({
|
|
@@ -11,6 +12,7 @@ export function Suggestions({
|
|
|
11
12
|
style,
|
|
12
13
|
testID
|
|
13
14
|
}) {
|
|
15
|
+
const colors = useColors();
|
|
14
16
|
if (items.length === 0) return null;
|
|
15
17
|
return /*#__PURE__*/_jsx(View, {
|
|
16
18
|
style: [styles.root, styles[align], style],
|
|
@@ -22,7 +24,9 @@ export function Suggestions({
|
|
|
22
24
|
busy: item.loading,
|
|
23
25
|
disabled: item.disabled,
|
|
24
26
|
leading: item.icon ? /*#__PURE__*/_jsx(Icon, {
|
|
25
|
-
name: item.icon
|
|
27
|
+
name: item.icon,
|
|
28
|
+
size: SUGGESTION_ICON_SIZE,
|
|
29
|
+
color: colors.primary
|
|
26
30
|
}) : undefined,
|
|
27
31
|
onPress: onSelect ? () => onSelect(item) : undefined
|
|
28
32
|
}, item.id))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Chip","Icon","styles","jsx","_jsx","Suggestions","items","onSelect","align","style","testID","length","root","accessibilityRole","children","map","item","label","selected","busy","loading","disabled","leading","icon","name","undefined","onPress","id"],"sourceRoot":"../../../../src","sources":["components/Suggestions/Suggestions.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,EAAEC,IAAI,QAAQ,2BAA2B;
|
|
1
|
+
{"version":3,"names":["View","Chip","Icon","useColors","SUGGESTION_ICON_SIZE","styles","jsx","_jsx","Suggestions","items","onSelect","align","style","testID","colors","length","root","accessibilityRole","children","map","item","label","selected","busy","loading","disabled","leading","icon","name","size","color","primary","undefined","onPress","id"],"sourceRoot":"../../../../src","sources":["components/Suggestions/Suggestions.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,2BAA2B;AACjE,SAASC,oBAAoB,QAAQ,gBAAa;AAClD,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlC,OAAO,SAASC,WAAWA,CAAC;EAC1BC,KAAK;EACLC,QAAQ;EACRC,KAAK,GAAG,OAAO;EACfC,KAAK;EACLC;AACgB,CAAC,EAA4B;EAC7C,MAAMC,MAAM,GAAGX,SAAS,CAAC,CAAC;EAC1B,IAAIM,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAEnC,oBACER,IAAA,CAACP,IAAI;IACHY,KAAK,EAAE,CAACP,MAAM,CAACW,IAAI,EAAEX,MAAM,CAACM,KAAK,CAAC,EAAEC,KAAK,CAAE;IAC3CC,MAAM,EAAEA,MAAO;IACfI,iBAAiB,EAAC,MAAM;IAAAC,QAAA,EAEvBT,KAAK,CAACU,GAAG,CAAEC,IAAI,iBACdb,IAAA,CAACN,IAAI;MAEHoB,KAAK,EAAED,IAAI,CAACC,KAAM;MAClBC,QAAQ,EAAEF,IAAI,CAACE,QAAS;MACxBC,IAAI,EAAEH,IAAI,CAACI,OAAQ;MACnBC,QAAQ,EAAEL,IAAI,CAACK,QAAS;MACxBC,OAAO,EACLN,IAAI,CAACO,IAAI,gBACPpB,IAAA,CAACL,IAAI;QACH0B,IAAI,EAAER,IAAI,CAACO,IAAK;QAChBE,IAAI,EAAEzB,oBAAqB;QAC3B0B,KAAK,EAAEhB,MAAM,CAACiB;MAAQ,CACvB,CAAC,GACAC,SACL;MACDC,OAAO,EAAEvB,QAAQ,GAAG,MAAMA,QAAQ,CAACU,IAAI,CAAC,GAAGY;IAAU,GAdhDZ,IAAI,CAACc,EAeX,CACF;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SUGGESTION_ICON_SIZE"],"sourceRoot":"../../../../src","sources":["components/Suggestions/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,oBAAoB,GAAG,EAAE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/Composer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/Composer.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAWjE,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7D,eAAO,MAAM,QAAQ,2GA0PpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposerIconAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/ComposerIconAction.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAS,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,OAAO,EACP,QAAgB,EAChB,IAAY,EACZ,QAAQ,EACR,MAAe,GAChB,EAAE,uBAAuB,+BAoDzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposerMenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/ComposerMenuItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,OAAO,GACR,EAAE,qBAAqB,+BA4CvB"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const COMPOSER_INPUT_LINE_HEIGHT: number;
|
|
2
|
+
export declare const COMPOSER_INPUT_MAX_LINES = 4;
|
|
3
|
+
export declare const COMPOSER_PLAIN_VERTICAL_INSET: number;
|
|
4
|
+
export declare const COMPOSER_ACTION_VISUAL_SIZE = 34;
|
|
5
|
+
export declare const COMPOSER_ACTION_ICON_SIZE = 22;
|
|
6
|
+
export declare const COMPOSER_PRIMARY_ICON_SIZE = 18;
|
|
7
|
+
export declare const COMPOSER_MENU_ICON_CONTAINER_SIZE = 40;
|
|
8
|
+
export declare const COMPOSER_MENU_ICON_SIZE = 20;
|
|
2
9
|
export declare const PRIMARY_LABELS: {
|
|
3
10
|
readonly send: "发送";
|
|
4
11
|
readonly stop: "停止回复";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,QAA8B,CAAC;AACtE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,6BAA6B,QAAe,CAAC;AAC1D,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AACX,eAAO,MAAM,YAAY;;;;CAIf,CAAC"}
|
|
@@ -1,40 +1,183 @@
|
|
|
1
|
-
import type { ColorTokens } from '@unif/react-native-design';
|
|
2
|
-
export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
1
|
+
import type { ColorTokens, ShadowTokens } from '@unif/react-native-design';
|
|
2
|
+
export declare const createStyles: (colors: ColorTokens, shadows: ShadowTokens) => Readonly<{
|
|
3
3
|
root: {
|
|
4
|
-
|
|
4
|
+
position: "relative";
|
|
5
5
|
minWidth: number;
|
|
6
6
|
};
|
|
7
7
|
card: {
|
|
8
|
-
|
|
8
|
+
shadowColor: string;
|
|
9
|
+
shadowOffset: {
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
};
|
|
13
|
+
shadowOpacity: number;
|
|
14
|
+
shadowRadius: number;
|
|
15
|
+
elevation: number;
|
|
9
16
|
borderRadius: number;
|
|
17
|
+
borderWidth: number;
|
|
18
|
+
borderColor: string;
|
|
10
19
|
backgroundColor: string;
|
|
11
20
|
};
|
|
21
|
+
accessory: {
|
|
22
|
+
padding: number;
|
|
23
|
+
};
|
|
12
24
|
regular: {
|
|
25
|
+
flexDirection: "row";
|
|
26
|
+
alignItems: "flex-end";
|
|
27
|
+
gap: number;
|
|
28
|
+
paddingVertical: number;
|
|
29
|
+
paddingHorizontal: number;
|
|
30
|
+
};
|
|
31
|
+
expanded: {
|
|
32
|
+
flexDirection: "column";
|
|
33
|
+
alignItems: "stretch";
|
|
13
34
|
gap: number;
|
|
14
35
|
};
|
|
15
36
|
hidden: {
|
|
16
37
|
display: "none";
|
|
17
38
|
};
|
|
39
|
+
input: {
|
|
40
|
+
flex: number;
|
|
41
|
+
minWidth: number;
|
|
42
|
+
};
|
|
43
|
+
inputExpanded: {
|
|
44
|
+
flex: number;
|
|
45
|
+
width: string;
|
|
46
|
+
};
|
|
47
|
+
more: {
|
|
48
|
+
width: 44;
|
|
49
|
+
height: 44;
|
|
50
|
+
zIndex: number;
|
|
51
|
+
};
|
|
52
|
+
moreExpanded: {
|
|
53
|
+
position: "absolute";
|
|
54
|
+
left: number;
|
|
55
|
+
bottom: number;
|
|
56
|
+
};
|
|
18
57
|
toolbar: {
|
|
19
58
|
flexDirection: "row";
|
|
20
|
-
|
|
59
|
+
alignItems: "center";
|
|
60
|
+
};
|
|
61
|
+
toolbarExpanded: {
|
|
62
|
+
width: string;
|
|
63
|
+
minHeight: 44;
|
|
64
|
+
justifyContent: "flex-end";
|
|
65
|
+
};
|
|
66
|
+
toolbarWithMore: {
|
|
67
|
+
paddingStart: number;
|
|
68
|
+
};
|
|
69
|
+
trailingActions: {
|
|
70
|
+
flexDirection: "row";
|
|
21
71
|
alignItems: "center";
|
|
22
72
|
gap: number;
|
|
73
|
+
marginStart: string;
|
|
74
|
+
};
|
|
75
|
+
action: {
|
|
76
|
+
width: 44;
|
|
77
|
+
height: 44;
|
|
78
|
+
alignItems: "center";
|
|
79
|
+
justifyContent: "center";
|
|
80
|
+
};
|
|
81
|
+
actionVisual: {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
borderRadius: number;
|
|
85
|
+
alignItems: "center";
|
|
86
|
+
justifyContent: "center";
|
|
87
|
+
};
|
|
88
|
+
actionPressed: {
|
|
89
|
+
backgroundColor: string;
|
|
90
|
+
};
|
|
91
|
+
actionDisabled: {
|
|
92
|
+
opacity: number;
|
|
23
93
|
};
|
|
24
94
|
primary: {
|
|
25
|
-
|
|
95
|
+
backgroundColor: string;
|
|
96
|
+
};
|
|
97
|
+
primaryPressed: {
|
|
98
|
+
backgroundColor: string;
|
|
99
|
+
};
|
|
100
|
+
primaryDisabled: {
|
|
101
|
+
backgroundColor: string;
|
|
102
|
+
};
|
|
103
|
+
cancel: {
|
|
104
|
+
backgroundColor: string;
|
|
105
|
+
};
|
|
106
|
+
backdrop: {
|
|
107
|
+
position: "absolute";
|
|
108
|
+
bottom: string;
|
|
109
|
+
left: number;
|
|
110
|
+
right: number;
|
|
111
|
+
zIndex: number;
|
|
26
112
|
};
|
|
27
113
|
menu: {
|
|
114
|
+
shadowColor: string;
|
|
115
|
+
shadowOffset: {
|
|
116
|
+
readonly width: number;
|
|
117
|
+
readonly height: number;
|
|
118
|
+
};
|
|
119
|
+
shadowOpacity: number;
|
|
120
|
+
shadowRadius: number;
|
|
121
|
+
elevation: number;
|
|
122
|
+
position: "absolute";
|
|
123
|
+
bottom: string;
|
|
124
|
+
left: number;
|
|
125
|
+
width: number;
|
|
126
|
+
maxWidth: string;
|
|
127
|
+
marginBottom: number;
|
|
128
|
+
borderRadius: number;
|
|
129
|
+
borderWidth: number;
|
|
130
|
+
borderColor: string;
|
|
131
|
+
backgroundColor: string;
|
|
132
|
+
zIndex: number;
|
|
133
|
+
};
|
|
134
|
+
menuClip: {
|
|
135
|
+
borderRadius: number;
|
|
136
|
+
overflow: "hidden";
|
|
137
|
+
paddingVertical: number;
|
|
138
|
+
};
|
|
139
|
+
menuRow: {
|
|
140
|
+
minHeight: 44;
|
|
28
141
|
flexDirection: "row";
|
|
29
|
-
|
|
142
|
+
alignItems: "center";
|
|
30
143
|
gap: number;
|
|
144
|
+
paddingVertical: number;
|
|
145
|
+
paddingHorizontal: number;
|
|
146
|
+
};
|
|
147
|
+
menuRowPressed: {
|
|
148
|
+
backgroundColor: string;
|
|
149
|
+
};
|
|
150
|
+
menuIcon: {
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
borderRadius: number;
|
|
154
|
+
alignItems: "center";
|
|
155
|
+
justifyContent: "center";
|
|
156
|
+
backgroundColor: string;
|
|
157
|
+
};
|
|
158
|
+
menuLabel: {
|
|
159
|
+
flex: number;
|
|
160
|
+
minWidth: number;
|
|
161
|
+
fontSize: number;
|
|
162
|
+
color: string;
|
|
31
163
|
};
|
|
32
164
|
voice: {
|
|
165
|
+
flexDirection: "row";
|
|
166
|
+
alignItems: "center";
|
|
33
167
|
gap: number;
|
|
168
|
+
paddingVertical: number;
|
|
169
|
+
paddingHorizontal: number;
|
|
170
|
+
borderRadius: number;
|
|
171
|
+
backgroundColor: string;
|
|
34
172
|
};
|
|
35
173
|
transcript: {
|
|
174
|
+
flex: number;
|
|
175
|
+
minWidth: number;
|
|
36
176
|
color: string;
|
|
37
177
|
fontSize: number;
|
|
38
178
|
};
|
|
179
|
+
transcriptPlaceholder: {
|
|
180
|
+
color: string;
|
|
181
|
+
};
|
|
39
182
|
}>;
|
|
40
183
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM3E,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW,EAAE,SAAS,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8HnE,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type { TextFieldHandle } from '@unif/react-native-design';
|
|
3
|
+
import type { IconName, TextFieldHandle } from '@unif/react-native-design';
|
|
4
4
|
import type { ChatAction } from '../../actions/index.js';
|
|
5
5
|
export interface ComposerSendAction {
|
|
6
6
|
kind: 'send';
|
|
7
7
|
onPress(value: string): void;
|
|
8
8
|
allowEmpty?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/** 图标按钮的可访问名称,默认“发送”。 */
|
|
10
11
|
label?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface ComposerStopAction {
|
|
@@ -41,8 +42,11 @@ export interface ComposerProps {
|
|
|
41
42
|
voice?: ComposerVoiceControl;
|
|
42
43
|
header?: ReactNode;
|
|
43
44
|
footer?: ReactNode;
|
|
45
|
+
/** card 提供统一表面;plain 由外层提供表面,内部 Textarea 均不单独绘制表面。 */
|
|
44
46
|
surface?: 'card' | 'plain';
|
|
47
|
+
/** Textarea 整体最小高度(含内间距),默认 44,不低于最小触达高度。 */
|
|
45
48
|
minInputHeight?: number;
|
|
49
|
+
/** Textarea 整体最大高度;默认四行文字预算加 plain 内间距,随应用字号变化。 */
|
|
46
50
|
maxInputHeight?: number;
|
|
47
51
|
onFocusChange?(focused: boolean): void;
|
|
48
52
|
onHeightChange?(height: number): void;
|
|
@@ -50,4 +54,18 @@ export interface ComposerProps {
|
|
|
50
54
|
testID?: string;
|
|
51
55
|
}
|
|
52
56
|
export type ComposerHandle = TextFieldHandle;
|
|
57
|
+
export interface ComposerIconActionProps {
|
|
58
|
+
icon: IconName;
|
|
59
|
+
label: string;
|
|
60
|
+
onPress?(): void;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
busy?: boolean;
|
|
63
|
+
expanded?: boolean;
|
|
64
|
+
visual?: 'icon' | 'primary' | 'cancel';
|
|
65
|
+
}
|
|
66
|
+
export interface ComposerMenuItemProps {
|
|
67
|
+
action: ChatAction;
|
|
68
|
+
disabled: boolean;
|
|
69
|
+
onPress(): void;
|
|
70
|
+
}
|
|
53
71
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/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,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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ent } from 'react-native';
|
|
2
|
+
export declare function useMousePress(disabled: boolean): {
|
|
3
|
+
mousePressed: boolean;
|
|
4
|
+
onPointerDown: ((event: PointerEvent) => void) | undefined;
|
|
5
|
+
onPointerUp: ((event: PointerEvent) => void) | undefined;
|
|
6
|
+
onPointerCancel: ((event: PointerEvent) => void) | undefined;
|
|
7
|
+
onPointerLeave: ((event: PointerEvent) => void) | undefined;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useMousePress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMousePress.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/useMousePress.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO;;4BAOvB,YAAY;0BAUd,YAAY;8BAAZ,YAAY;6BAAZ,YAAY;EAUjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAEhD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,KAAe,EACf,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA+B7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,QAAQ,CAAC,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,cAAc,EAA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