@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.
@@ -999,6 +999,7 @@ function AgentWorkbenchQuickStart({ viewModel, className, onIntent }) {
999
999
  );
1000
1000
  const activeCategory = categories.find((category) => category.id === activeCategoryId);
1001
1001
  const activeSection = activeCategory?.sections.find((section) => section.id === activeSectionId) || activeCategory?.sections[0];
1002
+ const usesCompactList = activeSection?.templates.length ? activeSection.templates.every((template) => !template.coverImageUrl) : false;
1002
1003
  React2.useEffect(() => {
1003
1004
  if (activeCategoryId && !categories.some((category) => category.id === activeCategoryId)) {
1004
1005
  setActiveCategoryId(void 0);
@@ -1085,19 +1086,52 @@ function AgentWorkbenchQuickStart({ viewModel, className, onIntent }) {
1085
1086
  ),
1086
1087
  activeCategory.sections.map((section) => /* @__PURE__ */ jsxRuntime.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))
1087
1088
  ] }),
1088
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3", children: activeSection?.templates.map((template) => /* @__PURE__ */ jsxRuntime.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: [
1089
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "block px-4 pb-3 pt-4", children: [
1090
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
1091
- template.title,
1092
- template.action === "upload" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground", children: [
1093
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-3", "aria-hidden": "true" }),
1094
- messages.addFile
1095
- ] }) : null
1096
- ] }),
1097
- template.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 line-clamp-2 block min-h-8 text-xs leading-4 text-muted-foreground", children: template.description }) : null
1098
- ] }),
1099
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn2("block overflow-hidden", template.coverImageUrl ? "aspect-[5/2]" : "h-28"), children: /* @__PURE__ */ jsxRuntime.jsx(TemplateVisual, { template }) })
1100
- ] }, template.id)) })
1089
+ /* @__PURE__ */ jsxRuntime.jsx(
1090
+ "div",
1091
+ {
1092
+ "data-quick-start-layout": usesCompactList ? "list" : "cards",
1093
+ className: cn2(
1094
+ "grid",
1095
+ usesCompactList ? "grid-cols-1 gap-0" : "grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3"
1096
+ ),
1097
+ children: activeSection?.templates.map((template) => /* @__PURE__ */ jsxRuntime.jsxs(
1098
+ "button",
1099
+ {
1100
+ type: "button",
1101
+ disabled: viewModel.disabled,
1102
+ "data-quick-start-template-id": template.id,
1103
+ className: cn2(
1104
+ "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",
1105
+ 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"
1106
+ ),
1107
+ onClick: () => selectTemplate(template),
1108
+ children: [
1109
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn2(usesCompactList ? "min-w-0 flex-1 px-2 py-2.5" : "block px-4 pb-3 pt-4"), children: [
1110
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn2("flex items-center gap-2 text-sm text-foreground", usesCompactList ? "font-medium" : "font-semibold"), children: [
1111
+ template.title,
1112
+ template.action === "upload" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground", children: [
1113
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-3", "aria-hidden": "true" }),
1114
+ messages.addFile
1115
+ ] }) : null
1116
+ ] }),
1117
+ template.description ? /* @__PURE__ */ jsxRuntime.jsx(
1118
+ "span",
1119
+ {
1120
+ className: cn2(
1121
+ "line-clamp-2 block text-xs leading-4 text-muted-foreground",
1122
+ usesCompactList ? "mt-0.5 min-h-0 text-muted-foreground/75" : "mt-1 min-h-8"
1123
+ ),
1124
+ children: template.description
1125
+ }
1126
+ ) : null
1127
+ ] }),
1128
+ usesCompactList ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: "mr-2 size-4 shrink-0 text-muted-foreground/45", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn2("block overflow-hidden", template.coverImageUrl ? "aspect-[5/2]" : "h-28"), children: /* @__PURE__ */ jsxRuntime.jsx(TemplateVisual, { template }) })
1129
+ ]
1130
+ },
1131
+ template.id
1132
+ ))
1133
+ }
1134
+ )
1101
1135
  ] })
1102
1136
  ] });
1103
1137
  }