@tightknitai/block-kitchen 0.10.19 → 0.10.21
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/README.md +13 -4
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +748 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +749 -232
- package/dist/index.js.map +1 -1
- package/dist/{palette-DNUiqoQK.d.cts → palette-CXXqlwIH.d.cts} +82 -15
- package/dist/{palette-DNUiqoQK.d.ts → palette-CXXqlwIH.d.ts} +82 -15
- package/dist/palette.cjs +52 -0
- package/dist/palette.cjs.map +1 -1
- package/dist/palette.d.cts +1 -1
- package/dist/palette.d.ts +1 -1
- package/dist/palette.js +52 -0
- package/dist/palette.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -3
|
@@ -168,7 +168,7 @@ declare function buildVariantById(sections: readonly PaletteSection[]): Readonly
|
|
|
168
168
|
/**
|
|
169
169
|
* The Slack Block Kit block types supported by the builder in v1.
|
|
170
170
|
*/
|
|
171
|
-
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container';
|
|
171
|
+
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container' | 'data_table';
|
|
172
172
|
/**
|
|
173
173
|
* Slack `markdown` block payload. Renders standard markdown (GFM)
|
|
174
174
|
* via `slack-blocks-to-jsx`'s react-markdown integration.
|
|
@@ -180,15 +180,19 @@ interface MarkdownBlock {
|
|
|
180
180
|
text: string;
|
|
181
181
|
block_id?: string;
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* A plain-text cell in a {@link TableBlock} or {@link DataTableBlock} row.
|
|
185
|
+
*/
|
|
186
|
+
interface TableRawTextCell {
|
|
187
|
+
type: 'raw_text';
|
|
188
|
+
text: string;
|
|
189
|
+
}
|
|
183
190
|
/**
|
|
184
191
|
* One cell in a {@link TableBlock} row. Slack accepts either a raw text
|
|
185
192
|
* cell or a rich-text cell; the visual editor only emits raw text in v1
|
|
186
193
|
* but preserves rich-text cells on edit.
|
|
187
194
|
*/
|
|
188
|
-
type TableCell = {
|
|
189
|
-
type: 'raw_text';
|
|
190
|
-
text: string;
|
|
191
|
-
} | {
|
|
195
|
+
type TableCell = TableRawTextCell | {
|
|
192
196
|
type: 'rich_text';
|
|
193
197
|
elements: unknown[];
|
|
194
198
|
};
|
|
@@ -210,6 +214,49 @@ interface TableBlock {
|
|
|
210
214
|
column_settings?: TableColumnSetting[];
|
|
211
215
|
block_id?: string;
|
|
212
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* A numeric cell in a {@link DataTableBlock} row. A column whose cells are
|
|
219
|
+
* all `raw_number` sorts numerically. `text`, when set, is shown in place
|
|
220
|
+
* of `value` (e.g. `"$1.2M"`).
|
|
221
|
+
*/
|
|
222
|
+
interface DataTableRawNumberCell {
|
|
223
|
+
type: 'raw_number';
|
|
224
|
+
value: number;
|
|
225
|
+
text?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* A button cell in a {@link DataTableBlock} row. Clicking it sends a
|
|
229
|
+
* `block_actions` payload; set the button's `value` to tell rows apart.
|
|
230
|
+
* `fallback` shows instead on clients that don't support action cells.
|
|
231
|
+
*/
|
|
232
|
+
interface DataTableActionCell {
|
|
233
|
+
type: 'action_cell';
|
|
234
|
+
element: Button;
|
|
235
|
+
fallback?: TableRawTextCell | DataTableRawNumberCell;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* One cell in a {@link DataTableBlock} row. `rich_text` is not allowed in
|
|
239
|
+
* the header (first) row.
|
|
240
|
+
*/
|
|
241
|
+
type DataTableCell = TableCell | DataTableRawNumberCell | DataTableActionCell;
|
|
242
|
+
/**
|
|
243
|
+
* Slack `data_table` block payload. A paginated, sortable table: the first
|
|
244
|
+
* row is the header, followed by 1-200 data rows of 1-20 cells each, all
|
|
245
|
+
* the same length. Valid on message and App Home surfaces.
|
|
246
|
+
* `slack-web-api-client` doesn't ship this type yet, so we declare it.
|
|
247
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/data-table-block
|
|
248
|
+
*/
|
|
249
|
+
interface DataTableBlock {
|
|
250
|
+
type: 'data_table';
|
|
251
|
+
/** Required. Rendered as the table's HTML caption. */
|
|
252
|
+
caption: string;
|
|
253
|
+
rows: DataTableCell[][];
|
|
254
|
+
/** Rows per page, 1-100. Slack defaults to 5. */
|
|
255
|
+
page_size?: number;
|
|
256
|
+
/** 0-based index of the column that identifies each row. Slack defaults to 0. */
|
|
257
|
+
row_header_column_index?: number;
|
|
258
|
+
block_id?: string;
|
|
259
|
+
}
|
|
213
260
|
/**
|
|
214
261
|
* Severity level for an {@link AlertBlock}. Controls the icon and color
|
|
215
262
|
* accent rendered by Slack. Defaults to `default` when omitted.
|
|
@@ -557,7 +604,7 @@ type SupportedHeaderBlock = HeaderBlock & {
|
|
|
557
604
|
* Subset of {@link AnyMessageBlock} from `slack-web-api-client`,
|
|
558
605
|
* plus a header `level` extension.
|
|
559
606
|
*/
|
|
560
|
-
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock;
|
|
607
|
+
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock | DataTableBlock;
|
|
561
608
|
/**
|
|
562
609
|
* A block as represented inside the builder's working state.
|
|
563
610
|
* `id` is an ephemeral client-side identifier used by DnD and selection.
|
|
@@ -928,10 +975,19 @@ interface MentionUser {
|
|
|
928
975
|
avatarUrl?: string | null;
|
|
929
976
|
}
|
|
930
977
|
/**
|
|
931
|
-
*
|
|
932
|
-
* {@link
|
|
933
|
-
|
|
934
|
-
|
|
978
|
+
* A Slack channel the rich text editor's `#` picker offers, returned by
|
|
979
|
+
* {@link MentionsConfig.searchChannels}.
|
|
980
|
+
*/
|
|
981
|
+
interface MentionChannel {
|
|
982
|
+
/** Slack channel id (`C…` / `G…`), written to the rich text `channel` element's `channel_id`. */
|
|
983
|
+
id: string;
|
|
984
|
+
/** Name shown in the picker row and on the inserted mention. */
|
|
985
|
+
name: string;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Opt-in `@` user and `#` channel mentions for the rich text editor, passed as
|
|
989
|
+
* {@link BlockKitchenBaseProps.mentions}. Each configured search powers its
|
|
990
|
+
* typed trigger and toolbar action.
|
|
935
991
|
*
|
|
936
992
|
* Like every other I/O concern, the search is brokered by the host: the
|
|
937
993
|
* builder never looks people up itself.
|
|
@@ -952,6 +1008,18 @@ interface MentionsConfig {
|
|
|
952
1008
|
* from the search, then the raw id.
|
|
953
1009
|
*/
|
|
954
1010
|
getUserName?: (userId: string) => string | undefined;
|
|
1011
|
+
/**
|
|
1012
|
+
* Optional. Searches the channels the picker offers. Called with the text
|
|
1013
|
+
* typed after `#` and the same debounce/abort behavior as `searchUsers`.
|
|
1014
|
+
*/
|
|
1015
|
+
searchChannels?: (query: string, options: {
|
|
1016
|
+
signal: AbortSignal;
|
|
1017
|
+
}) => Promise<MentionChannel[]>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Optional. Labels a channel mention in the editor by channel id. Return
|
|
1020
|
+
* `undefined` to fall back to the picked name, then the raw id.
|
|
1021
|
+
*/
|
|
1022
|
+
getChannelName?: (channelId: string) => string | undefined;
|
|
955
1023
|
}
|
|
956
1024
|
/**
|
|
957
1025
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
@@ -1071,10 +1139,9 @@ interface BlockKitchenBaseProps {
|
|
|
1071
1139
|
*/
|
|
1072
1140
|
customEmojis?: CustomEmoji[];
|
|
1073
1141
|
/**
|
|
1074
|
-
* Opt-in `@` mentions in the rich text editor
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
* raw id, but there is no picker.
|
|
1142
|
+
* Opt-in `@` user and `#` channel mentions in the rich text editor. See
|
|
1143
|
+
* {@link MentionsConfig}. Existing mentions still round-trip without picker
|
|
1144
|
+
* configuration and display by raw id.
|
|
1078
1145
|
*/
|
|
1079
1146
|
mentions?: MentionsConfig;
|
|
1080
1147
|
/**
|
|
@@ -1360,4 +1427,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1360
1427
|
*/
|
|
1361
1428
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1362
1429
|
|
|
1363
|
-
export { type
|
|
1430
|
+
export { type PaletteVariant as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type DataTableActionCell as D, type DataTableCell as E, type DataTableRawNumberCell as F, type DataVisualizationBlock as G, type EditableVia as H, type FeedbackButtonSubobject as I, type FeedbackButtonsElement as J, type HeaderLevel as K, type IconButtonElement as L, type IconButtonIcon as M, type InputBlock as N, type LoadMessageInput as O, type PreviewSurface as P, type LoadResult as Q, type LoadedMessage as R, type SupportedBlock as S, type Template as T, type LoadingConfig as U, type MarkdownBlock as V, type MentionChannel as W, type MentionUser as X, type MentionsConfig as Y, type PaletteMode as Z, type PaletteSection as _, type SendAsUserStatus as a, type PieChart as a0, type PieChartSegment as a1, type PlanBlock as a2, type PreviewHooks as a3, type PrimaryActionConfig as a4, type PrimaryActionContext as a5, type RecentMessage as a6, type SendResult as a7, type SupportedBlockType as a8, type SupportedHeaderBlock as a9, type TableBlock as aa, type TableCell as ab, type TableColumnSetting as ac, type TableRawTextCell as ad, type TaskCardBlock as ae, type TaskCardStatus as af, type UpdatePayload as ag, type UpdateResult as ah, type UrlSourceElement as ai, type ValidationSummary as aj, type VideoBlock as ak, defaultPalette as al, extraAlertVariant as am, legacyInputVariants as an, buildVariantById as ao, type SendPayload as b, type SendExtrasContext as c, type PreviewTheme as d, type AlertLevel as e, type BlockKitchenBaseProps as f, type BlockKitchenComposeOnlyProps as g, type BlockKitchenSendProps as h, type BrandPreset as i, type BrandTheme as j, type BrandTokens as k, type BuilderBlock as l, type CardBlock as m, type CarouselBlock as n, type CartesianChart as o, type Chart as p, type ChartAxisConfig as q, type ChartDataPoint as r, type ChartSeries as s, type ChartType as t, type ContainerBlock as u, type ContainerChildBlock as v, type ContextActionsBlock as w, type ContextActionsElement as x, type CustomEmoji as y, type DataTableBlock as z };
|
|
@@ -168,7 +168,7 @@ declare function buildVariantById(sections: readonly PaletteSection[]): Readonly
|
|
|
168
168
|
/**
|
|
169
169
|
* The Slack Block Kit block types supported by the builder in v1.
|
|
170
170
|
*/
|
|
171
|
-
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container';
|
|
171
|
+
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container' | 'data_table';
|
|
172
172
|
/**
|
|
173
173
|
* Slack `markdown` block payload. Renders standard markdown (GFM)
|
|
174
174
|
* via `slack-blocks-to-jsx`'s react-markdown integration.
|
|
@@ -180,15 +180,19 @@ interface MarkdownBlock {
|
|
|
180
180
|
text: string;
|
|
181
181
|
block_id?: string;
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* A plain-text cell in a {@link TableBlock} or {@link DataTableBlock} row.
|
|
185
|
+
*/
|
|
186
|
+
interface TableRawTextCell {
|
|
187
|
+
type: 'raw_text';
|
|
188
|
+
text: string;
|
|
189
|
+
}
|
|
183
190
|
/**
|
|
184
191
|
* One cell in a {@link TableBlock} row. Slack accepts either a raw text
|
|
185
192
|
* cell or a rich-text cell; the visual editor only emits raw text in v1
|
|
186
193
|
* but preserves rich-text cells on edit.
|
|
187
194
|
*/
|
|
188
|
-
type TableCell = {
|
|
189
|
-
type: 'raw_text';
|
|
190
|
-
text: string;
|
|
191
|
-
} | {
|
|
195
|
+
type TableCell = TableRawTextCell | {
|
|
192
196
|
type: 'rich_text';
|
|
193
197
|
elements: unknown[];
|
|
194
198
|
};
|
|
@@ -210,6 +214,49 @@ interface TableBlock {
|
|
|
210
214
|
column_settings?: TableColumnSetting[];
|
|
211
215
|
block_id?: string;
|
|
212
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* A numeric cell in a {@link DataTableBlock} row. A column whose cells are
|
|
219
|
+
* all `raw_number` sorts numerically. `text`, when set, is shown in place
|
|
220
|
+
* of `value` (e.g. `"$1.2M"`).
|
|
221
|
+
*/
|
|
222
|
+
interface DataTableRawNumberCell {
|
|
223
|
+
type: 'raw_number';
|
|
224
|
+
value: number;
|
|
225
|
+
text?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* A button cell in a {@link DataTableBlock} row. Clicking it sends a
|
|
229
|
+
* `block_actions` payload; set the button's `value` to tell rows apart.
|
|
230
|
+
* `fallback` shows instead on clients that don't support action cells.
|
|
231
|
+
*/
|
|
232
|
+
interface DataTableActionCell {
|
|
233
|
+
type: 'action_cell';
|
|
234
|
+
element: Button;
|
|
235
|
+
fallback?: TableRawTextCell | DataTableRawNumberCell;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* One cell in a {@link DataTableBlock} row. `rich_text` is not allowed in
|
|
239
|
+
* the header (first) row.
|
|
240
|
+
*/
|
|
241
|
+
type DataTableCell = TableCell | DataTableRawNumberCell | DataTableActionCell;
|
|
242
|
+
/**
|
|
243
|
+
* Slack `data_table` block payload. A paginated, sortable table: the first
|
|
244
|
+
* row is the header, followed by 1-200 data rows of 1-20 cells each, all
|
|
245
|
+
* the same length. Valid on message and App Home surfaces.
|
|
246
|
+
* `slack-web-api-client` doesn't ship this type yet, so we declare it.
|
|
247
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/data-table-block
|
|
248
|
+
*/
|
|
249
|
+
interface DataTableBlock {
|
|
250
|
+
type: 'data_table';
|
|
251
|
+
/** Required. Rendered as the table's HTML caption. */
|
|
252
|
+
caption: string;
|
|
253
|
+
rows: DataTableCell[][];
|
|
254
|
+
/** Rows per page, 1-100. Slack defaults to 5. */
|
|
255
|
+
page_size?: number;
|
|
256
|
+
/** 0-based index of the column that identifies each row. Slack defaults to 0. */
|
|
257
|
+
row_header_column_index?: number;
|
|
258
|
+
block_id?: string;
|
|
259
|
+
}
|
|
213
260
|
/**
|
|
214
261
|
* Severity level for an {@link AlertBlock}. Controls the icon and color
|
|
215
262
|
* accent rendered by Slack. Defaults to `default` when omitted.
|
|
@@ -557,7 +604,7 @@ type SupportedHeaderBlock = HeaderBlock & {
|
|
|
557
604
|
* Subset of {@link AnyMessageBlock} from `slack-web-api-client`,
|
|
558
605
|
* plus a header `level` extension.
|
|
559
606
|
*/
|
|
560
|
-
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock;
|
|
607
|
+
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock | DataTableBlock;
|
|
561
608
|
/**
|
|
562
609
|
* A block as represented inside the builder's working state.
|
|
563
610
|
* `id` is an ephemeral client-side identifier used by DnD and selection.
|
|
@@ -928,10 +975,19 @@ interface MentionUser {
|
|
|
928
975
|
avatarUrl?: string | null;
|
|
929
976
|
}
|
|
930
977
|
/**
|
|
931
|
-
*
|
|
932
|
-
* {@link
|
|
933
|
-
|
|
934
|
-
|
|
978
|
+
* A Slack channel the rich text editor's `#` picker offers, returned by
|
|
979
|
+
* {@link MentionsConfig.searchChannels}.
|
|
980
|
+
*/
|
|
981
|
+
interface MentionChannel {
|
|
982
|
+
/** Slack channel id (`C…` / `G…`), written to the rich text `channel` element's `channel_id`. */
|
|
983
|
+
id: string;
|
|
984
|
+
/** Name shown in the picker row and on the inserted mention. */
|
|
985
|
+
name: string;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Opt-in `@` user and `#` channel mentions for the rich text editor, passed as
|
|
989
|
+
* {@link BlockKitchenBaseProps.mentions}. Each configured search powers its
|
|
990
|
+
* typed trigger and toolbar action.
|
|
935
991
|
*
|
|
936
992
|
* Like every other I/O concern, the search is brokered by the host: the
|
|
937
993
|
* builder never looks people up itself.
|
|
@@ -952,6 +1008,18 @@ interface MentionsConfig {
|
|
|
952
1008
|
* from the search, then the raw id.
|
|
953
1009
|
*/
|
|
954
1010
|
getUserName?: (userId: string) => string | undefined;
|
|
1011
|
+
/**
|
|
1012
|
+
* Optional. Searches the channels the picker offers. Called with the text
|
|
1013
|
+
* typed after `#` and the same debounce/abort behavior as `searchUsers`.
|
|
1014
|
+
*/
|
|
1015
|
+
searchChannels?: (query: string, options: {
|
|
1016
|
+
signal: AbortSignal;
|
|
1017
|
+
}) => Promise<MentionChannel[]>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Optional. Labels a channel mention in the editor by channel id. Return
|
|
1020
|
+
* `undefined` to fall back to the picked name, then the raw id.
|
|
1021
|
+
*/
|
|
1022
|
+
getChannelName?: (channelId: string) => string | undefined;
|
|
955
1023
|
}
|
|
956
1024
|
/**
|
|
957
1025
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
@@ -1071,10 +1139,9 @@ interface BlockKitchenBaseProps {
|
|
|
1071
1139
|
*/
|
|
1072
1140
|
customEmojis?: CustomEmoji[];
|
|
1073
1141
|
/**
|
|
1074
|
-
* Opt-in `@` mentions in the rich text editor
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
* raw id, but there is no picker.
|
|
1142
|
+
* Opt-in `@` user and `#` channel mentions in the rich text editor. See
|
|
1143
|
+
* {@link MentionsConfig}. Existing mentions still round-trip without picker
|
|
1144
|
+
* configuration and display by raw id.
|
|
1078
1145
|
*/
|
|
1079
1146
|
mentions?: MentionsConfig;
|
|
1080
1147
|
/**
|
|
@@ -1360,4 +1427,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1360
1427
|
*/
|
|
1361
1428
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1362
1429
|
|
|
1363
|
-
export { type
|
|
1430
|
+
export { type PaletteVariant as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type DataTableActionCell as D, type DataTableCell as E, type DataTableRawNumberCell as F, type DataVisualizationBlock as G, type EditableVia as H, type FeedbackButtonSubobject as I, type FeedbackButtonsElement as J, type HeaderLevel as K, type IconButtonElement as L, type IconButtonIcon as M, type InputBlock as N, type LoadMessageInput as O, type PreviewSurface as P, type LoadResult as Q, type LoadedMessage as R, type SupportedBlock as S, type Template as T, type LoadingConfig as U, type MarkdownBlock as V, type MentionChannel as W, type MentionUser as X, type MentionsConfig as Y, type PaletteMode as Z, type PaletteSection as _, type SendAsUserStatus as a, type PieChart as a0, type PieChartSegment as a1, type PlanBlock as a2, type PreviewHooks as a3, type PrimaryActionConfig as a4, type PrimaryActionContext as a5, type RecentMessage as a6, type SendResult as a7, type SupportedBlockType as a8, type SupportedHeaderBlock as a9, type TableBlock as aa, type TableCell as ab, type TableColumnSetting as ac, type TableRawTextCell as ad, type TaskCardBlock as ae, type TaskCardStatus as af, type UpdatePayload as ag, type UpdateResult as ah, type UrlSourceElement as ai, type ValidationSummary as aj, type VideoBlock as ak, defaultPalette as al, extraAlertVariant as am, legacyInputVariants as an, buildVariantById as ao, type SendPayload as b, type SendExtrasContext as c, type PreviewTheme as d, type AlertLevel as e, type BlockKitchenBaseProps as f, type BlockKitchenComposeOnlyProps as g, type BlockKitchenSendProps as h, type BrandPreset as i, type BrandTheme as j, type BrandTokens as k, type BuilderBlock as l, type CardBlock as m, type CarouselBlock as n, type CartesianChart as o, type Chart as p, type ChartAxisConfig as q, type ChartDataPoint as r, type ChartSeries as s, type ChartType as t, type ContainerBlock as u, type ContainerChildBlock as v, type ContextActionsBlock as w, type ContextActionsElement as x, type CustomEmoji as y, type DataTableBlock as z };
|
package/dist/palette.cjs
CHANGED
|
@@ -944,6 +944,58 @@ var defaultPalette = [
|
|
|
944
944
|
]
|
|
945
945
|
]
|
|
946
946
|
})
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
// Slack's documented example.
|
|
950
|
+
id: "data_table_basic",
|
|
951
|
+
label: "Data table",
|
|
952
|
+
factory: () => ({
|
|
953
|
+
type: "data_table",
|
|
954
|
+
caption: "A Fabulous Table",
|
|
955
|
+
rows: [
|
|
956
|
+
[
|
|
957
|
+
{ type: "raw_text", text: "Name" },
|
|
958
|
+
{ type: "raw_text", text: "Department" },
|
|
959
|
+
{ type: "raw_text", text: "Badge" }
|
|
960
|
+
],
|
|
961
|
+
[
|
|
962
|
+
{ type: "raw_text", text: "Data Refinement Department" },
|
|
963
|
+
{ type: "raw_text", text: "MDR" },
|
|
964
|
+
{
|
|
965
|
+
type: "rich_text",
|
|
966
|
+
elements: [
|
|
967
|
+
{ type: "rich_text_section", elements: [{ type: "text", text: "Blue", style: { bold: true } }] }
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
],
|
|
971
|
+
[
|
|
972
|
+
{ type: "raw_text", text: "Art Sourcing Department" },
|
|
973
|
+
{ type: "raw_text", text: "O&D" },
|
|
974
|
+
{
|
|
975
|
+
type: "rich_text",
|
|
976
|
+
elements: [
|
|
977
|
+
{
|
|
978
|
+
type: "rich_text_section",
|
|
979
|
+
elements: [
|
|
980
|
+
{ type: "text", text: "Green " },
|
|
981
|
+
{ type: "text", text: "review", style: { italic: true } }
|
|
982
|
+
]
|
|
983
|
+
}
|
|
984
|
+
]
|
|
985
|
+
}
|
|
986
|
+
],
|
|
987
|
+
[
|
|
988
|
+
{ type: "raw_text", text: "Wellness Department" },
|
|
989
|
+
{ type: "raw_text", text: "Wellness Center" },
|
|
990
|
+
{
|
|
991
|
+
type: "rich_text",
|
|
992
|
+
elements: [
|
|
993
|
+
{ type: "rich_text_section", elements: [{ type: "text", text: "Limited", style: { bold: true } }] }
|
|
994
|
+
]
|
|
995
|
+
}
|
|
996
|
+
]
|
|
997
|
+
]
|
|
998
|
+
})
|
|
947
999
|
}
|
|
948
1000
|
]
|
|
949
1001
|
},
|