slack-blocks-to-jsx 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +955 -259
- package/dist/index.mjs +953 -257
- package/dist/style.css +1 -1
- package/package.json +9 -7
- package/readme.md +13 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement | RichTextBlockElement;
|
|
4
5
|
type ButtonElement = {
|
|
@@ -964,6 +965,10 @@ type VideoBlock = {
|
|
|
964
965
|
* The URL to be embedded. Must match any existing {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} within the app and point to a HTTPS URL.
|
|
965
966
|
*/
|
|
966
967
|
video_url: string;
|
|
968
|
+
/**
|
|
969
|
+
* This is a custom property added by slack-block-to-jsx library to more control over iframe
|
|
970
|
+
*/
|
|
971
|
+
iframeProps?: ComponentPropsWithoutRef<"iframe">;
|
|
967
972
|
};
|
|
968
973
|
type RichTextBlock = {
|
|
969
974
|
/**
|
|
@@ -1081,13 +1086,17 @@ type Channel = {
|
|
|
1081
1086
|
id: string;
|
|
1082
1087
|
name: string;
|
|
1083
1088
|
};
|
|
1089
|
+
type UserGroup = {
|
|
1090
|
+
id: string;
|
|
1091
|
+
name: string;
|
|
1092
|
+
};
|
|
1084
1093
|
type Hooks = {
|
|
1085
1094
|
user?: (data: User) => ReactNode;
|
|
1086
1095
|
channel?: (data: Channel) => ReactNode;
|
|
1096
|
+
usergroup?: (data: UserGroup) => ReactNode;
|
|
1087
1097
|
atChannel?: () => ReactNode;
|
|
1088
1098
|
atEveryone?: () => ReactNode;
|
|
1089
1099
|
atHere?: () => ReactNode;
|
|
1090
|
-
usergroup?: (id: string) => ReactNode;
|
|
1091
1100
|
emoji?: (emoji_text: string) => ReactNode;
|
|
1092
1101
|
date?: (data: {
|
|
1093
1102
|
timestamp: string;
|
|
@@ -1099,10 +1108,11 @@ type Hooks = {
|
|
|
1099
1108
|
type Data = {
|
|
1100
1109
|
users: User[];
|
|
1101
1110
|
channels: Channel[];
|
|
1102
|
-
user_groups:
|
|
1111
|
+
user_groups: UserGroup[];
|
|
1103
1112
|
hooks: Hooks;
|
|
1104
1113
|
setUsers: (users: User[]) => void;
|
|
1105
1114
|
setChannels: (channels: Channel[]) => void;
|
|
1115
|
+
setUserGroups: (channels: UserGroup[]) => void;
|
|
1106
1116
|
setHooks: (hooks: Hooks) => void;
|
|
1107
1117
|
};
|
|
1108
1118
|
type GlobalStore = Data;
|
|
@@ -1134,6 +1144,6 @@ type Props = {
|
|
|
1134
1144
|
*/
|
|
1135
1145
|
withoutWrapper?: boolean;
|
|
1136
1146
|
};
|
|
1137
|
-
declare const Message: (props: Props) => JSX.Element;
|
|
1147
|
+
declare const Message: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
1138
1148
|
|
|
1139
1149
|
export { ActionsBlock, Block, ButtonElement, ChannelsSelectElement, CheckboxesElement, ConfirmDialogObject, ContextBlock, ConversationsSelectElement, DatePickerElement, DateTimePickerElement, DispatchActionConfigObject, DividerBlock, Element, EmailInputElement, ExternalSelectElement, FileBlock, FilterObject, HeaderBlock, ImageBlock, ImageElement, InputBlock, Message, MultiChannelsSelectElement, MultiConversationsSelectElement, MultiExternalSelectElement, MultiStaticSelectElement, MultiUsersSelectElement, NumberInputElement, OptionGroupObject, OptionObject, OptionObjectWithoutUrl, OverflowMenuElement, PlainTextInputElement, RadioButtonsElement, RichTextBlock, RichTextBlockElement, RichTextBlockSubElement, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextSectionBroadcast, RichTextSectionChannel, RichTextSectionElement, RichTextSectionElementStyle, RichTextSectionElementStyleCode, RichTextSectionEmoji, RichTextSectionLink, RichTextSectionText, RichTextSectionUser, RichTextSectionUsergroup, SectionBlock, StaticSelectElement, Style, TextObject, TextObjectTextType, TimePickerElement, UrlTextInputElement, UsersSelectElement, VideoBlock };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement | RichTextBlockElement;
|
|
4
5
|
type ButtonElement = {
|
|
@@ -964,6 +965,10 @@ type VideoBlock = {
|
|
|
964
965
|
* The URL to be embedded. Must match any existing {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} within the app and point to a HTTPS URL.
|
|
965
966
|
*/
|
|
966
967
|
video_url: string;
|
|
968
|
+
/**
|
|
969
|
+
* This is a custom property added by slack-block-to-jsx library to more control over iframe
|
|
970
|
+
*/
|
|
971
|
+
iframeProps?: ComponentPropsWithoutRef<"iframe">;
|
|
967
972
|
};
|
|
968
973
|
type RichTextBlock = {
|
|
969
974
|
/**
|
|
@@ -1081,13 +1086,17 @@ type Channel = {
|
|
|
1081
1086
|
id: string;
|
|
1082
1087
|
name: string;
|
|
1083
1088
|
};
|
|
1089
|
+
type UserGroup = {
|
|
1090
|
+
id: string;
|
|
1091
|
+
name: string;
|
|
1092
|
+
};
|
|
1084
1093
|
type Hooks = {
|
|
1085
1094
|
user?: (data: User) => ReactNode;
|
|
1086
1095
|
channel?: (data: Channel) => ReactNode;
|
|
1096
|
+
usergroup?: (data: UserGroup) => ReactNode;
|
|
1087
1097
|
atChannel?: () => ReactNode;
|
|
1088
1098
|
atEveryone?: () => ReactNode;
|
|
1089
1099
|
atHere?: () => ReactNode;
|
|
1090
|
-
usergroup?: (id: string) => ReactNode;
|
|
1091
1100
|
emoji?: (emoji_text: string) => ReactNode;
|
|
1092
1101
|
date?: (data: {
|
|
1093
1102
|
timestamp: string;
|
|
@@ -1099,10 +1108,11 @@ type Hooks = {
|
|
|
1099
1108
|
type Data = {
|
|
1100
1109
|
users: User[];
|
|
1101
1110
|
channels: Channel[];
|
|
1102
|
-
user_groups:
|
|
1111
|
+
user_groups: UserGroup[];
|
|
1103
1112
|
hooks: Hooks;
|
|
1104
1113
|
setUsers: (users: User[]) => void;
|
|
1105
1114
|
setChannels: (channels: Channel[]) => void;
|
|
1115
|
+
setUserGroups: (channels: UserGroup[]) => void;
|
|
1106
1116
|
setHooks: (hooks: Hooks) => void;
|
|
1107
1117
|
};
|
|
1108
1118
|
type GlobalStore = Data;
|
|
@@ -1134,6 +1144,6 @@ type Props = {
|
|
|
1134
1144
|
*/
|
|
1135
1145
|
withoutWrapper?: boolean;
|
|
1136
1146
|
};
|
|
1137
|
-
declare const Message: (props: Props) => JSX.Element;
|
|
1147
|
+
declare const Message: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
1138
1148
|
|
|
1139
1149
|
export { ActionsBlock, Block, ButtonElement, ChannelsSelectElement, CheckboxesElement, ConfirmDialogObject, ContextBlock, ConversationsSelectElement, DatePickerElement, DateTimePickerElement, DispatchActionConfigObject, DividerBlock, Element, EmailInputElement, ExternalSelectElement, FileBlock, FilterObject, HeaderBlock, ImageBlock, ImageElement, InputBlock, Message, MultiChannelsSelectElement, MultiConversationsSelectElement, MultiExternalSelectElement, MultiStaticSelectElement, MultiUsersSelectElement, NumberInputElement, OptionGroupObject, OptionObject, OptionObjectWithoutUrl, OverflowMenuElement, PlainTextInputElement, RadioButtonsElement, RichTextBlock, RichTextBlockElement, RichTextBlockSubElement, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextSectionBroadcast, RichTextSectionChannel, RichTextSectionElement, RichTextSectionElementStyle, RichTextSectionElementStyleCode, RichTextSectionEmoji, RichTextSectionLink, RichTextSectionText, RichTextSectionUser, RichTextSectionUsergroup, SectionBlock, StaticSelectElement, Style, TextObject, TextObjectTextType, TimePickerElement, UrlTextInputElement, UsersSelectElement, VideoBlock };
|