@tightknitai/block-kitchen 0.10.25 → 0.10.26
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 +4 -1
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +34 -17
- 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 +34 -17
- package/dist/index.js.map +1 -1
- package/dist/{palette-DTE9U5si.d.cts → palette-Cnz2jz8O.d.cts} +5 -0
- package/dist/{palette-DTE9U5si.d.ts → palette-Cnz2jz8O.d.ts} +5 -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.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { B as BlockKitchenProps, S as SupportedBlock, C as ChannelOption, a as SendAsUserStatus, b as SendPayload, c as SendExtrasContext, T as Template, P as PreviewSurface, d as PreviewTheme } from './palette-
|
|
4
|
-
export { A as AlertBlock, e as AlertLevel, f as BlockAction, g as BlockKitchenBaseProps, h as BlockKitchenComposeOnlyProps, i as BlockKitchenSendProps, j as BlockPosition, k as BrandPreset, l as BrandTheme, m as BrandTokens, n as BuilderBlock, o as CardBlock, p as CarouselBlock, q as CartesianChart, r as Chart, s as ChartAxisConfig, t as ChartDataPoint, u as ChartSeries, v as ChartType, w as ContainerBlock, x as ContainerChildBlock, y as ContextActionsBlock, z as ContextActionsElement, D as CustomBlockEditor, E as CustomBlockEditorProps, F as CustomEmoji, G as DataTableActionCell, H as DataTableBlock, I as DataTableCell, J as DataTableRawNumberCell, K as DataVisualizationBlock, L as EditableVia, M as FeedbackButtonSubobject, N as FeedbackButtonsElement, O as HeaderLevel, Q as IconButtonElement, R as IconButtonIcon, U as InputBlock, V as LoadMessageInput, W as LoadResult, X as LoadedMessage, Y as LoadingConfig, Z as MarkdownBlock, _ as MentionChannel, $ as MentionUser, a0 as MentionsConfig, a1 as PaletteMode, a2 as PaletteSection, a3 as PaletteVariant, a4 as PaletteVariantBadge, a5 as PieChart, a6 as PieChartSegment, a7 as PlanBlock, a8 as PreviewHooks, a9 as PrimaryActionConfig, aa as PrimaryActionContext, ab as RecentMessage, ac as SendResult, ad as SupportedBlockType, ae as SupportedHeaderBlock, af as TableBlock, ag as TableCell, ah as TableColumnSetting, ai as TableRawTextCell, aj as TaskCardBlock, ak as TaskCardStatus, al as UpdatePayload, am as UpdateResult, an as UrlSourceElement, ao as ValidationSummary, ap as VideoBlock, aq as defaultPalette, ar as extraAlertVariant, as as legacyInputVariants } from './palette-
|
|
3
|
+
import { B as BlockKitchenProps, S as SupportedBlock, C as ChannelOption, a as SendAsUserStatus, b as SendPayload, c as SendExtrasContext, T as Template, P as PreviewSurface, d as PreviewTheme } from './palette-Cnz2jz8O.cjs';
|
|
4
|
+
export { A as AlertBlock, e as AlertLevel, f as BlockAction, g as BlockKitchenBaseProps, h as BlockKitchenComposeOnlyProps, i as BlockKitchenSendProps, j as BlockPosition, k as BrandPreset, l as BrandTheme, m as BrandTokens, n as BuilderBlock, o as CardBlock, p as CarouselBlock, q as CartesianChart, r as Chart, s as ChartAxisConfig, t as ChartDataPoint, u as ChartSeries, v as ChartType, w as ContainerBlock, x as ContainerChildBlock, y as ContextActionsBlock, z as ContextActionsElement, D as CustomBlockEditor, E as CustomBlockEditorProps, F as CustomEmoji, G as DataTableActionCell, H as DataTableBlock, I as DataTableCell, J as DataTableRawNumberCell, K as DataVisualizationBlock, L as EditableVia, M as FeedbackButtonSubobject, N as FeedbackButtonsElement, O as HeaderLevel, Q as IconButtonElement, R as IconButtonIcon, U as InputBlock, V as LoadMessageInput, W as LoadResult, X as LoadedMessage, Y as LoadingConfig, Z as MarkdownBlock, _ as MentionChannel, $ as MentionUser, a0 as MentionsConfig, a1 as PaletteMode, a2 as PaletteSection, a3 as PaletteVariant, a4 as PaletteVariantBadge, a5 as PieChart, a6 as PieChartSegment, a7 as PlanBlock, a8 as PreviewHooks, a9 as PrimaryActionConfig, aa as PrimaryActionContext, ab as RecentMessage, ac as SendResult, ad as SupportedBlockType, ae as SupportedHeaderBlock, af as TableBlock, ag as TableCell, ah as TableColumnSetting, ai as TableRawTextCell, aj as TaskCardBlock, ak as TaskCardStatus, al as UpdatePayload, am as UpdateResult, an as UrlSourceElement, ao as ValidationSummary, ap as VideoBlock, aq as defaultPalette, ar as extraAlertVariant, as as legacyInputVariants } from './palette-Cnz2jz8O.cjs';
|
|
5
5
|
export { decodeBlocksFromString, encodeBlocksToString, toSlackBlocks } from './helpers.cjs';
|
|
6
6
|
import 'slack-web-api-client';
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { B as BlockKitchenProps, S as SupportedBlock, C as ChannelOption, a as SendAsUserStatus, b as SendPayload, c as SendExtrasContext, T as Template, P as PreviewSurface, d as PreviewTheme } from './palette-
|
|
4
|
-
export { A as AlertBlock, e as AlertLevel, f as BlockAction, g as BlockKitchenBaseProps, h as BlockKitchenComposeOnlyProps, i as BlockKitchenSendProps, j as BlockPosition, k as BrandPreset, l as BrandTheme, m as BrandTokens, n as BuilderBlock, o as CardBlock, p as CarouselBlock, q as CartesianChart, r as Chart, s as ChartAxisConfig, t as ChartDataPoint, u as ChartSeries, v as ChartType, w as ContainerBlock, x as ContainerChildBlock, y as ContextActionsBlock, z as ContextActionsElement, D as CustomBlockEditor, E as CustomBlockEditorProps, F as CustomEmoji, G as DataTableActionCell, H as DataTableBlock, I as DataTableCell, J as DataTableRawNumberCell, K as DataVisualizationBlock, L as EditableVia, M as FeedbackButtonSubobject, N as FeedbackButtonsElement, O as HeaderLevel, Q as IconButtonElement, R as IconButtonIcon, U as InputBlock, V as LoadMessageInput, W as LoadResult, X as LoadedMessage, Y as LoadingConfig, Z as MarkdownBlock, _ as MentionChannel, $ as MentionUser, a0 as MentionsConfig, a1 as PaletteMode, a2 as PaletteSection, a3 as PaletteVariant, a4 as PaletteVariantBadge, a5 as PieChart, a6 as PieChartSegment, a7 as PlanBlock, a8 as PreviewHooks, a9 as PrimaryActionConfig, aa as PrimaryActionContext, ab as RecentMessage, ac as SendResult, ad as SupportedBlockType, ae as SupportedHeaderBlock, af as TableBlock, ag as TableCell, ah as TableColumnSetting, ai as TableRawTextCell, aj as TaskCardBlock, ak as TaskCardStatus, al as UpdatePayload, am as UpdateResult, an as UrlSourceElement, ao as ValidationSummary, ap as VideoBlock, aq as defaultPalette, ar as extraAlertVariant, as as legacyInputVariants } from './palette-
|
|
3
|
+
import { B as BlockKitchenProps, S as SupportedBlock, C as ChannelOption, a as SendAsUserStatus, b as SendPayload, c as SendExtrasContext, T as Template, P as PreviewSurface, d as PreviewTheme } from './palette-Cnz2jz8O.js';
|
|
4
|
+
export { A as AlertBlock, e as AlertLevel, f as BlockAction, g as BlockKitchenBaseProps, h as BlockKitchenComposeOnlyProps, i as BlockKitchenSendProps, j as BlockPosition, k as BrandPreset, l as BrandTheme, m as BrandTokens, n as BuilderBlock, o as CardBlock, p as CarouselBlock, q as CartesianChart, r as Chart, s as ChartAxisConfig, t as ChartDataPoint, u as ChartSeries, v as ChartType, w as ContainerBlock, x as ContainerChildBlock, y as ContextActionsBlock, z as ContextActionsElement, D as CustomBlockEditor, E as CustomBlockEditorProps, F as CustomEmoji, G as DataTableActionCell, H as DataTableBlock, I as DataTableCell, J as DataTableRawNumberCell, K as DataVisualizationBlock, L as EditableVia, M as FeedbackButtonSubobject, N as FeedbackButtonsElement, O as HeaderLevel, Q as IconButtonElement, R as IconButtonIcon, U as InputBlock, V as LoadMessageInput, W as LoadResult, X as LoadedMessage, Y as LoadingConfig, Z as MarkdownBlock, _ as MentionChannel, $ as MentionUser, a0 as MentionsConfig, a1 as PaletteMode, a2 as PaletteSection, a3 as PaletteVariant, a4 as PaletteVariantBadge, a5 as PieChart, a6 as PieChartSegment, a7 as PlanBlock, a8 as PreviewHooks, a9 as PrimaryActionConfig, aa as PrimaryActionContext, ab as RecentMessage, ac as SendResult, ad as SupportedBlockType, ae as SupportedHeaderBlock, af as TableBlock, ag as TableCell, ah as TableColumnSetting, ai as TableRawTextCell, aj as TaskCardBlock, ak as TaskCardStatus, al as UpdatePayload, am as UpdateResult, an as UrlSourceElement, ao as ValidationSummary, ap as VideoBlock, aq as defaultPalette, ar as extraAlertVariant, as as legacyInputVariants } from './palette-Cnz2jz8O.js';
|
|
5
5
|
export { decodeBlocksFromString, encodeBlocksToString, toSlackBlocks } from './helpers.js';
|
|
6
6
|
import 'slack-web-api-client';
|
|
7
7
|
|
package/dist/index.js
CHANGED
|
@@ -4474,7 +4474,7 @@ function PaletteItem({
|
|
|
4474
4474
|
{
|
|
4475
4475
|
ref: setNodeRef,
|
|
4476
4476
|
className: cn(
|
|
4477
|
-
"group flex items-
|
|
4477
|
+
"group flex items-start gap-2 rounded px-2 py-1 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground has-[:focus-visible]:bg-accent has-[:focus-visible]:text-foreground",
|
|
4478
4478
|
isDragging && "opacity-50"
|
|
4479
4479
|
),
|
|
4480
4480
|
children: [
|
|
@@ -4482,16 +4482,12 @@ function PaletteItem({
|
|
|
4482
4482
|
"div",
|
|
4483
4483
|
{
|
|
4484
4484
|
ref: setActivatorNodeRef,
|
|
4485
|
-
className: "-my-1 flex min-w-0 flex-1 cursor-grab items-
|
|
4485
|
+
className: "-my-1 flex min-w-0 flex-1 cursor-grab items-start gap-2 rounded py-1 active:cursor-grabbing focus-visible:outline-none",
|
|
4486
4486
|
...attributes,
|
|
4487
4487
|
...listeners,
|
|
4488
4488
|
children: [
|
|
4489
|
-
/* @__PURE__ */ jsx(GripVertical, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
4490
|
-
/* @__PURE__ */ jsx(
|
|
4491
|
-
variant.badge ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4492
|
-
" ",
|
|
4493
|
-
/* @__PURE__ */ jsx(VariantBadge, { badge: variant.badge })
|
|
4494
|
-
] }) : null
|
|
4489
|
+
/* @__PURE__ */ jsx(GripVertical, { className: "mt-[3px] h-3.5 w-3.5 shrink-0" }),
|
|
4490
|
+
/* @__PURE__ */ jsx(RailLabel, { variant })
|
|
4495
4491
|
]
|
|
4496
4492
|
}
|
|
4497
4493
|
),
|
|
@@ -4516,13 +4512,15 @@ function LockedPaletteItem({
|
|
|
4516
4512
|
}) {
|
|
4517
4513
|
const select = variant.onLockedSelect;
|
|
4518
4514
|
const className = cn(
|
|
4519
|
-
"flex w-full
|
|
4520
|
-
isSheet ? "min-h-11 gap-3 rounded-md px-3 py-2 text-sm font-medium" : "gap-2 rounded px-2 py-1 text-sm"
|
|
4515
|
+
"flex w-full text-left text-muted-foreground",
|
|
4516
|
+
isSheet ? "min-h-11 items-center gap-3 rounded-md px-3 py-2 text-sm font-medium" : "items-start gap-2 rounded px-2 py-1 text-sm"
|
|
4521
4517
|
);
|
|
4522
4518
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4523
|
-
/* @__PURE__ */ jsx(Lock, { "aria-hidden": true, className: cn("shrink-0", isSheet ? "h-4 w-4" : "h-3.5 w-3.5") }),
|
|
4524
|
-
/* @__PURE__ */
|
|
4525
|
-
|
|
4519
|
+
/* @__PURE__ */ jsx(Lock, { "aria-hidden": true, className: cn("shrink-0", isSheet ? "h-4 w-4" : "mt-[3px] h-3.5 w-3.5") }),
|
|
4520
|
+
isSheet ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4521
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: variant.label }),
|
|
4522
|
+
variant.badge ? /* @__PURE__ */ jsx(VariantBadge, { badge: variant.badge }) : null
|
|
4523
|
+
] }) : /* @__PURE__ */ jsx(RailLabel, { variant })
|
|
4526
4524
|
] });
|
|
4527
4525
|
if (!select) {
|
|
4528
4526
|
return /* @__PURE__ */ jsx("div", { "aria-disabled": "true", className, children: content });
|
|
@@ -4544,12 +4542,31 @@ function LockedPaletteItem({
|
|
|
4544
4542
|
}
|
|
4545
4543
|
);
|
|
4546
4544
|
}
|
|
4545
|
+
function RailLabel({ variant }) {
|
|
4546
|
+
if (!variant.badge) {
|
|
4547
|
+
return /* @__PURE__ */ jsx("span", { className: "truncate", children: variant.label });
|
|
4548
|
+
}
|
|
4549
|
+
return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col items-start gap-0.5", children: [
|
|
4550
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-full truncate", children: variant.label }),
|
|
4551
|
+
" ",
|
|
4552
|
+
/* @__PURE__ */ jsx(VariantBadge, { badge: variant.badge })
|
|
4553
|
+
] });
|
|
4554
|
+
}
|
|
4547
4555
|
function VariantBadge({ badge }) {
|
|
4548
4556
|
const Icon = badge.icon;
|
|
4549
|
-
return /* @__PURE__ */ jsxs(
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4557
|
+
return /* @__PURE__ */ jsxs(
|
|
4558
|
+
"span",
|
|
4559
|
+
{
|
|
4560
|
+
className: cn(
|
|
4561
|
+
"inline-flex shrink-0 items-center gap-1 rounded-full border bg-background px-1.5 text-[10px] font-medium leading-4 text-muted-foreground",
|
|
4562
|
+
badge.className
|
|
4563
|
+
),
|
|
4564
|
+
children: [
|
|
4565
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, className: "h-2.5 w-2.5 shrink-0" }) : null,
|
|
4566
|
+
badge.label
|
|
4567
|
+
]
|
|
4568
|
+
}
|
|
4569
|
+
);
|
|
4553
4570
|
}
|
|
4554
4571
|
function SendDialog({
|
|
4555
4572
|
open,
|