@mobilon-dev/chotto 0.3.99 → 0.3.100
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/dist/chotto.css +1 -1
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +15 -15
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +1 -1
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -65
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +1 -1
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +150 -150
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +79 -78
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +42 -42
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +68 -68
- package/dist/functions/renderAppleEmojis.js +120 -91
- package/dist/hooks/messages/useMessageLinks.js +15 -15
- package/dist/hooks/useEmojiNative.js +24 -12
- package/dist/node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js +581 -555
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +21 -2
- package/dist/types/functions/renderAppleEmojis.d.ts +13 -10
- package/dist/types/hooks/useEmojiNative.d.ts +5 -2
- package/package.json +2 -2
package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10
10
|
validator: (value: string) => boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* true — системные эмодзи; false —
|
|
13
|
+
* true — системные эмодзи; false — картинки в пикере, зеркале ввода и ленте.
|
|
14
14
|
* Значение пишется в общий store чата (useEmojiNative).
|
|
15
15
|
*/
|
|
16
16
|
native: {
|
|
@@ -24,6 +24,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Базовый URL PNG-картинок эмодзи (без слэша в конце).
|
|
29
|
+
* При native=false используется пикером, зеркалом ввода, лентой и реакциями.
|
|
30
|
+
* Пустая строка — Apple CDN по умолчанию.
|
|
31
|
+
*/
|
|
32
|
+
emojiSrc: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
27
36
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
37
|
state: {
|
|
29
38
|
type: StringConstructor;
|
|
@@ -35,7 +44,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
35
44
|
validator: (value: string) => boolean;
|
|
36
45
|
};
|
|
37
46
|
/**
|
|
38
|
-
* true — системные эмодзи; false —
|
|
47
|
+
* true — системные эмодзи; false — картинки в пикере, зеркале ввода и ленте.
|
|
39
48
|
* Значение пишется в общий store чата (useEmojiNative).
|
|
40
49
|
*/
|
|
41
50
|
native: {
|
|
@@ -49,8 +58,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
49
58
|
type: BooleanConstructor;
|
|
50
59
|
default: boolean;
|
|
51
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Базовый URL PNG-картинок эмодзи (без слэша в конце).
|
|
63
|
+
* При native=false используется пикером, зеркалом ввода, лентой и реакциями.
|
|
64
|
+
* Пустая строка — Apple CDN по умолчанию.
|
|
65
|
+
*/
|
|
66
|
+
emojiSrc: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
52
70
|
}>> & Readonly<{}>, {
|
|
53
71
|
native: boolean;
|
|
72
|
+
emojiSrc: string;
|
|
54
73
|
mode: string;
|
|
55
74
|
state: string;
|
|
56
75
|
displayRecent: boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Рендер Unicode
|
|
2
|
+
* Рендер Unicode-эмодзи картинками с CDN emoji-datasource
|
|
3
|
+
* (Apple по умолчанию; тот же URL, что vue3-emoji-picker-ru при native=false).
|
|
3
4
|
*/
|
|
4
5
|
export declare const APPLE_EMOJI_CDN = "https://cdn.jsdelivr.net/npm/emoji-datasource-apple@6.0.1/img/apple/64";
|
|
6
|
+
export declare function normalizeEmojiCdn(cdn?: string): string;
|
|
5
7
|
/** Ближайшая граница графемы (чтобы caret не попадал внутрь surrogate pair / ZWJ). */
|
|
6
8
|
export declare function snapIndexToGrapheme(text: string, index: number, prefer?: 'before' | 'after' | 'nearest'): number;
|
|
7
9
|
export declare function nextGraphemeIndex(text: string, index: number): number;
|
|
@@ -10,23 +12,24 @@ export declare function previousGraphemeIndex(text: string, index: number): numb
|
|
|
10
12
|
export declare function emojiToAppleCode(emoji: string, options?: {
|
|
11
13
|
stripVariationSelectors?: boolean;
|
|
12
14
|
}): string;
|
|
13
|
-
export declare function
|
|
15
|
+
export declare function hasAppleEmojiImage(emoji: string, cdn?: string): boolean;
|
|
16
|
+
export declare function getAppleEmojiUrl(emoji: string, cdn?: string): string;
|
|
14
17
|
/** Альтернативный URL, если основной codepoint не совпал с именем файла в emoji-datasource */
|
|
15
|
-
export declare function getAppleEmojiFallbackUrl(emoji: string): string | null;
|
|
18
|
+
export declare function getAppleEmojiFallbackUrl(emoji: string, cdn?: string): string | null;
|
|
16
19
|
/**
|
|
17
20
|
* Слот: скрытый системный эмодзи задаёт ширину (как в textarea),
|
|
18
|
-
* поверх —
|
|
21
|
+
* поверх — картинка с CDN. Так caret совпадает с картинками.
|
|
19
22
|
*/
|
|
20
|
-
export declare function createAppleEmojiImgHtml(emoji: string): string;
|
|
21
|
-
export declare function createAppleEmojiSlotElement(emoji: string): HTMLElement;
|
|
23
|
+
export declare function createAppleEmojiImgHtml(emoji: string, cdn?: string): string;
|
|
24
|
+
export declare function createAppleEmojiSlotElement(emoji: string, cdn?: string): HTMLElement;
|
|
22
25
|
/**
|
|
23
|
-
* Plain text → HTML с
|
|
26
|
+
* Plain text → HTML с картинками эмодзи (для зеркала инпута).
|
|
24
27
|
* Опционально подсвечивает выделенный диапазон (индексы как в textarea: UTF-16).
|
|
25
28
|
*/
|
|
26
29
|
export declare function textToAppleEmojiHtml(text: string, selection?: {
|
|
27
30
|
start: number;
|
|
28
31
|
end: number;
|
|
29
|
-
} | null): string;
|
|
32
|
+
} | null, cdn?: string): string;
|
|
30
33
|
export declare function textContainsEmoji(text: string): boolean;
|
|
31
|
-
/** HTML → HTML,
|
|
32
|
-
export declare function replaceEmojisInHtml(html: string): string;
|
|
34
|
+
/** HTML → HTML, эмодзи в текстовых узлах заменяются на img */
|
|
35
|
+
export declare function replaceEmojisInHtml(html: string, cdn?: string): string;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Общий флаг native/3D-эмодзи для инстанса чата (ключ — chatAppId).
|
|
3
|
-
* Источник правды —
|
|
2
|
+
* Общий флаг native/3D-эмодзи и CDN картинок для инстанса чата (ключ — chatAppId).
|
|
3
|
+
* Источник правды — props `native` и `emojiSrc` у ButtonEmojiPicker.
|
|
4
4
|
*/
|
|
5
5
|
export declare const useEmojiNative: (outId: string) => {
|
|
6
6
|
isNative: import("vue").ComputedRef<boolean>;
|
|
7
|
+
emojiSrc: import("vue").ComputedRef<string>;
|
|
7
8
|
getNative: () => boolean;
|
|
9
|
+
getEmojiSrc: () => string;
|
|
8
10
|
setNative: (native: boolean) => void;
|
|
11
|
+
setEmojiSrc: (src: string) => void;
|
|
9
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilon-dev/chotto",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.100",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"primeicons": "^7.0.0",
|
|
44
44
|
"sass-embedded": "^1.96.0",
|
|
45
45
|
"vue": "^3.5.25",
|
|
46
|
-
"vue3-emoji-picker-ru": "^1.1.
|
|
46
|
+
"vue3-emoji-picker-ru": "^1.1.11"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@chromatic-com/storybook": "^4.1.3",
|