@tightknitai/block-kitchen 0.10.18 → 0.10.20

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.
@@ -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.
@@ -915,6 +962,44 @@ interface CustomEmoji {
915
962
  url: string | null;
916
963
  alias: string | null;
917
964
  }
965
+ /**
966
+ * A person the rich text editor's `@` picker offers, returned by
967
+ * {@link MentionsConfig.searchUsers}.
968
+ */
969
+ interface MentionUser {
970
+ /** Slack user id (`U…` / `W…`), written to the rich text `user` element's `user_id`. */
971
+ id: string;
972
+ /** Name shown in the picker row and on the inserted mention. */
973
+ name: string;
974
+ /** Avatar shown in the picker row. Ignored unless a safe image URL; rows without one show an initial. */
975
+ avatarUrl?: string | null;
976
+ }
977
+ /**
978
+ * Opt-in `@` mentions for the rich text editor, passed as
979
+ * {@link BlockKitchenBaseProps.mentions}. Typing `@` (or the toolbar's
980
+ * mention button) opens a picker backed by the host's search; picking someone
981
+ * inserts a rich text `user` element (`{ type: 'user', user_id }`).
982
+ *
983
+ * Like every other I/O concern, the search is brokered by the host: the
984
+ * builder never looks people up itself.
985
+ */
986
+ interface MentionsConfig {
987
+ /**
988
+ * Searches the people the picker offers. Called with the text typed after
989
+ * `@` (empty right after it). Calls are debounced, and `signal` aborts once
990
+ * a newer query supersedes this one. A rejection shows an empty list.
991
+ */
992
+ searchUsers: (query: string, options: {
993
+ signal: AbortSignal;
994
+ }) => Promise<MentionUser[]>;
995
+ /**
996
+ * Optional. Labels a mention in the editor by user id, including mentions
997
+ * that came with the draft or a loaded message. Called while rendering, so
998
+ * keep it synchronous. Return `undefined` to fall back to the name picked
999
+ * from the search, then the raw id.
1000
+ */
1001
+ getUserName?: (userId: string) => string | undefined;
1002
+ }
918
1003
  /**
919
1004
  * Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
920
1005
  * resolve user mentions, channel mentions, custom emojis, and links to
@@ -1032,6 +1117,13 @@ interface BlockKitchenBaseProps {
1032
1117
  * is never serialized into the emitted Block Kit JSON.
1033
1118
  */
1034
1119
  customEmojis?: CustomEmoji[];
1120
+ /**
1121
+ * Opt-in `@` mentions in the rich text editor: an `@` trigger and a toolbar
1122
+ * button that search people through the host. See {@link MentionsConfig}.
1123
+ * Without it, mentions already in the draft still round-trip and display by
1124
+ * raw id, but there is no picker.
1125
+ */
1126
+ mentions?: MentionsConfig;
1035
1127
  /**
1036
1128
  * Opt-in: load an existing Slack message into the editor. Adds a
1037
1129
  * "Find message" toolbar entry — the user pastes a permalink (or picks a
@@ -1315,4 +1407,4 @@ interface BlockKitchenComposeOnlyProps {
1315
1407
  */
1316
1408
  type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
1317
1409
 
1318
- export { type RecentMessage as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type DataVisualizationBlock as D, type EditableVia as E, type FeedbackButtonSubobject as F, type IconButtonIcon as G, type HeaderLevel as H, type IconButtonElement as I, type InputBlock as J, type LoadResult as K, type LoadMessageInput as L, type LoadedMessage as M, type LoadingConfig as N, type MarkdownBlock as O, type PreviewSurface as P, type PaletteMode as Q, type PaletteSection as R, type SupportedBlock as S, type Template as T, type PaletteVariant as U, type PieChart as V, type PieChartSegment as W, type PlanBlock as X, type PreviewHooks as Y, type PrimaryActionConfig as Z, type PrimaryActionContext as _, type SendAsUserStatus as a, type SendResult as a0, type SupportedBlockType as a1, type SupportedHeaderBlock as a2, type TableBlock as a3, type TableCell as a4, type TableColumnSetting as a5, type TaskCardBlock as a6, type TaskCardStatus as a7, type UpdatePayload as a8, type UpdateResult as a9, type UrlSourceElement as aa, type ValidationSummary as ab, type VideoBlock as ac, defaultPalette as ad, extraAlertVariant as ae, legacyInputVariants as af, buildVariantById as ag, 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 FeedbackButtonsElement as z };
1410
+ export { type PieChart 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 MentionUser as W, type MentionsConfig as X, type PaletteMode as Y, type PaletteSection as Z, type PaletteVariant as _, type SendAsUserStatus as a, type PieChartSegment as a0, type PlanBlock as a1, type PreviewHooks as a2, type PrimaryActionConfig as a3, type PrimaryActionContext as a4, type RecentMessage as a5, type SendResult as a6, type SupportedBlockType as a7, type SupportedHeaderBlock as a8, type TableBlock as a9, type TableCell as aa, type TableColumnSetting as ab, type TableRawTextCell as ac, type TaskCardBlock as ad, type TaskCardStatus as ae, type UpdatePayload as af, type UpdateResult as ag, type UrlSourceElement as ah, type ValidationSummary as ai, type VideoBlock as aj, defaultPalette as ak, extraAlertVariant as al, legacyInputVariants as am, buildVariantById as an, 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.
@@ -915,6 +962,44 @@ interface CustomEmoji {
915
962
  url: string | null;
916
963
  alias: string | null;
917
964
  }
965
+ /**
966
+ * A person the rich text editor's `@` picker offers, returned by
967
+ * {@link MentionsConfig.searchUsers}.
968
+ */
969
+ interface MentionUser {
970
+ /** Slack user id (`U…` / `W…`), written to the rich text `user` element's `user_id`. */
971
+ id: string;
972
+ /** Name shown in the picker row and on the inserted mention. */
973
+ name: string;
974
+ /** Avatar shown in the picker row. Ignored unless a safe image URL; rows without one show an initial. */
975
+ avatarUrl?: string | null;
976
+ }
977
+ /**
978
+ * Opt-in `@` mentions for the rich text editor, passed as
979
+ * {@link BlockKitchenBaseProps.mentions}. Typing `@` (or the toolbar's
980
+ * mention button) opens a picker backed by the host's search; picking someone
981
+ * inserts a rich text `user` element (`{ type: 'user', user_id }`).
982
+ *
983
+ * Like every other I/O concern, the search is brokered by the host: the
984
+ * builder never looks people up itself.
985
+ */
986
+ interface MentionsConfig {
987
+ /**
988
+ * Searches the people the picker offers. Called with the text typed after
989
+ * `@` (empty right after it). Calls are debounced, and `signal` aborts once
990
+ * a newer query supersedes this one. A rejection shows an empty list.
991
+ */
992
+ searchUsers: (query: string, options: {
993
+ signal: AbortSignal;
994
+ }) => Promise<MentionUser[]>;
995
+ /**
996
+ * Optional. Labels a mention in the editor by user id, including mentions
997
+ * that came with the draft or a loaded message. Called while rendering, so
998
+ * keep it synchronous. Return `undefined` to fall back to the name picked
999
+ * from the search, then the raw id.
1000
+ */
1001
+ getUserName?: (userId: string) => string | undefined;
1002
+ }
918
1003
  /**
919
1004
  * Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
920
1005
  * resolve user mentions, channel mentions, custom emojis, and links to
@@ -1032,6 +1117,13 @@ interface BlockKitchenBaseProps {
1032
1117
  * is never serialized into the emitted Block Kit JSON.
1033
1118
  */
1034
1119
  customEmojis?: CustomEmoji[];
1120
+ /**
1121
+ * Opt-in `@` mentions in the rich text editor: an `@` trigger and a toolbar
1122
+ * button that search people through the host. See {@link MentionsConfig}.
1123
+ * Without it, mentions already in the draft still round-trip and display by
1124
+ * raw id, but there is no picker.
1125
+ */
1126
+ mentions?: MentionsConfig;
1035
1127
  /**
1036
1128
  * Opt-in: load an existing Slack message into the editor. Adds a
1037
1129
  * "Find message" toolbar entry — the user pastes a permalink (or picks a
@@ -1315,4 +1407,4 @@ interface BlockKitchenComposeOnlyProps {
1315
1407
  */
1316
1408
  type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
1317
1409
 
1318
- export { type RecentMessage as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type DataVisualizationBlock as D, type EditableVia as E, type FeedbackButtonSubobject as F, type IconButtonIcon as G, type HeaderLevel as H, type IconButtonElement as I, type InputBlock as J, type LoadResult as K, type LoadMessageInput as L, type LoadedMessage as M, type LoadingConfig as N, type MarkdownBlock as O, type PreviewSurface as P, type PaletteMode as Q, type PaletteSection as R, type SupportedBlock as S, type Template as T, type PaletteVariant as U, type PieChart as V, type PieChartSegment as W, type PlanBlock as X, type PreviewHooks as Y, type PrimaryActionConfig as Z, type PrimaryActionContext as _, type SendAsUserStatus as a, type SendResult as a0, type SupportedBlockType as a1, type SupportedHeaderBlock as a2, type TableBlock as a3, type TableCell as a4, type TableColumnSetting as a5, type TaskCardBlock as a6, type TaskCardStatus as a7, type UpdatePayload as a8, type UpdateResult as a9, type UrlSourceElement as aa, type ValidationSummary as ab, type VideoBlock as ac, defaultPalette as ad, extraAlertVariant as ae, legacyInputVariants as af, buildVariantById as ag, 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 FeedbackButtonsElement as z };
1410
+ export { type PieChart 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 MentionUser as W, type MentionsConfig as X, type PaletteMode as Y, type PaletteSection as Z, type PaletteVariant as _, type SendAsUserStatus as a, type PieChartSegment as a0, type PlanBlock as a1, type PreviewHooks as a2, type PrimaryActionConfig as a3, type PrimaryActionContext as a4, type RecentMessage as a5, type SendResult as a6, type SupportedBlockType as a7, type SupportedHeaderBlock as a8, type TableBlock as a9, type TableCell as aa, type TableColumnSetting as ab, type TableRawTextCell as ac, type TaskCardBlock as ad, type TaskCardStatus as ae, type UpdatePayload as af, type UpdateResult as ag, type UrlSourceElement as ah, type ValidationSummary as ai, type VideoBlock as aj, defaultPalette as ak, extraAlertVariant as al, legacyInputVariants as am, buildVariantById as an, 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
  },