slack-blocks-to-jsx 0.7.6 → 0.7.8
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 +44 -2
- package/dist/index.d.ts +44 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -700,7 +700,7 @@ type FilterObject = {
|
|
|
700
700
|
exclude_bot_users?: boolean;
|
|
701
701
|
};
|
|
702
702
|
|
|
703
|
-
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | VideoBlock | RichTextBlock;
|
|
703
|
+
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | TableBlock | VideoBlock | RichTextBlock;
|
|
704
704
|
type ActionsBlock = {
|
|
705
705
|
/**
|
|
706
706
|
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
@@ -970,6 +970,48 @@ type VideoBlock = {
|
|
|
970
970
|
*/
|
|
971
971
|
iframeProps?: ComponentPropsWithoutRef<"iframe">;
|
|
972
972
|
};
|
|
973
|
+
type TableBlock = {
|
|
974
|
+
/**
|
|
975
|
+
* Available in surfaces: **Messages**
|
|
976
|
+
*
|
|
977
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/table-block/ View here}
|
|
978
|
+
*
|
|
979
|
+
* A ***table*** block displays data in a structured table format. It supports up to 100 rows with 20 cells each. Only one table is allowed per message.
|
|
980
|
+
*/
|
|
981
|
+
type: "table";
|
|
982
|
+
/**
|
|
983
|
+
* 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***.
|
|
984
|
+
*/
|
|
985
|
+
block_id?: string;
|
|
986
|
+
/**
|
|
987
|
+
* An array of table rows. Maximum 100 rows, each row can have up to 20 cells.
|
|
988
|
+
*/
|
|
989
|
+
rows: TableCell[][];
|
|
990
|
+
/**
|
|
991
|
+
* Optional array to configure column behavior. Can specify alignment and text wrapping. Maximum 20 configuration items.
|
|
992
|
+
*/
|
|
993
|
+
column_settings?: TableColumnSetting[];
|
|
994
|
+
};
|
|
995
|
+
type TableCell = {
|
|
996
|
+
/**
|
|
997
|
+
* The type of cell content
|
|
998
|
+
*/
|
|
999
|
+
type: "raw_text";
|
|
1000
|
+
/**
|
|
1001
|
+
* The text content of the cell
|
|
1002
|
+
*/
|
|
1003
|
+
text: string;
|
|
1004
|
+
} | RichTextBlock;
|
|
1005
|
+
type TableColumnSetting = {
|
|
1006
|
+
/**
|
|
1007
|
+
* Text alignment for the column. Defaults to left.
|
|
1008
|
+
*/
|
|
1009
|
+
align?: "left" | "center" | "right";
|
|
1010
|
+
/**
|
|
1011
|
+
* Whether text should wrap in the column. Defaults to false.
|
|
1012
|
+
*/
|
|
1013
|
+
is_wrapped?: boolean;
|
|
1014
|
+
};
|
|
973
1015
|
type RichTextBlock = {
|
|
974
1016
|
/**
|
|
975
1017
|
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
@@ -1195,4 +1237,4 @@ type Props = {
|
|
|
1195
1237
|
type MessageProps = Props;
|
|
1196
1238
|
declare const Message: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
1197
1239
|
|
|
1198
|
-
export { ActionsBlock, Block, ButtonElement, ChannelsSelectElement, CheckboxesElement, ConfirmDialogObject, ContextBlock, ConversationsSelectElement, DatePickerElement, DateTimePickerElement, DispatchActionConfigObject, DividerBlock, Element, EmailInputElement, ExternalSelectElement, FileBlock, FilterObject, HeaderBlock, ImageBlock, ImageElement, InputBlock, Message, MessageProps, MultiChannelsSelectElement, MultiConversationsSelectElement, MultiExternalSelectElement, MultiStaticSelectElement, MultiUsersSelectElement, NumberInputElement, OptionGroupObject, OptionObject, OptionObjectWithoutUrl, OverflowMenuElement, PlainTextInputElement, RadioButtonsElement, RichTextBlock, RichTextBlockElement, RichTextBlockSubElement, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextSectionBroadcast, RichTextSectionChannel, RichTextSectionDate, RichTextSectionElement, RichTextSectionElementStyle, RichTextSectionElementStyleCode, RichTextSectionEmoji, RichTextSectionLink, RichTextSectionText, RichTextSectionUser, RichTextSectionUsergroup, SectionBlock, StaticSelectElement, Style, TextObject, TextObjectTextType, TimePickerElement, UrlTextInputElement, UsersSelectElement, VideoBlock };
|
|
1240
|
+
export { type ActionsBlock, type Block, type ButtonElement, type ChannelsSelectElement, type CheckboxesElement, type ConfirmDialogObject, type ContextBlock, type ConversationsSelectElement, type DatePickerElement, type DateTimePickerElement, type DispatchActionConfigObject, type DividerBlock, type Element, type EmailInputElement, type ExternalSelectElement, type FileBlock, type FilterObject, type HeaderBlock, type ImageBlock, type ImageElement, type InputBlock, Message, type MessageProps, type MultiChannelsSelectElement, type MultiConversationsSelectElement, type MultiExternalSelectElement, type MultiStaticSelectElement, type MultiUsersSelectElement, type NumberInputElement, type OptionGroupObject, type OptionObject, type OptionObjectWithoutUrl, type OverflowMenuElement, type PlainTextInputElement, type RadioButtonsElement, type RichTextBlock, type RichTextBlockElement, type RichTextBlockSubElement, type RichTextList, type RichTextPreformatted, type RichTextQuote, type RichTextSection, type RichTextSectionBroadcast, type RichTextSectionChannel, type RichTextSectionDate, type RichTextSectionElement, type RichTextSectionElementStyle, type RichTextSectionElementStyleCode, type RichTextSectionEmoji, type RichTextSectionLink, type RichTextSectionText, type RichTextSectionUser, type RichTextSectionUsergroup, type SectionBlock, type StaticSelectElement, type Style, type TableBlock, type TableCell, type TableColumnSetting, type TextObject, type TextObjectTextType, type TimePickerElement, type UrlTextInputElement, type UsersSelectElement, type VideoBlock };
|
package/dist/index.d.ts
CHANGED
|
@@ -700,7 +700,7 @@ type FilterObject = {
|
|
|
700
700
|
exclude_bot_users?: boolean;
|
|
701
701
|
};
|
|
702
702
|
|
|
703
|
-
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | VideoBlock | RichTextBlock;
|
|
703
|
+
type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | TableBlock | VideoBlock | RichTextBlock;
|
|
704
704
|
type ActionsBlock = {
|
|
705
705
|
/**
|
|
706
706
|
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
@@ -970,6 +970,48 @@ type VideoBlock = {
|
|
|
970
970
|
*/
|
|
971
971
|
iframeProps?: ComponentPropsWithoutRef<"iframe">;
|
|
972
972
|
};
|
|
973
|
+
type TableBlock = {
|
|
974
|
+
/**
|
|
975
|
+
* Available in surfaces: **Messages**
|
|
976
|
+
*
|
|
977
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/table-block/ View here}
|
|
978
|
+
*
|
|
979
|
+
* A ***table*** block displays data in a structured table format. It supports up to 100 rows with 20 cells each. Only one table is allowed per message.
|
|
980
|
+
*/
|
|
981
|
+
type: "table";
|
|
982
|
+
/**
|
|
983
|
+
* 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***.
|
|
984
|
+
*/
|
|
985
|
+
block_id?: string;
|
|
986
|
+
/**
|
|
987
|
+
* An array of table rows. Maximum 100 rows, each row can have up to 20 cells.
|
|
988
|
+
*/
|
|
989
|
+
rows: TableCell[][];
|
|
990
|
+
/**
|
|
991
|
+
* Optional array to configure column behavior. Can specify alignment and text wrapping. Maximum 20 configuration items.
|
|
992
|
+
*/
|
|
993
|
+
column_settings?: TableColumnSetting[];
|
|
994
|
+
};
|
|
995
|
+
type TableCell = {
|
|
996
|
+
/**
|
|
997
|
+
* The type of cell content
|
|
998
|
+
*/
|
|
999
|
+
type: "raw_text";
|
|
1000
|
+
/**
|
|
1001
|
+
* The text content of the cell
|
|
1002
|
+
*/
|
|
1003
|
+
text: string;
|
|
1004
|
+
} | RichTextBlock;
|
|
1005
|
+
type TableColumnSetting = {
|
|
1006
|
+
/**
|
|
1007
|
+
* Text alignment for the column. Defaults to left.
|
|
1008
|
+
*/
|
|
1009
|
+
align?: "left" | "center" | "right";
|
|
1010
|
+
/**
|
|
1011
|
+
* Whether text should wrap in the column. Defaults to false.
|
|
1012
|
+
*/
|
|
1013
|
+
is_wrapped?: boolean;
|
|
1014
|
+
};
|
|
973
1015
|
type RichTextBlock = {
|
|
974
1016
|
/**
|
|
975
1017
|
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
@@ -1195,4 +1237,4 @@ type Props = {
|
|
|
1195
1237
|
type MessageProps = Props;
|
|
1196
1238
|
declare const Message: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
1197
1239
|
|
|
1198
|
-
export { ActionsBlock, Block, ButtonElement, ChannelsSelectElement, CheckboxesElement, ConfirmDialogObject, ContextBlock, ConversationsSelectElement, DatePickerElement, DateTimePickerElement, DispatchActionConfigObject, DividerBlock, Element, EmailInputElement, ExternalSelectElement, FileBlock, FilterObject, HeaderBlock, ImageBlock, ImageElement, InputBlock, Message, MessageProps, MultiChannelsSelectElement, MultiConversationsSelectElement, MultiExternalSelectElement, MultiStaticSelectElement, MultiUsersSelectElement, NumberInputElement, OptionGroupObject, OptionObject, OptionObjectWithoutUrl, OverflowMenuElement, PlainTextInputElement, RadioButtonsElement, RichTextBlock, RichTextBlockElement, RichTextBlockSubElement, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextSectionBroadcast, RichTextSectionChannel, RichTextSectionDate, RichTextSectionElement, RichTextSectionElementStyle, RichTextSectionElementStyleCode, RichTextSectionEmoji, RichTextSectionLink, RichTextSectionText, RichTextSectionUser, RichTextSectionUsergroup, SectionBlock, StaticSelectElement, Style, TextObject, TextObjectTextType, TimePickerElement, UrlTextInputElement, UsersSelectElement, VideoBlock };
|
|
1240
|
+
export { type ActionsBlock, type Block, type ButtonElement, type ChannelsSelectElement, type CheckboxesElement, type ConfirmDialogObject, type ContextBlock, type ConversationsSelectElement, type DatePickerElement, type DateTimePickerElement, type DispatchActionConfigObject, type DividerBlock, type Element, type EmailInputElement, type ExternalSelectElement, type FileBlock, type FilterObject, type HeaderBlock, type ImageBlock, type ImageElement, type InputBlock, Message, type MessageProps, type MultiChannelsSelectElement, type MultiConversationsSelectElement, type MultiExternalSelectElement, type MultiStaticSelectElement, type MultiUsersSelectElement, type NumberInputElement, type OptionGroupObject, type OptionObject, type OptionObjectWithoutUrl, type OverflowMenuElement, type PlainTextInputElement, type RadioButtonsElement, type RichTextBlock, type RichTextBlockElement, type RichTextBlockSubElement, type RichTextList, type RichTextPreformatted, type RichTextQuote, type RichTextSection, type RichTextSectionBroadcast, type RichTextSectionChannel, type RichTextSectionDate, type RichTextSectionElement, type RichTextSectionElementStyle, type RichTextSectionElementStyleCode, type RichTextSectionEmoji, type RichTextSectionLink, type RichTextSectionText, type RichTextSectionUser, type RichTextSectionUsergroup, type SectionBlock, type StaticSelectElement, type Style, type TableBlock, type TableCell, type TableColumnSetting, type TextObject, type TextObjectTextType, type TimePickerElement, type UrlTextInputElement, type UsersSelectElement, type VideoBlock };
|