@tightknitai/block-kitchen 0.10.22 → 0.10.24
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 +48 -0
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +220 -149
- 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 +220 -149
- package/dist/index.js.map +1 -1
- package/dist/{palette-CXXqlwIH.d.cts → palette-Bup6i-9c.d.cts} +42 -1
- package/dist/{palette-CXXqlwIH.d.ts → palette-Bup6i-9c.d.ts} +42 -1
- package/dist/palette.d.cts +1 -1
- package/dist/palette.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -730,6 +730,33 @@ interface PrimaryActionContext {
|
|
|
730
730
|
*/
|
|
731
731
|
loadedMessage: LoadedMessage | null;
|
|
732
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Where a block sits in the draft, as a {@link BlockAction} is told. Hosts
|
|
735
|
+
* map it onto their own copy of the blocks (e.g. the array `onChange` last
|
|
736
|
+
* emitted), since builder ids never leave the package.
|
|
737
|
+
*/
|
|
738
|
+
interface BlockPosition {
|
|
739
|
+
/** Zero-based index among the draft's top-level blocks. */
|
|
740
|
+
index: number;
|
|
741
|
+
/** Zero-based index inside the container holding the block, or `null` for a top-level block. */
|
|
742
|
+
childIndex: number | null;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* A host-owned button added to every block's action toolbar (the hover
|
|
746
|
+
* toolbar on desktop, the inline row on mobile), before the built-in Edit,
|
|
747
|
+
* Duplicate and Delete. Use it for actions about a block that belong to your
|
|
748
|
+
* app, e.g. "Comment on this block".
|
|
749
|
+
*/
|
|
750
|
+
interface BlockAction {
|
|
751
|
+
/** Stable identifier, used as the button's React key. */
|
|
752
|
+
id: string;
|
|
753
|
+
/** Accessible name and tooltip for the button. */
|
|
754
|
+
label: string;
|
|
755
|
+
/** Icon for the button; an `svg` inside is sized to match the built-in icons. */
|
|
756
|
+
icon: ReactNode;
|
|
757
|
+
/** Called with the block's position when the button is clicked. */
|
|
758
|
+
onSelect: (position: BlockPosition) => void;
|
|
759
|
+
}
|
|
733
760
|
/**
|
|
734
761
|
* A host-owned primary action for compose-only mode, rendered in the
|
|
735
762
|
* toolbar slot where the built-in "Review & send" button normally sits.
|
|
@@ -1127,6 +1154,20 @@ interface BlockKitchenBaseProps {
|
|
|
1127
1154
|
* directives render with the library's defaults.
|
|
1128
1155
|
*/
|
|
1129
1156
|
previewHooks?: PreviewHooks;
|
|
1157
|
+
/**
|
|
1158
|
+
* Opt-in host buttons for every block's action toolbar, e.g. "Comment on
|
|
1159
|
+
* this block". See {@link BlockAction}. Each block row also carries
|
|
1160
|
+
* `data-bk-block-index` (and `data-bk-child-index` inside a container), so a
|
|
1161
|
+
* host can find a block on the canvas to scroll to or highlight it.
|
|
1162
|
+
*/
|
|
1163
|
+
blockActions?: readonly BlockAction[];
|
|
1164
|
+
/**
|
|
1165
|
+
* Opt-in host content shown beside every block, at its right edge, all the
|
|
1166
|
+
* time (unlike `blockActions`, which show on hover): e.g. a count of
|
|
1167
|
+
* comments on the block. Called with the block's position (see
|
|
1168
|
+
* {@link BlockPosition}); return `null` for a block with nothing to show.
|
|
1169
|
+
*/
|
|
1170
|
+
renderBlockAdornment?: (position: BlockPosition) => ReactNode;
|
|
1130
1171
|
/**
|
|
1131
1172
|
* Workspace custom emoji (`emoji.list`) the preview should resolve. Entries
|
|
1132
1173
|
* with a non-null `url` render as the workspace image; alias entries fall
|
|
@@ -1427,4 +1468,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1427
1468
|
*/
|
|
1428
1469
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1429
1470
|
|
|
1430
|
-
export { type
|
|
1471
|
+
export { type PaletteMode as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type CustomEmoji as D, type DataTableActionCell as E, type DataTableBlock as F, type DataTableCell as G, type DataTableRawNumberCell as H, type DataVisualizationBlock as I, type EditableVia as J, type FeedbackButtonSubobject as K, type FeedbackButtonsElement as L, type HeaderLevel as M, type IconButtonElement as N, type IconButtonIcon as O, type PreviewSurface as P, type InputBlock as Q, type LoadMessageInput as R, type SupportedBlock as S, type Template as T, type LoadResult as U, type LoadedMessage as V, type LoadingConfig as W, type MarkdownBlock as X, type MentionChannel as Y, type MentionUser as Z, type MentionsConfig as _, type SendAsUserStatus as a, type PaletteSection as a0, type PaletteVariant as a1, type PieChart as a2, type PieChartSegment as a3, type PlanBlock as a4, type PreviewHooks as a5, type PrimaryActionConfig as a6, type PrimaryActionContext as a7, type RecentMessage as a8, type SendResult as a9, type SupportedBlockType as aa, type SupportedHeaderBlock as ab, type TableBlock as ac, type TableCell as ad, type TableColumnSetting as ae, type TableRawTextCell as af, type TaskCardBlock as ag, type TaskCardStatus as ah, type UpdatePayload as ai, type UpdateResult as aj, type UrlSourceElement as ak, type ValidationSummary as al, type VideoBlock as am, defaultPalette as an, extraAlertVariant as ao, legacyInputVariants as ap, buildVariantById as aq, 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 };
|
|
@@ -730,6 +730,33 @@ interface PrimaryActionContext {
|
|
|
730
730
|
*/
|
|
731
731
|
loadedMessage: LoadedMessage | null;
|
|
732
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Where a block sits in the draft, as a {@link BlockAction} is told. Hosts
|
|
735
|
+
* map it onto their own copy of the blocks (e.g. the array `onChange` last
|
|
736
|
+
* emitted), since builder ids never leave the package.
|
|
737
|
+
*/
|
|
738
|
+
interface BlockPosition {
|
|
739
|
+
/** Zero-based index among the draft's top-level blocks. */
|
|
740
|
+
index: number;
|
|
741
|
+
/** Zero-based index inside the container holding the block, or `null` for a top-level block. */
|
|
742
|
+
childIndex: number | null;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* A host-owned button added to every block's action toolbar (the hover
|
|
746
|
+
* toolbar on desktop, the inline row on mobile), before the built-in Edit,
|
|
747
|
+
* Duplicate and Delete. Use it for actions about a block that belong to your
|
|
748
|
+
* app, e.g. "Comment on this block".
|
|
749
|
+
*/
|
|
750
|
+
interface BlockAction {
|
|
751
|
+
/** Stable identifier, used as the button's React key. */
|
|
752
|
+
id: string;
|
|
753
|
+
/** Accessible name and tooltip for the button. */
|
|
754
|
+
label: string;
|
|
755
|
+
/** Icon for the button; an `svg` inside is sized to match the built-in icons. */
|
|
756
|
+
icon: ReactNode;
|
|
757
|
+
/** Called with the block's position when the button is clicked. */
|
|
758
|
+
onSelect: (position: BlockPosition) => void;
|
|
759
|
+
}
|
|
733
760
|
/**
|
|
734
761
|
* A host-owned primary action for compose-only mode, rendered in the
|
|
735
762
|
* toolbar slot where the built-in "Review & send" button normally sits.
|
|
@@ -1127,6 +1154,20 @@ interface BlockKitchenBaseProps {
|
|
|
1127
1154
|
* directives render with the library's defaults.
|
|
1128
1155
|
*/
|
|
1129
1156
|
previewHooks?: PreviewHooks;
|
|
1157
|
+
/**
|
|
1158
|
+
* Opt-in host buttons for every block's action toolbar, e.g. "Comment on
|
|
1159
|
+
* this block". See {@link BlockAction}. Each block row also carries
|
|
1160
|
+
* `data-bk-block-index` (and `data-bk-child-index` inside a container), so a
|
|
1161
|
+
* host can find a block on the canvas to scroll to or highlight it.
|
|
1162
|
+
*/
|
|
1163
|
+
blockActions?: readonly BlockAction[];
|
|
1164
|
+
/**
|
|
1165
|
+
* Opt-in host content shown beside every block, at its right edge, all the
|
|
1166
|
+
* time (unlike `blockActions`, which show on hover): e.g. a count of
|
|
1167
|
+
* comments on the block. Called with the block's position (see
|
|
1168
|
+
* {@link BlockPosition}); return `null` for a block with nothing to show.
|
|
1169
|
+
*/
|
|
1170
|
+
renderBlockAdornment?: (position: BlockPosition) => ReactNode;
|
|
1130
1171
|
/**
|
|
1131
1172
|
* Workspace custom emoji (`emoji.list`) the preview should resolve. Entries
|
|
1132
1173
|
* with a non-null `url` render as the workspace image; alias entries fall
|
|
@@ -1427,4 +1468,4 @@ interface BlockKitchenComposeOnlyProps {
|
|
|
1427
1468
|
*/
|
|
1428
1469
|
type BlockKitchenProps = BlockKitchenBaseProps & (BlockKitchenSendProps | BlockKitchenComposeOnlyProps);
|
|
1429
1470
|
|
|
1430
|
-
export { type
|
|
1471
|
+
export { type PaletteMode as $, type AlertBlock as A, type BlockKitchenProps as B, type ChannelOption as C, type CustomEmoji as D, type DataTableActionCell as E, type DataTableBlock as F, type DataTableCell as G, type DataTableRawNumberCell as H, type DataVisualizationBlock as I, type EditableVia as J, type FeedbackButtonSubobject as K, type FeedbackButtonsElement as L, type HeaderLevel as M, type IconButtonElement as N, type IconButtonIcon as O, type PreviewSurface as P, type InputBlock as Q, type LoadMessageInput as R, type SupportedBlock as S, type Template as T, type LoadResult as U, type LoadedMessage as V, type LoadingConfig as W, type MarkdownBlock as X, type MentionChannel as Y, type MentionUser as Z, type MentionsConfig as _, type SendAsUserStatus as a, type PaletteSection as a0, type PaletteVariant as a1, type PieChart as a2, type PieChartSegment as a3, type PlanBlock as a4, type PreviewHooks as a5, type PrimaryActionConfig as a6, type PrimaryActionContext as a7, type RecentMessage as a8, type SendResult as a9, type SupportedBlockType as aa, type SupportedHeaderBlock as ab, type TableBlock as ac, type TableCell as ad, type TableColumnSetting as ae, type TableRawTextCell as af, type TaskCardBlock as ag, type TaskCardStatus as ah, type UpdatePayload as ai, type UpdateResult as aj, type UrlSourceElement as ak, type ValidationSummary as al, type VideoBlock as am, defaultPalette as an, extraAlertVariant as ao, legacyInputVariants as ap, buildVariantById as aq, 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 { $ as PaletteMode, a0 as PaletteSection, a1 as PaletteVariant, S as SupportedBlock, aa as SupportedBlockType, aq as buildVariantById, an as defaultPalette, ao as extraAlertVariant, ap as legacyInputVariants } from './palette-Bup6i-9c.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 { $ as PaletteMode, a0 as PaletteSection, a1 as PaletteVariant, S as SupportedBlock, aa as SupportedBlockType, aq as buildVariantById, an as defaultPalette, ao as extraAlertVariant, ap as legacyInputVariants } from './palette-Bup6i-9c.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'slack-web-api-client';
|