@medipha/chat 1.0.23 β†’ 1.0.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.
@@ -103,6 +103,7 @@ export interface MessageReplyPreview {
103
103
  type: MessageType;
104
104
  content: MessageContent | null;
105
105
  attachmentName: string | null;
106
+ attachmentUrl?: string | null;
106
107
  removedAt?: string | null;
107
108
  removedById?: string | null;
108
109
  }
@@ -249,7 +250,12 @@ export declare const toMessageContent: (editorJson: unknown) => MessageContent |
249
250
  export declare const normalizeMessageContent: (content: unknown) => MessageContent | null;
250
251
  export declare const hasMessageContent: (content: MessageContent | null | undefined) => boolean;
251
252
  export declare const getMessageContentParts: (message: unknown) => MessageContentPart[];
253
+ export declare const MAX_MESSAGE_INPUT_LENGTH = 5000;
252
254
  export declare const getMessageContentText: (message: unknown) => string;
255
+ /** True for a TEXT message whose entire content is exactly one emoji (a plain "Hi" or a
256
+ * multi-emoji "πŸ˜€πŸ˜€" doesn't count) β€” Zalo-style, these render at a much larger size with
257
+ * no bubble chrome around them. */
258
+ export declare const isSingleEmojiMessage: (message: ChatMessage) => boolean;
253
259
  /** Plain text for a SYSTEM message. Its mention nodes only carry the actor/target name, so
254
260
  * they drop the "@" a composed mention shows β€” the same treatment renderSystemMessageContent
255
261
  * already gives the timeline, since a leading "@" reads wrong inside a log sentence. Keeping
@@ -0,0 +1,6 @@
1
+ /** Lowercases and strips diacritics (accent marks) so search matching is accent-insensitive
2
+ * β€” typing "khong dau" still finds "KhΓ΄ng dαΊ₯u", the way Zalo's own search does. NFD
3
+ * decomposition splits an accented vowel into its base letter + a combining mark we then
4
+ * drop; Vietnamese "Δ‘" is a distinct letter (not a marked "d"), so it needs its own
5
+ * replace β€” NFD leaves it untouched. */
6
+ export declare function normalizeForSearch(text: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipha/chat",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Embeddable Medic-ERP chat module for React applications.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -35,6 +35,8 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@ant-design/icons": "^6.3.2",
38
+ "@emoji-mart/data": "^1.2.1",
39
+ "@emoji-mart/react": "^1.1.1",
38
40
  "@lottiefiles/dotlottie-react": "^0.19.14",
39
41
  "@tiptap/core": "^3.29.2",
40
42
  "@tiptap/extension-color": "^3.29.2",
@@ -43,18 +45,19 @@
43
45
  "@tiptap/extension-placeholder": "^3.30.1",
44
46
  "@tiptap/extension-text-style": "^3.29.2",
45
47
  "@tiptap/extension-underline": "^3.29.2",
48
+ "@tiptap/extensions": "^3.30.1",
46
49
  "@tiptap/pm": "^3.29.2",
47
50
  "@tiptap/react": "^3.29.2",
48
51
  "@tiptap/starter-kit": "^3.29.2",
49
52
  "@tiptap/suggestion": "^3.29.2",
50
53
  "dayjs": "^1.11.21",
51
- "emoji-picker-react": "^4.19.1",
54
+ "emoji-mart": "^5.6.0",
52
55
  "rc-picker": "^2.6.11",
53
56
  "react-virtuoso": "^4.18.10",
54
57
  "uuid": "^11.0.5",
55
58
  "yet-another-react-lightbox": "^3.32.2",
56
59
  "zustand": "^5.0.8",
57
- "@medipha/chat-core": "1.0.9"
60
+ "@medipha/chat-core": "1.0.10"
58
61
  },
59
62
  "devDependencies": {
60
63
  "@eslint/js": "^10.0.1",