slack-blocks-to-jsx 0.4.5 → 0.4.7

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/index.d.mts CHANGED
@@ -13,6 +13,11 @@ type UserGroup = {
13
13
  id: string;
14
14
  name: string;
15
15
  };
16
+ type Emoji = {
17
+ name: string;
18
+ unicode?: string;
19
+ skin_tone?: 1 | 2 | 3 | 4 | 5 | 6;
20
+ };
16
21
  type Hooks = {
17
22
  user?: (data: User) => ReactNode;
18
23
  channel?: (data: Channel) => ReactNode;
@@ -20,7 +25,13 @@ type Hooks = {
20
25
  atChannel?: () => ReactNode;
21
26
  atEveryone?: () => ReactNode;
22
27
  atHere?: () => ReactNode;
23
- emoji?: (name: string, parse: (name: string) => string) => ReactNode;
28
+ /**
29
+ * The hook to replace emojis with custom components
30
+ * @param data - the emoji object
31
+ * @param parse - fallback function for default emoji parsing
32
+ * @returns the custom emoji component
33
+ */
34
+ emoji?: (data: Emoji, parse: (data: Emoji) => string) => ReactNode;
24
35
  date?: (data: {
25
36
  timestamp: string;
26
37
  format: string;
@@ -1089,7 +1100,18 @@ type RichTextSectionUser = {
1089
1100
  };
1090
1101
  type RichTextSectionEmoji = {
1091
1102
  type: "emoji";
1103
+ /**
1104
+ * Name of the emoji, e.g. smiley, sparkles, grinning_face.
1105
+ */
1092
1106
  name: string;
1107
+ /**
1108
+ * hyphen-delineated list of Unicode code points
1109
+ * */
1110
+ unicode?: string;
1111
+ /**
1112
+ * included only for single-color skintone emojis (not compound emojis)
1113
+ * */
1114
+ skin_tone?: 1 | 2 | 3 | 4 | 5 | 6;
1093
1115
  };
1094
1116
  type RichTextSectionLink = {
1095
1117
  type: "link";
package/dist/index.d.ts CHANGED
@@ -13,6 +13,11 @@ type UserGroup = {
13
13
  id: string;
14
14
  name: string;
15
15
  };
16
+ type Emoji = {
17
+ name: string;
18
+ unicode?: string;
19
+ skin_tone?: 1 | 2 | 3 | 4 | 5 | 6;
20
+ };
16
21
  type Hooks = {
17
22
  user?: (data: User) => ReactNode;
18
23
  channel?: (data: Channel) => ReactNode;
@@ -20,7 +25,13 @@ type Hooks = {
20
25
  atChannel?: () => ReactNode;
21
26
  atEveryone?: () => ReactNode;
22
27
  atHere?: () => ReactNode;
23
- emoji?: (name: string, parse: (name: string) => string) => ReactNode;
28
+ /**
29
+ * The hook to replace emojis with custom components
30
+ * @param data - the emoji object
31
+ * @param parse - fallback function for default emoji parsing
32
+ * @returns the custom emoji component
33
+ */
34
+ emoji?: (data: Emoji, parse: (data: Emoji) => string) => ReactNode;
24
35
  date?: (data: {
25
36
  timestamp: string;
26
37
  format: string;
@@ -1089,7 +1100,18 @@ type RichTextSectionUser = {
1089
1100
  };
1090
1101
  type RichTextSectionEmoji = {
1091
1102
  type: "emoji";
1103
+ /**
1104
+ * Name of the emoji, e.g. smiley, sparkles, grinning_face.
1105
+ */
1092
1106
  name: string;
1107
+ /**
1108
+ * hyphen-delineated list of Unicode code points
1109
+ * */
1110
+ unicode?: string;
1111
+ /**
1112
+ * included only for single-color skintone emojis (not compound emojis)
1113
+ * */
1114
+ skin_tone?: 1 | 2 | 3 | 4 | 5 | 6;
1093
1115
  };
1094
1116
  type RichTextSectionLink = {
1095
1117
  type: "link";