@pixerate/editor 0.219.2 → 0.220.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.
@@ -7,7 +7,7 @@ var _chunkZ64NRDEHcjs = require('../chunk-Z64NRDEH.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkS55JFWDAcjs = require('../chunk-S55JFWDA.cjs');
10
+ var _chunkR35YOUP2cjs = require('../chunk-R35YOUP2.cjs');
11
11
  require('../chunk-A2IS7EHE.cjs');
12
12
  require('../chunk-SS53NNZO.cjs');
13
13
 
@@ -1659,11 +1659,11 @@ function header(state, options) {
1659
1659
  return out;
1660
1660
  }
1661
1661
  function serializePaintDocument(state, options = {}) {
1662
- const { layers, assets } = _chunkS55JFWDAcjs.serializeLayers.call(void 0, state.layers);
1662
+ const { layers, assets } = _chunkR35YOUP2cjs.serializeLayers.call(void 0, state.layers);
1663
1663
  return { ...header(state, options), layers, assets };
1664
1664
  }
1665
1665
  async function serializePaintDocumentExternal(state, store, options = {}) {
1666
- const { layers, assets } = await _chunkS55JFWDAcjs.serializeLayersExternal.call(void 0, state.layers, store);
1666
+ const { layers, assets } = await _chunkR35YOUP2cjs.serializeLayersExternal.call(void 0, state.layers, store);
1667
1667
  return { ...header(state, options), layers, assets };
1668
1668
  }
1669
1669
  function paintLayersOnly(layers, problems) {
@@ -1700,7 +1700,7 @@ function deserializePaintDocument(raw) {
1700
1700
  const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
1701
1701
  const paper = _chunkROVK6AXXcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
1702
1702
  const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
1703
- const layers = paintLayersOnly(_chunkS55JFWDAcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1703
+ const layers = paintLayersOnly(_chunkR35YOUP2cjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1704
1704
  const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
1705
1705
  const activeLayerId = wanted && _chunkB46UQUDCcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkB46UQUDCcjs.flattenLayers.call(void 0, layers), 'access', _70 => _70.filter, 'call', _71 => _71((l) => l.type === "pixel"), 'access', _72 => _72.pop, 'call', _73 => _73(), 'optionalAccess', _74 => _74.id]), () => ( null));
1706
1706
  const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
@@ -1716,7 +1716,7 @@ async function deserializePaintDocumentAsync(raw, store) {
1716
1716
  if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
1717
1717
  const r = raw;
1718
1718
  const problems = [];
1719
- const assets = await _chunkS55JFWDAcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1719
+ const assets = await _chunkR35YOUP2cjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1720
1720
  const loaded = deserializePaintDocument({ ...r, assets });
1721
1721
  return { ...loaded, problems: [...problems, ...loaded.problems] };
1722
1722
  }
@@ -5468,7 +5468,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5468
5468
  return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
5469
5469
  });
5470
5470
  const layers = toStandard(dried);
5471
- const result = _chunkS55JFWDAcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5471
+ const result = _chunkR35YOUP2cjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5472
5472
  for (const [mode, names] of changed) {
5473
5473
  const label = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.BLEND_MODES, 'access', _279 => _279.find, 'call', _280 => _280((m) => m.id === mode), 'optionalAccess', _281 => _281.label]), () => ( mode));
5474
5474
  const std = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.BLEND_MODES, 'access', _282 => _282.find, 'call', _283 => _283((m) => m.id === _chunkOLNIPTB3cjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _284 => _284.label]), () => ( _chunkOLNIPTB3cjs.standardBlendMode.call(void 0, mode)));
@@ -7,7 +7,7 @@ import {
7
7
  resolveExternalAssets,
8
8
  serializeLayers,
9
9
  serializeLayersExternal
10
- } from "../chunk-F7Z2MKY2.js";
10
+ } from "../chunk-S6KKLFZO.js";
11
11
  import "../chunk-3CI7FRMK.js";
12
12
  import "../chunk-ZNA3IQZF.js";
13
13
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.219.2",
3
+ "version": "0.220.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",