@unif/react-native-chat 4.3.2 → 4.4.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 +6 -1
- package/lib/module/components/Attachments/AttachmentItem.js.map +1 -1
- package/lib/module/components/Attachments/styles.js +5 -4
- package/lib/module/components/Attachments/styles.js.map +1 -1
- package/lib/module/components/Composer/Composer.js +1 -1
- package/lib/module/components/Composer/Composer.js.map +1 -1
- package/lib/module/components/Confirmation/Confirmation.js +4 -2
- package/lib/module/components/Confirmation/Confirmation.js.map +1 -1
- package/lib/module/components/Confirmation/styles.js +4 -2
- package/lib/module/components/Confirmation/styles.js.map +1 -1
- package/lib/module/components/Feedback/Feedback.js +8 -6
- package/lib/module/components/Feedback/Feedback.js.map +1 -1
- package/lib/module/components/Feedback/styles.js +3 -0
- package/lib/module/components/Feedback/styles.js.map +1 -1
- package/lib/module/components/Message/MarkdownContent/styles.js +1 -1
- package/lib/module/components/Message/MarkdownContent/styles.js.map +1 -1
- package/lib/module/components/Message/Message.js +6 -4
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/styles.js +7 -2
- package/lib/module/components/Message/styles.js.map +1 -1
- package/lib/module/components/MessageList/useMessageListScroll.js +1 -1
- package/lib/module/components/MessageList/useMessageListScroll.js.map +1 -1
- package/lib/module/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.js +3 -4
- package/lib/module/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.js.map +1 -1
- package/lib/module/components/Process/Process.js +4 -2
- package/lib/module/components/Process/Process.js.map +1 -1
- package/lib/module/components/Process/styles.js +8 -5
- package/lib/module/components/Process/styles.js.map +1 -1
- package/lib/module/components/ProcessingProgress/styles.js +2 -2
- package/lib/module/components/ProcessingProgress/styles.js.map +1 -1
- package/lib/module/components/Sources/Sources.js +30 -23
- package/lib/module/components/Sources/Sources.js.map +1 -1
- package/lib/module/components/Sources/styles.js +8 -10
- package/lib/module/components/Sources/styles.js.map +1 -1
- package/lib/typescript/src/components/Attachments/AttachmentItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Attachments/styles.d.ts +3 -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/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/typescript/src/components/Confirmation/styles.d.ts +3 -1
- package/lib/typescript/src/components/Confirmation/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Feedback/Feedback.d.ts.map +1 -1
- package/lib/typescript/src/components/Feedback/styles.d.ts +3 -0
- package/lib/typescript/src/components/Feedback/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/MarkdownContent/styles.d.ts +2 -2
- package/lib/typescript/src/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/src/components/Message/styles.d.ts +6 -1
- package/lib/typescript/src/components/Message/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageList/useMessageListScroll.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/Process.d.ts.map +1 -1
- package/lib/typescript/src/components/Process/styles.d.ts +6 -3
- package/lib/typescript/src/components/Process/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/Sources/Sources.d.ts.map +1 -1
- package/lib/typescript/src/components/Sources/styles.d.ts +6 -8
- package/lib/typescript/src/components/Sources/styles.d.ts.map +1 -1
- package/package.json +18 -17
- package/src/components/Attachments/AttachmentItem.tsx +4 -0
- package/src/components/Attachments/styles.ts +1 -2
- package/src/components/Composer/Composer.tsx +1 -2
- package/src/components/Confirmation/Confirmation.tsx +2 -0
- package/src/components/Confirmation/styles.ts +1 -1
- package/src/components/Feedback/Feedback.tsx +8 -9
- package/src/components/Feedback/styles.ts +1 -0
- package/src/components/Message/MarkdownContent/styles.ts +1 -1
- package/src/components/Message/Message.tsx +12 -2
- package/src/components/Message/styles.ts +2 -1
- package/src/components/MessageList/useMessageListScroll.ts +2 -1
- package/src/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.ts +6 -4
- package/src/components/Process/Process.tsx +8 -0
- package/src/components/Process/styles.ts +2 -3
- package/src/components/ProcessingProgress/styles.ts +2 -2
- package/src/components/Sources/Sources.tsx +35 -20
- package/src/components/Sources/styles.ts +6 -17
|
@@ -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":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAE5C,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BA6L1C"}
|
|
@@ -31,7 +31,12 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
31
31
|
paddingHorizontal: number;
|
|
32
32
|
paddingVertical: number;
|
|
33
33
|
borderRadius: number;
|
|
34
|
-
|
|
34
|
+
};
|
|
35
|
+
material: {
|
|
36
|
+
borderRadius: number;
|
|
37
|
+
};
|
|
38
|
+
waitingMaterial: {
|
|
39
|
+
borderTopLeftRadius: number;
|
|
35
40
|
};
|
|
36
41
|
outgoing: {
|
|
37
42
|
backgroundColor: string;
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwE5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMessageListScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/useMessageListScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAEV,wBAAwB,EAIxB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,YAAS,CAAC;AAEjB,UAAU,sBAAsB,CAAC,CAAC,CAAE,SAAQ,IAAI,CAC9C,gBAAgB,CAAC,CAAC,CAAC,EACnB,iBAAiB,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,CACtE;IACC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE,cAAc,CAAC;IACtC,oBAAoB,CAAC,EAAE,cAAc,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC,yBAAyB,IAAI,IAAI,CAAC;CACnC;AAaD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,OAAO,EACP,IAAI,EACJ,eAAe,EACf,YAAY,EACZ,YAAoC,EACpC,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,yBAAyB,GAC1B,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;
|
|
1
|
+
{"version":3,"file":"useMessageListScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/useMessageListScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAEV,wBAAwB,EAIxB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,YAAS,CAAC;AAEjB,UAAU,sBAAsB,CAAC,CAAC,CAAE,SAAQ,IAAI,CAC9C,gBAAgB,CAAC,CAAC,CAAC,EACnB,iBAAiB,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,CACtE;IACC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE,cAAc,CAAC;IACtC,oBAAoB,CAAC,EAAE,cAAc,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC,yBAAyB,IAAI,IAAI,CAAC;CACnC;AAaD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,OAAO,EACP,IAAI,EACJ,eAAe,EACf,YAAY,EACZ,YAAoC,EACpC,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,yBAAyB,GAC1B,EAAE,sBAAsB,CAAC,CAAC,CAAC;;;wBA+JlB,MAAM,YAAW,wBAAwB;wBA5CzC,MAAM,SAAS,MAAM,QAAQ,eAAe;wBAsB5C,MAAM,SAAS,MAAM,SAAS,MAAM;yBAUJ,MAAM,SAAS,MAAM;4BAMlB,iBAAiB;qCAkP/C,UAAU,CACjB,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CACvD,CAAC,CAAC,CAAC;4BAnLI,wBAAwB;4CAsIJ,iBAAiB;kCAQtC,MAAM,UAAU,MAAM;sBA3CvB,oBAAoB,CAAC,iBAAiB,CAAC;;;6BA2DvC,oBAAoB,CAAC,iBAAiB,CAAC;iCAUvC,oBAAoB,CAAC,iBAAiB,CAAC;EA+ClD"}
|
package/lib/typescript/src/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWebPrependAnchor.web.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAI1B,sBAAsB,EAEvB,MAAM,YAAS,CAAC;AAqDjB,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,aAAa,EACb,IAAI,GACL,EAAE,0BAA0B,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useWebPrependAnchor.web.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MessageList/webPrependAnchor/useWebPrependAnchor.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAI1B,sBAAsB,EAEvB,MAAM,YAAS,CAAC;AAqDjB,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,aAAa,EACb,IAAI,GACL,EAAE,0BAA0B,GAAG,sBAAsB,CAqQrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Process.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/Process.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,YAAS,CAAC;AAqCzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqL9D"}
|
|
@@ -46,8 +46,13 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
46
46
|
paddingHorizontal: number;
|
|
47
47
|
paddingVertical: number;
|
|
48
48
|
};
|
|
49
|
+
timelineMaterial: {
|
|
50
|
+
borderRadius: number;
|
|
51
|
+
};
|
|
52
|
+
material: {
|
|
53
|
+
borderRadius: number;
|
|
54
|
+
};
|
|
49
55
|
timelineRoot: {
|
|
50
|
-
backgroundColor: string;
|
|
51
56
|
borderRadius: number;
|
|
52
57
|
padding: number;
|
|
53
58
|
};
|
|
@@ -154,7 +159,6 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
154
159
|
borderRadius: number;
|
|
155
160
|
borderWidth: number;
|
|
156
161
|
borderColor: string;
|
|
157
|
-
backgroundColor: string;
|
|
158
162
|
};
|
|
159
163
|
heading: {
|
|
160
164
|
flexDirection: "row";
|
|
@@ -211,7 +215,6 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
211
215
|
details: {
|
|
212
216
|
padding: number;
|
|
213
217
|
borderRadius: number;
|
|
214
|
-
backgroundColor: string;
|
|
215
218
|
};
|
|
216
219
|
actions: {
|
|
217
220
|
flexDirection: "row";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Process/styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2L5C,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":"AAWA,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,CAqEzC"}
|
|
@@ -13,18 +13,16 @@ export declare const createStyles: (colors: ColorTokens) => Readonly<{
|
|
|
13
13
|
};
|
|
14
14
|
item: {
|
|
15
15
|
minHeight: 44;
|
|
16
|
-
flexDirection: "row";
|
|
17
|
-
alignItems: "flex-start";
|
|
18
|
-
gap: number;
|
|
19
16
|
padding: number;
|
|
20
17
|
borderRadius: number;
|
|
21
|
-
backgroundColor: string;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
material: {
|
|
20
|
+
borderRadius: number;
|
|
25
21
|
};
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
itemContent: {
|
|
23
|
+
flexDirection: "row";
|
|
24
|
+
alignItems: "flex-start";
|
|
25
|
+
gap: number;
|
|
28
26
|
};
|
|
29
27
|
label: {
|
|
30
28
|
minWidth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sources/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sources/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unif/react-native-chat",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Unif React Native 聊天组件:消息、输入、附件和交互展示",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"web": "yarn workspace @unif/react-native-chat-website start",
|
|
33
33
|
"lint": "eslint \"**/*.{js,jsx,mjs,ts,tsx}\"",
|
|
34
34
|
"format:check": "prettier --check .",
|
|
35
|
-
"website": "yarn workspace @unif/react-native-chat-website"
|
|
35
|
+
"website": "yarn workspace @unif/react-native-chat-website",
|
|
36
|
+
"test:native": "python3 scripts/test-native-hosts.py"
|
|
36
37
|
},
|
|
37
38
|
"keywords": [
|
|
38
39
|
"react-native",
|
|
@@ -61,15 +62,15 @@
|
|
|
61
62
|
"@eslint/eslintrc": "^3.3.6",
|
|
62
63
|
"@eslint/js": "^9.39.5",
|
|
63
64
|
"@jest/globals": "^30.3.0",
|
|
64
|
-
"@react-native/babel-preset": "0.
|
|
65
|
-
"@react-native/eslint-config": "0.
|
|
66
|
-
"@react-native/jest-preset": "0.
|
|
67
|
-
"@react-native/metro-config": "0.
|
|
65
|
+
"@react-native/babel-preset": "0.88.0",
|
|
66
|
+
"@react-native/eslint-config": "0.88.0",
|
|
67
|
+
"@react-native/jest-preset": "0.88.0",
|
|
68
|
+
"@react-native/metro-config": "0.88.0",
|
|
68
69
|
"@release-it/conventional-changelog": "^12.0.0",
|
|
69
70
|
"@testing-library/react-native": "13.3.3",
|
|
70
71
|
"@types/react": "^19.2.0",
|
|
71
|
-
"@unif/react-native-design": "^1.
|
|
72
|
-
"@unif/react-native-icons": "^0.
|
|
72
|
+
"@unif/react-native-design": "^1.7.0",
|
|
73
|
+
"@unif/react-native-icons": "^0.4.1",
|
|
73
74
|
"commitlint": "^21.2.1",
|
|
74
75
|
"del-cli": "^7.0.0",
|
|
75
76
|
"eslint": "^9.39.5",
|
|
@@ -80,24 +81,24 @@
|
|
|
80
81
|
"jest": "^30.3.0",
|
|
81
82
|
"lefthook": "^2.1.10",
|
|
82
83
|
"prettier": "^3.9.6",
|
|
83
|
-
"react": "19.
|
|
84
|
-
"react-dom": "19.
|
|
85
|
-
"react-native": "0.
|
|
84
|
+
"react": "19.3.0",
|
|
85
|
+
"react-dom": "19.3.0",
|
|
86
|
+
"react-native": "0.88.0",
|
|
86
87
|
"react-native-builder-bob": "^0.43.0",
|
|
87
88
|
"react-native-gesture-handler": "3.1.0",
|
|
88
|
-
"react-native-reanimated": "4.
|
|
89
|
+
"react-native-reanimated": "4.7.1",
|
|
89
90
|
"react-native-reanimated-carousel": "5.0.0",
|
|
90
91
|
"react-native-safe-area-context": "5.8.0",
|
|
91
|
-
"react-native-svg": "15.
|
|
92
|
-
"react-native-web": "
|
|
93
|
-
"react-native-worklets": "0.
|
|
94
|
-
"react-test-renderer": "19.
|
|
92
|
+
"react-native-svg": "15.16.0",
|
|
93
|
+
"react-native-web": "0.21.4",
|
|
94
|
+
"react-native-worklets": "0.13.0",
|
|
95
|
+
"react-test-renderer": "19.3.0",
|
|
95
96
|
"release-it": "^21.0.1",
|
|
96
97
|
"turbo": "^2.10.8",
|
|
97
98
|
"typescript": "^6.0.3"
|
|
98
99
|
},
|
|
99
100
|
"peerDependencies": {
|
|
100
|
-
"@unif/react-native-design": "^1.
|
|
101
|
+
"@unif/react-native-design": "^1.7.0",
|
|
101
102
|
"@unif/react-native-icons": "^0.3.0 || ^0.4.0",
|
|
102
103
|
"react": ">=19.2.3 <20.0.0",
|
|
103
104
|
"react-native": ">=0.86.0",
|
|
@@ -223,6 +223,7 @@ export function AttachmentItem({
|
|
|
223
223
|
);
|
|
224
224
|
return (
|
|
225
225
|
<View style={[styles.item, styles.row, mixed && styles.mixedRow]}>
|
|
226
|
+
<GlassLayer style={styles.itemMaterial} />
|
|
226
227
|
{previewable && !retry ? (
|
|
227
228
|
<Pressable
|
|
228
229
|
style={[styles.rowBody, mixed && styles.mixedRowBody]}
|
|
@@ -240,6 +241,7 @@ export function AttachmentItem({
|
|
|
240
241
|
<View style={styles.actions}>
|
|
241
242
|
{previewable && retry ? (
|
|
242
243
|
<IconButton
|
|
244
|
+
variant="glass"
|
|
243
245
|
icon={EyeOutlined}
|
|
244
246
|
size="sm"
|
|
245
247
|
accessibilityLabel={`预览${name}`}
|
|
@@ -248,6 +250,7 @@ export function AttachmentItem({
|
|
|
248
250
|
) : null}
|
|
249
251
|
{removable ? (
|
|
250
252
|
<IconButton
|
|
253
|
+
variant="glass"
|
|
251
254
|
icon={CloseOutlined}
|
|
252
255
|
size="sm"
|
|
253
256
|
accessibilityLabel={`移除${name}`}
|
|
@@ -380,6 +383,7 @@ export function AttachmentItem({
|
|
|
380
383
|
{separatePreview ? (
|
|
381
384
|
<View style={[styles.previewAction, { width: imageSize }]}>
|
|
382
385
|
<IconButton
|
|
386
|
+
variant="glass"
|
|
383
387
|
icon={EyeOutlined}
|
|
384
388
|
size="sm"
|
|
385
389
|
accessibilityLabel={`预览${name}`}
|
|
@@ -51,8 +51,8 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
51
51
|
borderWidth: 1,
|
|
52
52
|
borderColor: colors.outline,
|
|
53
53
|
borderRadius: radius.md,
|
|
54
|
-
backgroundColor: colors.surface,
|
|
55
54
|
},
|
|
55
|
+
itemMaterial: { borderRadius: radius.md },
|
|
56
56
|
row: { width: '100%', flexDirection: 'row', alignItems: 'center' },
|
|
57
57
|
rowBody: {
|
|
58
58
|
flex: 1,
|
|
@@ -68,7 +68,6 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
68
68
|
paddingHorizontal: space[3],
|
|
69
69
|
borderWidth: StyleSheet.hairlineWidth,
|
|
70
70
|
borderRadius: radius.md,
|
|
71
|
-
backgroundColor: colors.surfaceContainerHigh,
|
|
72
71
|
},
|
|
73
72
|
content: { minWidth: 0, flexShrink: 1 },
|
|
74
73
|
rowContent: { flex: 1 },
|
|
@@ -272,8 +272,7 @@ export const Composer = forwardRef<ComposerHandle, ComposerProps>(
|
|
|
272
272
|
setMenuOpen(false);
|
|
273
273
|
if (primaryAction.kind === 'send')
|
|
274
274
|
primaryAction.onPress(value);
|
|
275
|
-
else
|
|
276
|
-
primaryAction.onPress();
|
|
275
|
+
else primaryAction.onPress();
|
|
277
276
|
}}
|
|
278
277
|
/>
|
|
279
278
|
) : null}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { Text, View } from 'react-native';
|
|
7
7
|
import {
|
|
8
8
|
Button,
|
|
9
|
+
GlassLayer,
|
|
9
10
|
Spinner,
|
|
10
11
|
useColors,
|
|
11
12
|
useThemedStyles,
|
|
@@ -56,6 +57,7 @@ export function Confirmation({
|
|
|
56
57
|
: WarningOutlined;
|
|
57
58
|
return (
|
|
58
59
|
<View style={[styles.root, { borderColor }, style]} testID={testID}>
|
|
60
|
+
<GlassLayer style={styles.material} />
|
|
59
61
|
<View style={styles.heading}>
|
|
60
62
|
{status === 'processing' ? (
|
|
61
63
|
<Spinner size={14} color={tint} />
|
|
@@ -14,8 +14,8 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
14
14
|
borderWidth: 2,
|
|
15
15
|
borderColor: colors.outline,
|
|
16
16
|
borderRadius: radius.lg,
|
|
17
|
-
backgroundColor: colors.surface,
|
|
18
17
|
},
|
|
18
|
+
material: { borderRadius: radius.lg },
|
|
19
19
|
heading: {
|
|
20
20
|
flexDirection: 'row',
|
|
21
21
|
alignItems: 'center',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Text, View } from 'react-native';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
+
GlassLayer,
|
|
4
5
|
r,
|
|
5
6
|
useColors,
|
|
6
7
|
useThemedStyles,
|
|
@@ -50,14 +51,12 @@ export function Feedback({
|
|
|
50
51
|
|
|
51
52
|
const Glyph = FEEDBACK_TONE_ICONS[tone];
|
|
52
53
|
return (
|
|
53
|
-
<View
|
|
54
|
-
|
|
55
|
-
styles.
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
testID={testID}
|
|
60
|
-
>
|
|
54
|
+
<View style={[styles.root, style]} testID={testID}>
|
|
55
|
+
<GlassLayer
|
|
56
|
+
style={styles.material}
|
|
57
|
+
tintColor={toneColors.backgroundColor}
|
|
58
|
+
fallbackColor={toneColors.backgroundColor}
|
|
59
|
+
/>
|
|
61
60
|
<Glyph size={r(18)} color={toneColors.iconColor} />
|
|
62
61
|
<View style={styles.content}>
|
|
63
62
|
<View accessible accessibilityLabel={accessibilityLabel}>
|
|
@@ -78,7 +77,7 @@ export function Feedback({
|
|
|
78
77
|
loading={action.loading}
|
|
79
78
|
accessibilityHint={action.accessibilityHint}
|
|
80
79
|
size="sm"
|
|
81
|
-
variant="
|
|
80
|
+
variant="secondary"
|
|
82
81
|
/>
|
|
83
82
|
</View>
|
|
84
83
|
) : null}
|
|
@@ -13,7 +13,7 @@ const makeMarkdownStyles = (colors: ColorTokens, outgoing: boolean) => {
|
|
|
13
13
|
text: body,
|
|
14
14
|
paragraph: { paddingVertical: 0, paddingBottom: r(6) },
|
|
15
15
|
em: { color: textColor, fontStyle: 'italic' },
|
|
16
|
-
strong: { color: textColor, fontWeight:
|
|
16
|
+
strong: { color: textColor, fontWeight: fw.bold },
|
|
17
17
|
strikethrough: { color: textColor, textDecorationLine: 'line-through' },
|
|
18
18
|
link: {
|
|
19
19
|
color: outgoing ? colors.onPrimary : colors.primary,
|
|
@@ -2,6 +2,7 @@ import { AlertOutlined } from '@unif/react-native-icons';
|
|
|
2
2
|
import { Pressable, Text, View } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
+
GlassLayer,
|
|
5
6
|
IconButton,
|
|
6
7
|
useThemedStyles,
|
|
7
8
|
useColors,
|
|
@@ -59,6 +60,15 @@ export function Message(props: MessageProps) {
|
|
|
59
60
|
];
|
|
60
61
|
const content = (
|
|
61
62
|
<>
|
|
63
|
+
{surface === 'outlined' ||
|
|
64
|
+
(surface === 'bubble' && placement === 'start') ? (
|
|
65
|
+
<GlassLayer
|
|
66
|
+
style={[
|
|
67
|
+
styles.material,
|
|
68
|
+
waiting && surface === 'bubble' && styles.waitingMaterial,
|
|
69
|
+
]}
|
|
70
|
+
/>
|
|
71
|
+
) : null}
|
|
62
72
|
{header}
|
|
63
73
|
{props.text !== undefined ? (
|
|
64
74
|
props.format === 'markdown' ? (
|
|
@@ -145,7 +155,7 @@ export function Message(props: MessageProps) {
|
|
|
145
155
|
<IconButton
|
|
146
156
|
icon={AlertOutlined}
|
|
147
157
|
size="sm"
|
|
148
|
-
variant="
|
|
158
|
+
variant="glass"
|
|
149
159
|
color={colors.error}
|
|
150
160
|
style={styles.failureAction}
|
|
151
161
|
accessibilityLabel={failedAction.label}
|
|
@@ -166,7 +176,7 @@ export function Message(props: MessageProps) {
|
|
|
166
176
|
key={action.id}
|
|
167
177
|
icon={action.icon}
|
|
168
178
|
size="sm"
|
|
169
|
-
variant="
|
|
179
|
+
variant="glass"
|
|
170
180
|
color={colors.foregroundSubtle}
|
|
171
181
|
accessibilityLabel={action.label}
|
|
172
182
|
accessibilityHint={action.accessibilityHint}
|
|
@@ -24,8 +24,9 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
24
24
|
paddingHorizontal: space[5],
|
|
25
25
|
paddingVertical: space[4],
|
|
26
26
|
borderRadius: radius['2xl'],
|
|
27
|
-
backgroundColor: colors.surface,
|
|
28
27
|
},
|
|
28
|
+
material: { borderRadius: radius['2xl'] },
|
|
29
|
+
waitingMaterial: { borderTopLeftRadius: 0 },
|
|
29
30
|
outgoing: { backgroundColor: colors.primary },
|
|
30
31
|
outgoingText: { color: colors.onPrimary },
|
|
31
32
|
outlined: {
|
|
@@ -81,7 +81,6 @@ export function useMessageListScroll<T>({
|
|
|
81
81
|
const layoutRevision = useRef(0);
|
|
82
82
|
const footerHeight = useRef(0);
|
|
83
83
|
if (!hasFooter) footerHeight.current = 0;
|
|
84
|
-
const layoutChanged = useRef<() => void>(() => {});
|
|
85
84
|
const [anchorMinimumHeight, setAnchorMinimumHeight] = useState<number>();
|
|
86
85
|
const minimumRef = useRef<number | undefined>(undefined);
|
|
87
86
|
const threshold = Number.isFinite(endThreshold)
|
|
@@ -169,6 +168,8 @@ export function useMessageListScroll<T>({
|
|
|
169
168
|
publishPosition();
|
|
170
169
|
}, [listRef, publishPosition, ready]);
|
|
171
170
|
|
|
171
|
+
const layoutChanged = useRef(applyAnchor);
|
|
172
|
+
|
|
172
173
|
const onCellLayout = useCallback(
|
|
173
174
|
(key: string, index: number, cell: LayoutRectangle) => {
|
|
174
175
|
if (
|
|
@@ -153,9 +153,10 @@ export function useWebPrependAnchor({
|
|
|
153
153
|
);
|
|
154
154
|
|
|
155
155
|
const correctPrepend = useCallback(
|
|
156
|
-
(
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
(
|
|
157
|
+
connection: WebPrependAnchorConnection,
|
|
158
|
+
preservation: WebAnchorSnapshot
|
|
159
|
+
) => {
|
|
159
160
|
const anchor = findRow(connection.scroller, preservation.id);
|
|
160
161
|
if (anchor) {
|
|
161
162
|
const viewport = connection.scroller.getBoundingClientRect();
|
|
@@ -189,7 +190,8 @@ export function useWebPrependAnchor({
|
|
|
189
190
|
const connection = connectionRef.current;
|
|
190
191
|
if (!connection) return;
|
|
191
192
|
refreshResizeTargets(connection);
|
|
192
|
-
|
|
193
|
+
const preservation = preservationRef.current;
|
|
194
|
+
if (preservation) correctPrepend(connection, preservation);
|
|
193
195
|
else captureAnchor(connection);
|
|
194
196
|
}, [captureAnchor, correctPrepend, refreshResizeTargets]);
|
|
195
197
|
|
|
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
+
GlassLayer,
|
|
5
6
|
r,
|
|
6
7
|
useColors,
|
|
7
8
|
useThemedStyles,
|
|
@@ -95,6 +96,13 @@ export function Process(props: ProcessProps): React.JSX.Element {
|
|
|
95
96
|
]}
|
|
96
97
|
testID={testID}
|
|
97
98
|
>
|
|
99
|
+
{variant === 'card' || variant === 'timeline' ? (
|
|
100
|
+
<GlassLayer
|
|
101
|
+
style={
|
|
102
|
+
variant === 'timeline' ? styles.timelineMaterial : styles.material
|
|
103
|
+
}
|
|
104
|
+
/>
|
|
105
|
+
) : null}
|
|
98
106
|
{title || (identity && !inlineIdentity) ? (
|
|
99
107
|
<View style={styles.heading}>
|
|
100
108
|
{!inlineIdentity ? identity : null}
|
|
@@ -54,8 +54,9 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
54
54
|
paddingHorizontal: space[5],
|
|
55
55
|
paddingVertical: space[4],
|
|
56
56
|
},
|
|
57
|
+
timelineMaterial: { borderRadius: radius.lg },
|
|
58
|
+
material: { borderRadius: radius.xl },
|
|
57
59
|
timelineRoot: {
|
|
58
|
-
backgroundColor: colors.surface,
|
|
59
60
|
borderRadius: radius.lg,
|
|
60
61
|
padding: space[5],
|
|
61
62
|
},
|
|
@@ -134,7 +135,6 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
134
135
|
borderRadius: radius.xl,
|
|
135
136
|
borderWidth: 1,
|
|
136
137
|
borderColor: colors.outline,
|
|
137
|
-
backgroundColor: colors.surface,
|
|
138
138
|
},
|
|
139
139
|
heading: {
|
|
140
140
|
flexDirection: 'row',
|
|
@@ -191,7 +191,6 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
191
191
|
details: {
|
|
192
192
|
padding: space[4],
|
|
193
193
|
borderRadius: radius.md,
|
|
194
|
-
backgroundColor: colors.surfaceContainer,
|
|
195
194
|
},
|
|
196
195
|
actions: {
|
|
197
196
|
flexDirection: 'row',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { leading, space, type } from '@unif/react-native-design';
|
|
3
3
|
import type { ColorTokens } from '@unif/react-native-design';
|
|
4
4
|
|
|
5
5
|
export const createStyles = (colors: ColorTokens) =>
|
|
@@ -12,6 +12,6 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
12
12
|
text: {
|
|
13
13
|
color: colors.foregroundMuted,
|
|
14
14
|
fontSize: type.xs,
|
|
15
|
-
lineHeight:
|
|
15
|
+
lineHeight: leading.sm,
|
|
16
16
|
},
|
|
17
17
|
});
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ChevronRightOutlined } from '@unif/react-native-icons';
|
|
2
2
|
import { Pressable, Text, View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
GlassLayer,
|
|
5
|
+
pressedOpacity,
|
|
6
|
+
r,
|
|
7
|
+
useColors,
|
|
8
|
+
useThemedStyles,
|
|
9
|
+
} from '@unif/react-native-design';
|
|
4
10
|
import { DEFAULT_SOURCES_TITLE } from './constants';
|
|
5
11
|
import { createStyles } from './styles';
|
|
6
12
|
import type { SourceItem, SourcesProps } from './types';
|
|
@@ -17,20 +23,27 @@ export function Sources({
|
|
|
17
23
|
|
|
18
24
|
if (items.length === 0) return null;
|
|
19
25
|
|
|
20
|
-
const renderItem = (
|
|
26
|
+
const renderItem = (
|
|
27
|
+
item: SourceItem,
|
|
28
|
+
showChevron: boolean,
|
|
29
|
+
opacity: number
|
|
30
|
+
) => (
|
|
21
31
|
<>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
<Text style={styles.
|
|
32
|
+
<GlassLayer style={styles.material} />
|
|
33
|
+
<View style={[styles.itemContent, { opacity }]}>
|
|
34
|
+
<Text style={styles.label} testID={`source-label-${item.id}`}>
|
|
35
|
+
{item.label}
|
|
36
|
+
</Text>
|
|
37
|
+
<View style={styles.content}>
|
|
38
|
+
{item.title ? <Text style={styles.title}>{item.title}</Text> : null}
|
|
39
|
+
{item.description ? (
|
|
40
|
+
<Text style={styles.description}>{item.description}</Text>
|
|
41
|
+
) : null}
|
|
42
|
+
</View>
|
|
43
|
+
{showChevron ? (
|
|
44
|
+
<ChevronRightOutlined size={r(18)} color={colors.foregroundMuted} />
|
|
29
45
|
) : null}
|
|
30
46
|
</View>
|
|
31
|
-
{showChevron ? (
|
|
32
|
-
<ChevronRightOutlined size={r(18)} color={colors.foregroundMuted} />
|
|
33
|
-
) : null}
|
|
34
47
|
</>
|
|
35
48
|
);
|
|
36
49
|
|
|
@@ -42,11 +55,7 @@ export function Sources({
|
|
|
42
55
|
onPress ? (
|
|
43
56
|
<Pressable
|
|
44
57
|
key={item.id}
|
|
45
|
-
style={
|
|
46
|
-
styles.item,
|
|
47
|
-
pressed && styles.pressed,
|
|
48
|
-
item.disabled && styles.disabled,
|
|
49
|
-
]}
|
|
58
|
+
style={styles.item}
|
|
50
59
|
onPress={item.disabled ? undefined : () => onPress(item)}
|
|
51
60
|
disabled={item.disabled}
|
|
52
61
|
accessibilityRole="button"
|
|
@@ -56,15 +65,21 @@ export function Sources({
|
|
|
56
65
|
accessibilityState={{ disabled: item.disabled === true }}
|
|
57
66
|
testID={`source-${item.id}`}
|
|
58
67
|
>
|
|
59
|
-
{
|
|
68
|
+
{({ pressed }) =>
|
|
69
|
+
renderItem(
|
|
70
|
+
item,
|
|
71
|
+
true,
|
|
72
|
+
item.disabled ? 0.5 : pressed ? pressedOpacity : 1
|
|
73
|
+
)
|
|
74
|
+
}
|
|
60
75
|
</Pressable>
|
|
61
76
|
) : (
|
|
62
77
|
<View
|
|
63
78
|
key={item.id}
|
|
64
|
-
style={
|
|
79
|
+
style={styles.item}
|
|
65
80
|
testID={`source-${item.id}`}
|
|
66
81
|
>
|
|
67
|
-
{renderItem(item, false)}
|
|
82
|
+
{renderItem(item, false, item.disabled ? 0.5 : 1)}
|
|
68
83
|
</View>
|
|
69
84
|
)
|
|
70
85
|
)}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
-
import {
|
|
3
|
-
fixed,
|
|
4
|
-
fw,
|
|
5
|
-
pressedOpacity,
|
|
6
|
-
radius,
|
|
7
|
-
space,
|
|
8
|
-
type,
|
|
9
|
-
} from '@unif/react-native-design';
|
|
2
|
+
import { fixed, fw, radius, space, type } from '@unif/react-native-design';
|
|
10
3
|
import type { ColorTokens } from '@unif/react-native-design';
|
|
11
4
|
|
|
12
5
|
export const createStyles = (colors: ColorTokens) =>
|
|
@@ -24,18 +17,14 @@ export const createStyles = (colors: ColorTokens) =>
|
|
|
24
17
|
},
|
|
25
18
|
item: {
|
|
26
19
|
minHeight: fixed.hitTarget,
|
|
27
|
-
flexDirection: 'row',
|
|
28
|
-
alignItems: 'flex-start',
|
|
29
|
-
gap: space[3],
|
|
30
20
|
padding: space[3],
|
|
31
21
|
borderRadius: radius.md,
|
|
32
|
-
backgroundColor: colors.surfaceContainer,
|
|
33
|
-
},
|
|
34
|
-
pressed: {
|
|
35
|
-
opacity: pressedOpacity,
|
|
36
22
|
},
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
material: { borderRadius: radius.md },
|
|
24
|
+
itemContent: {
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
alignItems: 'flex-start',
|
|
27
|
+
gap: space[3],
|
|
39
28
|
},
|
|
40
29
|
label: {
|
|
41
30
|
minWidth: space[7],
|