@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.
- package/dist/{chunk-HHZ6ZJTW.js → chunk-CZOXTEMN.js} +1772 -456
- package/dist/chunk-CZOXTEMN.js.map +1 -0
- package/dist/{chunk-PHUMLSCW.cjs → chunk-YGIMK4NX.cjs} +1810 -494
- package/dist/chunk-YGIMK4NX.cjs.map +1 -0
- package/dist/{export-DoDhCszr.d.cts → export-DBba-buV.d.cts} +40 -13
- package/dist/{export-DBNVwb6h.d.ts → export-DNu_Jr8p.d.ts} +40 -13
- package/dist/image-editor/index.cjs +1166 -619
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +159 -3
- package/dist/image-editor/index.d.ts +159 -3
- package/dist/image-editor/index.js +554 -7
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.d.cts +1 -1
- package/dist/paint-editor/index.d.ts +1 -1
- package/dist/paint-editor/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HHZ6ZJTW.js.map +0 -1
- package/dist/chunk-PHUMLSCW.cjs.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
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 } =
|
|
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
|
|
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(
|
|
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
|
|
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 =
|
|
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-
|
|
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-
|
|
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';
|