@tightknitai/block-kitchen 0.9.0 → 0.9.2

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 CHANGED
@@ -2952,7 +2952,7 @@ function LoadMessageDialog({
2952
2952
  children: [
2953
2953
  /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
2954
2954
  /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Edit an existing message" }),
2955
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-1.5", children: [
2955
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-1.5 text-left", children: [
2956
2956
  /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: hasRecent ? "Paste a Slack message link, or pick a recent message your app posted." : `Paste a Slack message link (Slack's "Copy link") to load its blocks for editing.` }),
2957
2957
  /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
2958
2958
  /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2974,7 +2974,7 @@ function LoadMessageDialog({
2974
2974
  ] })
2975
2975
  ] })
2976
2976
  ] }),
2977
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
2977
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
2978
2978
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
2979
2979
  /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "message-link", children: "Message link" }),
2980
2980
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3019,7 +3019,7 @@ function LoadMessageDialog({
3019
3019
  }
3020
3020
  )
3021
3021
  ] }),
3022
- hasRecent && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
3022
+ hasRecent && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-2", children: [
3023
3023
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
3024
3024
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-px flex-1 bg-border" }),
3025
3025
  "or pick a recent message",
@@ -3051,23 +3051,28 @@ function LoadMessageDialog({
3051
3051
  channelId && recent === null && !recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Loading recent messages\u2026" }),
3052
3052
  channelId && recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: recentError }),
3053
3053
  channelId && recent && recent.length === 0 && !recentError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "No recent messages from this app in this channel." }),
3054
- channelId && recent && recent.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex max-h-48 flex-col gap-1 overflow-y-auto", children: recent.map((m) => {
3054
+ channelId && recent && recent.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex max-h-48 min-w-0 flex-col gap-1 overflow-y-auto", children: recent.map((m) => {
3055
3055
  const asUser = (m.editableVia ?? "bot") === "user";
3056
3056
  return /* @__PURE__ */ jsxRuntime.jsxs(
3057
3057
  "button",
3058
3058
  {
3059
3059
  type: "button",
3060
3060
  onClick: () => onLoaded(recentToResult(m)),
3061
- className: "flex flex-col gap-0.5 rounded-md border border-input bg-background px-3 py-2 text-left text-sm hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3061
+ className: "flex min-w-0 flex-col gap-0.5 rounded-md border border-input bg-background px-3 py-2 text-left text-sm hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3062
3062
  children: [
3063
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-baseline justify-between gap-2", children: [
3064
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [
3065
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: m.channelName ? `#${m.channelName}` : m.channelId }),
3066
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded border px-1 py-px text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: asUser ? "You" : "Bot" })
3067
- ] }),
3068
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-mono text-xs text-muted-foreground", children: m.ts })
3063
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-baseline justify-between gap-2", children: [
3064
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded border px-1 py-px text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: asUser ? "You" : "Bot" }),
3065
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
3066
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: new Date(Number(m.ts) * 1e3).toLocaleString() }),
3067
+ " ",
3068
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono", children: [
3069
+ "(",
3070
+ m.ts,
3071
+ ")"
3072
+ ] })
3073
+ ] })
3069
3074
  ] }),
3070
- m.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground", children: m.label })
3075
+ m.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-muted-foreground", children: m.label })
3071
3076
  ]
3072
3077
  },
3073
3078
  `${m.channelId}:${m.ts}`
@@ -3379,25 +3384,6 @@ function SendDialog({
3379
3384
  /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "Pick a channel and choose who to post as." })
3380
3385
  ] }),
3381
3386
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
3382
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
3383
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "channel-picker", children: "Channel" }),
3384
- channels === null && !channelsError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Loading channels\u2026" }),
3385
- channelsError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: channelsError }),
3386
- channels && channels.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "No public channels available." }),
3387
- channels && channels.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3388
- "select",
3389
- {
3390
- id: "channel-picker",
3391
- value: channelId,
3392
- onChange: (e) => setChannelId(e.target.value),
3393
- className: "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3394
- children: channels.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: c.id, children: [
3395
- "#",
3396
- c.name
3397
- ] }, c.id))
3398
- }
3399
- )
3400
- ] }),
3401
3387
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
3402
3388
  /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "send-as-picker", children: "Post as" }),
3403
3389
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3434,6 +3420,25 @@ function SendDialog({
3434
3420
  "to post as yourself."
3435
3421
  ] })
3436
3422
  ] }),
3423
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
3424
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "channel-picker", children: "Channel" }),
3425
+ channels === null && !channelsError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Loading channels\u2026" }),
3426
+ channelsError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: channelsError }),
3427
+ channels && channels.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "No public channels available." }),
3428
+ channels && channels.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3429
+ "select",
3430
+ {
3431
+ id: "channel-picker",
3432
+ value: channelId,
3433
+ onChange: (e) => setChannelId(e.target.value),
3434
+ className: "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3435
+ children: channels.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: c.id, children: [
3436
+ "#",
3437
+ c.name
3438
+ ] }, c.id))
3439
+ }
3440
+ )
3441
+ ] }),
3437
3442
  errorCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
3438
3443
  "button",
3439
3444
  {
@@ -9201,8 +9206,8 @@ function Toolbar2({
9201
9206
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9202
9207
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-2 gap-y-1 border-b bg-background px-2 py-1.5 sm:px-3 sm:py-2", children: [
9203
9208
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1 sm:gap-2", children: [
9204
- editingEnabled && !editBadge ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", size: "sm", onClick: onOpenLoad, "aria-label": loadButtonLabel, children: [
9205
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-3.5 w-3.5" }),
9209
+ editingEnabled ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", size: "sm", onClick: onOpenLoad, "aria-label": loadButtonLabel, children: [
9210
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailSearch, { className: "h-3.5 w-3.5" }),
9206
9211
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden md:inline", children: loadButtonLabel })
9207
9212
  ] }) : null,
9208
9213
  onOpenPalette ? /* @__PURE__ */ jsxRuntime.jsxs(