ag-psd 14.5.3 → 15.0.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.
@@ -1,4 +1,4 @@
1
- import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, Units, UnitsValue, WarpStyle } from './psd';
1
+ import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectsInfo, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, Units, UnitsValue, VectorContent, WarpStyle } from './psd';
2
2
  import { PsdReader } from './psdReader';
3
3
  import { PsdWriter } from './psdWriter';
4
4
  export declare function setLogErrors(value: boolean): void;
@@ -152,6 +152,153 @@ export interface QuiltWarpDescriptor extends WarpDescriptor {
152
152
  }[];
153
153
  };
154
154
  }
155
+ export interface FractionDescriptor {
156
+ numerator: number;
157
+ denominator: number;
158
+ }
159
+ export interface HrznVrtcDescriptor {
160
+ Hrzn: number;
161
+ Vrtc: number;
162
+ }
163
+ export interface FrameDescriptor {
164
+ FrLs: number[];
165
+ enab?: boolean;
166
+ IMsk?: {
167
+ Ofst: HrznVrtcDescriptor;
168
+ };
169
+ VMsk?: {
170
+ Ofst: HrznVrtcDescriptor;
171
+ };
172
+ Ofst?: HrznVrtcDescriptor;
173
+ FXRf?: HrznVrtcDescriptor;
174
+ Lefx?: Lfx2Descriptor;
175
+ blendOptions?: {
176
+ Opct: DescriptorUnitsValue;
177
+ };
178
+ }
179
+ export interface FrameListDescriptor {
180
+ LaID: number;
181
+ LaSt: FrameDescriptor[];
182
+ }
183
+ export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): {
184
+ x: number;
185
+ y: number;
186
+ };
187
+ export declare function xyToHorzVrtc(xy: {
188
+ x: number;
189
+ y: number;
190
+ }): HrznVrtcDescriptor;
191
+ export declare type TimelineAnimKeyDescriptor = {
192
+ Type: 'keyType.Opct';
193
+ Opct: DescriptorUnitsValue;
194
+ } | {
195
+ Type: 'keyType.Trnf';
196
+ 'Scl ': HrznVrtcDescriptor;
197
+ Skew: HrznVrtcDescriptor;
198
+ rotation: number;
199
+ translation: HrznVrtcDescriptor;
200
+ } | {
201
+ Type: 'keyType.Pstn';
202
+ Hrzn: number;
203
+ Vrtc: number;
204
+ } | {
205
+ Type: 'keyType.sheetStyle';
206
+ sheetStyle: {
207
+ Vrsn: number;
208
+ Lefx?: Lfx2Descriptor;
209
+ blendOptions: {};
210
+ };
211
+ } | {
212
+ Type: 'keyType.globalLighting';
213
+ gblA: number;
214
+ globalAltitude: number;
215
+ };
216
+ export interface TimelineKeyDescriptor {
217
+ Vrsn: 1;
218
+ animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold';
219
+ time: FractionDescriptor;
220
+ animKey: TimelineAnimKeyDescriptor;
221
+ selected: boolean;
222
+ }
223
+ export interface TimelineTrackDescriptor {
224
+ trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack';
225
+ Vrsn: 1;
226
+ enab: boolean;
227
+ Effc: boolean;
228
+ effectParams?: {
229
+ keyList: TimelineKeyDescriptor[];
230
+ fillCanvas: boolean;
231
+ zoomOrigin: number;
232
+ };
233
+ keyList: TimelineKeyDescriptor[];
234
+ }
235
+ export interface TimeScopeDescriptor {
236
+ Vrsn: 1;
237
+ Strt: FractionDescriptor;
238
+ duration: FractionDescriptor;
239
+ inTime: FractionDescriptor;
240
+ outTime: FractionDescriptor;
241
+ }
242
+ export interface TimelineDescriptor {
243
+ Vrsn: 1;
244
+ timeScope: TimeScopeDescriptor;
245
+ autoScope: boolean;
246
+ audioLevel: number;
247
+ LyrI: number;
248
+ trackList?: TimelineTrackDescriptor[];
249
+ }
250
+ export interface EffectDescriptor extends Partial<DescriptorGradientContent>, Partial<DescriptorPatternContent> {
251
+ enab?: boolean;
252
+ Styl: string;
253
+ PntT?: string;
254
+ 'Md '?: string;
255
+ Opct?: DescriptorUnitsValue;
256
+ 'Sz '?: DescriptorUnitsValue;
257
+ 'Clr '?: DescriptorColor;
258
+ present?: boolean;
259
+ showInDialog?: boolean;
260
+ overprint?: boolean;
261
+ }
262
+ export interface Lfx2Descriptor {
263
+ 'Scl '?: DescriptorUnitsValue;
264
+ masterFXSwitch?: boolean;
265
+ DrSh?: EffectDescriptor;
266
+ IrSh?: EffectDescriptor;
267
+ OrGl?: EffectDescriptor;
268
+ IrGl?: EffectDescriptor;
269
+ ebbl?: EffectDescriptor;
270
+ SoFi?: EffectDescriptor;
271
+ patternFill?: EffectDescriptor;
272
+ GrFl?: EffectDescriptor;
273
+ ChFX?: EffectDescriptor;
274
+ FrFX?: EffectDescriptor;
275
+ }
276
+ export interface LmfxDescriptor {
277
+ 'Scl '?: DescriptorUnitsValue;
278
+ masterFXSwitch?: boolean;
279
+ numModifyingFX?: number;
280
+ OrGl?: EffectDescriptor;
281
+ IrGl?: EffectDescriptor;
282
+ ebbl?: EffectDescriptor;
283
+ ChFX?: EffectDescriptor;
284
+ dropShadowMulti?: EffectDescriptor[];
285
+ innerShadowMulti?: EffectDescriptor[];
286
+ solidFillMulti?: EffectDescriptor[];
287
+ gradientFillMulti?: EffectDescriptor[];
288
+ frameFXMulti?: EffectDescriptor[];
289
+ patternFill?: EffectDescriptor;
290
+ }
291
+ export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor;
292
+ export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo;
293
+ export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[];
294
+ export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[];
295
+ export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent;
296
+ export declare function serializeVectorContent(content: VectorContent): {
297
+ descriptor: DescriptorVectorContent;
298
+ key: string;
299
+ };
300
+ export declare function parseColor(color: DescriptorColor): Color;
301
+ export declare function serializeColor(color: Color | undefined): DescriptorColor;
155
302
  export declare function parseAngle(x: DescriptorUnitsValue): number;
156
303
  export declare function parsePercent(x: DescriptorUnitsValue | undefined): number;
157
304
  export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number;
@@ -205,6 +352,14 @@ export declare const GrdT: {
205
352
  decode: (val: string) => GradientStyle;
206
353
  encode: (val: GradientStyle | undefined) => string;
207
354
  };
355
+ export declare const animInterpStyleEnum: {
356
+ decode: (val: string) => TimelineKeyInterpolation;
357
+ encode: (val: TimelineKeyInterpolation | undefined) => string;
358
+ };
359
+ export declare const stdTrackID: {
360
+ decode: (val: string) => TimelineTrackType;
361
+ encode: (val: TimelineTrackType | undefined) => string;
362
+ };
208
363
  export declare const gradientInterpolationMethodType: {
209
364
  decode: (val: string) => InterpolationMethod;
210
365
  encode: (val: InterpolationMethod | undefined) => string;