ag-psd 28.2.0 → 28.2.1

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.
@@ -1111,7 +1111,7 @@ function parseFilterFXItem(f, options) {
1111
1111
  removeJpegArtifact: f.Fltr.removeJPEGArtifact,
1112
1112
  reduceColorNoise: (0, descriptor_1.parsePercent)(f.Fltr.ClNs),
1113
1113
  sharpenDetails: (0, descriptor_1.parsePercent)(f.Fltr.Shrp),
1114
- channelDenoise: f.Fltr.channelDenoise.map(function (c) { return (__assign({ channels: c.Chnl.map(function (i) { return descriptor_1.Chnl.decode(i); }), amount: c.Amnt }, (c.EdgF ? { preserveDetails: c.EdgF } : {}))); }),
1114
+ channelDenoise: f.Fltr.channelDenoise.map(function (c) { return (__assign({ channels: c.Chnl.map(descriptor_1.Chnl.decode), amount: c.Amnt }, (c.EdgF ? { preserveDetails: c.EdgF } : {}))); }),
1115
1115
  } });
1116
1116
  case 'ClrH': return __assign(__assign({}, base), { type: 'color halftone', filter: {
1117
1117
  radius: f.Fltr['Rds '],
@@ -1338,10 +1338,9 @@ function parseFilterFXItem(f, options) {
1338
1338
  ;
1339
1339
  case 'Crvs':
1340
1340
  {
1341
- return __assign(__assign({}, base), { type: 'curves', filter: {
1342
- presetKind: descriptor_1.presetKindType.decode(f.Fltr.presetKind),
1341
+ return __assign(__assign({}, base), { type: 'curves', filter: __assign({ presetKind: descriptor_1.presetKindType.decode(f.Fltr.presetKind) }, (f.Fltr.Adjs ? {
1343
1342
  adjustments: f.Fltr.Adjs.map(function (a) {
1344
- var channels = a.Chnl.map(function (c) { return descriptor_1.Chnl.decode(c); });
1343
+ var channels = a.Chnl.map(descriptor_1.Chnl.decode);
1345
1344
  if (a['Crv ']) {
1346
1345
  return {
1347
1346
  channels: channels,
@@ -1359,8 +1358,8 @@ function parseFilterFXItem(f, options) {
1359
1358
  else {
1360
1359
  throw new Error("Unknown curve adjustment");
1361
1360
  }
1362
- }),
1363
- } });
1361
+ })
1362
+ } : {})) });
1364
1363
  }
1365
1364
  ;
1366
1365
  case 'BrgC':
@@ -1855,22 +1854,19 @@ function serializeFilterFXItem(f) {
1855
1854
  warpedVertices: f.filter.warpedVertices.map(pointToHrznVrtc),
1856
1855
  quads: f.filter.quads.map(function (indices) { return ({ indices: indices }); }),
1857
1856
  }, filterID: 442 });
1858
- case 'curves': return __assign(__assign({}, base), { Fltr: {
1859
- _name: 'Curves',
1860
- _classID: 'Crvs',
1861
- presetKind: descriptor_1.presetKindType.encode(f.filter.presetKind),
1857
+ case 'curves': return __assign(__assign({}, base), { Fltr: __assign({ _name: 'Curves', _classID: 'Crvs', presetKind: descriptor_1.presetKindType.encode(f.filter.presetKind) }, (f.filter.adjustments ? {
1862
1858
  Adjs: f.filter.adjustments.map(function (a) { return 'curve' in a ? {
1863
1859
  _name: '',
1864
1860
  _classID: 'CrvA',
1865
- Chnl: a.channels.map(function (c) { return descriptor_1.Chnl.encode(c); }),
1861
+ Chnl: a.channels.map(descriptor_1.Chnl.encode),
1866
1862
  'Crv ': a.curve.map(function (c) { return (__assign({ _name: '', _classID: 'Pnt ', Hrzn: c.x, Vrtc: c.y }, (c.curved ? { Cnty: true } : {}))); }),
1867
1863
  } : {
1868
1864
  _name: '',
1869
1865
  _classID: 'CrvA',
1870
- Chnl: a.channels.map(function (c) { return descriptor_1.Chnl.encode(c); }),
1866
+ Chnl: a.channels.map(descriptor_1.Chnl.encode),
1871
1867
  Mpng: a.values,
1872
- }; }),
1873
- }, filterID: 1131574899 });
1868
+ }; })
1869
+ } : {})), filterID: 1131574899 });
1874
1870
  case 'brightness/contrast': return __assign(__assign({}, base), { Fltr: {
1875
1871
  _name: 'Brightness/Contrast',
1876
1872
  _classID: 'BrgC',