@fibery/ui-kit 1.11.0 → 1.11.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -59,8 +59,9 @@
|
|
|
59
59
|
"react-windowed-select": "5.0.0",
|
|
60
60
|
"screenfull": "6.0.1",
|
|
61
61
|
"ua-parser-js": "0.7.24",
|
|
62
|
-
"@fibery/
|
|
63
|
-
"@fibery/react": "1.0.2"
|
|
62
|
+
"@fibery/emoji-data": "1.1.0",
|
|
63
|
+
"@fibery/react": "1.0.2",
|
|
64
|
+
"@fibery/helpers": "1.0.4"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"react": "^18.2.0",
|
|
@@ -93,8 +94,8 @@
|
|
|
93
94
|
"svgo": "2.8.0",
|
|
94
95
|
"typescript": "5.0.3",
|
|
95
96
|
"unist-util-reduce": "0.2.2",
|
|
96
|
-
"@fibery/
|
|
97
|
-
"@fibery/
|
|
97
|
+
"@fibery/babel-preset": "7.2.0",
|
|
98
|
+
"@fibery/eslint-config": "8.3.0"
|
|
98
99
|
},
|
|
99
100
|
"jest": {
|
|
100
101
|
"testEnvironment": "jsdom",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {Data} from "emoji-mart";
|
|
2
1
|
import {detectEmojiSupportLevel} from "../emoji-support";
|
|
2
|
+
import type {Data} from "emoji-mart";
|
|
3
3
|
|
|
4
4
|
export type EmojiDataProps = {
|
|
5
5
|
native: boolean;
|
|
@@ -15,12 +15,18 @@ let promise: Promise<EmojiDataProps>;
|
|
|
15
15
|
const backgroundImageFn = (set: string) =>
|
|
16
16
|
`https://fibery-ui-public-assets.s3.eu-central-1.amazonaws.com/images/emoji-datasource-${set}-15_0_1-64.png`;
|
|
17
17
|
|
|
18
|
+
export const loadEmojiData = async () => {
|
|
19
|
+
const data = await import("@fibery/emoji-data/data/all.json");
|
|
20
|
+
return data.default;
|
|
21
|
+
};
|
|
22
|
+
|
|
18
23
|
const getAppleDataProps = async (): Promise<EmojiDataProps> => {
|
|
19
|
-
const [level, data] = await Promise.all([detectEmojiSupportLevel(),
|
|
24
|
+
const [level, data] = await Promise.all([detectEmojiSupportLevel(), loadEmojiData()]);
|
|
20
25
|
|
|
21
26
|
return {
|
|
22
|
-
native: level >= 14,
|
|
23
|
-
data
|
|
27
|
+
native: level >= 14,
|
|
28
|
+
// type declarations between @fibery/emoji-data and emoji-mart conflict a bit but they are compatible
|
|
29
|
+
data: data as unknown as Data,
|
|
24
30
|
backgroundImageFn,
|
|
25
31
|
set: "apple",
|
|
26
32
|
sheetColumns: 61,
|
|
@@ -28,11 +34,12 @@ const getAppleDataProps = async (): Promise<EmojiDataProps> => {
|
|
|
28
34
|
};
|
|
29
35
|
};
|
|
30
36
|
const getTwitterDataProps = async (): Promise<EmojiDataProps> => {
|
|
31
|
-
const data = await
|
|
37
|
+
const data = await loadEmojiData();
|
|
32
38
|
|
|
33
39
|
return {
|
|
34
40
|
native: false,
|
|
35
|
-
data
|
|
41
|
+
// type declarations between @fibery/emoji-data and emoji-mart conflict a bit but they are compatible
|
|
42
|
+
data: data as unknown as Data,
|
|
36
43
|
backgroundImageFn,
|
|
37
44
|
set: "twitter",
|
|
38
45
|
sheetColumns: 61,
|
package/src/emoji-mart/data.tsx
DELETED