@tightknitai/block-kitchen 0.9.0 → 0.9.1

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useSensors, useSensor, PointerSensor, TouchSensor, KeyboardSensor, pointerWithin, closestCenter, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
2
2
  import { sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
3
- import { X, Circle, Sparkles, FileText, AlignLeft, MousePointerClick, TextCursorInput, LayoutTemplate, Bell, Pilcrow, Image, Video, GalleryHorizontal, Table, ChartColumnBig, Container, GripVertical, Sun, Moon, MessageSquare, AppWindow, Home, Pencil, Plus, ChevronDown, BookOpen, ExternalLink, AlertTriangle, Trash2, Code2, Send, Search, Info, CheckCircle2, Check, ChevronRight, LayoutGrid, ArrowUp, ArrowDown, Copy, Type, Bold, Italic, Strikethrough, Underline, Code, List, ListOrdered, Quote, Undo2, Redo2, Smile, Link as Link$1 } from 'lucide-react';
3
+ import { X, Circle, Sparkles, FileText, AlignLeft, MousePointerClick, TextCursorInput, LayoutTemplate, Bell, Pilcrow, Image, Video, GalleryHorizontal, Table, ChartColumnBig, Container, GripVertical, Sun, Moon, MessageSquare, AppWindow, Home, MailSearch, Plus, ChevronDown, BookOpen, ExternalLink, AlertTriangle, Trash2, Code2, Pencil, Send, Search, Info, CheckCircle2, Check, ChevronRight, LayoutGrid, ArrowUp, ArrowDown, Copy, Type, Bold, Italic, Strikethrough, Underline, Code, List, ListOrdered, Quote, Undo2, Redo2, Smile, Link as Link$1 } from 'lucide-react';
4
4
  import * as React from 'react';
5
5
  import { createContext, useMemo, useState, useCallback, useRef, useEffect, useId, useContext } from 'react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -3035,7 +3035,15 @@ function LoadMessageDialog({
3035
3035
  /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: m.channelName ? `#${m.channelName}` : m.channelId }),
3036
3036
  /* @__PURE__ */ 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" })
3037
3037
  ] }),
3038
- /* @__PURE__ */ jsx("span", { className: "shrink-0 font-mono text-xs text-muted-foreground", children: m.ts })
3038
+ /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
3039
+ new Date(Number(m.ts) * 1e3).toLocaleString(),
3040
+ " ",
3041
+ /* @__PURE__ */ jsxs("span", { className: "font-mono", children: [
3042
+ "(",
3043
+ m.ts,
3044
+ ")"
3045
+ ] })
3046
+ ] })
3039
3047
  ] }),
3040
3048
  m.label && /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: m.label })
3041
3049
  ]
@@ -3349,25 +3357,6 @@ function SendDialog({
3349
3357
  /* @__PURE__ */ jsx(DialogDescription, { children: "Pick a channel and choose who to post as." })
3350
3358
  ] }),
3351
3359
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
3352
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
3353
- /* @__PURE__ */ jsx(Label, { htmlFor: "channel-picker", children: "Channel" }),
3354
- channels === null && !channelsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Loading channels\u2026" }),
3355
- channelsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: channelsError }),
3356
- channels && channels.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "No public channels available." }),
3357
- channels && channels.length > 0 && /* @__PURE__ */ jsx(
3358
- "select",
3359
- {
3360
- id: "channel-picker",
3361
- value: channelId,
3362
- onChange: (e) => setChannelId(e.target.value),
3363
- 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",
3364
- children: channels.map((c) => /* @__PURE__ */ jsxs("option", { value: c.id, children: [
3365
- "#",
3366
- c.name
3367
- ] }, c.id))
3368
- }
3369
- )
3370
- ] }),
3371
3360
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
3372
3361
  /* @__PURE__ */ jsx(Label, { htmlFor: "send-as-picker", children: "Post as" }),
3373
3362
  /* @__PURE__ */ jsxs(
@@ -3404,6 +3393,25 @@ function SendDialog({
3404
3393
  "to post as yourself."
3405
3394
  ] })
3406
3395
  ] }),
3396
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
3397
+ /* @__PURE__ */ jsx(Label, { htmlFor: "channel-picker", children: "Channel" }),
3398
+ channels === null && !channelsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Loading channels\u2026" }),
3399
+ channelsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: channelsError }),
3400
+ channels && channels.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "No public channels available." }),
3401
+ channels && channels.length > 0 && /* @__PURE__ */ jsx(
3402
+ "select",
3403
+ {
3404
+ id: "channel-picker",
3405
+ value: channelId,
3406
+ onChange: (e) => setChannelId(e.target.value),
3407
+ 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",
3408
+ children: channels.map((c) => /* @__PURE__ */ jsxs("option", { value: c.id, children: [
3409
+ "#",
3410
+ c.name
3411
+ ] }, c.id))
3412
+ }
3413
+ )
3414
+ ] }),
3407
3415
  errorCount > 0 ? /* @__PURE__ */ jsxs(
3408
3416
  "button",
3409
3417
  {
@@ -9171,8 +9179,8 @@ function Toolbar2({
9171
9179
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9172
9180
  /* @__PURE__ */ 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: [
9173
9181
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1 sm:gap-2", children: [
9174
- editingEnabled && !editBadge ? /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", onClick: onOpenLoad, "aria-label": loadButtonLabel, children: [
9175
- /* @__PURE__ */ jsx(Pencil, { className: "h-3.5 w-3.5" }),
9182
+ editingEnabled ? /* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", onClick: onOpenLoad, "aria-label": loadButtonLabel, children: [
9183
+ /* @__PURE__ */ jsx(MailSearch, { className: "h-3.5 w-3.5" }),
9176
9184
  /* @__PURE__ */ jsx("span", { className: "hidden md:inline", children: loadButtonLabel })
9177
9185
  ] }) : null,
9178
9186
  onOpenPalette ? /* @__PURE__ */ jsxs(