@tightknitai/block-kitchen 0.10.4 → 0.10.5
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/index.cjs +21 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3251,6 +3251,7 @@ function SlackSignInButton({ onClick, polling }) {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
var LINK_DEBOUNCE_MS = 400;
|
|
3253
3253
|
var LINK_HELP_TEXT = 'Click the \u2807menu while hovering over the message in Slack (or right-click), and select "Copy Link".';
|
|
3254
|
+
var LINK_HELP_LABEL = "Where to find a message link";
|
|
3254
3255
|
var TABS = [
|
|
3255
3256
|
{ id: "recent", label: "Pick from Recent" },
|
|
3256
3257
|
{ id: "link", label: "Direct Link" }
|
|
@@ -3504,7 +3505,7 @@ function LoadMessageDialog({
|
|
|
3504
3505
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3505
3506
|
DialogContent,
|
|
3506
3507
|
{
|
|
3507
|
-
className: "flex max-h-[85svh] w-[calc(100vw-1.5rem)] flex-col rounded-lg lg:max-w-
|
|
3508
|
+
className: "flex max-h-[85svh] w-[calc(100vw-1.5rem)] max-w-4xl flex-col rounded-lg max-lg:max-w-lg",
|
|
3508
3509
|
onOpenAutoFocus: (e) => {
|
|
3509
3510
|
if (hasRecent) {
|
|
3510
3511
|
return;
|
|
@@ -3517,7 +3518,7 @@ function LoadMessageDialog({
|
|
|
3517
3518
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Find an existing message" }),
|
|
3518
3519
|
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: hasRecent ? "Pick a recent message your app posted, or paste a Slack message link. Preview it before loading." : `Paste a Slack message link (Slack's "Copy link") to preview it and load its blocks for editing.` })
|
|
3519
3520
|
] }),
|
|
3520
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "-mx-1 flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto
|
|
3521
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "-mx-1 flex min-h-0 min-w-0 flex-1 px-1 max-lg:flex-col max-lg:gap-4 max-lg:overflow-y-auto lg:flex-row lg:gap-5 lg:overflow-hidden", children: [
|
|
3521
3522
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 shrink-0 flex-col gap-3 lg:min-h-0 lg:w-[19rem]", children: [
|
|
3522
3523
|
hasRecent && /* @__PURE__ */ jsxRuntime.jsx(TabStrip, { activeTab, onSelect: setTab, tabDomId, panelDomId }),
|
|
3523
3524
|
activeTab === "recent" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3552,7 +3553,7 @@ function LoadMessageDialog({
|
|
|
3552
3553
|
channelId && recent === null && !recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 text-xs text-muted-foreground", children: "Loading recent messages\u2026" }),
|
|
3553
3554
|
channelId && recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 text-xs text-destructive", children: recentError }),
|
|
3554
3555
|
channelId && recent && recent.length === 0 && !recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 text-xs text-muted-foreground", children: "No recent messages from this app in this channel." }),
|
|
3555
|
-
channelId && recent && recent.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex
|
|
3556
|
+
channelId && recent && recent.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-0 min-w-0 flex-col gap-1 overflow-y-auto max-lg:max-h-60 lg:flex-1", children: recent.map((m) => {
|
|
3556
3557
|
const asUser = (m.editableVia ?? "bot") === "user";
|
|
3557
3558
|
const authorName = m.username || (asUser ? "You" : "App bot");
|
|
3558
3559
|
const safeIcon = isSafeImageSrc(m.iconUrl) ? m.iconUrl : void 0;
|
|
@@ -3610,7 +3611,21 @@ function LoadMessageDialog({
|
|
|
3610
3611
|
className: "-mx-1 flex min-w-0 flex-col gap-2 px-1 lg:min-h-0 lg:flex-1 lg:overflow-y-auto",
|
|
3611
3612
|
children: [
|
|
3612
3613
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
3613
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3614
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
3615
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "message-link", children: "Message link" }),
|
|
3616
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
3617
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3618
|
+
"button",
|
|
3619
|
+
{
|
|
3620
|
+
type: "button",
|
|
3621
|
+
"aria-label": LINK_HELP_LABEL,
|
|
3622
|
+
className: "flex h-4 w-4 items-center justify-center rounded-full text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3623
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "h-3.5 w-3.5" })
|
|
3624
|
+
}
|
|
3625
|
+
) }),
|
|
3626
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side: "right", children: LINK_HELP_TEXT })
|
|
3627
|
+
] })
|
|
3628
|
+
] }),
|
|
3614
3629
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3615
3630
|
Input,
|
|
3616
3631
|
{
|
|
@@ -3632,8 +3647,7 @@ function LoadMessageDialog({
|
|
|
3632
3647
|
autoComplete: "off",
|
|
3633
3648
|
spellCheck: false
|
|
3634
3649
|
}
|
|
3635
|
-
)
|
|
3636
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs leading-relaxed text-muted-foreground", children: LINK_HELP_TEXT })
|
|
3650
|
+
)
|
|
3637
3651
|
] }),
|
|
3638
3652
|
emptyLinkError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-md border border-destructive/30 bg-destructive/5 p-2 text-xs text-destructive", children: emptyLinkError })
|
|
3639
3653
|
]
|
|
@@ -3737,7 +3751,7 @@ function PreviewPane({
|
|
|
3737
3751
|
role: "region",
|
|
3738
3752
|
"aria-label": "Message preview",
|
|
3739
3753
|
tabIndex: 0,
|
|
3740
|
-
className: "flex
|
|
3754
|
+
className: "flex flex-1 flex-col gap-3 overflow-y-auto rounded-md border bg-muted/40 p-3 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring max-lg:max-h-72 max-lg:min-h-32 lg:min-h-0",
|
|
3741
3755
|
children: [
|
|
3742
3756
|
state.kind === "not-editable" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-col gap-2 rounded-md border border-amber-200! bg-amber-50 p-3 text-xs text-amber-800", children: [
|
|
3743
3757
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|