@droppii-org/chat-sdk 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/components/bizInbox/BizThreadAvatar.d.ts +10 -0
  2. package/dist/components/bizInbox/BizThreadAvatar.d.ts.map +1 -0
  3. package/dist/components/bizInbox/BizThreadAvatar.js +8 -0
  4. package/dist/components/bizInbox/BizThreadCard.d.ts.map +1 -1
  5. package/dist/components/bizInbox/BizThreadCard.js +12 -40
  6. package/dist/components/bizInbox/BizThreadList.d.ts +1 -1
  7. package/dist/components/bizInbox/BizThreadList.d.ts.map +1 -1
  8. package/dist/components/bizInbox/BizThreadList.js +22 -4
  9. package/dist/components/bizInbox/BizThreadTitle.d.ts +8 -0
  10. package/dist/components/bizInbox/BizThreadTitle.d.ts.map +1 -0
  11. package/dist/components/bizInbox/BizThreadTitle.js +6 -0
  12. package/dist/components/bizInbox/index.d.ts +4 -0
  13. package/dist/components/bizInbox/index.d.ts.map +1 -1
  14. package/dist/components/bizInbox/index.js +2 -0
  15. package/dist/components/bizThreadDetail/BizThreadDetailHeader.d.ts +8 -0
  16. package/dist/components/bizThreadDetail/BizThreadDetailHeader.d.ts.map +1 -0
  17. package/dist/components/bizThreadDetail/BizThreadDetailHeader.js +18 -0
  18. package/dist/components/bizThreadDetail/BizThreadDetailInput.d.ts +9 -0
  19. package/dist/components/bizThreadDetail/BizThreadDetailInput.d.ts.map +1 -0
  20. package/dist/components/bizThreadDetail/BizThreadDetailInput.js +20 -0
  21. package/dist/components/bizThreadDetail/index.d.ts +5 -0
  22. package/dist/components/bizThreadDetail/index.d.ts.map +1 -0
  23. package/dist/components/bizThreadDetail/index.js +2 -0
  24. package/dist/index.d.ts +8 -2
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -1
  27. package/dist/locales/vi/bizInbox.json +7 -0
  28. package/dist/screens/bizMessage/index.d.ts.map +1 -1
  29. package/dist/screens/bizMessage/index.js +37 -12
  30. package/dist/screens/bizThreadDetail/index.d.ts +9 -0
  31. package/dist/screens/bizThreadDetail/index.d.ts.map +1 -0
  32. package/dist/screens/bizThreadDetail/index.js +36 -0
  33. package/dist/store/bizConversation.d.ts +12 -0
  34. package/dist/store/bizConversation.d.ts.map +1 -0
  35. package/dist/store/bizConversation.js +22 -0
  36. package/dist/styles/global.css +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/dist/types/biz.d.ts +20 -17
  39. package/dist/types/biz.d.ts.map +1 -1
  40. package/dist/types/biz.js +17 -1
  41. package/dist/utils/bizConversation.d.ts +11 -0
  42. package/dist/utils/bizConversation.d.ts.map +1 -0
  43. package/dist/utils/bizConversation.js +65 -0
  44. package/package.json +126 -125
@@ -1,33 +1,36 @@
1
1
  import { DChatApplicationType } from "./chat";
2
- export type BizChatType = "SINGLE" | "GROUP";
3
- export type BizChatCategory = "BIZ_BIZ" | "BIZ_MALL" | "GROUP" | "BIZ_BOT_PDP";
4
- export interface BizConversationPeerUser {
5
- userId: string;
6
- username: string | null;
7
- fullName: string | null;
8
- avatar: string | null;
2
+ import type { IPulledRawMessage } from "./dto";
3
+ export declare enum BizChatType {
4
+ SINGLE = "SINGLE",
5
+ GROUP = "GROUP"
9
6
  }
10
- export interface BizConversationPeerGroup {
11
- groupId: string;
12
- name: string | null;
13
- avatar: string | null;
14
- memberCount: number;
7
+ export declare enum BizChatCategory {
8
+ BIZ_BIZ = "BIZ_BIZ",
9
+ BIZ_MALL = "BIZ_MALL",
10
+ GROUP = "GROUP",
11
+ BIZ_BOT_PDP = "BIZ_BOT_PDP"
12
+ }
13
+ export declare enum BizPeerType {
14
+ USER = "USER",
15
+ GROUP = "GROUP"
15
16
  }
16
17
  export interface BizConversationPeer {
17
- type: BizChatType;
18
- user: BizConversationPeerUser | null;
19
- group: BizConversationPeerGroup | null;
18
+ id: string | null;
19
+ username: string | null;
20
+ fullName: string | null;
21
+ avatar: string | null;
22
+ type: BizPeerType;
20
23
  }
21
24
  export interface BizConversationItem {
22
25
  conversationId: string;
23
26
  chatCategory: BizChatCategory;
24
27
  chatType: BizChatType;
25
28
  applicationType: DChatApplicationType;
26
- latestMessageAt: string | null;
27
- memberRole: string | null;
29
+ memberRole: string;
28
30
  pinnedAt: string | null;
29
31
  isMuted: boolean;
30
32
  peer: BizConversationPeer;
33
+ lastMessage: IPulledRawMessage | null;
31
34
  }
32
35
  export interface BizConversationMember {
33
36
  userId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"biz.d.ts","sourceRoot":"","sources":["../../src/types/biz.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,UAAU,GACV,OAAO,GACP,aAAa,CAAC;AAElB,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACrC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,eAAe,EAAE,oBAAoB,CAAC;IACtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,eAAe,EAAE,oBAAoB,CAAC;IACtC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC"}
1
+ {"version":3,"file":"biz.d.ts","sourceRoot":"","sources":["../../src/types/biz.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,WAAW,gBAAgB;CAC5B;AAED,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;CACnB;AACD,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,eAAe,EAAE,oBAAoB,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,eAAe,EAAE,oBAAoB,CAAC;IACtC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC"}
package/dist/types/biz.js CHANGED
@@ -1 +1,17 @@
1
- export {};
1
+ export var BizChatType;
2
+ (function (BizChatType) {
3
+ BizChatType["SINGLE"] = "SINGLE";
4
+ BizChatType["GROUP"] = "GROUP";
5
+ })(BizChatType || (BizChatType = {}));
6
+ export var BizChatCategory;
7
+ (function (BizChatCategory) {
8
+ BizChatCategory["BIZ_BIZ"] = "BIZ_BIZ";
9
+ BizChatCategory["BIZ_MALL"] = "BIZ_MALL";
10
+ BizChatCategory["GROUP"] = "GROUP";
11
+ BizChatCategory["BIZ_BOT_PDP"] = "BIZ_BOT_PDP";
12
+ })(BizChatCategory || (BizChatCategory = {}));
13
+ export var BizPeerType;
14
+ (function (BizPeerType) {
15
+ BizPeerType["USER"] = "USER";
16
+ BizPeerType["GROUP"] = "GROUP";
17
+ })(BizPeerType || (BizPeerType = {}));
@@ -0,0 +1,11 @@
1
+ import type { TFunction } from "i18next";
2
+ import { BizChatCategory, type BizConversationItem } from "../types/biz";
3
+ import { IPulledRawMessage } from "../types/dto";
4
+ export declare const resolveBizDisplayName: (item: BizConversationItem, fallback: string) => string;
5
+ export declare const resolveBizAvatarUrl: (item: BizConversationItem) => string | null;
6
+ export declare const resolveBizBadgeLabel: (chatCategory: BizChatCategory, t: (key: string) => string) => string;
7
+ export declare const resolveBizBadgeColor: (chatCategory: BizChatCategory) => "" | "bg-[#F28504]" | "bg-[#59ABFF]";
8
+ export declare const isBizGroupChat: (item: BizConversationItem) => boolean;
9
+ export declare const resolveBizLastMessagePreview: (lastMessage: IPulledRawMessage | null, t?: TFunction) => string;
10
+ export declare const resolveBizLastMessageTime: (lastMessage: IPulledRawMessage | null) => number | null;
11
+ //# sourceMappingURL=bizConversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bizConversation.d.ts","sourceRoot":"","sources":["../../src/utils/bizConversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EACL,eAAe,EAGf,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAkBjD,eAAO,MAAM,qBAAqB,GAChC,MAAM,mBAAmB,EACzB,UAAU,MAAM,KACf,MAMF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,mBAAmB,KAAG,MAAM,GAAG,IACvD,CAAC;AAEnB,eAAO,MAAM,oBAAoB,GAC/B,cAAc,eAAe,EAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB,MAUF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,cAAc,eAAe,yCAIjE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,mBAAmB,YAGlB,CAAC;AAEvC,eAAO,MAAM,4BAA4B,GACvC,aAAa,iBAAiB,GAAG,IAAI,EACrC,IAAI,SAAS,WAqBd,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,aAAa,iBAAiB,GAAG,IAAI,kBACL,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { BizChatCategory, BizChatType, BizPeerType, } from "../types/biz";
2
+ import { generateContentBasedOnMessageType } from "./common";
3
+ import { transformPulledMessage } from "./messageTransform";
4
+ const stripHtml = (html) => html
5
+ .replace(/<[^>]*>/g, " ")
6
+ .replace(/\s+/g, " ")
7
+ .trim();
8
+ const parseRichTextFromEx = (ex) => {
9
+ var _a, _b;
10
+ if (!ex)
11
+ return "";
12
+ try {
13
+ const parsed = JSON.parse(ex);
14
+ const content = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.messageInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.content;
15
+ return content ? stripHtml(content) : "";
16
+ }
17
+ catch (_c) {
18
+ return "";
19
+ }
20
+ };
21
+ export const resolveBizDisplayName = (item, fallback) => {
22
+ var _a, _b;
23
+ const fullName = (_a = item.peer.fullName) === null || _a === void 0 ? void 0 : _a.trim();
24
+ if (fullName)
25
+ return fullName;
26
+ const username = (_b = item.peer.username) === null || _b === void 0 ? void 0 : _b.trim();
27
+ if (username)
28
+ return username;
29
+ return fallback;
30
+ };
31
+ export const resolveBizAvatarUrl = (item) => item.peer.avatar;
32
+ export const resolveBizBadgeLabel = (chatCategory, t) => {
33
+ if (chatCategory === BizChatCategory.BIZ_MALL) {
34
+ return t("thread_card.badge.mall");
35
+ }
36
+ if (chatCategory === BizChatCategory.BIZ_BOT_PDP) {
37
+ return t("thread_card.badge.bot");
38
+ }
39
+ return "";
40
+ };
41
+ export const resolveBizBadgeColor = (chatCategory) => {
42
+ if (chatCategory === BizChatCategory.BIZ_MALL)
43
+ return "bg-[#F28504]";
44
+ if (chatCategory === BizChatCategory.BIZ_BOT_PDP)
45
+ return "bg-[#59ABFF]";
46
+ return "";
47
+ };
48
+ export const isBizGroupChat = (item) => item.chatCategory === BizChatCategory.GROUP ||
49
+ item.chatType === BizChatType.GROUP ||
50
+ item.peer.type === BizPeerType.GROUP;
51
+ export const resolveBizLastMessagePreview = (lastMessage, t) => {
52
+ var _a, _b, _c;
53
+ if (!lastMessage)
54
+ return "";
55
+ const richText = parseRichTextFromEx(lastMessage.ex);
56
+ if (richText)
57
+ return richText;
58
+ const transformed = transformPulledMessage(lastMessage);
59
+ const plainText = ((_a = transformed.textElem) === null || _a === void 0 ? void 0 : _a.content) ||
60
+ ((_b = transformed.quoteElem) === null || _b === void 0 ? void 0 : _b.text) ||
61
+ ((_c = transformed.logTextElem) === null || _c === void 0 ? void 0 : _c.content) ||
62
+ "";
63
+ return generateContentBasedOnMessageType(lastMessage.contentType, plainText, t);
64
+ };
65
+ export const resolveBizLastMessageTime = (lastMessage) => { var _a; return (_a = lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.sendTime) !== null && _a !== void 0 ? _a : null; };
package/package.json CHANGED
@@ -1,125 +1,126 @@
1
- {
2
- "name": "@droppii-org/chat-sdk",
3
- "version": "0.1.23",
4
- "description": "Droppii React Chat SDK",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "import": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
11
- },
12
- "./components/*": {
13
- "import": "./dist/components/*.js",
14
- "types": "./dist/components/*.d.ts"
15
- },
16
- "./hooks/*": {
17
- "import": "./dist/hooks/*.js",
18
- "types": "./dist/hooks/*.d.ts"
19
- },
20
- "./context/*": {
21
- "import": "./dist/context/*.js",
22
- "types": "./dist/context/*.d.ts"
23
- },
24
- "./types/*": {
25
- "import": "./dist/types/*.js",
26
- "types": "./dist/types/*.d.ts"
27
- },
28
- "./screens/*": {
29
- "import": "./dist/screens/*.js",
30
- "types": "./dist/screens/*.d.ts"
31
- },
32
- "./assets/*": {
33
- "import": "./dist/assets/*.js",
34
- "types": "./dist/assets/*.d.ts"
35
- },
36
- "./constants/*": {
37
- "import": "./dist/constants/*.js",
38
- "types": "./dist/constants/*.d.ts"
39
- },
40
- "./layout/*": {
41
- "import": "./dist/layout/*.js",
42
- "types": "./dist/layout/*.d.ts"
43
- },
44
- "./utils/*": {
45
- "import": "./dist/utils/*.js",
46
- "types": "./dist/utils/*.d.ts"
47
- },
48
- "./services/*": {
49
- "import": "./dist/services/*.js",
50
- "types": "./dist/services/*.d.ts"
51
- },
52
- "./locales/*": "./dist/locales/*",
53
- "./styles/global.css": "./dist/styles/global.css"
54
- },
55
- "files": [
56
- "dist"
57
- ],
58
- "keywords": [
59
- "chat",
60
- "sdk",
61
- "react",
62
- "messenger-style"
63
- ],
64
- "author": "Garru",
65
- "license": "MIT",
66
- "publishConfig": {
67
- "access": "public"
68
- },
69
- "dependencies": {
70
- "@ant-design/icons": "^6.0.0",
71
- "@lexical/code": "^0.34.0",
72
- "@lexical/html": "^0.34.0",
73
- "@lexical/link": "^0.34.0",
74
- "@lexical/list": "^0.34.0",
75
- "@lexical/react": "^0.34.0",
76
- "@lexical/rich-text": "^0.34.0",
77
- "@openim/wasm-client-sdk": "3.8.3-patch.10",
78
- "@tailwindcss/postcss": "^4.1.12",
79
- "@tanstack/react-query": "^5.85.5",
80
- "ahooks": "^3.9.4",
81
- "antd": "^5.27.0",
82
- "axios": "^1.11.0",
83
- "clsx": "^2.0.0",
84
- "dayjs": "^1.11.13",
85
- "dompurify": "^3.3.1",
86
- "i18next": "^25.5.2",
87
- "jwt-decode": "^4.0.0",
88
- "lexical": "^0.34.0",
89
- "lodash": "^4.17.21",
90
- "lucide-react": "^0.263.1",
91
- "mitt": "^3.0.1",
92
- "postcss": "^8.5.6",
93
- "query-string": "^9.3.1",
94
- "react-i18next": "^15.7.3",
95
- "react-icomoon": "^2.6.1",
96
- "react-infinite-scroll-component": "^6.1.0",
97
- "react-sticky-box": "^2.0.5",
98
- "react-virtuoso": "^4.14.0",
99
- "tailwind-merge": "^2.0.0",
100
- "tailwindcss": "^3.3.0",
101
- "uuid": "^11.1.0",
102
- "zustand": "^5.0.7"
103
- },
104
- "peerDependencies": {
105
- "react": "^18.0.0",
106
- "react-dom": "^18.0.0"
107
- },
108
- "devDependencies": {
109
- "@types/dompurify": "^3.2.0",
110
- "@types/lodash": "^4.17.20",
111
- "@types/node": "^20.0.0",
112
- "@types/react": "^18.2.37",
113
- "@types/react-dom": "^18.2.15",
114
- "shx": "^0.4.0",
115
- "typescript": "^5.2.2"
116
- },
117
- "scripts": {
118
- "build": "pnpm build:css && tsc -p tsconfig.build.json && pnpm copy-assets",
119
- "build:css": "tailwindcss -i ./src/styles/global.css -o ./dist/styles/global.css --minify",
120
- "dev": "tsc --noEmit --watch",
121
- "lint": "eslint src/",
122
- "type-check": "tsc --noEmit",
123
- "copy-assets": "shx cp -r src/assets dist && shx cp -r src/locales dist"
124
- }
125
- }
1
+ {
2
+ "name": "@droppii-org/chat-sdk",
3
+ "version": "0.1.24",
4
+ "description": "Droppii React Chat SDK",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./components/*": {
13
+ "import": "./dist/components/*.js",
14
+ "types": "./dist/components/*.d.ts"
15
+ },
16
+ "./hooks/*": {
17
+ "import": "./dist/hooks/*.js",
18
+ "types": "./dist/hooks/*.d.ts"
19
+ },
20
+ "./context/*": {
21
+ "import": "./dist/context/*.js",
22
+ "types": "./dist/context/*.d.ts"
23
+ },
24
+ "./types/*": {
25
+ "import": "./dist/types/*.js",
26
+ "types": "./dist/types/*.d.ts"
27
+ },
28
+ "./screens/*": {
29
+ "import": "./dist/screens/*.js",
30
+ "types": "./dist/screens/*.d.ts"
31
+ },
32
+ "./assets/*": {
33
+ "import": "./dist/assets/*.js",
34
+ "types": "./dist/assets/*.d.ts"
35
+ },
36
+ "./constants/*": {
37
+ "import": "./dist/constants/*.js",
38
+ "types": "./dist/constants/*.d.ts"
39
+ },
40
+ "./layout/*": {
41
+ "import": "./dist/layout/*.js",
42
+ "types": "./dist/layout/*.d.ts"
43
+ },
44
+ "./utils/*": {
45
+ "import": "./dist/utils/*.js",
46
+ "types": "./dist/utils/*.d.ts"
47
+ },
48
+ "./services/*": {
49
+ "import": "./dist/services/*.js",
50
+ "types": "./dist/services/*.d.ts"
51
+ },
52
+ "./locales/*": "./dist/locales/*",
53
+ "./styles/global.css": "./dist/styles/global.css"
54
+ },
55
+ "files": [
56
+ "dist"
57
+ ],
58
+ "scripts": {
59
+ "build": "pnpm build:css && tsc -p tsconfig.build.json && pnpm copy-assets",
60
+ "build:css": "tailwindcss -i ./src/styles/global.css -o ./dist/styles/global.css --minify",
61
+ "dev": "tsc --noEmit --watch",
62
+ "lint": "eslint src/",
63
+ "type-check": "tsc --noEmit",
64
+ "prepublishOnly": "pnpm build",
65
+ "copy-assets": "shx cp -r src/assets dist && shx cp -r src/locales dist"
66
+ },
67
+ "keywords": [
68
+ "chat",
69
+ "sdk",
70
+ "react",
71
+ "messenger-style"
72
+ ],
73
+ "author": "Garru",
74
+ "license": "MIT",
75
+ "publishConfig": {
76
+ "access": "public"
77
+ },
78
+ "dependencies": {
79
+ "@ant-design/icons": "^6.0.0",
80
+ "@lexical/code": "^0.34.0",
81
+ "@lexical/html": "^0.34.0",
82
+ "@lexical/link": "^0.34.0",
83
+ "@lexical/list": "^0.34.0",
84
+ "@lexical/react": "^0.34.0",
85
+ "@lexical/rich-text": "^0.34.0",
86
+ "@openim/wasm-client-sdk": "3.8.3-patch.10",
87
+ "@tailwindcss/postcss": "^4.1.12",
88
+ "@tanstack/react-query": "^5.85.5",
89
+ "ahooks": "^3.9.4",
90
+ "antd": "^5.27.0",
91
+ "axios": "^1.11.0",
92
+ "clsx": "^2.0.0",
93
+ "dayjs": "^1.11.13",
94
+ "dompurify": "^3.3.1",
95
+ "i18next": "^25.5.2",
96
+ "jwt-decode": "^4.0.0",
97
+ "lexical": "^0.34.0",
98
+ "lodash": "^4.17.21",
99
+ "lucide-react": "^0.263.1",
100
+ "mitt": "^3.0.1",
101
+ "postcss": "^8.5.6",
102
+ "query-string": "^9.3.1",
103
+ "react-i18next": "^15.7.3",
104
+ "react-icomoon": "^2.6.1",
105
+ "react-infinite-scroll-component": "^6.1.0",
106
+ "react-sticky-box": "^2.0.5",
107
+ "react-virtuoso": "^4.14.0",
108
+ "tailwind-merge": "^2.0.0",
109
+ "tailwindcss": "^3.3.0",
110
+ "uuid": "^11.1.0",
111
+ "zustand": "^5.0.7"
112
+ },
113
+ "peerDependencies": {
114
+ "react": "^18.0.0",
115
+ "react-dom": "^18.0.0"
116
+ },
117
+ "devDependencies": {
118
+ "@types/dompurify": "^3.2.0",
119
+ "@types/lodash": "^4.17.20",
120
+ "@types/node": "^20.0.0",
121
+ "@types/react": "^18.2.37",
122
+ "@types/react-dom": "^18.2.15",
123
+ "shx": "^0.4.0",
124
+ "typescript": "^5.2.2"
125
+ }
126
+ }