@unif/react-native-chat 3.6.1 → 4.0.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.
- package/lib/module/components/Attachments/AttachmentItem.js +24 -16
- package/lib/module/components/Attachments/AttachmentItem.js.map +1 -1
- package/lib/module/components/Attachments/constants.js +5 -4
- package/lib/module/components/Attachments/constants.js.map +1 -1
- package/lib/module/components/Attachments/styles.js +4 -2
- package/lib/module/components/Attachments/styles.js.map +1 -1
- package/lib/module/components/Composer/Composer.js +10 -7
- package/lib/module/components/Composer/Composer.js.map +1 -1
- package/lib/module/components/Composer/ComposerIconAction.js +3 -3
- package/lib/module/components/Composer/ComposerIconAction.js.map +1 -1
- package/lib/module/components/Composer/styles.js +5 -2
- package/lib/module/components/Composer/styles.js.map +1 -1
- package/lib/module/components/Confirmation/Confirmation.js +4 -3
- package/lib/module/components/Confirmation/Confirmation.js.map +1 -1
- package/lib/module/components/Feedback/Feedback.js +4 -3
- package/lib/module/components/Feedback/Feedback.js.map +1 -1
- package/lib/module/components/Feedback/constants.js +5 -4
- package/lib/module/components/Feedback/constants.js.map +1 -1
- package/lib/module/components/Message/MarkdownContent/MarkdownContent.js +3 -1
- package/lib/module/components/Message/MarkdownContent/MarkdownContent.js.map +1 -1
- package/lib/module/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.js +6 -3
- package/lib/module/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.js.map +1 -1
- package/lib/module/components/Message/MarkdownContent/types.js +2 -0
- package/lib/module/components/Message/Message.js +7 -5
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/MessageList/MessageListEndButton.js +25 -26
- package/lib/module/components/MessageList/MessageListEndButton.js.map +1 -1
- package/lib/module/components/MessageList/styles.js +1 -2
- package/lib/module/components/MessageList/styles.js.map +1 -1
- package/lib/module/components/Process/Process.js +4 -3
- package/lib/module/components/Process/Process.js.map +1 -1
- package/lib/module/components/Process/ProcessCompactStep.js +11 -10
- package/lib/module/components/Process/ProcessCompactStep.js.map +1 -1
- package/lib/module/components/Process/ProcessTimelineStep.js +3 -3
- package/lib/module/components/Process/ProcessTimelineStep.js.map +1 -1
- package/lib/module/components/Process/constants.js +6 -5
- package/lib/module/components/Process/constants.js.map +1 -1
- package/lib/module/components/Sources/Sources.js +6 -3
- package/lib/module/components/Sources/Sources.js.map +1 -1
- package/lib/module/components/Suggestions/Suggestions.js +2 -3
- package/lib/module/components/Suggestions/Suggestions.js.map +1 -1
- package/lib/typescript/src/actions/types.d.ts +3 -2
- package/lib/typescript/src/actions/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Attachments/AttachmentItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Attachments/constants.d.ts +3 -2
- package/lib/typescript/src/components/Attachments/constants.d.ts.map +1 -1
- package/lib/typescript/src/components/Attachments/styles.d.ts +4 -2
- package/lib/typescript/src/components/Attachments/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/Composer.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/styles.d.ts +3 -1
- package/lib/typescript/src/components/Composer/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Composer/types.d.ts +5 -3
- package/lib/typescript/src/components/Composer/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/typescript/src/components/Feedback/Feedback.d.ts.map +1 -1
- package/lib/typescript/src/components/Feedback/constants.d.ts +3 -2
- package/lib/typescript/src/components/Feedback/constants.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/MarkdownContent/MarkdownContent.d.ts +1 -1
- package/lib/typescript/src/components/Message/MarkdownContent/MarkdownContent.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/MarkdownContent/types.d.ts +2 -0
- package/lib/typescript/src/components/Message/MarkdownContent/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageList/MessageListEndButton.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageList/styles.d.ts +1 -2
- package/lib/typescript/src/components/MessageList/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/Process.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/ProcessCompactStep.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/constants.d.ts +3 -2
- package/lib/typescript/src/components/Process/constants.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/types.d.ts +4 -0
- package/lib/typescript/src/components/Process/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Sources/Sources.d.ts.map +1 -1
- package/lib/typescript/src/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/typescript/src/components/Suggestions/types.d.ts +3 -2
- package/lib/typescript/src/components/Suggestions/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/actions/types.ts +3 -2
- package/src/components/Attachments/AttachmentItem.tsx +20 -20
- package/src/components/Attachments/constants.ts +14 -6
- package/src/components/Attachments/styles.ts +2 -2
- package/src/components/Composer/Composer.tsx +16 -5
- package/src/components/Composer/ComposerIconAction.tsx +3 -3
- package/src/components/Composer/styles.ts +3 -2
- package/src/components/Composer/types.ts +5 -3
- package/src/components/Confirmation/Confirmation.tsx +12 -12
- package/src/components/Feedback/Feedback.tsx +3 -2
- package/src/components/Feedback/constants.ts +16 -6
- package/src/components/Message/MarkdownContent/MarkdownContent.tsx +2 -1
- package/src/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.tsx +4 -2
- package/src/components/Message/MarkdownContent/types.ts +3 -0
- package/src/components/Message/Message.tsx +10 -3
- package/src/components/MessageList/MessageListEndButton.tsx +18 -24
- package/src/components/MessageList/styles.ts +1 -2
- package/src/components/Process/Process.tsx +4 -3
- package/src/components/Process/ProcessCompactStep.tsx +26 -20
- package/src/components/Process/ProcessTimelineStep.tsx +2 -2
- package/src/components/Process/constants.ts +16 -7
- package/src/components/Process/types.ts +5 -0
- package/src/components/Sources/Sources.tsx +6 -2
- package/src/components/Suggestions/Suggestions.tsx +2 -6
- package/src/components/Suggestions/types.ts +4 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
-
import { Chip,
|
|
4
|
+
import { Chip, useColors } from '@unif/react-native-design';
|
|
5
5
|
import { SUGGESTION_ICON_SIZE } from "./constants.js";
|
|
6
6
|
import { styles } from "./styles.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,8 +23,7 @@ export function Suggestions({
|
|
|
23
23
|
selected: item.selected,
|
|
24
24
|
busy: item.loading,
|
|
25
25
|
disabled: item.disabled,
|
|
26
|
-
leading: item.icon ? /*#__PURE__*/_jsx(
|
|
27
|
-
name: item.icon,
|
|
26
|
+
leading: item.icon ? /*#__PURE__*/_jsx(item.icon, {
|
|
28
27
|
size: SUGGESTION_ICON_SIZE,
|
|
29
28
|
color: colors.primary
|
|
30
29
|
}) : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Chip","
|
|
1
|
+
{"version":3,"names":["View","Chip","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","size","color","primary","undefined","onPress","id"],"sourceRoot":"../../../../src","sources":["components/Suggestions/Suggestions.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,EAAEC,SAAS,QAAQ,2BAA2B;AAC3D,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,CAACN,IAAI;IACHW,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,CAACL,IAAI;MAEHmB,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,CAACa,IAAI,CAACO,IAAI;QAACC,IAAI,EAAExB,oBAAqB;QAACyB,KAAK,EAAEf,MAAM,CAACgB;MAAQ,CAAE,CAAC,GAC9DC,SACL;MACDC,OAAO,EAAEtB,QAAQ,GAAG,MAAMA,QAAQ,CAACU,IAAI,CAAC,GAAGW;IAAU,GAVhDX,IAAI,CAACa,EAWX,CACF;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
export interface ChatAction {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
5
|
-
icon?:
|
|
6
|
+
icon?: ComponentType<IconProps>;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
loading?: boolean;
|
|
8
9
|
accessibilityHint?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/AttachmentItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/AttachmentItem.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAS,CAAC;AAEnD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,SAAS,EACT,GAAG,EACH,KAAa,EACb,OAAe,EACf,OAAe,EACf,iBAAyB,EACzB,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,+BA0UrB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
import type { ChatAttachmentItem } from './types.js';
|
|
3
4
|
export declare const CARD_WIDTH: number;
|
|
4
5
|
export declare const PREVIEW_IMAGE_SIZE: number;
|
|
@@ -8,7 +9,7 @@ export declare const MIXED_IMAGE_SIZE: number;
|
|
|
8
9
|
export declare const ATTACHMENT_STATUS_SIZE: number;
|
|
9
10
|
export declare const ATTACHMENT_STATUS_OWNER_SIZE: number;
|
|
10
11
|
export declare const ATTACHMENT_REMOVE_OWNER_SIZE = 44;
|
|
11
|
-
export declare const ATTACHMENT_ICONS: Record<NonNullable<ChatAttachmentItem['kind']>,
|
|
12
|
+
export declare const ATTACHMENT_ICONS: Record<NonNullable<ChatAttachmentItem['kind']>, ComponentType<IconProps>>;
|
|
12
13
|
export declare const STATUS_LABELS: {
|
|
13
14
|
readonly idle: "";
|
|
14
15
|
readonly uploading: "正在上传";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/constants.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,kBAAkB,QAAS,CAAC;AACzC,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAC1C,eAAO,MAAM,cAAc,QAAU,CAAC;AACtC,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,eAAO,MAAM,4BAA4B,QAGxC,CAAC;AACF,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,EACvC,aAAa,CAAC,SAAS,CAAC,CAMzB,CAAC;AACF,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC"}
|
|
@@ -104,7 +104,6 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
104
104
|
width: number;
|
|
105
105
|
height: number;
|
|
106
106
|
borderRadius: 999;
|
|
107
|
-
backgroundColor: string;
|
|
108
107
|
alignItems: "center";
|
|
109
108
|
justifyContent: "center";
|
|
110
109
|
};
|
|
@@ -121,10 +120,13 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
121
120
|
width: number;
|
|
122
121
|
height: number;
|
|
123
122
|
borderRadius: 999;
|
|
124
|
-
|
|
123
|
+
overflow: "hidden";
|
|
125
124
|
alignItems: "center";
|
|
126
125
|
justifyContent: "center";
|
|
127
126
|
};
|
|
127
|
+
circleGlass: {
|
|
128
|
+
borderRadius: 999;
|
|
129
|
+
};
|
|
128
130
|
previewRemoveVisual: {
|
|
129
131
|
width: number;
|
|
130
132
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attachments/styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqI5C,CAAC"}
|
|
@@ -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":"AA8BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAWjE,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7D,eAAO,MAAM,QAAQ,2GA6RpB,CAAC"}
|
|
@@ -16,7 +16,9 @@ export declare const createStyles: (colors: ColorTokens, shadows: ShadowTokens)
|
|
|
16
16
|
borderRadius: number;
|
|
17
17
|
borderWidth: number;
|
|
18
18
|
borderColor: string;
|
|
19
|
-
|
|
19
|
+
};
|
|
20
|
+
glass: {
|
|
21
|
+
borderRadius: number;
|
|
20
22
|
};
|
|
21
23
|
accessory: {
|
|
22
24
|
padding: number;
|
|
@@ -1 +1 @@
|
|
|
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;AAG3E,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW,EAAE,SAAS,YAAY
|
|
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;AAG3E,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW,EAAE,SAAS,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyHnE,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
1
3
|
import type { ReactNode } from 'react';
|
|
2
4
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type {
|
|
5
|
+
import type { TextFieldHandle } from '@unif/react-native-design';
|
|
4
6
|
import type { ChatAction } from '../../actions/index.js';
|
|
5
7
|
export interface ComposerSendAction {
|
|
6
8
|
kind: 'send';
|
|
@@ -42,7 +44,7 @@ export interface ComposerProps {
|
|
|
42
44
|
voice?: ComposerVoiceControl;
|
|
43
45
|
header?: ReactNode;
|
|
44
46
|
footer?: ReactNode;
|
|
45
|
-
/** card
|
|
47
|
+
/** card 提供统一玻璃表面;plain 由外层提供表面,内部 Textarea 均不单独绘制表面。 */
|
|
46
48
|
surface?: 'card' | 'plain';
|
|
47
49
|
/** Textarea 整体最小高度(含内间距),默认 44,不低于最小触达高度。 */
|
|
48
50
|
minInputHeight?: number;
|
|
@@ -55,7 +57,7 @@ export interface ComposerProps {
|
|
|
55
57
|
}
|
|
56
58
|
export type ComposerHandle = TextFieldHandle;
|
|
57
59
|
export interface ComposerIconActionProps {
|
|
58
|
-
icon:
|
|
60
|
+
icon: ComponentType<IconProps>;
|
|
59
61
|
label: string;
|
|
60
62
|
onPress?(): void;
|
|
61
63
|
disabled?: boolean;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Composer/types.ts"],"names":[],"mappings":"AAAA,OAA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":"Confirmation.d.ts","sourceRoot":"","sources":["../../../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAEjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAoC,EACpC,WAAkC,EAClC,eAAuB,EACvB,cAAsB,EACtB,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgEvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feedback.d.ts","sourceRoot":"","sources":["../../../../../src/components/Feedback/Feedback.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,YAAS,CAAC;AA2B3D,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,IAAa,EACb,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Feedback.d.ts","sourceRoot":"","sources":["../../../../../src/components/Feedback/Feedback.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,YAAS,CAAC;AA2B3D,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,IAAa,EACb,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4CnC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
import type { FeedbackTone } from './types.js';
|
|
3
4
|
export declare const FEEDBACK_TONE_LABELS: Readonly<Record<FeedbackTone, string>>;
|
|
4
|
-
export declare const FEEDBACK_TONE_ICONS: Readonly<Record<FeedbackTone,
|
|
5
|
+
export declare const FEEDBACK_TONE_ICONS: Readonly<Record<FeedbackTone, ComponentType<IconProps>>>;
|
|
5
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Feedback/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Feedback/constants.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAE5C,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAKvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CACxC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAM/C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MarkdownContentProps } from './types.js';
|
|
2
|
-
export declare function MarkdownContent({ text, onLinkPress, outgoing, }: MarkdownContentProps): import("react").JSX.Element | null;
|
|
2
|
+
export declare function MarkdownContent({ text, onLinkPress, outgoing, style, }: MarkdownContentProps): import("react").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=MarkdownContent.d.ts.map
|
|
@@ -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,EAC9B,IAAI,EACJ,WAAW,EACX,QAAgB,
|
|
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,EAChB,KAAK,GACN,EAAE,oBAAoB,sCAiFtB"}
|
package/lib/typescript/src/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownImage.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownImage.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Message/MarkdownContent/MarkdownImage/MarkdownImage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAE9D,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BA8C/D"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
2
|
export interface MarkdownContentProps {
|
|
2
3
|
text: string;
|
|
3
4
|
onLinkPress?(url: string): void;
|
|
4
5
|
outgoing?: boolean;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
5
7
|
}
|
|
6
8
|
export interface MarkdownSvgLabelProps {
|
|
7
9
|
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;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Message/MarkdownContent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;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":"
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAE5C,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAoL1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageListEndButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/MessageListEndButton.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAS,CAAC;AAEzD,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,OAAO,GACR,EAAE,yBAAyB,+
|
|
1
|
+
{"version":3,"file":"MessageListEndButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/MessageListEndButton.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAS,CAAC;AAEzD,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,OAAO,GACR,EAAE,yBAAyB,+BAuC3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColorTokens, ShadowTokens } from '@unif/react-native-design';
|
|
2
|
-
export declare const createStyles: (
|
|
2
|
+
export declare const createStyles: (_colors: ColorTokens, shadows: ShadowTokens) => Readonly<{
|
|
3
3
|
root: {
|
|
4
4
|
flex: number;
|
|
5
5
|
minHeight: number;
|
|
@@ -41,7 +41,6 @@ export declare const createStyles: (colors: ColorTokens, shadows: ShadowTokens)
|
|
|
41
41
|
elevation: number;
|
|
42
42
|
alignSelf: "center";
|
|
43
43
|
borderRadius: number;
|
|
44
|
-
backgroundColor: string;
|
|
45
44
|
};
|
|
46
45
|
}>;
|
|
47
46
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,SAAS,WAAW,EAAE,SAAS,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,YAAS,CAAC;AAkCzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,YAAS,CAAC;AAkCzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiK9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessCompactStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/ProcessCompactStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProcessCompactStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/ProcessCompactStep.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAS,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,+BA8GzB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
import type { ProcessStepStatus } from './types.js';
|
|
3
4
|
export declare const PROCESS_STATUS_LABELS: Readonly<Record<ProcessStepStatus, string>>;
|
|
4
|
-
export declare const PROCESS_STATUS_ICONS: Readonly<Record<ProcessStepStatus,
|
|
5
|
+
export declare const PROCESS_STATUS_ICONS: Readonly<Record<ProcessStepStatus, ComponentType<IconProps>>>;
|
|
5
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/constants.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAEjD,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAC1C,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAOlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CACzC,MAAM,CAAC,iBAAiB,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAOpD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
1
3
|
import type { ReactNode } from 'react';
|
|
2
4
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
5
|
import type { ChatAction } from '../../actions/index.js';
|
|
@@ -6,6 +8,8 @@ export interface ProcessStep {
|
|
|
6
8
|
id: string;
|
|
7
9
|
title: string;
|
|
8
10
|
status: ProcessStepStatus;
|
|
11
|
+
/** compact 的活动图标;null 不显示,省略时沿状态呈现。 */
|
|
12
|
+
icon?: ComponentType<IconProps> | null;
|
|
9
13
|
/** 调用者提供的状态显示文案;不改变 status 的语义。 */
|
|
10
14
|
statusText?: string;
|
|
11
15
|
description?: string;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/types.ts"],"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AC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,IAAI,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,gBAAgB,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAC/C,kBAAkB,CAAC,EAAE,KAAK,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,gBAAgB,CAAC,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,MAAM,YAAY,GAAG,gBAAgB,GACzC,CAAC,0BAA0B,GAAG,qBAAqB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sources.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sources/Sources.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sources.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sources/Sources.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,YAAS,CAAC;AAExD,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAA6B,EAC7B,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA4DzC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CA2B7C"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
export interface SuggestionItem {
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
6
7
|
/** 14 布局单位的主题主色图标,普通与选中状态保持相同图标样式。 */
|
|
7
|
-
icon?:
|
|
8
|
+
icon?: ComponentType<IconProps>;
|
|
8
9
|
selected?: boolean;
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Suggestions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,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,aAAa,CAAC,SAAS,CAAC,CAAC;IAChC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unif/react-native-chat",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.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,8 @@
|
|
|
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.
|
|
71
|
+
"@unif/react-native-design": ">=1.0.0",
|
|
72
|
+
"@unif/react-native-icons": ">=0.1.0",
|
|
72
73
|
"commitlint": "^21.2.1",
|
|
73
74
|
"del-cli": "^7.0.0",
|
|
74
75
|
"eslint": "^9.39.5",
|
|
@@ -96,7 +97,8 @@
|
|
|
96
97
|
"typescript": "^6.0.3"
|
|
97
98
|
},
|
|
98
99
|
"peerDependencies": {
|
|
99
|
-
"@unif/react-native-design": ">=0.
|
|
100
|
+
"@unif/react-native-design": ">=1.0.0",
|
|
101
|
+
"@unif/react-native-icons": ">=0.1.0",
|
|
100
102
|
"react": ">=19.2.3 <20.0.0",
|
|
101
103
|
"react-native": ">=0.86.0",
|
|
102
104
|
"react-native-svg": ">=15"
|
package/src/actions/types.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
2
3
|
|
|
3
4
|
export interface ChatAction {
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
6
|
-
icon?:
|
|
7
|
+
icon?: ComponentType<IconProps>;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
loading?: boolean;
|
|
9
10
|
accessibilityHint?: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CloseOutlined,
|
|
3
|
+
EyeOutlined,
|
|
4
|
+
RefreshOutlined,
|
|
5
|
+
} from '@unif/react-native-icons';
|
|
1
6
|
import { Pressable, Text, View } from 'react-native';
|
|
2
7
|
import {
|
|
3
8
|
Button,
|
|
4
9
|
CircularProgress,
|
|
5
|
-
|
|
10
|
+
GlassLayer,
|
|
6
11
|
IconButton,
|
|
7
12
|
radius,
|
|
8
13
|
Spinner,
|
|
@@ -54,12 +59,7 @@ export function AttachmentItem({
|
|
|
54
59
|
const removable = item.removable && onRemove;
|
|
55
60
|
const singleAction = item.actions?.length === 1 ? item.actions[0] : undefined;
|
|
56
61
|
const retry =
|
|
57
|
-
failed &&
|
|
58
|
-
!caption &&
|
|
59
|
-
singleAction &&
|
|
60
|
-
(singleAction.id === 'retry' ||
|
|
61
|
-
singleAction.icon === 'retry' ||
|
|
62
|
-
singleAction.icon === 'refresh')
|
|
62
|
+
failed && !caption && singleAction?.id === 'retry'
|
|
63
63
|
? singleAction
|
|
64
64
|
: undefined;
|
|
65
65
|
const statusLeft = (imageSize - ATTACHMENT_STATUS_OWNER_SIZE) / 2;
|
|
@@ -72,9 +72,8 @@ export function AttachmentItem({
|
|
|
72
72
|
ATTACHMENT_STATUS_OWNER_SIZE
|
|
73
73
|
)
|
|
74
74
|
: statusLeft;
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
);
|
|
75
|
+
const Glyph = ATTACHMENT_ICONS[item.kind ?? 'file'];
|
|
76
|
+
const icon = <Glyph size={ROW_IMAGE_SIZE} color={colors.foregroundMuted} />;
|
|
78
77
|
const thumbnail = item.thumbnail ? (
|
|
79
78
|
<Thumbnail
|
|
80
79
|
source={item.thumbnail}
|
|
@@ -90,21 +89,20 @@ export function AttachmentItem({
|
|
|
90
89
|
{icon}
|
|
91
90
|
</View>
|
|
92
91
|
);
|
|
92
|
+
const Glyph2 = retry?.icon ?? RefreshOutlined;
|
|
93
93
|
const statusVisual =
|
|
94
94
|
busy || failed ? (
|
|
95
95
|
<View style={styles.statusVisual}>
|
|
96
|
+
<GlassLayer colorScheme="dark" style={styles.circleGlass} />
|
|
96
97
|
{failed ? (
|
|
97
|
-
<
|
|
98
|
-
name={retry?.icon ?? 'refresh'}
|
|
99
|
-
size={16}
|
|
100
|
-
color={colors.onPrimary}
|
|
101
|
-
/>
|
|
98
|
+
<Glyph2 size={16} color={colors.onPrimary} />
|
|
102
99
|
) : progress !== undefined ? (
|
|
103
100
|
<CircularProgress
|
|
104
101
|
value={progress}
|
|
105
102
|
size={36}
|
|
106
103
|
showLabel={showProgressLabel}
|
|
107
104
|
color={colors.onPrimary}
|
|
105
|
+
labelColor={colors.onPrimary}
|
|
108
106
|
accessibilityLabel={`${name}上传进度`}
|
|
109
107
|
/>
|
|
110
108
|
) : (
|
|
@@ -222,7 +220,7 @@ export function AttachmentItem({
|
|
|
222
220
|
<View style={styles.actions}>
|
|
223
221
|
{previewable && retry ? (
|
|
224
222
|
<IconButton
|
|
225
|
-
icon=
|
|
223
|
+
icon={EyeOutlined}
|
|
226
224
|
size="sm"
|
|
227
225
|
accessibilityLabel={`预览${name}`}
|
|
228
226
|
onPress={() => onPreview?.(item)}
|
|
@@ -230,7 +228,7 @@ export function AttachmentItem({
|
|
|
230
228
|
) : null}
|
|
231
229
|
{removable ? (
|
|
232
230
|
<IconButton
|
|
233
|
-
icon=
|
|
231
|
+
icon={CloseOutlined}
|
|
234
232
|
size="sm"
|
|
235
233
|
accessibilityLabel={`移除${name}`}
|
|
236
234
|
disabled={item.removeDisabled}
|
|
@@ -326,8 +324,10 @@ export function AttachmentItem({
|
|
|
326
324
|
failed && styles.removeFailed,
|
|
327
325
|
]}
|
|
328
326
|
>
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
{!failed ? (
|
|
328
|
+
<GlassLayer colorScheme="dark" style={styles.circleGlass} />
|
|
329
|
+
) : null}
|
|
330
|
+
<CloseOutlined
|
|
331
331
|
size={preview ? 12 : 10}
|
|
332
332
|
color={colors.onPrimary}
|
|
333
333
|
strokeWidth={2.5}
|
|
@@ -357,7 +357,7 @@ export function AttachmentItem({
|
|
|
357
357
|
{separatePreview ? (
|
|
358
358
|
<View style={[styles.previewAction, { width: imageSize }]}>
|
|
359
359
|
<IconButton
|
|
360
|
-
icon=
|
|
360
|
+
icon={EyeOutlined}
|
|
361
361
|
size="sm"
|
|
362
362
|
accessibilityLabel={`预览${name}`}
|
|
363
363
|
onPress={() => onPreview?.(item)}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FileOutlined,
|
|
3
|
+
ImageOutlined,
|
|
4
|
+
PlayOutlined,
|
|
5
|
+
SoundOutlined,
|
|
6
|
+
} from '@unif/react-native-icons';
|
|
7
|
+
import type { ComponentType } from 'react';
|
|
8
|
+
import type { IconProps } from '@unif/react-native-icons';
|
|
1
9
|
import { icon, r } from '@unif/react-native-design';
|
|
2
|
-
|
|
10
|
+
|
|
3
11
|
import type { ChatAttachmentItem } from './types';
|
|
4
12
|
|
|
5
13
|
export const CARD_WIDTH = r(76);
|
|
@@ -15,12 +23,12 @@ export const ATTACHMENT_STATUS_OWNER_SIZE = Math.max(
|
|
|
15
23
|
export const ATTACHMENT_REMOVE_OWNER_SIZE = 44;
|
|
16
24
|
export const ATTACHMENT_ICONS: Record<
|
|
17
25
|
NonNullable<ChatAttachmentItem['kind']>,
|
|
18
|
-
|
|
26
|
+
ComponentType<IconProps>
|
|
19
27
|
> = {
|
|
20
|
-
image:
|
|
21
|
-
file:
|
|
22
|
-
audio:
|
|
23
|
-
video:
|
|
28
|
+
image: ImageOutlined,
|
|
29
|
+
file: FileOutlined,
|
|
30
|
+
audio: SoundOutlined,
|
|
31
|
+
video: PlayOutlined,
|
|
24
32
|
};
|
|
25
33
|
export const STATUS_LABELS = {
|
|
26
34
|
idle: '',
|
|
@@ -97,7 +97,6 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
97
97
|
width: ATTACHMENT_STATUS_SIZE,
|
|
98
98
|
height: ATTACHMENT_STATUS_SIZE,
|
|
99
99
|
borderRadius: radius.pill,
|
|
100
|
-
backgroundColor: colors.scrim,
|
|
101
100
|
alignItems: 'center',
|
|
102
101
|
justifyContent: 'center',
|
|
103
102
|
},
|
|
@@ -114,10 +113,11 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
114
113
|
width: icon.xs,
|
|
115
114
|
height: icon.xs,
|
|
116
115
|
borderRadius: radius.pill,
|
|
117
|
-
|
|
116
|
+
overflow: 'hidden',
|
|
118
117
|
alignItems: 'center',
|
|
119
118
|
justifyContent: 'center',
|
|
120
119
|
},
|
|
120
|
+
circleGlass: { borderRadius: radius.pill },
|
|
121
121
|
previewRemoveVisual: { width: r(22), height: r(22) },
|
|
122
122
|
removeInCell: { alignItems: 'flex-end', paddingRight: space[1] },
|
|
123
123
|
removeFailed: { backgroundColor: colors.error },
|