@pixerate/editor 0.111.0 → 0.112.0

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkPHUMLSCWcjs = require('../chunk-PHUMLSCW.cjs');
7
+ var _chunkYGIMK4NXcjs = require('../chunk-YGIMK4NX.cjs');
8
8
 
9
9
 
10
10
 
@@ -1697,11 +1697,11 @@ function header(state, options) {
1697
1697
  return out;
1698
1698
  }
1699
1699
  function serializePaintDocument(state, options = {}) {
1700
- const { layers, assets } = _chunkPHUMLSCWcjs.serializeLayers.call(void 0, state.layers);
1700
+ const { layers, assets } = _chunkYGIMK4NXcjs.serializeLayers.call(void 0, state.layers);
1701
1701
  return { ...header(state, options), layers, assets };
1702
1702
  }
1703
1703
  async function serializePaintDocumentExternal(state, store, options = {}) {
1704
- const { layers, assets } = await _chunkPHUMLSCWcjs.serializeLayersExternal.call(void 0, state.layers, store);
1704
+ const { layers, assets } = await _chunkYGIMK4NXcjs.serializeLayersExternal.call(void 0, state.layers, store);
1705
1705
  return { ...header(state, options), layers, assets };
1706
1706
  }
1707
1707
  function paintLayersOnly(layers, problems) {
@@ -1738,7 +1738,7 @@ function deserializePaintDocument(raw) {
1738
1738
  const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
1739
1739
  const paper = normalizePaper(_nullishCoalesce(r.paper, () => ( {})));
1740
1740
  const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
1741
- const layers = paintLayersOnly(_chunkPHUMLSCWcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1741
+ const layers = paintLayersOnly(_chunkYGIMK4NXcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1742
1742
  const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
1743
1743
  const activeLayerId = wanted && _chunkPOGBUYWEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkPOGBUYWEcjs.flattenLayers.call(void 0, layers), 'access', _33 => _33.filter, 'call', _34 => _34((l) => l.type === "pixel"), 'access', _35 => _35.pop, 'call', _36 => _36(), 'optionalAccess', _37 => _37.id]), () => ( null));
1744
1744
  return { state: { canvas, paper, layers, activeLayerId, strokes: readStrokes(r.strokes, problems) }, extensions: documentExtensions(r), guides: r.guides, swatches: r.swatches, mixingPad: r.mixingPad, problems };
@@ -1747,7 +1747,7 @@ async function deserializePaintDocumentAsync(raw, store) {
1747
1747
  if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
1748
1748
  const r = raw;
1749
1749
  const problems = [];
1750
- const assets = await _chunkPHUMLSCWcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1750
+ const assets = await _chunkYGIMK4NXcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1751
1751
  const loaded = deserializePaintDocument({ ...r, assets });
1752
1752
  return { ...loaded, problems: [...problems, ...loaded.problems] };
1753
1753
  }
@@ -3420,7 +3420,7 @@ var PaintEditorController = (_class10 = class {
3420
3420
  return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
3421
3421
  });
3422
3422
  const layers = toStandard(this.doc.layers);
3423
- const result = _chunkPHUMLSCWcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
3423
+ const result = _chunkYGIMK4NXcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
3424
3424
  for (const [mode, names] of changed) {
3425
3425
  const label = _nullishCoalesce(_optionalChain([_chunkXIOMMGPDcjs.BLEND_MODES, 'access', _81 => _81.find, 'call', _82 => _82((m) => m.id === mode), 'optionalAccess', _83 => _83.label]), () => ( mode));
3426
3426
  const std = _nullishCoalesce(_optionalChain([_chunkXIOMMGPDcjs.BLEND_MODES, 'access', _84 => _84.find, 'call', _85 => _85((m) => m.id === _chunkXIOMMGPDcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _86 => _86.label]), () => ( _chunkXIOMMGPDcjs.standardBlendMode.call(void 0, mode)));
@@ -3,7 +3,7 @@ import { B as BrushSettings, M as MixerSettings, a as MixingModel, b as BlenderS
3
3
  export { e as MAX_BRUSH_SIZE } from '../blending-aOE6Y3UE.cjs';
4
4
  import { R as RasterRect, a as TiledSurface, B as BlendMode, c as BlendModeInfo } from '../surface-C8RRg_Bh.cjs';
5
5
  export { d as BLEND_MODES, e as PAINTERLY_BLEND_MODES, f as Tile, i as isBlendMode, g as isPainterlyBlendMode, s as standardBlendMode } from '../surface-C8RRg_Bh.cjs';
6
- import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DoDhCszr.cjs';
6
+ import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DBba-buV.cjs';
7
7
  import { g as PresenceStore, e as PresenceClock, d as PresenceActorInfo, c as PresenceActor, f as PresenceState } from '../presence-Cb6WhcrQ.cjs';
8
8
  import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
9
9
  import '../types-CwMPoRMU.cjs';
@@ -3,7 +3,7 @@ import { B as BrushSettings, M as MixerSettings, a as MixingModel, b as BlenderS
3
3
  export { e as MAX_BRUSH_SIZE } from '../blending-DXl06NSx.js';
4
4
  import { R as RasterRect, a as TiledSurface, B as BlendMode, c as BlendModeInfo } from '../surface-C8RRg_Bh.js';
5
5
  export { d as BLEND_MODES, e as PAINTERLY_BLEND_MODES, f as Tile, i as isBlendMode, g as isPainterlyBlendMode, s as standardBlendMode } from '../surface-C8RRg_Bh.js';
6
- import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DBNVwb6h.js';
6
+ import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DNu_Jr8p.js';
7
7
  import { g as PresenceStore, e as PresenceClock, d as PresenceActorInfo, c as PresenceActor, f as PresenceState } from '../presence-Cb6WhcrQ.js';
8
8
  import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
9
9
  import '../types-CwMPoRMU.js';
@@ -4,7 +4,7 @@ import {
4
4
  resolveExternalAssets,
5
5
  serializeLayers,
6
6
  serializeLayersExternal
7
- } from "../chunk-HHZ6ZJTW.js";
7
+ } from "../chunk-CZOXTEMN.js";
8
8
  import {
9
9
  RasterCompositor,
10
10
  base64ToBytes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.111.0",
3
+ "version": "0.112.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",