@sequent-org/moodboard 1.2.56 → 1.2.57

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/ui/Topbar.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequent-org/moodboard",
3
- "version": "1.2.56",
3
+ "version": "1.2.57",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
package/src/ui/Topbar.js CHANGED
@@ -190,7 +190,8 @@ export class Topbar {
190
190
  /** Возвращает текущий цвет фона канваса как hex-строку #RRGGBB */
191
191
  _getCurrentBoardBackgroundHex() {
192
192
  try {
193
- const app = window?.moodboard?.core?.pixi?.app;
193
+ // Предпочтительно из CoreMoodBoard (актуальный путь в проекте)
194
+ const app = window?.moodboard?.coreMoodboard?.pixi?.app || window?.moodboard?.core?.pixi?.app;
194
195
  const colorInt = app?.renderer?.background?.color ?? app?.renderer?.backgroundColor;
195
196
  if (typeof colorInt !== 'number') return null;
196
197
  const hex = `#${colorInt.toString(16).padStart(6, '0')}`;