@pixerate/editor 0.114.0 → 0.115.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/THIRD_PARTY_NOTICES.md +3 -0
- package/dist/{chunk-5OVJHMZQ.cjs → chunk-I7FQBWMQ.cjs} +94 -55
- package/dist/chunk-I7FQBWMQ.cjs.map +1 -0
- package/dist/{chunk-EUVSQ25B.js → chunk-XICA4PVO.js} +76 -37
- package/dist/chunk-XICA4PVO.js.map +1 -0
- package/dist/{export-b6NjCZ5-.d.cts → export-BJE8T0YA.d.cts} +65 -3
- package/dist/{export-_1dUKwpF.d.ts → export-Con3UKkm.d.ts} +65 -3
- package/dist/image-editor/index.cjs +828 -697
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +14 -6
- package/dist/image-editor/index.d.ts +14 -6
- package/dist/image-editor/index.js +145 -14
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +7 -6
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +1 -1
- package/dist/paint-editor/index.d.ts +1 -1
- package/dist/paint-editor/index.js +2 -1
- package/dist/paint-editor/index.js.map +1 -1
- package/package.json +4 -2
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-editor/references/color-management.md +8 -3
- package/skills/pixerate-image-editor/references/photoshop-files.md +11 -9
- package/skills/pixerate-paint-editor/SKILL.md +136 -4
- package/skills/pixerate-vector/SKILL.md +19 -1
- package/dist/chunk-5OVJHMZQ.cjs.map +0 -1
- package/dist/chunk-EUVSQ25B.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkI7FQBWMQcjs = require('../chunk-I7FQBWMQ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -69,6 +69,7 @@ var _chunkTCKIXI46cjs = require('../chunk-TCKIXI46.cjs');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
var _chunkTFOPHZ3Ucjs = require('../chunk-TFOPHZ3U.cjs');
|
|
72
|
+
require('../chunk-G5NMLUVF.cjs');
|
|
72
73
|
require('../chunk-643B2HKC.cjs');
|
|
73
74
|
|
|
74
75
|
|
|
@@ -1698,11 +1699,11 @@ function header(state, options) {
|
|
|
1698
1699
|
return out;
|
|
1699
1700
|
}
|
|
1700
1701
|
function serializePaintDocument(state, options = {}) {
|
|
1701
|
-
const { layers, assets } =
|
|
1702
|
+
const { layers, assets } = _chunkI7FQBWMQcjs.serializeLayers.call(void 0, state.layers);
|
|
1702
1703
|
return { ...header(state, options), layers, assets };
|
|
1703
1704
|
}
|
|
1704
1705
|
async function serializePaintDocumentExternal(state, store, options = {}) {
|
|
1705
|
-
const { layers, assets } = await
|
|
1706
|
+
const { layers, assets } = await _chunkI7FQBWMQcjs.serializeLayersExternal.call(void 0, state.layers, store);
|
|
1706
1707
|
return { ...header(state, options), layers, assets };
|
|
1707
1708
|
}
|
|
1708
1709
|
function paintLayersOnly(layers, problems) {
|
|
@@ -1739,7 +1740,7 @@ function deserializePaintDocument(raw) {
|
|
|
1739
1740
|
const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
|
|
1740
1741
|
const paper = normalizePaper(_nullishCoalesce(r.paper, () => ( {})));
|
|
1741
1742
|
const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
|
|
1742
|
-
const layers = paintLayersOnly(
|
|
1743
|
+
const layers = paintLayersOnly(_chunkI7FQBWMQcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
|
|
1743
1744
|
const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
|
|
1744
1745
|
const activeLayerId = wanted && _chunkST7E3NEEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkST7E3NEEcjs.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));
|
|
1745
1746
|
return { state: { canvas, paper, layers, activeLayerId, strokes: readStrokes(r.strokes, problems) }, extensions: documentExtensions(r), guides: r.guides, swatches: r.swatches, mixingPad: r.mixingPad, problems };
|
|
@@ -1748,7 +1749,7 @@ async function deserializePaintDocumentAsync(raw, store) {
|
|
|
1748
1749
|
if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
|
|
1749
1750
|
const r = raw;
|
|
1750
1751
|
const problems = [];
|
|
1751
|
-
const assets = await
|
|
1752
|
+
const assets = await _chunkI7FQBWMQcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
|
|
1752
1753
|
const loaded = deserializePaintDocument({ ...r, assets });
|
|
1753
1754
|
return { ...loaded, problems: [...problems, ...loaded.problems] };
|
|
1754
1755
|
}
|
|
@@ -3421,7 +3422,7 @@ var PaintEditorController = (_class10 = class {
|
|
|
3421
3422
|
return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
|
|
3422
3423
|
});
|
|
3423
3424
|
const layers = toStandard(this.doc.layers);
|
|
3424
|
-
const result =
|
|
3425
|
+
const result = _chunkI7FQBWMQcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
|
|
3425
3426
|
for (const [mode, names] of changed) {
|
|
3426
3427
|
const label = _nullishCoalesce(_optionalChain([_chunkTFOPHZ3Ucjs.BLEND_MODES, 'access', _81 => _81.find, 'call', _82 => _82((m) => m.id === mode), 'optionalAccess', _83 => _83.label]), () => ( mode));
|
|
3427
3428
|
const std = _nullishCoalesce(_optionalChain([_chunkTFOPHZ3Ucjs.BLEND_MODES, 'access', _84 => _84.find, 'call', _85 => _85((m) => m.id === _chunkTFOPHZ3Ucjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _86 => _86.label]), () => ( _chunkTFOPHZ3Ucjs.standardBlendMode.call(void 0, mode)));
|