@inf-monkeys-tech/monkeys-design 1.0.66 → 1.0.68

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.
Files changed (62) hide show
  1. package/dist/components/agent-workbench/index.d.mts +7 -41
  2. package/dist/components/agent-workbench/index.d.ts +7 -41
  3. package/dist/components/agent-workbench/index.js +24 -20
  4. package/dist/components/agent-workbench/index.js.map +1 -1
  5. package/dist/components/agent-workbench/index.mjs +25 -21
  6. package/dist/components/agent-workbench/index.mjs.map +1 -1
  7. package/dist/components/base/index.js +2 -0
  8. package/dist/components/base/index.js.map +1 -1
  9. package/dist/components/base/index.mjs +2 -0
  10. package/dist/components/base/index.mjs.map +1 -1
  11. package/dist/components/data-explorer/index.js +2 -0
  12. package/dist/components/data-explorer/index.js.map +1 -1
  13. package/dist/components/data-explorer/index.mjs +2 -0
  14. package/dist/components/data-explorer/index.mjs.map +1 -1
  15. package/dist/components/layout/index.js +2 -0
  16. package/dist/components/layout/index.js.map +1 -1
  17. package/dist/components/layout/index.mjs +2 -0
  18. package/dist/components/layout/index.mjs.map +1 -1
  19. package/dist/components/navigation-sidebar/index.js +2 -0
  20. package/dist/components/navigation-sidebar/index.js.map +1 -1
  21. package/dist/components/navigation-sidebar/index.mjs +2 -0
  22. package/dist/components/navigation-sidebar/index.mjs.map +1 -1
  23. package/dist/components/runtime/index.js +2 -0
  24. package/dist/components/runtime/index.js.map +1 -1
  25. package/dist/components/runtime/index.mjs +2 -0
  26. package/dist/components/runtime/index.mjs.map +1 -1
  27. package/dist/components/toast/index.d.mts +1 -1
  28. package/dist/components/toast/index.d.ts +1 -1
  29. package/dist/components/toast/index.js +2 -0
  30. package/dist/components/toast/index.js.map +1 -1
  31. package/dist/components/toast/index.mjs +2 -0
  32. package/dist/components/toast/index.mjs.map +1 -1
  33. package/dist/components/toolbar/index.js +2 -0
  34. package/dist/components/toolbar/index.js.map +1 -1
  35. package/dist/components/toolbar/index.mjs +2 -0
  36. package/dist/components/toolbar/index.mjs.map +1 -1
  37. package/dist/components/workbench/index.js +2 -0
  38. package/dist/components/workbench/index.js.map +1 -1
  39. package/dist/components/workbench/index.mjs +2 -0
  40. package/dist/components/workbench/index.mjs.map +1 -1
  41. package/dist/index.d.mts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +4 -0
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +4 -0
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/locale/index.d.mts +6 -2
  48. package/dist/locale/index.d.ts +6 -2
  49. package/dist/locale/index.js +4 -0
  50. package/dist/locale/index.js.map +1 -1
  51. package/dist/locale/index.mjs +4 -0
  52. package/dist/locale/index.mjs.map +1 -1
  53. package/dist/provider/index.d.mts +2 -2
  54. package/dist/provider/index.d.ts +2 -2
  55. package/dist/provider/index.js +4 -0
  56. package/dist/provider/index.js.map +1 -1
  57. package/dist/provider/index.mjs +4 -0
  58. package/dist/provider/index.mjs.map +1 -1
  59. package/dist/styles.css +1 -1
  60. package/dist/{types-15efbcf88674.d.mts → types-340390798922.d.mts} +2 -0
  61. package/dist/{types-15efbcf88674.d.ts → types-340390798922.d.ts} +2 -0
  62. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare, Clock3, FileOutput, Download, CircleAlert, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, 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, LoaderCircle, CircleAlert, RotateCcw, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare, Clock3, FileOutput, Download, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
2
2
  import * as React5 from 'react';
3
3
  import { useImperativeHandle, createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -153,6 +153,8 @@ var enUS = {
153
153
  moveDown: "Move message down",
154
154
  queued: "Queued messages",
155
155
  uploading: "Uploading",
156
+ uploadFailed: "Upload failed",
157
+ retryAttachment: "Retry attachment upload",
156
158
  noModels: "No models available",
157
159
  message: "Message",
158
160
  attachmentOnly: "Attachment",
@@ -1066,23 +1068,25 @@ function AgentWorkbenchComposer({
1066
1068
  }
1067
1069
  ) : null,
1068
1070
  /* @__PURE__ */ jsxs("div", { ref: surfaceRef, className: "agent-workbench-composer__surface min-w-0 max-w-full rounded-lg border border-input bg-background p-3 shadow-sm focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/30", children: [
1069
- viewModel.attachments.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn2("mb-2 flex max-w-full gap-2 overflow-x-auto", classNames?.attachments), children: viewModel.attachments.map((attachment) => /* @__PURE__ */ jsxs("div", { className: "relative flex size-16 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted", children: [
1070
- attachment.previewUrl && attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: attachment.previewUrl, alt: "", className: "size-full object-cover" }) : attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx(Image, { className: "size-5 text-muted-foreground" }) : /* @__PURE__ */ jsx(File, { className: "size-5 text-muted-foreground" }),
1071
- attachment.status === "uploading" ? /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center bg-background/80 text-[10px] font-medium", children: messages.composer.uploading }) : null,
1072
- /* @__PURE__ */ jsx(
1073
- Button,
1074
- {
1075
- type: "button",
1076
- variant: "secondary",
1077
- size: "icon",
1078
- className: "absolute right-1 top-1 !size-5 min-w-5 rounded-full bg-background/90 p-0 text-foreground shadow [&_svg]:!size-3",
1079
- "aria-label": messages.composer.removeAttachment,
1080
- onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }),
1081
- children: /* @__PURE__ */ jsx(X, { className: "size-3" })
1082
- }
1083
- ),
1084
- /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-background/85 px-1 py-0.5 text-[9px]", children: attachment.name })
1085
- ] }, attachment.id)) }) : null,
1071
+ viewModel.attachments.length > 0 ? /* @__PURE__ */ jsx("div", { "data-agent-workbench-composer-attachments": true, className: cn2("mb-2 flex max-w-full gap-2 overflow-x-auto overscroll-x-contain pb-1", classNames?.attachments), children: viewModel.attachments.map((attachment) => {
1072
+ const isAttachmentError = attachment.status === "error";
1073
+ const isAttachmentUploading = attachment.status === "uploading";
1074
+ return /* @__PURE__ */ jsxs("div", { role: isAttachmentError ? "alert" : void 0, className: cn2("flex h-14 min-w-48 max-w-64 shrink-0 items-center gap-2 rounded-md border bg-muted/45 p-1.5", isAttachmentError ? "border-destructive/50 bg-destructive/5" : "border-border"), children: [
1075
+ /* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded bg-muted", children: attachment.previewUrl && attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: attachment.previewUrl, alt: "", className: "size-full object-cover" }) : attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx(Image, { className: "size-5 text-muted-foreground" }) : /* @__PURE__ */ jsx(File, { className: "size-5 text-muted-foreground" }) }),
1076
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
1077
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-xs font-medium text-foreground", title: attachment.name, children: attachment.name }),
1078
+ /* @__PURE__ */ jsxs("span", { className: cn2("mt-0.5 flex items-center gap-1 text-[11px]", isAttachmentError ? "text-destructive-text" : "text-muted-foreground"), children: [
1079
+ isAttachmentUploading ? /* @__PURE__ */ jsx(LoaderCircle, { className: "size-3 animate-spin", "aria-hidden": "true" }) : null,
1080
+ isAttachmentError ? /* @__PURE__ */ jsx(CircleAlert, { className: "size-3", "aria-hidden": "true" }) : null,
1081
+ isAttachmentUploading ? messages.composer.uploading : isAttachmentError ? messages.composer.uploadFailed : attachment.mediaType || messages.composer.attachmentOnly
1082
+ ] })
1083
+ ] }),
1084
+ /* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-0.5", children: [
1085
+ isAttachmentError ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "!size-7 min-w-7 shrink-0 p-0 text-destructive-text hover:text-destructive-text", "aria-label": `${messages.composer.retryAttachment}: ${attachment.name}`, onClick: () => onIntent?.({ type: "retry-attachment", attachmentId: attachment.id }), children: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5" }) }) : null,
1086
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "!size-7 min-w-7 shrink-0 p-0 text-muted-foreground hover:text-foreground", "aria-label": `${messages.composer.removeAttachment}: ${attachment.name}`, onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }), children: /* @__PURE__ */ jsx(X, { className: "size-3.5" }) })
1087
+ ] })
1088
+ ] }, attachment.id);
1089
+ }) }) : null,
1086
1090
  /* @__PURE__ */ jsx(
1087
1091
  AutosizeTextarea,
1088
1092
  {
@@ -1091,7 +1095,7 @@ function AgentWorkbenchComposer({
1091
1095
  maxHeight: 256,
1092
1096
  "aria-label": messages.composer.message,
1093
1097
  placeholder: viewModel.placeholder,
1094
- className: cn2("min-w-0 w-full resize-none rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", classNames?.textarea),
1098
+ className: cn2("min-w-0 w-full resize-none overflow-y-auto rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", classNames?.textarea),
1095
1099
  onChange: (event) => onIntent?.({ type: "change-value", value: event.target.value }),
1096
1100
  onKeyDown: (event) => {
1097
1101
  if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
@@ -1102,7 +1106,7 @@ function AgentWorkbenchComposer({
1102
1106
  }
1103
1107
  ),
1104
1108
  /* @__PURE__ */ jsxs("div", { className: cn2("agent-workbench-composer__toolbar mt-2 flex min-h-8 min-w-0 max-w-full items-center gap-2", isNarrow ? "flex-wrap" : "flex-nowrap", classNames?.toolbar), children: [
1105
- /* @__PURE__ */ jsxs("div", { className: cn2("agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 items-center gap-1.5", isNarrow ? "w-full flex-wrap" : "flex-nowrap"), children: [
1109
+ /* @__PURE__ */ jsxs("div", { "data-agent-workbench-composer-controls": true, className: cn2("agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 items-center gap-1.5", isNarrow ? "w-full flex-wrap" : "flex-nowrap overflow-x-auto overscroll-x-contain pb-1"), children: [
1106
1110
  viewModel.capabilities.attachments ? /* @__PURE__ */ jsxs(Fragment, { children: [
1107
1111
  /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: iconButtonClass, "aria-label": messages.composer.attach, onClick: () => fileInputRef.current?.click(), children: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" }) }),
1108
1112
  /* @__PURE__ */ jsx(
@@ -1135,7 +1139,7 @@ function AgentWorkbenchComposer({
1135
1139
  className: "h-7 min-w-0 gap-1.5 px-2.5 text-xs text-foreground/75 shadow-none hover:text-foreground data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-none",
1136
1140
  children: [
1137
1141
  action.icon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-3.5" }) : null,
1138
- action.label
1142
+ /* @__PURE__ */ jsx("span", { className: "max-w-32 truncate", children: action.label })
1139
1143
  ]
1140
1144
  },
1141
1145
  action.id