@sequent-org/moodboard 1.4.73 → 1.4.74

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequent-org/moodboard",
3
- "version": "1.4.73",
3
+ "version": "1.4.74",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -385,6 +385,13 @@ export function openMindmapEditor(object, create = false) {
385
385
  if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {
386
386
  window.requestAnimationFrame(() => {
387
387
  alignTextareaLineTop();
388
+ // Каретка позиционируется по textarea.getBoundingClientRect(). После
389
+ // выравнивания раскладка textarea окончательна — пересчитываем каретку,
390
+ // иначе в медленном окружении она остаётся в позиции раннего кадра
391
+ // (когда textarea ещё не сжат/не отцентрован) и «прилипает» к верху капсулы.
392
+ if (this.textEditor && this.textEditor.caret && this.textEditor.textarea === textarea) {
393
+ updateCustomCaret(textarea, this.textEditor.caret);
394
+ }
388
395
  });
389
396
  }
390
397
  };
@@ -846,6 +853,20 @@ export function openMindmapEditor(object, create = false) {
846
853
  object,
847
854
  textarea,
848
855
  });
856
+
857
+ // При открытии редактора textarea сжимается до одной строки и центрируется flex-ом
858
+ // асинхронно; первый расчёт каретки может произойти до устаканивания раскладки
859
+ // (offsetY ≈ 0 → каретка у верха капсулы). Пересчитываем после двух кадров, когда
860
+ // геометрия textarea окончательна — независимо от скорости окружения.
861
+ if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {
862
+ window.requestAnimationFrame(() => {
863
+ window.requestAnimationFrame(() => {
864
+ if (this.textEditor && this.textEditor.caret && this.textEditor.textarea === textarea) {
865
+ updateCustomCaret(textarea, this.textEditor.caret);
866
+ }
867
+ });
868
+ });
869
+ }
849
870
  }
850
871
 
851
872
  export function closeMindmapEditor(commit) {
@@ -227,6 +227,10 @@ export class NotePropertiesPanel {
227
227
  backgroundColor: '#fff',
228
228
  cursor: 'pointer',
229
229
  minWidth: '140px',
230
+ // Хост может форсить color-scheme: dark (как futurello), из-за чего
231
+ // нативный select и его опции рендерятся белым текстом на белом фоне.
232
+ colorScheme: 'light',
233
+ color: '#111827',
230
234
  });
231
235
  this.fontSelect = fontSelect;
232
236
 
@@ -249,6 +253,8 @@ export class NotePropertiesPanel {
249
253
  option.value = font.value;
250
254
  option.textContent = font.name;
251
255
  option.style.fontFamily = font.value;
256
+ option.style.color = '#111827';
257
+ option.style.backgroundColor = '#fff';
252
258
  fontSelect.appendChild(option);
253
259
  });
254
260
 
@@ -322,7 +328,12 @@ export class NotePropertiesPanel {
322
328
  border: '1px solid #ccc',
323
329
  borderRadius: '4px',
324
330
  fontSize: '11px',
325
- textAlign: 'center'
331
+ textAlign: 'center',
332
+ // Хост может форсить color-scheme: dark (как futurello) — фиксируем
333
+ // светлую схему и явные цвета, иначе число становится белым на чёрном.
334
+ colorScheme: 'light',
335
+ color: '#111827',
336
+ backgroundColor: '#fff'
326
337
  });
327
338
 
328
339
  fontSizeInput.addEventListener('change', () => {
@@ -11,7 +11,7 @@
11
11
  .moodboard-chat {
12
12
  position: absolute;
13
13
  left: 50%;
14
- bottom: 32px;
14
+ bottom: 16px;
15
15
  transform: translateX(-50%);
16
16
  width: min(720px, 96%);
17
17
  z-index: 2500;