@tightknitai/block-kitchen 0.10.20 → 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 +268 -81
- 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 +269 -82
- package/dist/index.js.map +1 -1
- package/dist/{palette-4BJw_nd7.d.cts → palette-CXXqlwIH.d.cts} +29 -9
- package/dist/{palette-4BJw_nd7.d.ts → palette-CXXqlwIH.d.ts} +29 -9
- package/dist/palette.d.cts +1 -1
- package/dist/palette.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
|
@@ -975,10 +975,19 @@ interface MentionUser {
|
|
|
975
975
|
avatarUrl?: string | null;
|
|
976
976
|
}
|
|
977
977
|
/**
|
|
978
|
-
*
|
|
979
|
-
* {@link
|
|
980
|
-
|
|
981
|
-
|
|
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.
|
|
982
991
|
*
|
|
983
992
|
* Like every other I/O concern, the search is brokered by the host: the
|
|
984
993
|
* builder never looks people up itself.
|
|
@@ -999,6 +1008,18 @@ interface MentionsConfig {
|
|
|
999
1008
|
* from the search, then the raw id.
|
|
1000
1009
|
*/
|
|
1001
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;
|
|
1002
1023
|
}
|
|
1003
1024
|
/**
|
|
1004
1025
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
@@ -1118,10 +1139,9 @@ interface BlockKitchenBaseProps {
|
|
|
1118
1139
|
*/
|
|
1119
1140
|
customEmojis?: CustomEmoji[];
|
|
1120
1141
|
/**
|
|
1121
|
-
* Opt-in `@` mentions in the rich text editor
|
|
1122
|
-
*
|
|
1123
|
-
*
|
|
1124
|
-
* 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.
|
|
1125
1145
|
*/
|
|
1126
1146
|
mentions?: MentionsConfig;
|
|
1127
1147
|
/**
|
|
@@ -1407,4 +1427,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1407
1427
|
*/
|
|
1408
1428
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1409
1429
|
|
|
1410
|
-
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 };
|
|
@@ -975,10 +975,19 @@ interface MentionUser {
|
|
|
975
975
|
avatarUrl?: string | null;
|
|
976
976
|
}
|
|
977
977
|
/**
|
|
978
|
-
*
|
|
979
|
-
* {@link
|
|
980
|
-
|
|
981
|
-
|
|
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.
|
|
982
991
|
*
|
|
983
992
|
* Like every other I/O concern, the search is brokered by the host: the
|
|
984
993
|
* builder never looks people up itself.
|
|
@@ -999,6 +1008,18 @@ interface MentionsConfig {
|
|
|
999
1008
|
* from the search, then the raw id.
|
|
1000
1009
|
*/
|
|
1001
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;
|
|
1002
1023
|
}
|
|
1003
1024
|
/**
|
|
1004
1025
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
@@ -1118,10 +1139,9 @@ interface BlockKitchenBaseProps {
|
|
|
1118
1139
|
*/
|
|
1119
1140
|
customEmojis?: CustomEmoji[];
|
|
1120
1141
|
/**
|
|
1121
|
-
* Opt-in `@` mentions in the rich text editor
|
|
1122
|
-
*
|
|
1123
|
-
*
|
|
1124
|
-
* 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.
|
|
1125
1145
|
*/
|
|
1126
1146
|
mentions?: MentionsConfig;
|
|
1127
1147
|
/**
|
|
@@ -1407,4 +1427,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1407
1427
|
*/
|
|
1408
1428
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1409
1429
|
|
|
1410
|
-
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.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Z as PaletteMode, _ as PaletteSection, $ as PaletteVariant, S as SupportedBlock, a8 as SupportedBlockType, ao as buildVariantById, al as defaultPalette, am as extraAlertVariant, an as legacyInputVariants } from './palette-CXXqlwIH.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'slack-web-api-client';
|
package/dist/palette.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Z as PaletteMode, _ as PaletteSection, $ as PaletteVariant, S as SupportedBlock, a8 as SupportedBlockType, ao as buildVariantById, al as defaultPalette, am as extraAlertVariant, an as legacyInputVariants } from './palette-CXXqlwIH.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'slack-web-api-client';
|