@inf-monkeys-tech/monkeys-design 1.0.36 → 1.0.37

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.
@@ -1,4 +1,4 @@
1
- import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, Mic, Send, Square, ShoppingBag, Code2, FileText, Search, Palette, Sparkles, ArrowLeft, Upload, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, TerminalSquare, Clock3, FileOutput, Download, Loader2, CircleAlert, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, RefreshCw, CheckCircle2, XCircle, CircleStop, AlertCircle, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
1
+ import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, Mic, Send, Square, ShoppingBag, Code2, FileText, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, TerminalSquare, Clock3, FileOutput, Download, Loader2, CircleAlert, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, RefreshCw, CheckCircle2, XCircle, CircleStop, AlertCircle, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
2
2
  import * as React2 from 'react';
3
3
  import { createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -968,6 +968,7 @@ function AgentWorkbenchQuickStart({ viewModel, className, onIntent }) {
968
968
  );
969
969
  const activeCategory = categories.find((category) => category.id === activeCategoryId);
970
970
  const activeSection = activeCategory?.sections.find((section) => section.id === activeSectionId) || activeCategory?.sections[0];
971
+ const usesCompactList = activeSection?.templates.length ? activeSection.templates.every((template) => !template.coverImageUrl) : false;
971
972
  useEffect(() => {
972
973
  if (activeCategoryId && !categories.some((category) => category.id === activeCategoryId)) {
973
974
  setActiveCategoryId(void 0);
@@ -1054,19 +1055,52 @@ function AgentWorkbenchQuickStart({ viewModel, className, onIntent }) {
1054
1055
  ),
1055
1056
  activeCategory.sections.map((section) => /* @__PURE__ */ jsx("button", { type: "button", "aria-pressed": activeSection?.id === section.id, className: cn2("h-9 shrink-0 rounded-full px-4 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", activeSection?.id === section.id ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground"), onClick: () => selectSection(section.id), children: section.label }, section.id))
1056
1057
  ] }),
1057
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3", children: activeSection?.templates.map((template) => /* @__PURE__ */ jsxs("button", { type: "button", disabled: viewModel.disabled, "data-quick-start-template-id": template.id, className: "group min-w-0 overflow-hidden rounded-xl border border-border bg-background text-left transition-colors hover:border-primary/30 hover:bg-muted/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", onClick: () => selectTemplate(template), children: [
1058
- /* @__PURE__ */ jsxs("span", { className: "block px-4 pb-3 pt-4", children: [
1059
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
1060
- template.title,
1061
- template.action === "upload" ? /* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground", children: [
1062
- /* @__PURE__ */ jsx(Upload, { className: "size-3", "aria-hidden": "true" }),
1063
- messages.addFile
1064
- ] }) : null
1065
- ] }),
1066
- template.description ? /* @__PURE__ */ jsx("span", { className: "mt-1 line-clamp-2 block min-h-8 text-xs leading-4 text-muted-foreground", children: template.description }) : null
1067
- ] }),
1068
- /* @__PURE__ */ jsx("span", { className: cn2("block overflow-hidden", template.coverImageUrl ? "aspect-[5/2]" : "h-28"), children: /* @__PURE__ */ jsx(TemplateVisual, { template }) })
1069
- ] }, template.id)) })
1058
+ /* @__PURE__ */ jsx(
1059
+ "div",
1060
+ {
1061
+ "data-quick-start-layout": usesCompactList ? "list" : "cards",
1062
+ className: cn2(
1063
+ "grid",
1064
+ usesCompactList ? "grid-cols-1 gap-0" : "grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3"
1065
+ ),
1066
+ children: activeSection?.templates.map((template) => /* @__PURE__ */ jsxs(
1067
+ "button",
1068
+ {
1069
+ type: "button",
1070
+ disabled: viewModel.disabled,
1071
+ "data-quick-start-template-id": template.id,
1072
+ className: cn2(
1073
+ "group min-w-0 overflow-hidden text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
1074
+ usesCompactList ? "flex min-h-14 items-center rounded-none border-x-0 border-t-0 bg-transparent shadow-none hover:border-border hover:bg-muted/40 last:border-b-0" : "rounded-xl border border-border bg-background hover:border-primary/30 hover:bg-muted/20"
1075
+ ),
1076
+ onClick: () => selectTemplate(template),
1077
+ children: [
1078
+ /* @__PURE__ */ jsxs("span", { className: cn2(usesCompactList ? "min-w-0 flex-1 px-2 py-2.5" : "block px-4 pb-3 pt-4"), children: [
1079
+ /* @__PURE__ */ jsxs("span", { className: cn2("flex items-center gap-2 text-sm text-foreground", usesCompactList ? "font-medium" : "font-semibold"), children: [
1080
+ template.title,
1081
+ template.action === "upload" ? /* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground", children: [
1082
+ /* @__PURE__ */ jsx(Upload, { className: "size-3", "aria-hidden": "true" }),
1083
+ messages.addFile
1084
+ ] }) : null
1085
+ ] }),
1086
+ template.description ? /* @__PURE__ */ jsx(
1087
+ "span",
1088
+ {
1089
+ className: cn2(
1090
+ "line-clamp-2 block text-xs leading-4 text-muted-foreground",
1091
+ usesCompactList ? "mt-0.5 min-h-0 text-muted-foreground/75" : "mt-1 min-h-8"
1092
+ ),
1093
+ children: template.description
1094
+ }
1095
+ ) : null
1096
+ ] }),
1097
+ usesCompactList ? /* @__PURE__ */ jsx(ArrowUpRight, { className: "mr-2 size-4 shrink-0 text-muted-foreground/45", "aria-hidden": "true" }) : /* @__PURE__ */ jsx("span", { className: cn2("block overflow-hidden", template.coverImageUrl ? "aspect-[5/2]" : "h-28"), children: /* @__PURE__ */ jsx(TemplateVisual, { template }) })
1098
+ ]
1099
+ },
1100
+ template.id
1101
+ ))
1102
+ }
1103
+ )
1070
1104
  ] })
1071
1105
  ] });
1072
1106
  }