slack-blocks-to-jsx 0.1.6 → 0.1.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 +145 -8
- package/dist/index.d.ts +145 -8
- package/dist/index.js +238 -46
- package/dist/index.mjs +238 -46
- package/dist/style.css +1 -1
- package/package.json +1 -2
package/dist/index.d.mts
CHANGED
|
@@ -697,6 +697,102 @@ type FilterObject = {
|
|
|
697
697
|
exclude_bot_users?: boolean;
|
|
698
698
|
};
|
|
699
699
|
|
|
700
|
+
type RichTextList = {
|
|
701
|
+
type: "rich_text_list";
|
|
702
|
+
style: "bullet" | "ordered";
|
|
703
|
+
/**
|
|
704
|
+
* The number of spaces to indent this block. It must be a number between 0 and 8.
|
|
705
|
+
*/
|
|
706
|
+
indent?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
707
|
+
offset?: number;
|
|
708
|
+
/**
|
|
709
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
710
|
+
*/
|
|
711
|
+
border?: 0 | 1;
|
|
712
|
+
elements: RichTextSection[];
|
|
713
|
+
};
|
|
714
|
+
type RichTextPreformatted = {
|
|
715
|
+
type: "rich_text_preformatted";
|
|
716
|
+
elements: AnyRichTextSectionElement[];
|
|
717
|
+
/**
|
|
718
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
719
|
+
*/
|
|
720
|
+
border?: 0 | 1;
|
|
721
|
+
};
|
|
722
|
+
type RichTextQuote = {
|
|
723
|
+
type: "rich_text_quote";
|
|
724
|
+
elements: AnyRichTextSectionElement[];
|
|
725
|
+
/**
|
|
726
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
727
|
+
*/
|
|
728
|
+
border?: 0 | 1;
|
|
729
|
+
};
|
|
730
|
+
type RichTextSection = {
|
|
731
|
+
type: "rich_text_section";
|
|
732
|
+
elements: AnyRichTextSectionElement[];
|
|
733
|
+
};
|
|
734
|
+
type AnyRichTextBlockElement = RichTextList | RichTextPreformatted | RichTextQuote | RichTextSection;
|
|
735
|
+
type AnyRichTextSectionElement = RichTextSectionText | RichTextSectionChannel | RichTextSectionUser | RichTextSectionEmoji | RichTextSectionLink | RichTextSectionTeam | RichTextSectionUsergroup | RichTextSectionDate | RichTextSectionBroadcast | RichTextSectionColor;
|
|
736
|
+
interface RichTextSectionElement {
|
|
737
|
+
type: "text" | "channel" | "user" | "emoji" | "link" | "team" | "usergroup" | "date" | "broadcast" | "color";
|
|
738
|
+
style?: RichTextSectionElementStyle;
|
|
739
|
+
}
|
|
740
|
+
interface RichTextSectionText extends RichTextSectionElement {
|
|
741
|
+
type: "text";
|
|
742
|
+
text: string;
|
|
743
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
744
|
+
}
|
|
745
|
+
interface RichTextSectionChannel extends RichTextSectionElement {
|
|
746
|
+
type: "channel";
|
|
747
|
+
channel_id: string;
|
|
748
|
+
}
|
|
749
|
+
interface RichTextSectionUser extends RichTextSectionElement {
|
|
750
|
+
type: "user";
|
|
751
|
+
user_id: string;
|
|
752
|
+
}
|
|
753
|
+
interface RichTextSectionEmoji extends RichTextSectionElement {
|
|
754
|
+
type: "emoji";
|
|
755
|
+
name: string;
|
|
756
|
+
skin_tone?: number;
|
|
757
|
+
unicode?: string;
|
|
758
|
+
}
|
|
759
|
+
interface RichTextSectionLink extends RichTextSectionElement {
|
|
760
|
+
type: "link";
|
|
761
|
+
url: string;
|
|
762
|
+
text: string;
|
|
763
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
764
|
+
}
|
|
765
|
+
interface RichTextSectionTeam extends RichTextSectionElement {
|
|
766
|
+
type: "team";
|
|
767
|
+
team_id: string;
|
|
768
|
+
}
|
|
769
|
+
interface RichTextSectionUsergroup extends RichTextSectionElement {
|
|
770
|
+
type: "usergroup";
|
|
771
|
+
usergroup_id: string;
|
|
772
|
+
}
|
|
773
|
+
interface RichTextSectionDate extends RichTextSectionElement {
|
|
774
|
+
type: "date";
|
|
775
|
+
timestamp: number;
|
|
776
|
+
format: string;
|
|
777
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
778
|
+
}
|
|
779
|
+
interface RichTextSectionBroadcast extends RichTextSectionElement {
|
|
780
|
+
type: "broadcast";
|
|
781
|
+
range: "channel" | "here" | "everyone";
|
|
782
|
+
}
|
|
783
|
+
interface RichTextSectionColor extends RichTextSectionElement {
|
|
784
|
+
type: "color";
|
|
785
|
+
value: string;
|
|
786
|
+
}
|
|
787
|
+
interface RichTextSectionElementStyle {
|
|
788
|
+
bold?: boolean;
|
|
789
|
+
italic?: boolean;
|
|
790
|
+
strike?: boolean;
|
|
791
|
+
}
|
|
792
|
+
interface RichTextSectionElementStyleWithCode extends RichTextSectionElementStyle {
|
|
793
|
+
code?: boolean;
|
|
794
|
+
}
|
|
795
|
+
|
|
700
796
|
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | VideoBlock | RichTextBlock;
|
|
701
797
|
type ActionsBlock = {
|
|
702
798
|
/**
|
|
@@ -974,7 +1070,53 @@ type RichTextBlock = {
|
|
|
974
1070
|
* A ***rich_text*** block is a formatted, structured representation of text. It is the output of the Slack client's WYSIWYG composer, so all messages sent by end-users will have this format. You can use this block to create your own formatted text in Block Kit Builder or include user-defined formatted text in your Block Kit payload. You might encounter ***rich_text*** blocks in message payloads coming from our APIs, as a built-in type in the next-generation Slack platform, or as output of the ***rich_text_input*** block.
|
|
975
1071
|
*/
|
|
976
1072
|
type: "rich_text";
|
|
1073
|
+
/**
|
|
1074
|
+
* A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
|
|
1075
|
+
*/
|
|
1076
|
+
block_id?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* An array of rich text objects - rich_text_section, rich_text_list, rich_text_preformatted, and rich_text_quote. See your specific desired element below for more details.
|
|
1079
|
+
*/
|
|
1080
|
+
elements: AnyRichTextBlockElement[];
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
type User = {
|
|
1084
|
+
id: string;
|
|
1085
|
+
name: string;
|
|
1086
|
+
};
|
|
1087
|
+
type Channel = {
|
|
1088
|
+
id: string;
|
|
1089
|
+
name: string;
|
|
1090
|
+
};
|
|
1091
|
+
type Hooks = {
|
|
1092
|
+
user?: (data: User) => string;
|
|
1093
|
+
channel?: (data: Channel) => string;
|
|
1094
|
+
atChannel?: (data: {
|
|
1095
|
+
name: string;
|
|
1096
|
+
}) => string;
|
|
1097
|
+
usergroup?: (data: Channel) => string;
|
|
1098
|
+
atEveryone?: (data: {
|
|
1099
|
+
name: string;
|
|
1100
|
+
}) => string;
|
|
1101
|
+
atHere?: (data: {
|
|
1102
|
+
name: string;
|
|
1103
|
+
}) => string;
|
|
1104
|
+
date?: (data: {
|
|
1105
|
+
timestamp: string;
|
|
1106
|
+
format: string;
|
|
1107
|
+
link?: string | undefined;
|
|
1108
|
+
fallback: string;
|
|
1109
|
+
}) => string;
|
|
1110
|
+
};
|
|
1111
|
+
type Data = {
|
|
1112
|
+
users: User[];
|
|
1113
|
+
channels: Channel[];
|
|
1114
|
+
hooks: Hooks;
|
|
1115
|
+
setUsers: (users: User[]) => void;
|
|
1116
|
+
setChannels: (channels: Channel[]) => void;
|
|
1117
|
+
setHooks: (hooks: Hooks) => void;
|
|
977
1118
|
};
|
|
1119
|
+
type GlobalStore = Data;
|
|
978
1120
|
|
|
979
1121
|
type Props = {
|
|
980
1122
|
/**
|
|
@@ -993,15 +1135,10 @@ type Props = {
|
|
|
993
1135
|
style?: React.CSSProperties;
|
|
994
1136
|
unstyled?: boolean;
|
|
995
1137
|
data?: {
|
|
996
|
-
users?:
|
|
997
|
-
|
|
998
|
-
name: string;
|
|
999
|
-
}[];
|
|
1000
|
-
channels?: {
|
|
1001
|
-
id: string;
|
|
1002
|
-
name: string;
|
|
1003
|
-
}[];
|
|
1138
|
+
users?: GlobalStore["users"];
|
|
1139
|
+
channels?: GlobalStore["channels"];
|
|
1004
1140
|
};
|
|
1141
|
+
hooks?: GlobalStore["hooks"];
|
|
1005
1142
|
};
|
|
1006
1143
|
declare const Message: (props: Props) => JSX.Element;
|
|
1007
1144
|
|
package/dist/index.d.ts
CHANGED
|
@@ -697,6 +697,102 @@ type FilterObject = {
|
|
|
697
697
|
exclude_bot_users?: boolean;
|
|
698
698
|
};
|
|
699
699
|
|
|
700
|
+
type RichTextList = {
|
|
701
|
+
type: "rich_text_list";
|
|
702
|
+
style: "bullet" | "ordered";
|
|
703
|
+
/**
|
|
704
|
+
* The number of spaces to indent this block. It must be a number between 0 and 8.
|
|
705
|
+
*/
|
|
706
|
+
indent?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
707
|
+
offset?: number;
|
|
708
|
+
/**
|
|
709
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
710
|
+
*/
|
|
711
|
+
border?: 0 | 1;
|
|
712
|
+
elements: RichTextSection[];
|
|
713
|
+
};
|
|
714
|
+
type RichTextPreformatted = {
|
|
715
|
+
type: "rich_text_preformatted";
|
|
716
|
+
elements: AnyRichTextSectionElement[];
|
|
717
|
+
/**
|
|
718
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
719
|
+
*/
|
|
720
|
+
border?: 0 | 1;
|
|
721
|
+
};
|
|
722
|
+
type RichTextQuote = {
|
|
723
|
+
type: "rich_text_quote";
|
|
724
|
+
elements: AnyRichTextSectionElement[];
|
|
725
|
+
/**
|
|
726
|
+
* 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block.
|
|
727
|
+
*/
|
|
728
|
+
border?: 0 | 1;
|
|
729
|
+
};
|
|
730
|
+
type RichTextSection = {
|
|
731
|
+
type: "rich_text_section";
|
|
732
|
+
elements: AnyRichTextSectionElement[];
|
|
733
|
+
};
|
|
734
|
+
type AnyRichTextBlockElement = RichTextList | RichTextPreformatted | RichTextQuote | RichTextSection;
|
|
735
|
+
type AnyRichTextSectionElement = RichTextSectionText | RichTextSectionChannel | RichTextSectionUser | RichTextSectionEmoji | RichTextSectionLink | RichTextSectionTeam | RichTextSectionUsergroup | RichTextSectionDate | RichTextSectionBroadcast | RichTextSectionColor;
|
|
736
|
+
interface RichTextSectionElement {
|
|
737
|
+
type: "text" | "channel" | "user" | "emoji" | "link" | "team" | "usergroup" | "date" | "broadcast" | "color";
|
|
738
|
+
style?: RichTextSectionElementStyle;
|
|
739
|
+
}
|
|
740
|
+
interface RichTextSectionText extends RichTextSectionElement {
|
|
741
|
+
type: "text";
|
|
742
|
+
text: string;
|
|
743
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
744
|
+
}
|
|
745
|
+
interface RichTextSectionChannel extends RichTextSectionElement {
|
|
746
|
+
type: "channel";
|
|
747
|
+
channel_id: string;
|
|
748
|
+
}
|
|
749
|
+
interface RichTextSectionUser extends RichTextSectionElement {
|
|
750
|
+
type: "user";
|
|
751
|
+
user_id: string;
|
|
752
|
+
}
|
|
753
|
+
interface RichTextSectionEmoji extends RichTextSectionElement {
|
|
754
|
+
type: "emoji";
|
|
755
|
+
name: string;
|
|
756
|
+
skin_tone?: number;
|
|
757
|
+
unicode?: string;
|
|
758
|
+
}
|
|
759
|
+
interface RichTextSectionLink extends RichTextSectionElement {
|
|
760
|
+
type: "link";
|
|
761
|
+
url: string;
|
|
762
|
+
text: string;
|
|
763
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
764
|
+
}
|
|
765
|
+
interface RichTextSectionTeam extends RichTextSectionElement {
|
|
766
|
+
type: "team";
|
|
767
|
+
team_id: string;
|
|
768
|
+
}
|
|
769
|
+
interface RichTextSectionUsergroup extends RichTextSectionElement {
|
|
770
|
+
type: "usergroup";
|
|
771
|
+
usergroup_id: string;
|
|
772
|
+
}
|
|
773
|
+
interface RichTextSectionDate extends RichTextSectionElement {
|
|
774
|
+
type: "date";
|
|
775
|
+
timestamp: number;
|
|
776
|
+
format: string;
|
|
777
|
+
style?: RichTextSectionElementStyleWithCode;
|
|
778
|
+
}
|
|
779
|
+
interface RichTextSectionBroadcast extends RichTextSectionElement {
|
|
780
|
+
type: "broadcast";
|
|
781
|
+
range: "channel" | "here" | "everyone";
|
|
782
|
+
}
|
|
783
|
+
interface RichTextSectionColor extends RichTextSectionElement {
|
|
784
|
+
type: "color";
|
|
785
|
+
value: string;
|
|
786
|
+
}
|
|
787
|
+
interface RichTextSectionElementStyle {
|
|
788
|
+
bold?: boolean;
|
|
789
|
+
italic?: boolean;
|
|
790
|
+
strike?: boolean;
|
|
791
|
+
}
|
|
792
|
+
interface RichTextSectionElementStyleWithCode extends RichTextSectionElementStyle {
|
|
793
|
+
code?: boolean;
|
|
794
|
+
}
|
|
795
|
+
|
|
700
796
|
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | VideoBlock | RichTextBlock;
|
|
701
797
|
type ActionsBlock = {
|
|
702
798
|
/**
|
|
@@ -974,7 +1070,53 @@ type RichTextBlock = {
|
|
|
974
1070
|
* A ***rich_text*** block is a formatted, structured representation of text. It is the output of the Slack client's WYSIWYG composer, so all messages sent by end-users will have this format. You can use this block to create your own formatted text in Block Kit Builder or include user-defined formatted text in your Block Kit payload. You might encounter ***rich_text*** blocks in message payloads coming from our APIs, as a built-in type in the next-generation Slack platform, or as output of the ***rich_text_input*** block.
|
|
975
1071
|
*/
|
|
976
1072
|
type: "rich_text";
|
|
1073
|
+
/**
|
|
1074
|
+
* A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
|
|
1075
|
+
*/
|
|
1076
|
+
block_id?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* An array of rich text objects - rich_text_section, rich_text_list, rich_text_preformatted, and rich_text_quote. See your specific desired element below for more details.
|
|
1079
|
+
*/
|
|
1080
|
+
elements: AnyRichTextBlockElement[];
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
type User = {
|
|
1084
|
+
id: string;
|
|
1085
|
+
name: string;
|
|
1086
|
+
};
|
|
1087
|
+
type Channel = {
|
|
1088
|
+
id: string;
|
|
1089
|
+
name: string;
|
|
1090
|
+
};
|
|
1091
|
+
type Hooks = {
|
|
1092
|
+
user?: (data: User) => string;
|
|
1093
|
+
channel?: (data: Channel) => string;
|
|
1094
|
+
atChannel?: (data: {
|
|
1095
|
+
name: string;
|
|
1096
|
+
}) => string;
|
|
1097
|
+
usergroup?: (data: Channel) => string;
|
|
1098
|
+
atEveryone?: (data: {
|
|
1099
|
+
name: string;
|
|
1100
|
+
}) => string;
|
|
1101
|
+
atHere?: (data: {
|
|
1102
|
+
name: string;
|
|
1103
|
+
}) => string;
|
|
1104
|
+
date?: (data: {
|
|
1105
|
+
timestamp: string;
|
|
1106
|
+
format: string;
|
|
1107
|
+
link?: string | undefined;
|
|
1108
|
+
fallback: string;
|
|
1109
|
+
}) => string;
|
|
1110
|
+
};
|
|
1111
|
+
type Data = {
|
|
1112
|
+
users: User[];
|
|
1113
|
+
channels: Channel[];
|
|
1114
|
+
hooks: Hooks;
|
|
1115
|
+
setUsers: (users: User[]) => void;
|
|
1116
|
+
setChannels: (channels: Channel[]) => void;
|
|
1117
|
+
setHooks: (hooks: Hooks) => void;
|
|
977
1118
|
};
|
|
1119
|
+
type GlobalStore = Data;
|
|
978
1120
|
|
|
979
1121
|
type Props = {
|
|
980
1122
|
/**
|
|
@@ -993,15 +1135,10 @@ type Props = {
|
|
|
993
1135
|
style?: React.CSSProperties;
|
|
994
1136
|
unstyled?: boolean;
|
|
995
1137
|
data?: {
|
|
996
|
-
users?:
|
|
997
|
-
|
|
998
|
-
name: string;
|
|
999
|
-
}[];
|
|
1000
|
-
channels?: {
|
|
1001
|
-
id: string;
|
|
1002
|
-
name: string;
|
|
1003
|
-
}[];
|
|
1138
|
+
users?: GlobalStore["users"];
|
|
1139
|
+
channels?: GlobalStore["channels"];
|
|
1004
1140
|
};
|
|
1141
|
+
hooks?: GlobalStore["hooks"];
|
|
1005
1142
|
};
|
|
1006
1143
|
declare const Message: (props: Props) => JSX.Element;
|
|
1007
1144
|
|
package/dist/index.js
CHANGED
|
@@ -58,23 +58,36 @@ var parseEmojis = (text) => {
|
|
|
58
58
|
// src/utils/slack_text_to_jsx.ts
|
|
59
59
|
var import_html_react_parser = __toESM(require("html-react-parser"));
|
|
60
60
|
var import_slack_markdown = require("slack-markdown");
|
|
61
|
-
var slack_text_parser = import_slack_markdown.toHTML;
|
|
62
61
|
var slack_text_to_jsx = (text, parse_options) => {
|
|
63
|
-
const {
|
|
62
|
+
const { users, channels, hooks } = parse_options;
|
|
64
63
|
if (!text)
|
|
65
64
|
return null;
|
|
66
|
-
const html_string =
|
|
65
|
+
const html_string = (0, import_slack_markdown.toHTML)(text, {
|
|
67
66
|
slackCallbacks: {
|
|
68
67
|
user(data) {
|
|
69
68
|
const user = users.find((u) => u.id === data.id || u.name === data.name);
|
|
69
|
+
if (hooks.user)
|
|
70
|
+
return hooks.user(user || data);
|
|
70
71
|
const label = (user == null ? void 0 : user.name) || data.id || data.name;
|
|
71
72
|
return `<span class="slack_user" data-user-id="${(user == null ? void 0 : user.id) || data.id}">@${label}</span>`;
|
|
72
73
|
},
|
|
73
74
|
channel(data) {
|
|
74
75
|
const channel = channels.find((c) => c.id === data.id || c.name === data.name);
|
|
76
|
+
if (hooks.channel)
|
|
77
|
+
return hooks.channel(channel || data);
|
|
75
78
|
const label = (channel == null ? void 0 : channel.name) || data.id || data.name;
|
|
76
79
|
return `<span class="slack_channel" data-channel-id="${(channel == null ? void 0 : channel.id) || data.id}">#${label}</span>`;
|
|
77
80
|
}
|
|
81
|
+
// atChannel(data) {
|
|
82
|
+
// const channel = channels.find((c) => c.name === data.name);
|
|
83
|
+
// if (hooks.atChannel) return hooks.atChannel(channel || data);
|
|
84
|
+
// const label = channel?.name || data.name;
|
|
85
|
+
// return `<span class="slack_channel" data-channel-id="${channel?.id}">#${label}</span>`;
|
|
86
|
+
// },
|
|
87
|
+
// ...(hooks.atEveryone && { atEveryone: hooks.atEveryone }),
|
|
88
|
+
// ...(hooks.atHere && { atHere: hooks.atHere }),
|
|
89
|
+
// ...(hooks.date && { date: hooks.date }),
|
|
90
|
+
// ...(hooks.usergroup && { usergroup: hooks.usergroup }),
|
|
78
91
|
}
|
|
79
92
|
});
|
|
80
93
|
return (0, import_html_react_parser.default)(html_string, { trim: false });
|
|
@@ -159,16 +172,20 @@ var import_zustand = require("zustand");
|
|
|
159
172
|
var useBearStore = (0, import_zustand.create)((set) => ({
|
|
160
173
|
users: [],
|
|
161
174
|
channels: [],
|
|
175
|
+
hooks: {},
|
|
162
176
|
setUsers: (users) => set({ users }),
|
|
163
|
-
setChannels: (channels) => set({ channels })
|
|
177
|
+
setChannels: (channels) => set({ channels }),
|
|
178
|
+
setHooks: (hooks) => set({ hooks })
|
|
164
179
|
}));
|
|
165
180
|
var useGlobalData = () => {
|
|
166
|
-
const { users, channels, setChannels, setUsers } = useBearStore();
|
|
181
|
+
const { users, channels, hooks, setChannels, setUsers, setHooks } = useBearStore();
|
|
167
182
|
return {
|
|
168
183
|
users,
|
|
169
184
|
channels,
|
|
185
|
+
hooks,
|
|
170
186
|
setChannels,
|
|
171
|
-
setUsers
|
|
187
|
+
setUsers,
|
|
188
|
+
setHooks
|
|
172
189
|
};
|
|
173
190
|
};
|
|
174
191
|
|
|
@@ -177,12 +194,12 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
177
194
|
var TextObject = (props) => {
|
|
178
195
|
const { type, text, emoji, verbatim = false } = props.data;
|
|
179
196
|
const { className = "" } = props;
|
|
180
|
-
const { channels, users } = useGlobalData();
|
|
197
|
+
const { channels, users, hooks } = useGlobalData();
|
|
181
198
|
let emoji_parsed = type == "mrkdwn" ? parseEmojis(text) : emoji === false ? text : parseEmojis(text);
|
|
182
199
|
emoji_parsed = emoji_parsed.replace(/>/g, "> ").replace(/</g, "<");
|
|
183
200
|
if (type === "plain_text")
|
|
184
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: false, users, channels }) });
|
|
185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: true, users, channels }) });
|
|
201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: false, users, channels, hooks }) });
|
|
202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: true, users, channels, hooks }) });
|
|
186
203
|
};
|
|
187
204
|
|
|
188
205
|
// src/components/elements/button_element.tsx
|
|
@@ -728,31 +745,203 @@ var Input = (props) => {
|
|
|
728
745
|
);
|
|
729
746
|
};
|
|
730
747
|
|
|
731
|
-
// src/components/blocks/
|
|
748
|
+
// src/components/blocks/rich_text/rich_text_section_channel.tsx
|
|
749
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
750
|
+
var RichTextSectionChannel = (props) => {
|
|
751
|
+
const { channel_id, style } = props;
|
|
752
|
+
const { channels, hooks } = useGlobalData();
|
|
753
|
+
const channel = channels.find((u) => u.id === channel_id);
|
|
754
|
+
const label = (channel == null ? void 0 : channel.name) || channel_id;
|
|
755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
756
|
+
"span",
|
|
757
|
+
{
|
|
758
|
+
"data-channel-id": channel_id,
|
|
759
|
+
className: `
|
|
760
|
+
slack_channel
|
|
761
|
+
${(style == null ? void 0 : style.italic) ? "italic" : ""}
|
|
762
|
+
${(style == null ? void 0 : style.strike) ? "line-through" : ""}
|
|
763
|
+
${(style == null ? void 0 : style.bold) ? "font-medium" : ""}
|
|
764
|
+
`,
|
|
765
|
+
children: [
|
|
766
|
+
"#",
|
|
767
|
+
label
|
|
768
|
+
]
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
// src/components/blocks/rich_text/rich_text_section_user.tsx
|
|
774
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
775
|
+
var RichTextSectionUser = (props) => {
|
|
776
|
+
const { user_id, style } = props;
|
|
777
|
+
const { users, hooks } = useGlobalData();
|
|
778
|
+
const user = users.find((u) => u.id === user_id);
|
|
779
|
+
const label = (user == null ? void 0 : user.name) || user_id;
|
|
780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
781
|
+
"span",
|
|
782
|
+
{
|
|
783
|
+
"data-user-id": user_id,
|
|
784
|
+
className: `
|
|
785
|
+
slack_user
|
|
786
|
+
${(style == null ? void 0 : style.italic) ? "italic" : ""}
|
|
787
|
+
${(style == null ? void 0 : style.strike) ? "line-through" : ""}
|
|
788
|
+
${(style == null ? void 0 : style.bold) ? "font-medium" : ""}
|
|
789
|
+
`,
|
|
790
|
+
children: [
|
|
791
|
+
"@",
|
|
792
|
+
label
|
|
793
|
+
]
|
|
794
|
+
}
|
|
795
|
+
);
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
// src/components/blocks/rich_text/rich_text.tsx
|
|
799
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
732
800
|
var RichText = (props) => {
|
|
733
|
-
const {
|
|
801
|
+
const { elements, block_id } = props.data;
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: block_id, children: elements.map((element, i) => {
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Element, { element }, `${element.type}__${i}`);
|
|
804
|
+
}) });
|
|
805
|
+
};
|
|
806
|
+
var Element = (props) => {
|
|
807
|
+
const { element } = props;
|
|
808
|
+
if (element.type === "rich_text_list") {
|
|
809
|
+
const { elements, style, border = 0, indent, offset } = element;
|
|
810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-2", children: [
|
|
811
|
+
border === 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: `list-none`, children: elements.map((el, i) => {
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
814
|
+
"li",
|
|
815
|
+
{
|
|
816
|
+
className: "flex",
|
|
817
|
+
style: {
|
|
818
|
+
marginLeft: indent ? indent > 5 ? 0 : indent * 28 + 6 + 28 : 0
|
|
819
|
+
},
|
|
820
|
+
children: [
|
|
821
|
+
style === "ordered" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "w-[22px] h-[22px] shrink-0 flex items-center justify-center", children: [
|
|
822
|
+
i + 1,
|
|
823
|
+
"."
|
|
824
|
+
] }),
|
|
825
|
+
style === "bullet" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "w-[22px] h-[22px] shrink-0 flex items-center justify-center", children: [
|
|
826
|
+
(indent === void 0 || indent === 0 || indent === 3 || indent === 6) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-current" }),
|
|
827
|
+
(indent === 1 || indent === 4 || indent === 7) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w-1.5 h-1.5 rounded-full border border-current" }),
|
|
828
|
+
(indent === 2 || indent === 5 || indent === 8) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w-1.5 h-1.5 rounded-[1.5px] bg-current" })
|
|
829
|
+
] }),
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
831
|
+
"div",
|
|
832
|
+
{
|
|
833
|
+
style: {
|
|
834
|
+
marginLeft: 6
|
|
835
|
+
},
|
|
836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Element, { element: el }, `${element.type}__${i}`)
|
|
837
|
+
}
|
|
838
|
+
)
|
|
839
|
+
]
|
|
840
|
+
},
|
|
841
|
+
`${el.type}__${i}`
|
|
842
|
+
);
|
|
843
|
+
}) })
|
|
844
|
+
] });
|
|
845
|
+
}
|
|
846
|
+
if (element.type === "rich_text_preformatted") {
|
|
847
|
+
const { elements, border } = element;
|
|
848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-2 w-full", children: [
|
|
849
|
+
border === 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
851
|
+
"pre",
|
|
852
|
+
{
|
|
853
|
+
className: "p-2 rounded my-1 whitespace-pre-wrap bg-gray-secondary text-xs leading-[1.50001] border grow",
|
|
854
|
+
style: {
|
|
855
|
+
wordWrap: "break-word",
|
|
856
|
+
wordBreak: "normal"
|
|
857
|
+
},
|
|
858
|
+
children: elements.map((el, i) => {
|
|
859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
860
|
+
})
|
|
861
|
+
}
|
|
862
|
+
)
|
|
863
|
+
] });
|
|
864
|
+
}
|
|
865
|
+
if (element.type === "rich_text_quote") {
|
|
866
|
+
const { elements, border } = element;
|
|
867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-2", children: [
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
869
|
+
border === 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
870
|
+
elements.map((el, i) => {
|
|
871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
872
|
+
})
|
|
873
|
+
] });
|
|
874
|
+
}
|
|
875
|
+
if (element.type === "rich_text_section") {
|
|
876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "inline-block", children: element.elements.map((el, i) => {
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
878
|
+
}) });
|
|
879
|
+
}
|
|
734
880
|
return null;
|
|
735
881
|
};
|
|
882
|
+
var RichTextSectionElement = (props) => {
|
|
883
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
884
|
+
const { element } = props;
|
|
885
|
+
if (element.type === "text") {
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
887
|
+
"span",
|
|
888
|
+
{
|
|
889
|
+
className: `
|
|
890
|
+
${((_a = element.style) == null ? void 0 : _a.italic) ? "italic" : ""}
|
|
891
|
+
${((_b = element.style) == null ? void 0 : _b.strike) ? "line-through" : ""}
|
|
892
|
+
${((_c = element.style) == null ? void 0 : _c.code) ? "slack_inline_code" : ""}
|
|
893
|
+
${((_d = element.style) == null ? void 0 : _d.bold) ? "font-medium" : ""}
|
|
894
|
+
`,
|
|
895
|
+
children: element.text
|
|
896
|
+
}
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
if (element.type === "user") {
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RichTextSectionUser, { user_id: element.user_id, style: element.style });
|
|
901
|
+
}
|
|
902
|
+
if (element.type === "channel") {
|
|
903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RichTextSectionChannel, { channel_id: element.channel_id, style: element.style });
|
|
904
|
+
}
|
|
905
|
+
if (element.type === "link") {
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
907
|
+
"a",
|
|
908
|
+
{
|
|
909
|
+
target: "_blank",
|
|
910
|
+
rel: "noreferrer noopener",
|
|
911
|
+
href: element.url,
|
|
912
|
+
className: `
|
|
913
|
+
text-blue-primary hover:underline underline-offset-4
|
|
914
|
+
${((_e = element.style) == null ? void 0 : _e.italic) ? "italic" : ""}
|
|
915
|
+
${((_f = element.style) == null ? void 0 : _f.strike) ? "line-through" : ""}
|
|
916
|
+
${((_g = element.style) == null ? void 0 : _g.code) ? "slack_inline_code" : ""}
|
|
917
|
+
${((_h = element.style) == null ? void 0 : _h.bold) ? "font-medium" : ""}
|
|
918
|
+
`,
|
|
919
|
+
children: element.text
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {});
|
|
924
|
+
};
|
|
736
925
|
|
|
737
926
|
// src/components/blocks/section.tsx
|
|
738
|
-
var
|
|
927
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
739
928
|
var Section = (props) => {
|
|
740
929
|
const { accessory, fields, text, block_id } = props.data;
|
|
741
930
|
const element = accessory ? getElementComponent(accessory) : null;
|
|
742
931
|
const is_stacked = accessory ? is_accessory_stacked(accessory) : false;
|
|
743
|
-
return /* @__PURE__ */ (0,
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
744
933
|
"div",
|
|
745
934
|
{
|
|
746
935
|
id: block_id,
|
|
747
936
|
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary ${is_stacked ? "flex-col" : ""}`,
|
|
748
937
|
children: [
|
|
749
|
-
/* @__PURE__ */ (0,
|
|
750
|
-
text && /* @__PURE__ */ (0,
|
|
751
|
-
fields && /* @__PURE__ */ (0,
|
|
752
|
-
return /* @__PURE__ */ (0,
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "grow", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
939
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextObject, { data: text }),
|
|
940
|
+
fields && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "grid grid-col-2 w-full", children: fields.map((field, i) => {
|
|
941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextObject, { data: field }, i);
|
|
753
942
|
}) })
|
|
754
943
|
] }) }),
|
|
755
|
-
element && is_stacked ? element : /* @__PURE__ */ (0,
|
|
944
|
+
element && is_stacked ? element : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ml-2 mb-1 relative shrink-0", children: element })
|
|
756
945
|
]
|
|
757
946
|
}
|
|
758
947
|
);
|
|
@@ -765,41 +954,41 @@ var Video = (props) => {
|
|
|
765
954
|
};
|
|
766
955
|
|
|
767
956
|
// src/components/index.tsx
|
|
768
|
-
var
|
|
957
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
769
958
|
var getBlockComponent = (block) => {
|
|
770
959
|
if (block.type === "divider")
|
|
771
|
-
return /* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider, { data: block });
|
|
772
961
|
if (block.type === "section")
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Section, { data: block });
|
|
774
963
|
if (block.type === "image")
|
|
775
|
-
return /* @__PURE__ */ (0,
|
|
964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Image, { data: block });
|
|
776
965
|
if (block.type === "context")
|
|
777
|
-
return /* @__PURE__ */ (0,
|
|
966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Context, { data: block });
|
|
778
967
|
if (block.type === "actions")
|
|
779
|
-
return /* @__PURE__ */ (0,
|
|
968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Actions, { data: block });
|
|
780
969
|
if (block.type === "file")
|
|
781
|
-
return /* @__PURE__ */ (0,
|
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(File, { data: block });
|
|
782
971
|
if (block.type === "header")
|
|
783
|
-
return /* @__PURE__ */ (0,
|
|
972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Header2, { data: block });
|
|
784
973
|
if (block.type === "input")
|
|
785
|
-
return /* @__PURE__ */ (0,
|
|
974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Input, { data: block });
|
|
786
975
|
if (block.type === "video")
|
|
787
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Video, { data: block });
|
|
788
977
|
if (block.type === "rich_text")
|
|
789
|
-
return /* @__PURE__ */ (0,
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RichText, { data: block });
|
|
790
979
|
return null;
|
|
791
980
|
};
|
|
792
981
|
var getElementComponent = (element) => {
|
|
793
982
|
if (element.type === "button")
|
|
794
|
-
return /* @__PURE__ */ (0,
|
|
983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ButtonElement, { data: element });
|
|
795
984
|
if (element.type === "checkboxes")
|
|
796
|
-
return /* @__PURE__ */ (0,
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckboxesElement, { data: element });
|
|
797
986
|
if (element.type === "image")
|
|
798
|
-
return /* @__PURE__ */ (0,
|
|
987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageElement, { data: element });
|
|
799
988
|
if (element.type === "plain_text_input")
|
|
800
|
-
return /* @__PURE__ */ (0,
|
|
989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PlaintTextInput, { data: element });
|
|
801
990
|
if (element.type === "users_select")
|
|
802
|
-
return /* @__PURE__ */ (0,
|
|
991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UsersSelectElement, { data: element });
|
|
803
992
|
if (element.type === "datepicker")
|
|
804
993
|
return null;
|
|
805
994
|
if (element.type === "datetimepicker")
|
|
@@ -838,15 +1027,15 @@ var getElementComponent = (element) => {
|
|
|
838
1027
|
};
|
|
839
1028
|
|
|
840
1029
|
// src/block_wrapper.tsx
|
|
841
|
-
var
|
|
1030
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
842
1031
|
var BlockWrapper = (props) => {
|
|
843
1032
|
const { children } = props;
|
|
844
|
-
return /* @__PURE__ */ (0,
|
|
1033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-base break-words font-normal", children });
|
|
845
1034
|
};
|
|
846
1035
|
|
|
847
1036
|
// src/message.tsx
|
|
848
1037
|
var import_react6 = require("react");
|
|
849
|
-
var
|
|
1038
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
850
1039
|
var Message = (props) => {
|
|
851
1040
|
const {
|
|
852
1041
|
blocks,
|
|
@@ -857,22 +1046,25 @@ var Message = (props) => {
|
|
|
857
1046
|
style,
|
|
858
1047
|
showBlockKitDebug = false,
|
|
859
1048
|
unstyled = false,
|
|
860
|
-
data = {}
|
|
1049
|
+
data = {},
|
|
1050
|
+
hooks = {}
|
|
861
1051
|
} = props;
|
|
862
|
-
const { setChannels, setUsers } = useGlobalData();
|
|
1052
|
+
const { setChannels, setUsers, setHooks } = useGlobalData();
|
|
863
1053
|
(0, import_react6.useEffect)(() => {
|
|
864
1054
|
if (data.users)
|
|
865
1055
|
setUsers(data.users);
|
|
866
1056
|
if (data.channels)
|
|
867
1057
|
setChannels(data.channels);
|
|
1058
|
+
if (hooks)
|
|
1059
|
+
setHooks(hooks);
|
|
868
1060
|
}, [data]);
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
1061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { id: "slack_blocks_to_jsx", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
870
1062
|
"section",
|
|
871
1063
|
{
|
|
872
1064
|
className: `flex gap-2 w-full max-w-[600px] slack_blocks_to_jsx relative ${unstyled ? "styles_disabled" : "styles_enabled"} ${className}`,
|
|
873
1065
|
style,
|
|
874
1066
|
children: [
|
|
875
|
-
showBlockKitDebug && /* @__PURE__ */ (0,
|
|
1067
|
+
showBlockKitDebug && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
876
1068
|
"a",
|
|
877
1069
|
{
|
|
878
1070
|
target: "_blank",
|
|
@@ -884,14 +1076,14 @@ var Message = (props) => {
|
|
|
884
1076
|
children: "Open in Slack Block Kit Builder"
|
|
885
1077
|
}
|
|
886
1078
|
),
|
|
887
|
-
/* @__PURE__ */ (0,
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: logo, className: "w-9 h-9", alt: name }) }),
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Header, { name, time }),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: blocks.map((block, i) => {
|
|
891
1083
|
const element = getBlockComponent(block);
|
|
892
1084
|
if (!element)
|
|
893
1085
|
return null;
|
|
894
|
-
return /* @__PURE__ */ (0,
|
|
1086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BlockWrapper, { children: element }, i);
|
|
895
1087
|
}) })
|
|
896
1088
|
] })
|
|
897
1089
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -21,24 +21,37 @@ var parseEmojis = (text) => {
|
|
|
21
21
|
|
|
22
22
|
// src/utils/slack_text_to_jsx.ts
|
|
23
23
|
import parse from "html-react-parser";
|
|
24
|
-
import { toHTML } from "slack-markdown";
|
|
25
|
-
var slack_text_parser = toHTML;
|
|
24
|
+
import { toHTML as slack_text_parser } from "slack-markdown";
|
|
26
25
|
var slack_text_to_jsx = (text, parse_options) => {
|
|
27
|
-
const {
|
|
26
|
+
const { users, channels, hooks } = parse_options;
|
|
28
27
|
if (!text)
|
|
29
28
|
return null;
|
|
30
29
|
const html_string = slack_text_parser(text, {
|
|
31
30
|
slackCallbacks: {
|
|
32
31
|
user(data) {
|
|
33
32
|
const user = users.find((u) => u.id === data.id || u.name === data.name);
|
|
33
|
+
if (hooks.user)
|
|
34
|
+
return hooks.user(user || data);
|
|
34
35
|
const label = (user == null ? void 0 : user.name) || data.id || data.name;
|
|
35
36
|
return `<span class="slack_user" data-user-id="${(user == null ? void 0 : user.id) || data.id}">@${label}</span>`;
|
|
36
37
|
},
|
|
37
38
|
channel(data) {
|
|
38
39
|
const channel = channels.find((c) => c.id === data.id || c.name === data.name);
|
|
40
|
+
if (hooks.channel)
|
|
41
|
+
return hooks.channel(channel || data);
|
|
39
42
|
const label = (channel == null ? void 0 : channel.name) || data.id || data.name;
|
|
40
43
|
return `<span class="slack_channel" data-channel-id="${(channel == null ? void 0 : channel.id) || data.id}">#${label}</span>`;
|
|
41
44
|
}
|
|
45
|
+
// atChannel(data) {
|
|
46
|
+
// const channel = channels.find((c) => c.name === data.name);
|
|
47
|
+
// if (hooks.atChannel) return hooks.atChannel(channel || data);
|
|
48
|
+
// const label = channel?.name || data.name;
|
|
49
|
+
// return `<span class="slack_channel" data-channel-id="${channel?.id}">#${label}</span>`;
|
|
50
|
+
// },
|
|
51
|
+
// ...(hooks.atEveryone && { atEveryone: hooks.atEveryone }),
|
|
52
|
+
// ...(hooks.atHere && { atHere: hooks.atHere }),
|
|
53
|
+
// ...(hooks.date && { date: hooks.date }),
|
|
54
|
+
// ...(hooks.usergroup && { usergroup: hooks.usergroup }),
|
|
42
55
|
}
|
|
43
56
|
});
|
|
44
57
|
return parse(html_string, { trim: false });
|
|
@@ -123,16 +136,20 @@ import { create } from "zustand";
|
|
|
123
136
|
var useBearStore = create((set) => ({
|
|
124
137
|
users: [],
|
|
125
138
|
channels: [],
|
|
139
|
+
hooks: {},
|
|
126
140
|
setUsers: (users) => set({ users }),
|
|
127
|
-
setChannels: (channels) => set({ channels })
|
|
141
|
+
setChannels: (channels) => set({ channels }),
|
|
142
|
+
setHooks: (hooks) => set({ hooks })
|
|
128
143
|
}));
|
|
129
144
|
var useGlobalData = () => {
|
|
130
|
-
const { users, channels, setChannels, setUsers } = useBearStore();
|
|
145
|
+
const { users, channels, hooks, setChannels, setUsers, setHooks } = useBearStore();
|
|
131
146
|
return {
|
|
132
147
|
users,
|
|
133
148
|
channels,
|
|
149
|
+
hooks,
|
|
134
150
|
setChannels,
|
|
135
|
-
setUsers
|
|
151
|
+
setUsers,
|
|
152
|
+
setHooks
|
|
136
153
|
};
|
|
137
154
|
};
|
|
138
155
|
|
|
@@ -141,12 +158,12 @@ import { jsx as jsx3 } from "react/jsx-runtime";
|
|
|
141
158
|
var TextObject = (props) => {
|
|
142
159
|
const { type, text, emoji, verbatim = false } = props.data;
|
|
143
160
|
const { className = "" } = props;
|
|
144
|
-
const { channels, users } = useGlobalData();
|
|
161
|
+
const { channels, users, hooks } = useGlobalData();
|
|
145
162
|
let emoji_parsed = type == "mrkdwn" ? parseEmojis(text) : emoji === false ? text : parseEmojis(text);
|
|
146
163
|
emoji_parsed = emoji_parsed.replace(/>/g, "> ").replace(/</g, "<");
|
|
147
164
|
if (type === "plain_text")
|
|
148
|
-
return /* @__PURE__ */ jsx3("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: false, users, channels }) });
|
|
149
|
-
return /* @__PURE__ */ jsx3("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: true, users, channels }) });
|
|
165
|
+
return /* @__PURE__ */ jsx3("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: false, users, channels, hooks }) });
|
|
166
|
+
return /* @__PURE__ */ jsx3("div", { className, children: slack_text_to_jsx(emoji_parsed, { markdown: true, users, channels, hooks }) });
|
|
150
167
|
};
|
|
151
168
|
|
|
152
169
|
// src/components/elements/button_element.tsx
|
|
@@ -692,31 +709,203 @@ var Input = (props) => {
|
|
|
692
709
|
);
|
|
693
710
|
};
|
|
694
711
|
|
|
695
|
-
// src/components/blocks/
|
|
712
|
+
// src/components/blocks/rich_text/rich_text_section_channel.tsx
|
|
713
|
+
import { jsxs as jsxs8 } from "react/jsx-runtime";
|
|
714
|
+
var RichTextSectionChannel = (props) => {
|
|
715
|
+
const { channel_id, style } = props;
|
|
716
|
+
const { channels, hooks } = useGlobalData();
|
|
717
|
+
const channel = channels.find((u) => u.id === channel_id);
|
|
718
|
+
const label = (channel == null ? void 0 : channel.name) || channel_id;
|
|
719
|
+
return /* @__PURE__ */ jsxs8(
|
|
720
|
+
"span",
|
|
721
|
+
{
|
|
722
|
+
"data-channel-id": channel_id,
|
|
723
|
+
className: `
|
|
724
|
+
slack_channel
|
|
725
|
+
${(style == null ? void 0 : style.italic) ? "italic" : ""}
|
|
726
|
+
${(style == null ? void 0 : style.strike) ? "line-through" : ""}
|
|
727
|
+
${(style == null ? void 0 : style.bold) ? "font-medium" : ""}
|
|
728
|
+
`,
|
|
729
|
+
children: [
|
|
730
|
+
"#",
|
|
731
|
+
label
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
// src/components/blocks/rich_text/rich_text_section_user.tsx
|
|
738
|
+
import { jsxs as jsxs9 } from "react/jsx-runtime";
|
|
739
|
+
var RichTextSectionUser = (props) => {
|
|
740
|
+
const { user_id, style } = props;
|
|
741
|
+
const { users, hooks } = useGlobalData();
|
|
742
|
+
const user = users.find((u) => u.id === user_id);
|
|
743
|
+
const label = (user == null ? void 0 : user.name) || user_id;
|
|
744
|
+
return /* @__PURE__ */ jsxs9(
|
|
745
|
+
"span",
|
|
746
|
+
{
|
|
747
|
+
"data-user-id": user_id,
|
|
748
|
+
className: `
|
|
749
|
+
slack_user
|
|
750
|
+
${(style == null ? void 0 : style.italic) ? "italic" : ""}
|
|
751
|
+
${(style == null ? void 0 : style.strike) ? "line-through" : ""}
|
|
752
|
+
${(style == null ? void 0 : style.bold) ? "font-medium" : ""}
|
|
753
|
+
`,
|
|
754
|
+
children: [
|
|
755
|
+
"@",
|
|
756
|
+
label
|
|
757
|
+
]
|
|
758
|
+
}
|
|
759
|
+
);
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
// src/components/blocks/rich_text/rich_text.tsx
|
|
763
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
696
764
|
var RichText = (props) => {
|
|
697
|
-
const {
|
|
765
|
+
const { elements, block_id } = props.data;
|
|
766
|
+
return /* @__PURE__ */ jsx14("div", { id: block_id, children: elements.map((element, i) => {
|
|
767
|
+
return /* @__PURE__ */ jsx14(Element, { element }, `${element.type}__${i}`);
|
|
768
|
+
}) });
|
|
769
|
+
};
|
|
770
|
+
var Element = (props) => {
|
|
771
|
+
const { element } = props;
|
|
772
|
+
if (element.type === "rich_text_list") {
|
|
773
|
+
const { elements, style, border = 0, indent, offset } = element;
|
|
774
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex gap-2", children: [
|
|
775
|
+
border === 1 && /* @__PURE__ */ jsx14("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
776
|
+
/* @__PURE__ */ jsx14("ul", { className: `list-none`, children: elements.map((el, i) => {
|
|
777
|
+
return /* @__PURE__ */ jsxs10(
|
|
778
|
+
"li",
|
|
779
|
+
{
|
|
780
|
+
className: "flex",
|
|
781
|
+
style: {
|
|
782
|
+
marginLeft: indent ? indent > 5 ? 0 : indent * 28 + 6 + 28 : 0
|
|
783
|
+
},
|
|
784
|
+
children: [
|
|
785
|
+
style === "ordered" && /* @__PURE__ */ jsxs10("span", { className: "w-[22px] h-[22px] shrink-0 flex items-center justify-center", children: [
|
|
786
|
+
i + 1,
|
|
787
|
+
"."
|
|
788
|
+
] }),
|
|
789
|
+
style === "bullet" && /* @__PURE__ */ jsxs10("span", { className: "w-[22px] h-[22px] shrink-0 flex items-center justify-center", children: [
|
|
790
|
+
(indent === void 0 || indent === 0 || indent === 3 || indent === 6) && /* @__PURE__ */ jsx14("span", { className: "w-1.5 h-1.5 rounded-full bg-current" }),
|
|
791
|
+
(indent === 1 || indent === 4 || indent === 7) && /* @__PURE__ */ jsx14("span", { className: "w-1.5 h-1.5 rounded-full border border-current" }),
|
|
792
|
+
(indent === 2 || indent === 5 || indent === 8) && /* @__PURE__ */ jsx14("span", { className: "w-1.5 h-1.5 rounded-[1.5px] bg-current" })
|
|
793
|
+
] }),
|
|
794
|
+
/* @__PURE__ */ jsx14(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
style: {
|
|
798
|
+
marginLeft: 6
|
|
799
|
+
},
|
|
800
|
+
children: /* @__PURE__ */ jsx14(Element, { element: el }, `${element.type}__${i}`)
|
|
801
|
+
}
|
|
802
|
+
)
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
`${el.type}__${i}`
|
|
806
|
+
);
|
|
807
|
+
}) })
|
|
808
|
+
] });
|
|
809
|
+
}
|
|
810
|
+
if (element.type === "rich_text_preformatted") {
|
|
811
|
+
const { elements, border } = element;
|
|
812
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex gap-2 w-full", children: [
|
|
813
|
+
border === 1 && /* @__PURE__ */ jsx14("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
814
|
+
/* @__PURE__ */ jsx14(
|
|
815
|
+
"pre",
|
|
816
|
+
{
|
|
817
|
+
className: "p-2 rounded my-1 whitespace-pre-wrap bg-gray-secondary text-xs leading-[1.50001] border grow",
|
|
818
|
+
style: {
|
|
819
|
+
wordWrap: "break-word",
|
|
820
|
+
wordBreak: "normal"
|
|
821
|
+
},
|
|
822
|
+
children: elements.map((el, i) => {
|
|
823
|
+
return /* @__PURE__ */ jsx14(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
824
|
+
})
|
|
825
|
+
}
|
|
826
|
+
)
|
|
827
|
+
] });
|
|
828
|
+
}
|
|
829
|
+
if (element.type === "rich_text_quote") {
|
|
830
|
+
const { elements, border } = element;
|
|
831
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex gap-2", children: [
|
|
832
|
+
/* @__PURE__ */ jsx14("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
833
|
+
border === 1 && /* @__PURE__ */ jsx14("div", { className: "w-1 rounded bg-gray-primary self-stretch" }),
|
|
834
|
+
elements.map((el, i) => {
|
|
835
|
+
return /* @__PURE__ */ jsx14(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
836
|
+
})
|
|
837
|
+
] });
|
|
838
|
+
}
|
|
839
|
+
if (element.type === "rich_text_section") {
|
|
840
|
+
return /* @__PURE__ */ jsx14("div", { className: "inline-block", children: element.elements.map((el, i) => {
|
|
841
|
+
return /* @__PURE__ */ jsx14(RichTextSectionElement, { element: el }, `${el.type}__${i}`);
|
|
842
|
+
}) });
|
|
843
|
+
}
|
|
698
844
|
return null;
|
|
699
845
|
};
|
|
846
|
+
var RichTextSectionElement = (props) => {
|
|
847
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
848
|
+
const { element } = props;
|
|
849
|
+
if (element.type === "text") {
|
|
850
|
+
return /* @__PURE__ */ jsx14(
|
|
851
|
+
"span",
|
|
852
|
+
{
|
|
853
|
+
className: `
|
|
854
|
+
${((_a = element.style) == null ? void 0 : _a.italic) ? "italic" : ""}
|
|
855
|
+
${((_b = element.style) == null ? void 0 : _b.strike) ? "line-through" : ""}
|
|
856
|
+
${((_c = element.style) == null ? void 0 : _c.code) ? "slack_inline_code" : ""}
|
|
857
|
+
${((_d = element.style) == null ? void 0 : _d.bold) ? "font-medium" : ""}
|
|
858
|
+
`,
|
|
859
|
+
children: element.text
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
if (element.type === "user") {
|
|
864
|
+
return /* @__PURE__ */ jsx14(RichTextSectionUser, { user_id: element.user_id, style: element.style });
|
|
865
|
+
}
|
|
866
|
+
if (element.type === "channel") {
|
|
867
|
+
return /* @__PURE__ */ jsx14(RichTextSectionChannel, { channel_id: element.channel_id, style: element.style });
|
|
868
|
+
}
|
|
869
|
+
if (element.type === "link") {
|
|
870
|
+
return /* @__PURE__ */ jsx14(
|
|
871
|
+
"a",
|
|
872
|
+
{
|
|
873
|
+
target: "_blank",
|
|
874
|
+
rel: "noreferrer noopener",
|
|
875
|
+
href: element.url,
|
|
876
|
+
className: `
|
|
877
|
+
text-blue-primary hover:underline underline-offset-4
|
|
878
|
+
${((_e = element.style) == null ? void 0 : _e.italic) ? "italic" : ""}
|
|
879
|
+
${((_f = element.style) == null ? void 0 : _f.strike) ? "line-through" : ""}
|
|
880
|
+
${((_g = element.style) == null ? void 0 : _g.code) ? "slack_inline_code" : ""}
|
|
881
|
+
${((_h = element.style) == null ? void 0 : _h.bold) ? "font-medium" : ""}
|
|
882
|
+
`,
|
|
883
|
+
children: element.text
|
|
884
|
+
}
|
|
885
|
+
);
|
|
886
|
+
}
|
|
887
|
+
return /* @__PURE__ */ jsx14("span", {});
|
|
888
|
+
};
|
|
700
889
|
|
|
701
890
|
// src/components/blocks/section.tsx
|
|
702
|
-
import { jsx as
|
|
891
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
703
892
|
var Section = (props) => {
|
|
704
893
|
const { accessory, fields, text, block_id } = props.data;
|
|
705
894
|
const element = accessory ? getElementComponent(accessory) : null;
|
|
706
895
|
const is_stacked = accessory ? is_accessory_stacked(accessory) : false;
|
|
707
|
-
return /* @__PURE__ */
|
|
896
|
+
return /* @__PURE__ */ jsxs11(
|
|
708
897
|
"div",
|
|
709
898
|
{
|
|
710
899
|
id: block_id,
|
|
711
900
|
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary ${is_stacked ? "flex-col" : ""}`,
|
|
712
901
|
children: [
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
text && /* @__PURE__ */
|
|
715
|
-
fields && /* @__PURE__ */
|
|
716
|
-
return /* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ jsx15("div", { className: "grow", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-3", children: [
|
|
903
|
+
text && /* @__PURE__ */ jsx15(TextObject, { data: text }),
|
|
904
|
+
fields && /* @__PURE__ */ jsx15("div", { className: "grid grid-col-2 w-full", children: fields.map((field, i) => {
|
|
905
|
+
return /* @__PURE__ */ jsx15(TextObject, { data: field }, i);
|
|
717
906
|
}) })
|
|
718
907
|
] }) }),
|
|
719
|
-
element && is_stacked ? element : /* @__PURE__ */
|
|
908
|
+
element && is_stacked ? element : /* @__PURE__ */ jsx15("div", { className: "ml-2 mb-1 relative shrink-0", children: element })
|
|
720
909
|
]
|
|
721
910
|
}
|
|
722
911
|
);
|
|
@@ -729,41 +918,41 @@ var Video = (props) => {
|
|
|
729
918
|
};
|
|
730
919
|
|
|
731
920
|
// src/components/index.tsx
|
|
732
|
-
import { jsx as
|
|
921
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
733
922
|
var getBlockComponent = (block) => {
|
|
734
923
|
if (block.type === "divider")
|
|
735
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx16(Divider, { data: block });
|
|
736
925
|
if (block.type === "section")
|
|
737
|
-
return /* @__PURE__ */
|
|
926
|
+
return /* @__PURE__ */ jsx16(Section, { data: block });
|
|
738
927
|
if (block.type === "image")
|
|
739
|
-
return /* @__PURE__ */
|
|
928
|
+
return /* @__PURE__ */ jsx16(Image, { data: block });
|
|
740
929
|
if (block.type === "context")
|
|
741
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ jsx16(Context, { data: block });
|
|
742
931
|
if (block.type === "actions")
|
|
743
|
-
return /* @__PURE__ */
|
|
932
|
+
return /* @__PURE__ */ jsx16(Actions, { data: block });
|
|
744
933
|
if (block.type === "file")
|
|
745
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsx16(File, { data: block });
|
|
746
935
|
if (block.type === "header")
|
|
747
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ jsx16(Header2, { data: block });
|
|
748
937
|
if (block.type === "input")
|
|
749
|
-
return /* @__PURE__ */
|
|
938
|
+
return /* @__PURE__ */ jsx16(Input, { data: block });
|
|
750
939
|
if (block.type === "video")
|
|
751
|
-
return /* @__PURE__ */
|
|
940
|
+
return /* @__PURE__ */ jsx16(Video, { data: block });
|
|
752
941
|
if (block.type === "rich_text")
|
|
753
|
-
return /* @__PURE__ */
|
|
942
|
+
return /* @__PURE__ */ jsx16(RichText, { data: block });
|
|
754
943
|
return null;
|
|
755
944
|
};
|
|
756
945
|
var getElementComponent = (element) => {
|
|
757
946
|
if (element.type === "button")
|
|
758
|
-
return /* @__PURE__ */
|
|
947
|
+
return /* @__PURE__ */ jsx16(ButtonElement, { data: element });
|
|
759
948
|
if (element.type === "checkboxes")
|
|
760
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx16(CheckboxesElement, { data: element });
|
|
761
950
|
if (element.type === "image")
|
|
762
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ jsx16(ImageElement, { data: element });
|
|
763
952
|
if (element.type === "plain_text_input")
|
|
764
|
-
return /* @__PURE__ */
|
|
953
|
+
return /* @__PURE__ */ jsx16(PlaintTextInput, { data: element });
|
|
765
954
|
if (element.type === "users_select")
|
|
766
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ jsx16(UsersSelectElement, { data: element });
|
|
767
956
|
if (element.type === "datepicker")
|
|
768
957
|
return null;
|
|
769
958
|
if (element.type === "datetimepicker")
|
|
@@ -802,15 +991,15 @@ var getElementComponent = (element) => {
|
|
|
802
991
|
};
|
|
803
992
|
|
|
804
993
|
// src/block_wrapper.tsx
|
|
805
|
-
import { jsx as
|
|
994
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
806
995
|
var BlockWrapper = (props) => {
|
|
807
996
|
const { children } = props;
|
|
808
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsx17("div", { className: "text-base break-words font-normal", children });
|
|
809
998
|
};
|
|
810
999
|
|
|
811
1000
|
// src/message.tsx
|
|
812
1001
|
import { useEffect as useEffect5 } from "react";
|
|
813
|
-
import { jsx as
|
|
1002
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
814
1003
|
var Message = (props) => {
|
|
815
1004
|
const {
|
|
816
1005
|
blocks,
|
|
@@ -821,22 +1010,25 @@ var Message = (props) => {
|
|
|
821
1010
|
style,
|
|
822
1011
|
showBlockKitDebug = false,
|
|
823
1012
|
unstyled = false,
|
|
824
|
-
data = {}
|
|
1013
|
+
data = {},
|
|
1014
|
+
hooks = {}
|
|
825
1015
|
} = props;
|
|
826
|
-
const { setChannels, setUsers } = useGlobalData();
|
|
1016
|
+
const { setChannels, setUsers, setHooks } = useGlobalData();
|
|
827
1017
|
useEffect5(() => {
|
|
828
1018
|
if (data.users)
|
|
829
1019
|
setUsers(data.users);
|
|
830
1020
|
if (data.channels)
|
|
831
1021
|
setChannels(data.channels);
|
|
1022
|
+
if (hooks)
|
|
1023
|
+
setHooks(hooks);
|
|
832
1024
|
}, [data]);
|
|
833
|
-
return /* @__PURE__ */
|
|
1025
|
+
return /* @__PURE__ */ jsx18("div", { id: "slack_blocks_to_jsx", children: /* @__PURE__ */ jsxs12(
|
|
834
1026
|
"section",
|
|
835
1027
|
{
|
|
836
1028
|
className: `flex gap-2 w-full max-w-[600px] slack_blocks_to_jsx relative ${unstyled ? "styles_disabled" : "styles_enabled"} ${className}`,
|
|
837
1029
|
style,
|
|
838
1030
|
children: [
|
|
839
|
-
showBlockKitDebug && /* @__PURE__ */
|
|
1031
|
+
showBlockKitDebug && /* @__PURE__ */ jsx18(
|
|
840
1032
|
"a",
|
|
841
1033
|
{
|
|
842
1034
|
target: "_blank",
|
|
@@ -848,14 +1040,14 @@ var Message = (props) => {
|
|
|
848
1040
|
children: "Open in Slack Block Kit Builder"
|
|
849
1041
|
}
|
|
850
1042
|
),
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ jsx18("div", { className: "shrink-0", children: /* @__PURE__ */ jsx18("img", { src: logo, className: "w-9 h-9", alt: name }) }),
|
|
1044
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col w-full", children: [
|
|
1045
|
+
/* @__PURE__ */ jsx18(Header, { name, time }),
|
|
1046
|
+
/* @__PURE__ */ jsx18("div", { children: blocks.map((block, i) => {
|
|
855
1047
|
const element = getBlockComponent(block);
|
|
856
1048
|
if (!element)
|
|
857
1049
|
return null;
|
|
858
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ jsx18(BlockWrapper, { children: element }, i);
|
|
859
1051
|
}) })
|
|
860
1052
|
] })
|
|
861
1053
|
]
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");#slack_blocks_to_jsx :is(.pointer-events-none){pointer-events:none}#slack_blocks_to_jsx :is(.visible){visibility:visible}#slack_blocks_to_jsx :is(.absolute){position:absolute}#slack_blocks_to_jsx :is(.relative){position:relative}#slack_blocks_to_jsx :is(.-left-3){left:-.75rem}#slack_blocks_to_jsx :is(.-right-\[5px\]){right:-5px}#slack_blocks_to_jsx :is(.-top-\[5px\]){top:-5px}#slack_blocks_to_jsx :is(.left-2){left:.5rem}#slack_blocks_to_jsx :is(.right-0){right:0}#slack_blocks_to_jsx :is(.right-1){right:.25rem}#slack_blocks_to_jsx :is(.top-0){top:0}#slack_blocks_to_jsx :is(.top-1\/2){top:50%}#slack_blocks_to_jsx :is(.top-2){top:.5rem}#slack_blocks_to_jsx :is(.top-\[24px\]){top:24px}#slack_blocks_to_jsx :is(.z-10){z-index:10}#slack_blocks_to_jsx :is(.z-20){z-index:20}#slack_blocks_to_jsx :is(.z-\[10\]){z-index:10}#slack_blocks_to_jsx :is(.my-1){margin-bottom:.25rem;margin-top:.25rem}#slack_blocks_to_jsx :is(.my-2){margin-bottom:.5rem;margin-top:.5rem}#slack_blocks_to_jsx :is(.mb-1){margin-bottom:.25rem}#slack_blocks_to_jsx :is(.mb-2){margin-bottom:.5rem}#slack_blocks_to_jsx :is(.ml-2){margin-left:.5rem}#slack_blocks_to_jsx :is(.mr-2){margin-right:.5rem}#slack_blocks_to_jsx :is(.mt-1){margin-top:.25rem}#slack_blocks_to_jsx :is(.mt-2){margin-top:.5rem}#slack_blocks_to_jsx :is(.block){display:block}#slack_blocks_to_jsx :is(.inline){display:inline}#slack_blocks_to_jsx :is(.flex){display:flex}#slack_blocks_to_jsx :is(.grid){display:grid}#slack_blocks_to_jsx :is(.h-3){height:.75rem}#slack_blocks_to_jsx :is(.h-5){height:1.25rem}#slack_blocks_to_jsx :is(.h-7){height:1.75rem}#slack_blocks_to_jsx :is(.h-9){height:2.25rem}#slack_blocks_to_jsx :is(.h-\[10px\]){height:10px}#slack_blocks_to_jsx :is(.h-\[14px\]){height:14px}#slack_blocks_to_jsx :is(.h-\[15px\]){height:15px}#slack_blocks_to_jsx :is(.h-\[28px\]){height:28px}#slack_blocks_to_jsx :is(.h-\[88px\]){height:88px}#slack_blocks_to_jsx :is(.h-\[9px\]){height:9px}#slack_blocks_to_jsx :is(.h-full){height:100%}#slack_blocks_to_jsx :is(.max-h-\[240px\]){max-height:240px}#slack_blocks_to_jsx :is(.min-h-\[28px\]){min-height:28px}#slack_blocks_to_jsx :is(.w-3){width:.75rem}#slack_blocks_to_jsx :is(.w-5){width:1.25rem}#slack_blocks_to_jsx :is(.w-9){width:2.25rem}#slack_blocks_to_jsx :is(.w-\[10px\]){width:10px}#slack_blocks_to_jsx :is(.w-\[15px\]){width:15px}#slack_blocks_to_jsx :is(.w-\[190px\]){width:190px}#slack_blocks_to_jsx :is(.w-\[27px\]){width:27px}#slack_blocks_to_jsx :is(.w-\[322px\]){width:322px}#slack_blocks_to_jsx :is(.w-\[88px\]){width:88px}#slack_blocks_to_jsx :is(.w-\[9px\]){width:9px}#slack_blocks_to_jsx :is(.w-full){width:100%}#slack_blocks_to_jsx :is(.min-w-\[56px\]){min-width:56px}#slack_blocks_to_jsx :is(.max-w-\[322px\]){max-width:322px}#slack_blocks_to_jsx :is(.max-w-\[600px\]){max-width:600px}#slack_blocks_to_jsx :is(.max-w-max){max-width:-moz-max-content;max-width:max-content}#slack_blocks_to_jsx :is(.shrink-0){flex-shrink:0}#slack_blocks_to_jsx :is(.grow){flex-grow:1}#slack_blocks_to_jsx :is(.-translate-y-1\/2){--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.cursor-pointer){cursor:pointer}#slack_blocks_to_jsx :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}#slack_blocks_to_jsx :is(.flex-col){flex-direction:column}#slack_blocks_to_jsx :is(.flex-wrap){flex-wrap:wrap}#slack_blocks_to_jsx :is(.items-center){align-items:center}#slack_blocks_to_jsx :is(.items-baseline){align-items:baseline}#slack_blocks_to_jsx :is(.justify-center){justify-content:center}#slack_blocks_to_jsx :is(.justify-between){justify-content:space-between}#slack_blocks_to_jsx :is(.gap-1){gap:.25rem}#slack_blocks_to_jsx :is(.gap-2){gap:.5rem}#slack_blocks_to_jsx :is(.gap-3){gap:.75rem}#slack_blocks_to_jsx :is(.gap-\[5px\]){gap:5px}#slack_blocks_to_jsx :is(.overflow-auto){overflow:auto}#slack_blocks_to_jsx :is(.overflow-hidden){overflow:hidden}#slack_blocks_to_jsx :is(.truncate){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#slack_blocks_to_jsx :is(.whitespace-nowrap){white-space:nowrap}#slack_blocks_to_jsx :is(.break-words){overflow-wrap:break-word}#slack_blocks_to_jsx :is(.rounded){border-radius:.25rem}#slack_blocks_to_jsx :is(.rounded-\[2px\]){border-radius:2px}#slack_blocks_to_jsx :is(.rounded-\[6px\]){border-radius:6px}#slack_blocks_to_jsx :is(.rounded-full){border-radius:9999px}#slack_blocks_to_jsx :is(.rounded-lg){border-radius:.5rem}#slack_blocks_to_jsx :is(.rounded-md){border-radius:.375rem}#slack_blocks_to_jsx :is(.border){border-width:1px}#slack_blocks_to_jsx :is(.border-\[1\.5px\]){border-width:1.5px}#slack_blocks_to_jsx :is(.border-b){border-bottom-width:1px}#slack_blocks_to_jsx :is(.border-solid){border-style:solid}#slack_blocks_to_jsx :is(.border-black-primary){--tw-border-opacity:1;border-color:rgb(29 28 29/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-black-primary\.3){border-color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.border-black-secondary){--tw-border-opacity:1;border-color:rgb(97 96 97/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-gray-primary){--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary){--tw-border-opacity:1;border-color:rgb(0 122 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary\.3){border-color:rgba(0,122,90,.3)}#slack_blocks_to_jsx :is(.border-red-primary){--tw-border-opacity:1;border-color:rgb(224 30 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-red-primary\.3){border-color:rgba(224,30,90,.3)}#slack_blocks_to_jsx :is(.bg-black-primary\/\[0\.13\]){background-color:rgba(29,28,29,.13)}#slack_blocks_to_jsx :is(.bg-gray-300){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-green-secondary){--tw-bg-opacity:1;background-color:rgb(32 162 113/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-white-secondary){--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.object-cover){-o-object-fit:cover;object-fit:cover}#slack_blocks_to_jsx :is(.p-2){padding:.5rem}#slack_blocks_to_jsx :is(.px-2){padding-left:.5rem;padding-right:.5rem}#slack_blocks_to_jsx :is(.px-6){padding-left:1.5rem;padding-right:1.5rem}#slack_blocks_to_jsx :is(.px-\[3px\]){padding-left:3px;padding-right:3px}#slack_blocks_to_jsx :is(.py-1){padding-bottom:.25rem;padding-top:.25rem}#slack_blocks_to_jsx :is(.py-3){padding-bottom:.75rem;padding-top:.75rem}#slack_blocks_to_jsx :is(.py-\[1px\]){padding-bottom:1px;padding-top:1px}#slack_blocks_to_jsx :is(.pb-\[1px\]){padding-bottom:1px}#slack_blocks_to_jsx :is(.pr-3){padding-right:.75rem}#slack_blocks_to_jsx :is(.pr-7){padding-right:1.75rem}#slack_blocks_to_jsx :is(.pt-0){padding-top:0}#slack_blocks_to_jsx :is(.text-center){text-align:center}#slack_blocks_to_jsx :is(.text-\[10px\]){font-size:10px}#slack_blocks_to_jsx :is(.text-\[15px\]){font-size:15px}#slack_blocks_to_jsx :is(.text-\[8px\]){font-size:8px}#slack_blocks_to_jsx :is(.text-base){font-size:15px;line-height:1.46668}#slack_blocks_to_jsx :is(.text-small){font-size:13px;line-height:1.38461538}#slack_blocks_to_jsx :is(.text-xs){font-size:.75rem;line-height:1rem}#slack_blocks_to_jsx :is(.font-black){font-weight:900}#slack_blocks_to_jsx :is(.font-normal){font-weight:400}#slack_blocks_to_jsx :is(.font-semibold){font-weight:600}#slack_blocks_to_jsx :is(.uppercase){text-transform:uppercase}#slack_blocks_to_jsx :is(.leading-\[12\.5px\]){line-height:12.5px}#slack_blocks_to_jsx :is(.leading-\[17\.6px\]){line-height:17.6px}#slack_blocks_to_jsx :is(.leading-\[8px\]){line-height:8px}#slack_blocks_to_jsx :is(.text-black-primary){--tw-text-opacity:1;color:rgb(29 28 29/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-black-primary\.3){color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.text-black-primary\/\[0\.7\]){color:rgba(29,28,29,.7)}#slack_blocks_to_jsx :is(.text-black-secondary){--tw-text-opacity:1;color:rgb(97 96 97/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-500){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-primary){--tw-text-opacity:1;color:rgb(18 100 163/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-green-primary){--tw-text-opacity:1;color:rgb(0 122 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-red-primary){--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.underline){text-decoration-line:underline}#slack_blocks_to_jsx :is(.shadow-custom_shadow-1){--tw-shadow-color:rgba(29,28,29,.13) 0px 0px 0px 1px,rgba(0,0,0,.12) 0px 5px 10px 0px;--tw-shadow:var(--tw-shadow-colored)}#slack_blocks_to_jsx :is(.outline){outline-style:solid}#slack_blocks_to_jsx :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.slack_blocks_to_jsx.styles_enabled{font-family:Open Sans,sans-serif!important;white-space:pre-wrap!important}.slack_blocks_to_jsx.styles_enabled *,.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{border:0 solid #e5e7eb;box-sizing:border-box}.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{--tw-content:""}.slack_blocks_to_jsx.styles_enabled :host,.slack_blocks_to_jsx.styles_enabled html{line-height:1.5;-webkit-text-size-adjust:100%;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.slack_blocks_to_jsx.styles_enabled body{line-height:inherit;margin:0}.slack_blocks_to_jsx.styles_enabled hr{border-top-width:1px;color:inherit;height:0}.slack_blocks_to_jsx.styles_enabled abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.slack_blocks_to_jsx.styles_enabled h1,.slack_blocks_to_jsx.styles_enabled h2,.slack_blocks_to_jsx.styles_enabled h3,.slack_blocks_to_jsx.styles_enabled h4,.slack_blocks_to_jsx.styles_enabled h5,.slack_blocks_to_jsx.styles_enabled h6{font-size:inherit;font-weight:inherit}.slack_blocks_to_jsx.styles_enabled a{color:inherit;text-decoration:inherit}.slack_blocks_to_jsx.styles_enabled b,.slack_blocks_to_jsx.styles_enabled strong{font-weight:bolder}.slack_blocks_to_jsx.styles_enabled code,.slack_blocks_to_jsx.styles_enabled kbd,.slack_blocks_to_jsx.styles_enabled pre,.slack_blocks_to_jsx.styles_enabled samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}.slack_blocks_to_jsx.styles_enabled small{font-size:80%}.slack_blocks_to_jsx.styles_enabled sub,.slack_blocks_to_jsx.styles_enabled sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.slack_blocks_to_jsx.styles_enabled sub{bottom:-.25em}.slack_blocks_to_jsx.styles_enabled sup{top:-.5em}.slack_blocks_to_jsx.styles_enabled table{border-collapse:collapse;border-color:inherit;text-indent:0}.slack_blocks_to_jsx.styles_enabled button,.slack_blocks_to_jsx.styles_enabled input,.slack_blocks_to_jsx.styles_enabled optgroup,.slack_blocks_to_jsx.styles_enabled select,.slack_blocks_to_jsx.styles_enabled textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}.slack_blocks_to_jsx.styles_enabled button,.slack_blocks_to_jsx.styles_enabled select{text-transform:none}.slack_blocks_to_jsx.styles_enabled [type=button],.slack_blocks_to_jsx.styles_enabled [type=reset],.slack_blocks_to_jsx.styles_enabled [type=submit],.slack_blocks_to_jsx.styles_enabled button{-webkit-appearance:button;background-color:initial;background-image:none}.slack_blocks_to_jsx.styles_enabled :-moz-focusring{outline:auto}.slack_blocks_to_jsx.styles_enabled :-moz-ui-invalid{box-shadow:none}.slack_blocks_to_jsx.styles_enabled progress{vertical-align:initial}.slack_blocks_to_jsx.styles_enabled ::-webkit-inner-spin-button,.slack_blocks_to_jsx.styles_enabled ::-webkit-outer-spin-button{height:auto}.slack_blocks_to_jsx.styles_enabled [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.slack_blocks_to_jsx.styles_enabled ::-webkit-search-decoration{-webkit-appearance:none}.slack_blocks_to_jsx.styles_enabled ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.slack_blocks_to_jsx.styles_enabled summary{display:list-item}.slack_blocks_to_jsx.styles_enabled blockquote,.slack_blocks_to_jsx.styles_enabled dd,.slack_blocks_to_jsx.styles_enabled dl,.slack_blocks_to_jsx.styles_enabled fieldset,.slack_blocks_to_jsx.styles_enabled figure,.slack_blocks_to_jsx.styles_enabled h1,.slack_blocks_to_jsx.styles_enabled h2,.slack_blocks_to_jsx.styles_enabled h3,.slack_blocks_to_jsx.styles_enabled h4,.slack_blocks_to_jsx.styles_enabled h5,.slack_blocks_to_jsx.styles_enabled h6,.slack_blocks_to_jsx.styles_enabled hr,.slack_blocks_to_jsx.styles_enabled p,.slack_blocks_to_jsx.styles_enabled pre{margin:0}.slack_blocks_to_jsx.styles_enabled fieldset,.slack_blocks_to_jsx.styles_enabled legend{padding:0}.slack_blocks_to_jsx.styles_enabled menu,.slack_blocks_to_jsx.styles_enabled ol,.slack_blocks_to_jsx.styles_enabled ul{list-style:none;margin:0;padding:0}.slack_blocks_to_jsx.styles_enabled dialog{padding:0}.slack_blocks_to_jsx.styles_enabled textarea{resize:vertical}.slack_blocks_to_jsx.styles_enabled input::-moz-placeholder,.slack_blocks_to_jsx.styles_enabled textarea::-moz-placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx.styles_enabled input::placeholder,.slack_blocks_to_jsx.styles_enabled textarea::placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx.styles_enabled [role=button],.slack_blocks_to_jsx.styles_enabled button{cursor:pointer}.slack_blocks_to_jsx.styles_enabled :disabled{cursor:default}.slack_blocks_to_jsx.styles_enabled audio,.slack_blocks_to_jsx.styles_enabled canvas,.slack_blocks_to_jsx.styles_enabled embed,.slack_blocks_to_jsx.styles_enabled iframe,.slack_blocks_to_jsx.styles_enabled img,.slack_blocks_to_jsx.styles_enabled object,.slack_blocks_to_jsx.styles_enabled svg,.slack_blocks_to_jsx.styles_enabled video{display:block;vertical-align:middle}.slack_blocks_to_jsx.styles_enabled img,.slack_blocks_to_jsx.styles_enabled video{height:auto;max-width:100%}.slack_blocks_to_jsx.styles_enabled [hidden]{display:none}.slack_blocks_to_jsx.styles_enabled *,.slack_blocks_to_jsx.styles_enabled ::backdrop,.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.slack_blocks_to_jsx.styles_enabled .slack_code{display:block;margin-bottom:.25rem;margin-top:.25rem;padding:.5rem;width:100%}.slack_blocks_to_jsx.styles_enabled .slack_code,.slack_blocks_to_jsx.styles_enabled .slack_inline_code{background-color:rgba(29,28,29,.04);border-color:rgba(29,28,29,.13);border-radius:3px;border-width:1px;font-size:.75rem;line-height:1rem;line-height:1.5;overflow-wrap:break-word;white-space:pre-wrap}.slack_blocks_to_jsx.styles_enabled .slack_inline_code{display:inline-block;padding:.125rem 3px 1px;--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}.slack_blocks_to_jsx.styles_enabled .slack_bold,.slack_blocks_to_jsx.styles_enabled .slack_bold code{font-weight:600}.slack_blocks_to_jsx.styles_enabled .slack_blockquote{display:block}.slack_blocks_to_jsx.styles_enabled .slack_inline_blockquote{display:inline-block}.slack_blocks_to_jsx.styles_enabled blockquote{padding-left:16px;position:relative}.slack_blocks_to_jsx.styles_enabled blockquote:before{background:#ddd;border-radius:8px;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:4px}.slack_blocks_to_jsx.styles_enabled .slack_channel,.slack_blocks_to_jsx.styles_enabled .slack_user{background:rgba(29,155,209,.1);color:#1264a3;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slack_blocks_to_jsx.styles_disabled>*{all:unset!important}#slack_blocks_to_jsx :is(.hover\:bg-blue-primary:hover){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.hover\:text-white-primary:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}#slack_blocks_to_jsx :is(.group:hover .group-hover\:border-white-primary){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.group:hover .group-hover\:bg-blue-primary){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.group:hover .group-hover\:text-white-primary){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");#slack_blocks_to_jsx :is(.pointer-events-none){pointer-events:none}#slack_blocks_to_jsx :is(.visible){visibility:visible}#slack_blocks_to_jsx :is(.static){position:static}#slack_blocks_to_jsx :is(.absolute){position:absolute}#slack_blocks_to_jsx :is(.relative){position:relative}#slack_blocks_to_jsx :is(.-left-3){left:-.75rem}#slack_blocks_to_jsx :is(.-right-\[5px\]){right:-5px}#slack_blocks_to_jsx :is(.-top-\[5px\]){top:-5px}#slack_blocks_to_jsx :is(.left-2){left:.5rem}#slack_blocks_to_jsx :is(.right-0){right:0}#slack_blocks_to_jsx :is(.right-1){right:.25rem}#slack_blocks_to_jsx :is(.top-0){top:0}#slack_blocks_to_jsx :is(.top-1\/2){top:50%}#slack_blocks_to_jsx :is(.top-2){top:.5rem}#slack_blocks_to_jsx :is(.top-\[24px\]){top:24px}#slack_blocks_to_jsx :is(.z-10){z-index:10}#slack_blocks_to_jsx :is(.z-20){z-index:20}#slack_blocks_to_jsx :is(.z-\[10\]){z-index:10}#slack_blocks_to_jsx :is(.my-1){margin-bottom:.25rem;margin-top:.25rem}#slack_blocks_to_jsx :is(.my-2){margin-bottom:.5rem;margin-top:.5rem}#slack_blocks_to_jsx :is(.mb-1){margin-bottom:.25rem}#slack_blocks_to_jsx :is(.mb-2){margin-bottom:.5rem}#slack_blocks_to_jsx :is(.ml-2){margin-left:.5rem}#slack_blocks_to_jsx :is(.mr-2){margin-right:.5rem}#slack_blocks_to_jsx :is(.mt-1){margin-top:.25rem}#slack_blocks_to_jsx :is(.mt-2){margin-top:.5rem}#slack_blocks_to_jsx :is(.block){display:block}#slack_blocks_to_jsx :is(.inline-block){display:inline-block}#slack_blocks_to_jsx :is(.inline){display:inline}#slack_blocks_to_jsx :is(.flex){display:flex}#slack_blocks_to_jsx :is(.grid){display:grid}#slack_blocks_to_jsx :is(.h-1){height:.25rem}#slack_blocks_to_jsx :is(.h-1\.5){height:.375rem}#slack_blocks_to_jsx :is(.h-3){height:.75rem}#slack_blocks_to_jsx :is(.h-5){height:1.25rem}#slack_blocks_to_jsx :is(.h-7){height:1.75rem}#slack_blocks_to_jsx :is(.h-9){height:2.25rem}#slack_blocks_to_jsx :is(.h-\[10px\]){height:10px}#slack_blocks_to_jsx :is(.h-\[14px\]){height:14px}#slack_blocks_to_jsx :is(.h-\[15px\]){height:15px}#slack_blocks_to_jsx :is(.h-\[22px\]){height:22px}#slack_blocks_to_jsx :is(.h-\[28px\]){height:28px}#slack_blocks_to_jsx :is(.h-\[88px\]){height:88px}#slack_blocks_to_jsx :is(.h-\[9px\]){height:9px}#slack_blocks_to_jsx :is(.h-full){height:100%}#slack_blocks_to_jsx :is(.max-h-\[240px\]){max-height:240px}#slack_blocks_to_jsx :is(.min-h-\[28px\]){min-height:28px}#slack_blocks_to_jsx :is(.w-1){width:.25rem}#slack_blocks_to_jsx :is(.w-1\.5){width:.375rem}#slack_blocks_to_jsx :is(.w-3){width:.75rem}#slack_blocks_to_jsx :is(.w-5){width:1.25rem}#slack_blocks_to_jsx :is(.w-9){width:2.25rem}#slack_blocks_to_jsx :is(.w-\[10px\]){width:10px}#slack_blocks_to_jsx :is(.w-\[15px\]){width:15px}#slack_blocks_to_jsx :is(.w-\[190px\]){width:190px}#slack_blocks_to_jsx :is(.w-\[22px\]){width:22px}#slack_blocks_to_jsx :is(.w-\[27px\]){width:27px}#slack_blocks_to_jsx :is(.w-\[322px\]){width:322px}#slack_blocks_to_jsx :is(.w-\[88px\]){width:88px}#slack_blocks_to_jsx :is(.w-\[9px\]){width:9px}#slack_blocks_to_jsx :is(.w-full){width:100%}#slack_blocks_to_jsx :is(.min-w-\[56px\]){min-width:56px}#slack_blocks_to_jsx :is(.max-w-\[322px\]){max-width:322px}#slack_blocks_to_jsx :is(.max-w-\[600px\]){max-width:600px}#slack_blocks_to_jsx :is(.max-w-max){max-width:-moz-max-content;max-width:max-content}#slack_blocks_to_jsx :is(.shrink-0){flex-shrink:0}#slack_blocks_to_jsx :is(.grow){flex-grow:1}#slack_blocks_to_jsx :is(.-translate-y-1\/2){--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.cursor-pointer){cursor:pointer}#slack_blocks_to_jsx :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}#slack_blocks_to_jsx :is(.list-none){list-style-type:none}#slack_blocks_to_jsx :is(.flex-col){flex-direction:column}#slack_blocks_to_jsx :is(.flex-wrap){flex-wrap:wrap}#slack_blocks_to_jsx :is(.items-center){align-items:center}#slack_blocks_to_jsx :is(.items-baseline){align-items:baseline}#slack_blocks_to_jsx :is(.justify-center){justify-content:center}#slack_blocks_to_jsx :is(.justify-between){justify-content:space-between}#slack_blocks_to_jsx :is(.gap-1){gap:.25rem}#slack_blocks_to_jsx :is(.gap-2){gap:.5rem}#slack_blocks_to_jsx :is(.gap-3){gap:.75rem}#slack_blocks_to_jsx :is(.gap-\[5px\]){gap:5px}#slack_blocks_to_jsx :is(.self-stretch){align-self:stretch}#slack_blocks_to_jsx :is(.overflow-auto){overflow:auto}#slack_blocks_to_jsx :is(.overflow-hidden){overflow:hidden}#slack_blocks_to_jsx :is(.truncate){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#slack_blocks_to_jsx :is(.whitespace-nowrap){white-space:nowrap}#slack_blocks_to_jsx :is(.whitespace-pre-wrap){white-space:pre-wrap}#slack_blocks_to_jsx :is(.break-words){overflow-wrap:break-word}#slack_blocks_to_jsx :is(.rounded){border-radius:.25rem}#slack_blocks_to_jsx :is(.rounded-\[1\.5px\]){border-radius:1.5px}#slack_blocks_to_jsx :is(.rounded-\[2px\]){border-radius:2px}#slack_blocks_to_jsx :is(.rounded-\[6px\]){border-radius:6px}#slack_blocks_to_jsx :is(.rounded-full){border-radius:9999px}#slack_blocks_to_jsx :is(.rounded-lg){border-radius:.5rem}#slack_blocks_to_jsx :is(.rounded-md){border-radius:.375rem}#slack_blocks_to_jsx :is(.border){border-width:1px}#slack_blocks_to_jsx :is(.border-\[1\.5px\]){border-width:1.5px}#slack_blocks_to_jsx :is(.border-b){border-bottom-width:1px}#slack_blocks_to_jsx :is(.border-solid){border-style:solid}#slack_blocks_to_jsx :is(.border-black-primary){--tw-border-opacity:1;border-color:rgb(29 28 29/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-black-primary\.3){border-color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.border-black-secondary){--tw-border-opacity:1;border-color:rgb(97 96 97/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-current){border-color:currentColor}#slack_blocks_to_jsx :is(.border-gray-primary){--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary){--tw-border-opacity:1;border-color:rgb(0 122 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary\.3){border-color:rgba(0,122,90,.3)}#slack_blocks_to_jsx :is(.border-red-primary){--tw-border-opacity:1;border-color:rgb(224 30 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-red-primary\.3){border-color:rgba(224,30,90,.3)}#slack_blocks_to_jsx :is(.bg-black-primary\/\[0\.13\]){background-color:rgba(29,28,29,.13)}#slack_blocks_to_jsx :is(.bg-current){background-color:currentColor}#slack_blocks_to_jsx :is(.bg-gray-300){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-gray-primary){--tw-bg-opacity:1;background-color:rgb(221 221 221/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-gray-secondary){--tw-bg-opacity:1;background-color:rgb(246 246 246/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-green-secondary){--tw-bg-opacity:1;background-color:rgb(32 162 113/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-white-secondary){--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.object-cover){-o-object-fit:cover;object-fit:cover}#slack_blocks_to_jsx :is(.p-2){padding:.5rem}#slack_blocks_to_jsx :is(.px-2){padding-left:.5rem;padding-right:.5rem}#slack_blocks_to_jsx :is(.px-6){padding-left:1.5rem;padding-right:1.5rem}#slack_blocks_to_jsx :is(.px-\[3px\]){padding-left:3px;padding-right:3px}#slack_blocks_to_jsx :is(.py-1){padding-bottom:.25rem;padding-top:.25rem}#slack_blocks_to_jsx :is(.py-3){padding-bottom:.75rem;padding-top:.75rem}#slack_blocks_to_jsx :is(.py-\[1px\]){padding-bottom:1px;padding-top:1px}#slack_blocks_to_jsx :is(.pb-\[1px\]){padding-bottom:1px}#slack_blocks_to_jsx :is(.pr-3){padding-right:.75rem}#slack_blocks_to_jsx :is(.pr-7){padding-right:1.75rem}#slack_blocks_to_jsx :is(.pt-0){padding-top:0}#slack_blocks_to_jsx :is(.text-center){text-align:center}#slack_blocks_to_jsx :is(.text-\[10px\]){font-size:10px}#slack_blocks_to_jsx :is(.text-\[15px\]){font-size:15px}#slack_blocks_to_jsx :is(.text-\[8px\]){font-size:8px}#slack_blocks_to_jsx :is(.text-base){font-size:15px;line-height:1.46668}#slack_blocks_to_jsx :is(.text-small){font-size:13px;line-height:1.38461538}#slack_blocks_to_jsx :is(.text-xs){font-size:.75rem;line-height:1rem}#slack_blocks_to_jsx :is(.font-black){font-weight:900}#slack_blocks_to_jsx :is(.font-medium){font-weight:500}#slack_blocks_to_jsx :is(.font-normal){font-weight:400}#slack_blocks_to_jsx :is(.font-semibold){font-weight:600}#slack_blocks_to_jsx :is(.uppercase){text-transform:uppercase}#slack_blocks_to_jsx :is(.italic){font-style:italic}#slack_blocks_to_jsx :is(.leading-\[1\.50001\]){line-height:1.50001}#slack_blocks_to_jsx :is(.leading-\[12\.5px\]){line-height:12.5px}#slack_blocks_to_jsx :is(.leading-\[17\.6px\]){line-height:17.6px}#slack_blocks_to_jsx :is(.leading-\[8px\]){line-height:8px}#slack_blocks_to_jsx :is(.text-black-primary){--tw-text-opacity:1;color:rgb(29 28 29/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-black-primary\.3){color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.text-black-primary\/\[0\.7\]){color:rgba(29,28,29,.7)}#slack_blocks_to_jsx :is(.text-black-secondary){--tw-text-opacity:1;color:rgb(97 96 97/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-500){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-primary){--tw-text-opacity:1;color:rgb(18 100 163/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-green-primary){--tw-text-opacity:1;color:rgb(0 122 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-red-primary){--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.underline){text-decoration-line:underline}#slack_blocks_to_jsx :is(.line-through){text-decoration-line:line-through}#slack_blocks_to_jsx :is(.underline-offset-4){text-underline-offset:4px}#slack_blocks_to_jsx :is(.shadow-custom_shadow-1){--tw-shadow-color:rgba(29,28,29,.13) 0px 0px 0px 1px,rgba(0,0,0,.12) 0px 5px 10px 0px;--tw-shadow:var(--tw-shadow-colored)}#slack_blocks_to_jsx :is(.outline){outline-style:solid}#slack_blocks_to_jsx :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.slack_blocks_to_jsx.styles_enabled{font-family:Open Sans,sans-serif!important;white-space:pre-wrap!important}.slack_blocks_to_jsx.styles_enabled *,.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{border:0 solid #e5e7eb;box-sizing:border-box}.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{--tw-content:""}.slack_blocks_to_jsx.styles_enabled :host,.slack_blocks_to_jsx.styles_enabled html{line-height:1.5;-webkit-text-size-adjust:100%;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.slack_blocks_to_jsx.styles_enabled body{line-height:inherit;margin:0}.slack_blocks_to_jsx.styles_enabled hr{border-top-width:1px;color:inherit;height:0}.slack_blocks_to_jsx.styles_enabled abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.slack_blocks_to_jsx.styles_enabled h1,.slack_blocks_to_jsx.styles_enabled h2,.slack_blocks_to_jsx.styles_enabled h3,.slack_blocks_to_jsx.styles_enabled h4,.slack_blocks_to_jsx.styles_enabled h5,.slack_blocks_to_jsx.styles_enabled h6{font-size:inherit;font-weight:inherit}.slack_blocks_to_jsx.styles_enabled a{color:inherit;text-decoration:inherit}.slack_blocks_to_jsx.styles_enabled b,.slack_blocks_to_jsx.styles_enabled strong{font-weight:bolder}.slack_blocks_to_jsx.styles_enabled code,.slack_blocks_to_jsx.styles_enabled kbd,.slack_blocks_to_jsx.styles_enabled pre,.slack_blocks_to_jsx.styles_enabled samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}.slack_blocks_to_jsx.styles_enabled small{font-size:80%}.slack_blocks_to_jsx.styles_enabled sub,.slack_blocks_to_jsx.styles_enabled sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.slack_blocks_to_jsx.styles_enabled sub{bottom:-.25em}.slack_blocks_to_jsx.styles_enabled sup{top:-.5em}.slack_blocks_to_jsx.styles_enabled table{border-collapse:collapse;border-color:inherit;text-indent:0}.slack_blocks_to_jsx.styles_enabled button,.slack_blocks_to_jsx.styles_enabled input,.slack_blocks_to_jsx.styles_enabled optgroup,.slack_blocks_to_jsx.styles_enabled select,.slack_blocks_to_jsx.styles_enabled textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}.slack_blocks_to_jsx.styles_enabled button,.slack_blocks_to_jsx.styles_enabled select{text-transform:none}.slack_blocks_to_jsx.styles_enabled [type=button],.slack_blocks_to_jsx.styles_enabled [type=reset],.slack_blocks_to_jsx.styles_enabled [type=submit],.slack_blocks_to_jsx.styles_enabled button{-webkit-appearance:button;background-color:initial;background-image:none}.slack_blocks_to_jsx.styles_enabled :-moz-focusring{outline:auto}.slack_blocks_to_jsx.styles_enabled :-moz-ui-invalid{box-shadow:none}.slack_blocks_to_jsx.styles_enabled progress{vertical-align:initial}.slack_blocks_to_jsx.styles_enabled ::-webkit-inner-spin-button,.slack_blocks_to_jsx.styles_enabled ::-webkit-outer-spin-button{height:auto}.slack_blocks_to_jsx.styles_enabled [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.slack_blocks_to_jsx.styles_enabled ::-webkit-search-decoration{-webkit-appearance:none}.slack_blocks_to_jsx.styles_enabled ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.slack_blocks_to_jsx.styles_enabled summary{display:list-item}.slack_blocks_to_jsx.styles_enabled blockquote,.slack_blocks_to_jsx.styles_enabled dd,.slack_blocks_to_jsx.styles_enabled dl,.slack_blocks_to_jsx.styles_enabled fieldset,.slack_blocks_to_jsx.styles_enabled figure,.slack_blocks_to_jsx.styles_enabled h1,.slack_blocks_to_jsx.styles_enabled h2,.slack_blocks_to_jsx.styles_enabled h3,.slack_blocks_to_jsx.styles_enabled h4,.slack_blocks_to_jsx.styles_enabled h5,.slack_blocks_to_jsx.styles_enabled h6,.slack_blocks_to_jsx.styles_enabled hr,.slack_blocks_to_jsx.styles_enabled p,.slack_blocks_to_jsx.styles_enabled pre{margin:0}.slack_blocks_to_jsx.styles_enabled fieldset,.slack_blocks_to_jsx.styles_enabled legend{padding:0}.slack_blocks_to_jsx.styles_enabled menu,.slack_blocks_to_jsx.styles_enabled ol,.slack_blocks_to_jsx.styles_enabled ul{list-style:none;margin:0;padding:0}.slack_blocks_to_jsx.styles_enabled dialog{padding:0}.slack_blocks_to_jsx.styles_enabled textarea{resize:vertical}.slack_blocks_to_jsx.styles_enabled input::-moz-placeholder,.slack_blocks_to_jsx.styles_enabled textarea::-moz-placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx.styles_enabled input::placeholder,.slack_blocks_to_jsx.styles_enabled textarea::placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx.styles_enabled [role=button],.slack_blocks_to_jsx.styles_enabled button{cursor:pointer}.slack_blocks_to_jsx.styles_enabled :disabled{cursor:default}.slack_blocks_to_jsx.styles_enabled audio,.slack_blocks_to_jsx.styles_enabled canvas,.slack_blocks_to_jsx.styles_enabled embed,.slack_blocks_to_jsx.styles_enabled iframe,.slack_blocks_to_jsx.styles_enabled img,.slack_blocks_to_jsx.styles_enabled object,.slack_blocks_to_jsx.styles_enabled svg,.slack_blocks_to_jsx.styles_enabled video{display:block;vertical-align:middle}.slack_blocks_to_jsx.styles_enabled img,.slack_blocks_to_jsx.styles_enabled video{height:auto;max-width:100%}.slack_blocks_to_jsx.styles_enabled [hidden]{display:none}.slack_blocks_to_jsx.styles_enabled *,.slack_blocks_to_jsx.styles_enabled ::backdrop,.slack_blocks_to_jsx.styles_enabled :after,.slack_blocks_to_jsx.styles_enabled :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.slack_blocks_to_jsx.styles_enabled .slack_code{display:block;font-size:.75rem;line-height:1rem;margin-bottom:.25rem;margin-top:.25rem;padding:.5rem;width:100%}.slack_blocks_to_jsx.styles_enabled .slack_code,.slack_blocks_to_jsx.styles_enabled .slack_inline_code{background-color:rgba(29,28,29,.04);border-color:rgba(29,28,29,.13);border-radius:3px;border-width:1px;line-height:1.5;overflow-wrap:break-word;white-space:pre-wrap}.slack_blocks_to_jsx.styles_enabled .slack_inline_code{display:inline-block;padding:.125rem 3px 1px;--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}.slack_blocks_to_jsx.styles_enabled .slack_bold,.slack_blocks_to_jsx.styles_enabled .slack_bold code{font-weight:600}.slack_blocks_to_jsx.styles_enabled .slack_blockquote{display:block}.slack_blocks_to_jsx.styles_enabled .slack_inline_blockquote{display:inline-block}.slack_blocks_to_jsx.styles_enabled blockquote{padding-left:16px;position:relative}.slack_blocks_to_jsx.styles_enabled blockquote:before{background:#ddd;border-radius:8px;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:4px}.slack_blocks_to_jsx.styles_enabled .slack_channel,.slack_blocks_to_jsx.styles_enabled .slack_user{background:rgba(29,155,209,.1);color:#1264a3;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slack_blocks_to_jsx.styles_disabled>*{all:unset!important}#slack_blocks_to_jsx :is(.hover\:bg-blue-primary:hover){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.hover\:text-white-primary:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.hover\:underline:hover){text-decoration-line:underline}#slack_blocks_to_jsx :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}#slack_blocks_to_jsx :is(.group:hover .group-hover\:border-white-primary){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.group:hover .group-hover\:bg-blue-primary){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.group:hover .group-hover\:text-white-primary){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"repository": "https://github.com/themashcodee/slack-blocks-to-jsx.git",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.7",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"module": "dist/index.mjs",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"html-react-parser": "^4.2.2",
|
|
24
24
|
"node-emoji": "^2.1.0",
|
|
25
25
|
"slack-markdown": "^0.3.0",
|
|
26
|
-
"xregexp": "^5.1.1",
|
|
27
26
|
"zustand": "^4.5.2"
|
|
28
27
|
},
|
|
29
28
|
"peerDependencies": {
|