@inf-monkeys-tech/monkeys-design 2.0.361 → 2.0.363
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/components/workbench/index.js +80 -80
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +11 -11
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/sources/{645434fe76e9d97b8417afc30f3fcb95a327aec5b03ee80d1cd63097adedcc76.tsx → 10484d3900c3a09aa36281378c39fcb645bb41b5042a94b154d863d206d75d22.tsx} +18 -1
- package/dist/styles/agent-conversation.css +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,9 @@ import { useEffect, useRef, useState, type ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { BaseDialog } from '../base/BaseDialog';
|
|
4
4
|
import { BaseButton } from '../base/BaseButton';
|
|
5
|
+
import { BaseLink } from '../base/BaseLink';
|
|
5
6
|
import { MediaPreviewImage } from '../primitives/MediaPreview';
|
|
7
|
+
import { useMonkeysLocale } from '../../provider/context';
|
|
6
8
|
|
|
7
9
|
export interface WorkbenchMeasurementsData {
|
|
8
10
|
garment_type?: string;
|
|
@@ -35,7 +37,11 @@ export function WorkbenchMeasurementsPreview({
|
|
|
35
37
|
}: WorkbenchMeasurementsPreviewProps) {
|
|
36
38
|
const [open, setOpen] = useState(false);
|
|
37
39
|
const [failedImage, setFailedImage] = useState<string>();
|
|
40
|
+
const locale = useMonkeysLocale();
|
|
38
41
|
const image = data.image?.trim();
|
|
42
|
+
const editHref = data.editHref?.trim();
|
|
43
|
+
const editLabel = locale.locale.toLowerCase().startsWith('zh') ? '编辑' : 'Edit';
|
|
44
|
+
const editTitle = `${editLabel} Techpack`;
|
|
39
45
|
const [visibleRows, setVisibleRows] = useState(5);
|
|
40
46
|
const summaryRef = useRef<HTMLDListElement>(null);
|
|
41
47
|
useEffect(() => {
|
|
@@ -70,9 +76,20 @@ export function WorkbenchMeasurementsPreview({
|
|
|
70
76
|
/>
|
|
71
77
|
</div>
|
|
72
78
|
)}
|
|
73
|
-
<span className="min-w-0 line-clamp-2 text-sm font-medium [overflow-wrap:anywhere]">
|
|
79
|
+
<span className="min-w-0 flex-1 line-clamp-2 text-sm font-medium [overflow-wrap:anywhere]">
|
|
74
80
|
{data.garment_type || title}
|
|
75
81
|
</span>
|
|
82
|
+
{editHref && (
|
|
83
|
+
<BaseLink
|
|
84
|
+
href={editHref}
|
|
85
|
+
aria-label={editTitle}
|
|
86
|
+
title={editTitle}
|
|
87
|
+
className="inline-flex shrink-0 items-center rounded-md border border-border px-2 py-1 text-sm font-medium no-underline"
|
|
88
|
+
style={{ height: 28, padding: '0 8px', textDecoration: 'none' }}
|
|
89
|
+
>
|
|
90
|
+
{editLabel}
|
|
91
|
+
</BaseLink>
|
|
92
|
+
)}
|
|
76
93
|
</div>
|
|
77
94
|
<dl
|
|
78
95
|
ref={summaryRef}
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
.agent-question-answer-title {
|
|
226
|
+
[data-question-answer] .agent-question-answer-title {
|
|
227
227
|
color: hsl(var(--muted-foreground));
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
@media (hover: none) {
|
|
275
275
|
.agent-conversation-surface .agent-markdown-image-actions { opacity: 1; }
|
|
276
276
|
}
|
|
277
|
-
.agent-question-answer-value {
|
|
277
|
+
[data-question-answer] .agent-question-answer-value {
|
|
278
278
|
color: hsl(var(--foreground));
|
|
279
279
|
}
|
|
280
280
|
.agent-question-card:not([data-docked]) {
|