@inf-monkeys-tech/monkeys-design 2.0.397 → 2.0.399

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.
@@ -93,7 +93,7 @@ export function MarkdownDocumentWorkspace({ model }: MarkdownDocumentWorkspacePr
93
93
  const dirty = !['saved'].includes(model.saveStatus);
94
94
  const ThemeIcon = localColorMode === 'dark' ? Sun : Moon;
95
95
  return <MonkeysProvider theme={theme} colorMode={localColorMode} density={inheritedTheme?.density}><BUIScope>
96
- <section className="markdown-document markdown-document-theme-scope monkeys-ui-markdown-document" data-editing={model.editing ? 'true' : 'false'} data-color-mode={localColorMode} aria-label={model.name} style={surfaceStyle} onKeyDown={event => {
96
+ <section className="markdown-document markdown-document-theme-scope monkeys-ui-markdown-document" data-monkeys-ui-color-source="platform" data-editing={model.editing ? 'true' : 'false'} data-color-mode={localColorMode} aria-label={model.name} style={surfaceStyle} onKeyDown={event => {
97
97
  if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 's') { event.preventDefault(); invoke(model.onSave); }
98
98
  }}>
99
99
  <header className="markdown-document-header">
@@ -118,12 +118,12 @@ export function MarkdownDocumentWorkspace({ model }: MarkdownDocumentWorkspacePr
118
118
  <div className="markdown-document-content">
119
119
  {model.editing ? <Suspense fallback={<p role="status">{labels.loading}</p>}><Editor value={model.text} mode={mode} onChange={model.onChange} onCompositionChange={model.onCompositionChange} uploadImage={model.uploadImage} resourceAccess={model.resources} /></Suspense> : <StreamingMarkdown text={model.text} resources={resources} />}
120
120
  </div>
121
- <Dialog open={compare} onOpenChange={setCompare}><DialogContent className="markdown-document-dialog markdown-document-theme-scope" style={surfaceStyle}><BUIScope portal><DialogTitle>{labels.conflict}</DialogTitle>
121
+ <Dialog open={compare} onOpenChange={setCompare}><DialogContent className="markdown-document-dialog markdown-document-theme-scope" data-monkeys-ui-color-source="platform" style={surfaceStyle}><BUIScope portal><DialogTitle>{labels.conflict}</DialogTitle>
122
122
  <div className="markdown-document-comparison"><div><h3>{labels.dirty}</h3><pre>{model.text}</pre></div><div><h3>{labels.latest}</h3><pre>{model.latestText ?? labels.loading}</pre></div></div>
123
123
  <Button disabled={model.latestText === undefined} onClick={() => { model.onUseLatest(); setCompare(false); }}>{labels.useLatest}</Button>
124
124
  <Button disabled={model.latestText === undefined} variant="outline" onClick={() => { model.onMergeDraft(); setCompare(false); setMode('source'); }}>{labels.keepDraft}</Button>
125
125
  </BUIScope></DialogContent></Dialog>
126
- <Dialog open={historyOpen} onOpenChange={setHistoryOpen}><DialogContent className="markdown-document-dialog markdown-document-theme-scope" style={surfaceStyle}><BUIScope portal><DialogTitle>{labels.history}</DialogTitle>
126
+ <Dialog open={historyOpen} onOpenChange={setHistoryOpen}><DialogContent className="markdown-document-dialog markdown-document-theme-scope" data-monkeys-ui-color-source="platform" style={surfaceStyle}><BUIScope portal><DialogTitle>{labels.history}</DialogTitle>
127
127
  <div className="markdown-document-history">{model.history?.items.map(item => <Button key={item.commitId} variant="ghost" onClick={() => { setVersion(item); setVersionText(undefined); void model.onVersion(item).then(setVersionText).catch(() => setActionError(true)); }}>{new Date(item.createdAt).toLocaleString()} · {item.actorId}</Button>)}
128
128
  {!model.history?.items.length ? <p>{model.history?.loading ? labels.loading : labels.emptyHistory}</p> : null}
129
129
  {model.history?.hasMore ? <Button disabled={model.history.loading} onClick={() => invoke(() => model.onHistory(true))}>{labels.history}</Button> : null}
@@ -99,12 +99,18 @@
99
99
  }
100
100
  .report-product-media {
101
101
  min-width: 0;
102
- display: flex;
103
- flex-direction: column;
104
- justify-content: center;
102
+ display: grid;
103
+ grid-template-columns: repeat(
104
+ auto-fit,
105
+ minmax(min(100%, calc(var(--bui-spacing, 0.25rem) * 28)), 1fr)
106
+ );
107
+ gap: calc(var(--bui-spacing, 0.25rem) * 2);
108
+ align-items: start;
105
109
  background: var(--agent-panel-muted-bg, hsl(var(--muted)));
106
110
  }
107
111
  .report-product-media > div {
112
+ width: 100%;
113
+ min-width: 0;
108
114
  height: auto;
109
115
  }
110
116
  /* The conversation's image paragraph and lazy/preview wrappers also constrain width.