@sequent-org/moodboard 1.2.75 → 1.2.77

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.2.75",
3
+ "version": "1.2.77",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -98,6 +98,31 @@ export class SaveManager {
98
98
  e.returnValue = '';
99
99
  return '';
100
100
  }, { capture: true });
101
+
102
+ // Дополнительно: обработка быстрого ухода со страницы (pagehide надёжнее в части браузеров)
103
+ window.addEventListener('pagehide', () => {
104
+ if (!this.hasUnsavedChanges) return;
105
+ try {
106
+ if (!this.options || this.options.useBeaconOnUnload) {
107
+ this._flushOnUnload();
108
+ } else {
109
+ this._flushSyncFallback();
110
+ }
111
+ } catch (_) { /* игнорируем */ }
112
+ }, { capture: true });
113
+
114
+ // Подстраховка на случай, когда вкладка просто уходит в фон без beforeunload/pagehide
115
+ document.addEventListener('visibilitychange', () => {
116
+ if (document.visibilityState !== 'hidden') return;
117
+ if (!this.hasUnsavedChanges) return;
118
+ try {
119
+ if (!this.options || this.options.useBeaconOnUnload) {
120
+ this._flushOnUnload();
121
+ } else {
122
+ this._flushSyncFallback();
123
+ }
124
+ } catch (_) { /* игнорируем */ }
125
+ });
101
126
 
102
127
  // Периодическое автосохранение
103
128
  if (this.options.autoSave) {
@@ -85,10 +85,10 @@ export class GridFactory {
85
85
  },
86
86
  cross: {
87
87
  enabled: true,
88
- size: 90,
89
- color: 0x6a6aff,
90
- opacity: 0.3,
91
- crossHalfSize: 30,
88
+ size: 65, // шаг между крестиками
89
+ color: 0xB8BAFF, // целевой цвет
90
+ opacity: 1, // непрозрачно
91
+ crossHalfSize: 5, // длина луча (половина креста) в px
92
92
  crossLineWidth: 1
93
93
  }
94
94
  };