@tightknitai/block-kitchen 0.10.26 → 0.10.27
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/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +403 -68
- 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 +404 -69
- package/dist/index.js.map +1 -1
- package/dist/{palette-Cnz2jz8O.d.cts → palette-xi4VWU0p.d.cts} +32 -1
- package/dist/{palette-Cnz2jz8O.d.ts → palette-xi4VWU0p.d.ts} +32 -1
- package/dist/palette.d.cts +1 -1
- package/dist/palette.d.ts +1 -1
- package/dist/styles.css +2 -2
- package/package.json +6 -6
|
@@ -1107,6 +1107,31 @@ interface MentionsConfig {
|
|
|
1107
1107
|
*/
|
|
1108
1108
|
getChannelName?: (channelId: string) => string | undefined;
|
|
1109
1109
|
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Opt-in image uploads, passed as {@link BlockKitchenBaseProps.imageUpload}.
|
|
1112
|
+
* Image URL fields gain an "Upload" button and accept a dropped file, and an
|
|
1113
|
+
* image file dropped on the canvas adds an image block.
|
|
1114
|
+
*
|
|
1115
|
+
* Like every other I/O concern, the upload is brokered by the host: the
|
|
1116
|
+
* builder hands over the `File` and writes whatever URL comes back into the
|
|
1117
|
+
* block. Slack fetches that URL when the message is posted, so it must be
|
|
1118
|
+
* publicly reachable.
|
|
1119
|
+
*/
|
|
1120
|
+
interface ImageUploadConfig {
|
|
1121
|
+
/**
|
|
1122
|
+
* Uploads one image and resolves its public URL. A rejection's `message`
|
|
1123
|
+
* is shown to the user, so reject with something they can act on (e.g.
|
|
1124
|
+
* "File size exceeds 5 MB limit").
|
|
1125
|
+
*/
|
|
1126
|
+
uploadImage: (file: File) => Promise<{
|
|
1127
|
+
url: string;
|
|
1128
|
+
}>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Optional. MIME types the file picker offers and drops accept. Defaults
|
|
1131
|
+
* to PNG, JPEG and GIF, the formats Slack renders in an image block.
|
|
1132
|
+
*/
|
|
1133
|
+
accept?: readonly string[];
|
|
1134
|
+
}
|
|
1110
1135
|
/**
|
|
1111
1136
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
1112
1137
|
* resolve user mentions, channel mentions, custom emojis, and links to
|
|
@@ -1250,6 +1275,12 @@ interface BlockKitchenBaseProps {
|
|
|
1250
1275
|
* configuration and display by raw id.
|
|
1251
1276
|
*/
|
|
1252
1277
|
mentions?: MentionsConfig;
|
|
1278
|
+
/**
|
|
1279
|
+
* Opt-in image uploads from the user's device. See
|
|
1280
|
+
* {@link ImageUploadConfig}. Without it, images are added by public URL
|
|
1281
|
+
* only.
|
|
1282
|
+
*/
|
|
1283
|
+
imageUpload?: ImageUploadConfig;
|
|
1253
1284
|
/**
|
|
1254
1285
|
* Opt-in: load an existing Slack message into the editor. Adds a
|
|
1255
1286
|
* "Find message" toolbar entry — the user pastes a permalink (or picks a
|
|
@@ -1541,4 +1572,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1541
1572
|
*/
|
|
1542
1573
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1543
1574
|
|
|
1544
|
-
export { type
|
|
1575
|
+
export { type MentionChannel as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type CustomBlockEditor as D, type CustomBlockEditorProps as E, type CustomEmoji as F, type DataTableActionCell as G, type DataTableBlock as H, type DataTableCell as I, type DataTableRawNumberCell as J, type DataVisualizationBlock as K, type EditableVia as L, type FeedbackButtonSubobject as M, type FeedbackButtonsElement as N, type HeaderLevel as O, type PreviewSurface as P, type IconButtonElement as Q, type IconButtonIcon as R, type SupportedBlock as S, type Template as T, type ImageUploadConfig as U, type InputBlock as V, type LoadMessageInput as W, type LoadResult as X, type LoadedMessage as Y, type LoadingConfig as Z, type MarkdownBlock as _, type SendAsUserStatus as a, type MentionUser as a0, type MentionsConfig as a1, type PaletteMode as a2, type PaletteSection as a3, type PaletteVariant as a4, type PaletteVariantBadge as a5, type PieChart as a6, type PieChartSegment as a7, type PlanBlock as a8, type PreviewHooks as a9, type PrimaryActionConfig as aa, type PrimaryActionContext as ab, type RecentMessage as ac, type SendResult as ad, type SupportedBlockType as ae, type SupportedHeaderBlock as af, type TableBlock as ag, type TableCell as ah, type TableColumnSetting as ai, type TableRawTextCell as aj, type TaskCardBlock as ak, type TaskCardStatus as al, type UpdatePayload as am, type UpdateResult as an, type UrlSourceElement as ao, type ValidationSummary as ap, type VideoBlock as aq, defaultPalette as ar, extraAlertVariant as as, legacyInputVariants as at, buildVariantById as au, type SendPayload as b, type SendExtrasContext as c, type PreviewTheme as d, type AlertLevel as e, type BlockAction as f, type BlockKitchenBaseProps as g, type BlockKitchenComposeOnlyProps as h, type BlockKitchenSendProps as i, type BlockPosition as j, type BrandPreset as k, type BrandTheme as l, type BrandTokens as m, type BuilderBlock as n, type CardBlock as o, type CarouselBlock as p, type CartesianChart as q, type Chart as r, type ChartAxisConfig as s, type ChartDataPoint as t, type ChartSeries as u, type ChartType as v, type ContainerBlock as w, type ContainerChildBlock as x, type ContextActionsBlock as y, type ContextActionsElement as z };
|
|
@@ -1107,6 +1107,31 @@ interface MentionsConfig {
|
|
|
1107
1107
|
*/
|
|
1108
1108
|
getChannelName?: (channelId: string) => string | undefined;
|
|
1109
1109
|
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Opt-in image uploads, passed as {@link BlockKitchenBaseProps.imageUpload}.
|
|
1112
|
+
* Image URL fields gain an "Upload" button and accept a dropped file, and an
|
|
1113
|
+
* image file dropped on the canvas adds an image block.
|
|
1114
|
+
*
|
|
1115
|
+
* Like every other I/O concern, the upload is brokered by the host: the
|
|
1116
|
+
* builder hands over the `File` and writes whatever URL comes back into the
|
|
1117
|
+
* block. Slack fetches that URL when the message is posted, so it must be
|
|
1118
|
+
* publicly reachable.
|
|
1119
|
+
*/
|
|
1120
|
+
interface ImageUploadConfig {
|
|
1121
|
+
/**
|
|
1122
|
+
* Uploads one image and resolves its public URL. A rejection's `message`
|
|
1123
|
+
* is shown to the user, so reject with something they can act on (e.g.
|
|
1124
|
+
* "File size exceeds 5 MB limit").
|
|
1125
|
+
*/
|
|
1126
|
+
uploadImage: (file: File) => Promise<{
|
|
1127
|
+
url: string;
|
|
1128
|
+
}>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Optional. MIME types the file picker offers and drops accept. Defaults
|
|
1131
|
+
* to PNG, JPEG and GIF, the formats Slack renders in an image block.
|
|
1132
|
+
*/
|
|
1133
|
+
accept?: readonly string[];
|
|
1134
|
+
}
|
|
1110
1135
|
/**
|
|
1111
1136
|
* Hooks forwarded to `slack-blocks-to-jsx`'s `<Message>` so the consumer can
|
|
1112
1137
|
* resolve user mentions, channel mentions, custom emojis, and links to
|
|
@@ -1250,6 +1275,12 @@ interface BlockKitchenBaseProps {
|
|
|
1250
1275
|
* configuration and display by raw id.
|
|
1251
1276
|
*/
|
|
1252
1277
|
mentions?: MentionsConfig;
|
|
1278
|
+
/**
|
|
1279
|
+
* Opt-in image uploads from the user's device. See
|
|
1280
|
+
* {@link ImageUploadConfig}. Without it, images are added by public URL
|
|
1281
|
+
* only.
|
|
1282
|
+
*/
|
|
1283
|
+
imageUpload?: ImageUploadConfig;
|
|
1253
1284
|
/**
|
|
1254
1285
|
* Opt-in: load an existing Slack message into the editor. Adds a
|
|
1255
1286
|
* "Find message" toolbar entry — the user pastes a permalink (or picks a
|
|
@@ -1541,4 +1572,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1541
1572
|
*/
|
|
1542
1573
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1543
1574
|
|
|
1544
|
-
export { type
|
|
1575
|
+
export { type MentionChannel as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type CustomBlockEditor as D, type CustomBlockEditorProps as E, type CustomEmoji as F, type DataTableActionCell as G, type DataTableBlock as H, type DataTableCell as I, type DataTableRawNumberCell as J, type DataVisualizationBlock as K, type EditableVia as L, type FeedbackButtonSubobject as M, type FeedbackButtonsElement as N, type HeaderLevel as O, type PreviewSurface as P, type IconButtonElement as Q, type IconButtonIcon as R, type SupportedBlock as S, type Template as T, type ImageUploadConfig as U, type InputBlock as V, type LoadMessageInput as W, type LoadResult as X, type LoadedMessage as Y, type LoadingConfig as Z, type MarkdownBlock as _, type SendAsUserStatus as a, type MentionUser as a0, type MentionsConfig as a1, type PaletteMode as a2, type PaletteSection as a3, type PaletteVariant as a4, type PaletteVariantBadge as a5, type PieChart as a6, type PieChartSegment as a7, type PlanBlock as a8, type PreviewHooks as a9, type PrimaryActionConfig as aa, type PrimaryActionContext as ab, type RecentMessage as ac, type SendResult as ad, type SupportedBlockType as ae, type SupportedHeaderBlock as af, type TableBlock as ag, type TableCell as ah, type TableColumnSetting as ai, type TableRawTextCell as aj, type TaskCardBlock as ak, type TaskCardStatus as al, type UpdatePayload as am, type UpdateResult as an, type UrlSourceElement as ao, type ValidationSummary as ap, type VideoBlock as aq, defaultPalette as ar, extraAlertVariant as as, legacyInputVariants as at, buildVariantById as au, type SendPayload as b, type SendExtrasContext as c, type PreviewTheme as d, type AlertLevel as e, type BlockAction as f, type BlockKitchenBaseProps as g, type BlockKitchenComposeOnlyProps as h, type BlockKitchenSendProps as i, type BlockPosition as j, type BrandPreset as k, type BrandTheme as l, type BrandTokens as m, type BuilderBlock as n, type CardBlock as o, type CarouselBlock as p, type CartesianChart as q, type Chart as r, type ChartAxisConfig as s, type ChartDataPoint as t, type ChartSeries as u, type ChartType as v, type ContainerBlock as w, type ContainerChildBlock as x, type ContextActionsBlock as y, type ContextActionsElement as z };
|
package/dist/palette.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a2 as PaletteMode, a3 as PaletteSection, a4 as PaletteVariant, S as SupportedBlock, ae as SupportedBlockType, au as buildVariantById, ar as defaultPalette, as as extraAlertVariant, at as legacyInputVariants } from './palette-xi4VWU0p.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 { a2 as PaletteMode, a3 as PaletteSection, a4 as PaletteVariant, S as SupportedBlock, ae as SupportedBlockType, au as buildVariantById, ar as defaultPalette, as as extraAlertVariant, at as legacyInputVariants } from './palette-xi4VWU0p.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'slack-web-api-client';
|