@igeekfan/fluent-emoji-ms-core 0.1.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/LICENSE +21 -0
- package/dist/data/emoji-categories.d.ts +6 -0
- package/dist/data/emoji-list.d.ts +3 -0
- package/dist/data/emoji-presets.d.ts +4 -0
- package/dist/data/emoji-styles.d.ts +4 -0
- package/dist/i18n.d.ts +3 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +13374 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/types.d.ts +75 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 igeekfan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EmojiCategory, EmojiLocale } from '../types';
|
|
2
|
+
export declare const emojiCategories: EmojiCategory[];
|
|
3
|
+
export declare const detailedEmojiCategories: EmojiCategory[];
|
|
4
|
+
export declare function getEmojiCategories(locale?: EmojiLocale): EmojiCategory[];
|
|
5
|
+
export declare function getSubcategories(): never[];
|
|
6
|
+
export declare function getMainCategory(category: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EmojiLocale, EmojiPreset, EmojiPresetKey } from '../types';
|
|
2
|
+
export declare const defaultEmojiPreset: EmojiPresetKey;
|
|
3
|
+
export declare const emojiPresets: Record<EmojiPresetKey, EmojiPreset>;
|
|
4
|
+
export declare function getEmojiPresets(locale?: EmojiLocale): Record<EmojiPresetKey, EmojiPreset>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EmojiLocale, StyleOption } from '../types';
|
|
2
|
+
export declare const emojiStyles: StyleOption[];
|
|
3
|
+
export declare function getEmojiStyles(locale?: EmojiLocale): StyleOption[];
|
|
4
|
+
export declare function getStyleName(styleValue: string, locale?: EmojiLocale): string;
|
package/dist/i18n.d.ts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getEmojiCategories, emojiCategories } from './data/emoji-categories';
|
|
2
|
+
import { emojiList } from './data/emoji-list';
|
|
3
|
+
import { defaultEmojiPreset, emojiPresets, getEmojiPresets } from './data/emoji-presets';
|
|
4
|
+
import { emojiStyles, getEmojiStyles, getStyleName } from './data/emoji-styles';
|
|
5
|
+
import { defaultEmojiLocale } from './i18n';
|
|
6
|
+
import type { EmojiCategory, EmojiCollectionOptions, EmojiItem, EmojiItemWithStyle, EmojiLocale, EmojiLocaleMessages, EmojiPreset, EmojiPresetKey, EmojiPickerState, EmojiPickerStateStore, EmojiQueryOptions, EmojiQueryResult, StyleOption } from './types';
|
|
7
|
+
export type { EmojiCategory, EmojiCollectionOptions, EmojiItem, EmojiItemWithStyle, EmojiLocale, EmojiLocaleMessages, EmojiPreset, EmojiPresetKey, EmojiPickerState, EmojiPickerStateStore, EmojiQueryOptions, EmojiQueryResult, StyleOption };
|
|
8
|
+
export declare const DEFAULT_BASE_URL = "https://cdn.jsdelivr.net/npm/fluentui-emoji@1.1.1";
|
|
9
|
+
export declare const DEFAULT_RENDER_BATCH_SIZE = 240;
|
|
10
|
+
export declare const defaultCategories: string[];
|
|
11
|
+
type IndexedEmoji = EmojiItem & {
|
|
12
|
+
searchText: string;
|
|
13
|
+
};
|
|
14
|
+
interface EmojiIndex {
|
|
15
|
+
all: IndexedEmoji[];
|
|
16
|
+
byCategory: Map<string, IndexedEmoji[]>;
|
|
17
|
+
byName: Map<string, IndexedEmoji>;
|
|
18
|
+
usedCategories: Set<string>;
|
|
19
|
+
}
|
|
20
|
+
export declare function getEmojiIndex(): EmojiIndex;
|
|
21
|
+
export declare function queryEmojis(options?: EmojiQueryOptions): EmojiQueryResult;
|
|
22
|
+
export declare function filterEmojisByCategories(categories?: string[]): EmojiItem[];
|
|
23
|
+
export declare function filterCategories(optionsOrCategories?: EmojiCollectionOptions | string[], locale?: EmojiLocale): EmojiCategory[];
|
|
24
|
+
export declare function getEmojiMessages(locale?: EmojiLocale): EmojiLocaleMessages;
|
|
25
|
+
export declare function getEmojiPreset(preset: EmojiPresetKey, locale?: EmojiLocale): EmojiPreset;
|
|
26
|
+
export declare function buildEmojiImageUrl(baseUrl: string, style: string, path: string): string;
|
|
27
|
+
export declare function createEmojiPickerState(initialState?: Partial<EmojiPickerState>): EmojiPickerStateStore;
|
|
28
|
+
export { defaultEmojiLocale, defaultEmojiPreset, emojiCategories, emojiList, emojiPresets, emojiStyles, getEmojiCategories, getEmojiPresets, getEmojiStyles, getStyleName };
|
|
29
|
+
export declare const commonEmojis: EmojiItem[];
|
|
30
|
+
export declare const categories: EmojiCategory[];
|