增加中文转拼音- mac

This commit is contained in:
onvia 2023-07-27 15:04:13 +08:00
parent dd0373c362
commit 1840eab0d3
287 changed files with 61358 additions and 56240 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,74 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '24 5 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

View File

@ -1,8 +1,5 @@
# node-pre-gyp changelog
## 1.0.11
- Fixes dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)
## 1.0.10
- Upgraded minimist to 1.2.6 to address dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)

View File

@ -1,7 +1,7 @@
{
"name": "@mapbox/node-pre-gyp",
"description": "Node.js native addon binary install tool",
"version": "1.0.11",
"version": "1.0.10",
"keywords": [
"native",
"addon",

View File

@ -1,18 +1,5 @@
# Changelog
## v15.3.0
- Added support for smart layer puppet filter (`placedLayer.filter`)
## v15.2.0
- Added handling missing `font` in text layer style by assuming first font on the list
## v15.1.0
- Added support for float color in effects, new color type was added
```ts
export type FRGB = { fr: number; fg: number; fb: number; }; // values from 0 to 1 (can be above 1)
```
- Changed `time` field on `LinkedFile` from `Date` to `string` type
## v15.0.0
- Added support for frame and timeline animations

View File

@ -686,12 +686,11 @@ Many fields in PSD file support passing color in different color formats (RGBA,
```ts
type RGBA = { r: number; g: number; b: number; a: number; }; // values from 0 to 255
type RGB = { r: number; g: number; b: number; }; // values from 0 to 255
type FRGB = { fr: number; fg: number; fb: number; }; // values from 0 to 1 (can be above 1)
type HSB = { h: number; s: number; b: number; }; // values from 0 to 1
type CMYK = { c: number; m: number; y: number; k: number; }; // values from 0 to 255
type LAB = { l: number; a: number; b: number; }; // values `l` from 0 to 1; `a` and `b` from -1 to 1
type Grayscale = { k: number }; // values from 0 to 255
type Color = RGBA | RGB | FRGB | HSB | CMYK | LAB | Grayscale;
type Color = RGBA | RGB | HSB | CMYK | LAB | Grayscale;
```
When you want to set field with a `Color` type, it's pretty straightforward, you can just choose any of the formats you like and set it on the field:
@ -713,8 +712,6 @@ if ('l' in color) {
// color is Grayscale
} else if ('a' in color) {
// color is RGBA
} else if ('rf' in color) {
// color is FRGB
} else {
// color is RGB
}

View File

@ -1,3 +1,5 @@
- remove gulp
- can we remove sectionDivider property ?
- can we remove nameSource property ?

View File

@ -1,3 +0,0 @@
const fs = require('fs');
fs.rmSync('dist', { recursive: true, force: true });
fs.rmSync('dist-es', { recursive: true, force: true });

View File

@ -1,132 +1,132 @@
import { BlendMode, PatternInfo } from './psd';
export interface Abr {
brushes: Brush[];
samples: SampleInfo[];
patterns: PatternInfo[];
}
export interface SampleInfo {
id: string;
bounds: {
x: number;
y: number;
w: number;
h: number;
};
alpha: Uint8Array;
}
export interface BrushDynamics {
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
steps: number;
jitter: number;
minimum: number;
}
export interface BrushShape {
name?: string;
size: number;
angle: number;
roundness: number;
hardness?: number;
spacingOn: boolean;
spacing: number;
flipX: boolean;
flipY: boolean;
sampledData?: string;
}
export interface Brush {
name: string;
shape: BrushShape;
shapeDynamics?: {
sizeDynamics: BrushDynamics;
minimumDiameter: number;
tiltScale: number;
angleDynamics: BrushDynamics;
roundnessDynamics: BrushDynamics;
minimumRoundness: number;
flipX: boolean;
flipY: boolean;
brushProjection: boolean;
};
scatter?: {
bothAxes: boolean;
scatterDynamics: BrushDynamics;
countDynamics: BrushDynamics;
count: number;
};
texture?: {
id: string;
name: string;
invert: boolean;
scale: number;
brightness: number;
contrast: number;
blendMode: BlendMode;
depth: number;
depthMinimum: number;
depthDynamics: BrushDynamics;
};
dualBrush?: {
flip: boolean;
shape: BrushShape;
blendMode: BlendMode;
useScatter: boolean;
spacing: number;
count: number;
bothAxes: boolean;
countDynamics: BrushDynamics;
scatterDynamics: BrushDynamics;
};
colorDynamics?: {
foregroundBackground: BrushDynamics;
hue: number;
saturation: number;
brightness: number;
purity: number;
perTip: boolean;
};
transfer?: {
flowDynamics: BrushDynamics;
opacityDynamics: BrushDynamics;
wetnessDynamics: BrushDynamics;
mixDynamics: BrushDynamics;
};
brushPose?: {
overrideAngle: boolean;
overrideTiltX: boolean;
overrideTiltY: boolean;
overridePressure: boolean;
pressure: number;
tiltX: number;
tiltY: number;
angle: number;
};
noise: boolean;
wetEdges: boolean;
protectTexture?: boolean;
spacing: number;
brushGroup?: undefined;
interpretation?: boolean;
useBrushSize: boolean;
toolOptions?: {
brushPreset: boolean;
flow: number;
smooth: number;
mode: BlendMode;
opacity: number;
smoothing: boolean;
smoothingValue: number;
smoothingRadiusMode: boolean;
smoothingCatchup: boolean;
smoothingCatchupAtEnd: boolean;
smoothingZoomCompensation: boolean;
pressureSmoothing: boolean;
usePressureOverridesSize: boolean;
usePressureOverridesOpacity: boolean;
useLegacy: boolean;
flowDynamics?: BrushDynamics;
opacityDynamics?: BrushDynamics;
sizeDynamics?: BrushDynamics;
};
}
export declare function readAbr(buffer: ArrayBufferView, options?: {
logMissingFeatures?: boolean;
}): Abr;
import { BlendMode, PatternInfo } from './psd';
export interface Abr {
brushes: Brush[];
samples: SampleInfo[];
patterns: PatternInfo[];
}
export interface SampleInfo {
id: string;
bounds: {
x: number;
y: number;
w: number;
h: number;
};
alpha: Uint8Array;
}
export interface BrushDynamics {
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
steps: number;
jitter: number;
minimum: number;
}
export interface BrushShape {
name?: string;
size: number;
angle: number;
roundness: number;
hardness?: number;
spacingOn: boolean;
spacing: number;
flipX: boolean;
flipY: boolean;
sampledData?: string;
}
export interface Brush {
name: string;
shape: BrushShape;
shapeDynamics?: {
sizeDynamics: BrushDynamics;
minimumDiameter: number;
tiltScale: number;
angleDynamics: BrushDynamics;
roundnessDynamics: BrushDynamics;
minimumRoundness: number;
flipX: boolean;
flipY: boolean;
brushProjection: boolean;
};
scatter?: {
bothAxes: boolean;
scatterDynamics: BrushDynamics;
countDynamics: BrushDynamics;
count: number;
};
texture?: {
id: string;
name: string;
invert: boolean;
scale: number;
brightness: number;
contrast: number;
blendMode: BlendMode;
depth: number;
depthMinimum: number;
depthDynamics: BrushDynamics;
};
dualBrush?: {
flip: boolean;
shape: BrushShape;
blendMode: BlendMode;
useScatter: boolean;
spacing: number;
count: number;
bothAxes: boolean;
countDynamics: BrushDynamics;
scatterDynamics: BrushDynamics;
};
colorDynamics?: {
foregroundBackground: BrushDynamics;
hue: number;
saturation: number;
brightness: number;
purity: number;
perTip: boolean;
};
transfer?: {
flowDynamics: BrushDynamics;
opacityDynamics: BrushDynamics;
wetnessDynamics: BrushDynamics;
mixDynamics: BrushDynamics;
};
brushPose?: {
overrideAngle: boolean;
overrideTiltX: boolean;
overrideTiltY: boolean;
overridePressure: boolean;
pressure: number;
tiltX: number;
tiltY: number;
angle: number;
};
noise: boolean;
wetEdges: boolean;
protectTexture?: boolean;
spacing: number;
brushGroup?: undefined;
interpretation?: boolean;
useBrushSize: boolean;
toolOptions?: {
brushPreset: boolean;
flow: number;
smooth: number;
mode: BlendMode;
opacity: number;
smoothing: boolean;
smoothingValue: number;
smoothingRadiusMode: boolean;
smoothingCatchup: boolean;
smoothingCatchupAtEnd: boolean;
smoothingZoomCompensation: boolean;
pressureSmoothing: boolean;
usePressureOverridesSize: boolean;
usePressureOverridesOpacity: boolean;
useLegacy: boolean;
flowDynamics?: BrushDynamics;
opacityDynamics?: BrushDynamics;
sizeDynamics?: BrushDynamics;
};
}
export declare function readAbr(buffer: ArrayBufferView, options?: {
logMissingFeatures?: boolean;
}): Abr;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,25 +1,25 @@
import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ExtendedWriteOptions extends WriteOptions {
layerIds: Set<number>;
layerToId: Map<any, number>;
}
type HasMethod = (target: LayerAdditionalInfo) => boolean;
type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void;
type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void;
export interface InfoHandler {
key: string;
has: HasMethod;
read: ReadMethod;
write: WriteMethod;
}
export declare const infoHandlers: InfoHandler[];
export declare const infoHandlersMap: {
[key: string]: InfoHandler;
};
export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[];
export declare const booleanOperations: BooleanOperation[];
export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[];
export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean;
export {};
import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ExtendedWriteOptions extends WriteOptions {
layerIds: Set<number>;
layerToId: Map<any, number>;
}
declare type HasMethod = (target: LayerAdditionalInfo) => boolean;
declare type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void;
declare type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void;
export interface InfoHandler {
key: string;
has: HasMethod;
read: ReadMethod;
write: WriteMethod;
}
export declare const infoHandlers: InfoHandler[];
export declare const infoHandlersMap: {
[key: string]: InfoHandler;
};
export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[];
export declare const booleanOperations: BooleanOperation[];
export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[];
export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean;
export {};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
import { LayerVectorMask } from './psd';
export interface Csh {
shapes: (LayerVectorMask & {
name: string;
id: string;
width: number;
height: number;
})[];
}
export declare function readCsh(buffer: ArrayBufferView): Csh;
import { LayerVectorMask } from './psd';
export interface Csh {
shapes: (LayerVectorMask & {
name: string;
id: string;
width: number;
height: number;
})[];
}
export declare function readCsh(buffer: ArrayBufferView): Csh;

View File

@ -1,44 +1,45 @@
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { readVectorMask } from './additionalInfo';
import { readUint32, checkSignature, createReader, readPascalString, readUnicodeString } from './psdReader';
export function readCsh(buffer) {
var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength);
var csh = { shapes: [] };
checkSignature(reader, 'cush');
if (readUint32(reader) !== 2)
throw new Error('Invalid version');
var count = readUint32(reader);
for (var i = 0; i < count; i++) {
var name_1 = readUnicodeString(reader);
while (reader.offset % 4)
reader.offset++; // pad to 4byte bounds
if (readUint32(reader) !== 1)
throw new Error('Invalid shape version');
var size = readUint32(reader);
var end = reader.offset + size;
var id = readPascalString(reader, 1);
// this might not be correct ???
var y1 = readUint32(reader);
var x1 = readUint32(reader);
var y2 = readUint32(reader);
var x2 = readUint32(reader);
var width = x2 - x1;
var height = y2 - y1;
var mask = { paths: [] };
readVectorMask(reader, mask, width, height, end - reader.offset);
csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask));
reader.offset = end;
}
return csh;
}
//# sourceMappingURL=csh.js.map
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { readVectorMask } from './additionalInfo';
import { readUint32, checkSignature, createReader, readPascalString, readUnicodeString } from './psdReader';
export function readCsh(buffer) {
var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength);
var csh = { shapes: [] };
checkSignature(reader, 'cush');
if (readUint32(reader) !== 2)
throw new Error('Invalid version');
var count = readUint32(reader);
for (var i = 0; i < count; i++) {
var name_1 = readUnicodeString(reader);
while (reader.offset % 4)
reader.offset++; // pad to 4byte bounds
if (readUint32(reader) !== 1)
throw new Error('Invalid shape version');
var size = readUint32(reader);
var end = reader.offset + size;
var id = readPascalString(reader, 1);
// this might not be correct ???
var y1 = readUint32(reader);
var x1 = readUint32(reader);
var y2 = readUint32(reader);
var x2 = readUint32(reader);
var width = x2 - x1;
var height = y2 - y1;
var mask = { paths: [] };
readVectorMask(reader, mask, width, height, end - reader.offset);
csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask));
reader.offset = end;
}
return csh;
}
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLGNBQWMsRUFBRSxZQUFZLEVBQUUsZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFXNUcsTUFBTSxVQUFVLE9BQU8sQ0FBQyxNQUF1QjtJQUM5QyxJQUFNLE1BQU0sR0FBRyxZQUFZLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUNqRixJQUFNLEdBQUcsR0FBUSxFQUFFLE1BQU0sRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUVoQyxjQUFjLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQy9CLElBQUksVUFBVSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7UUFBRSxNQUFNLElBQUksS0FB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B;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"}

View File

@ -1,415 +1,390 @@
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';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function setLogErrors(value: boolean): void;
export declare function readAsciiStringOrClassId(reader: PsdReader): string;
export declare function readDescriptorStructure(reader: PsdReader): any;
export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void;
export declare function readVersionAndDescriptor(reader: PsdReader): any;
export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void;
export type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters';
export interface DescriptorUnitsValue {
units: DescriptorUnits;
value: number;
}
export type DescriptorColor = {
'Rd ': number;
'Grn ': number;
'Bl ': number;
} | {
'H ': DescriptorUnitsValue;
Strt: number;
Brgh: number;
} | {
'Cyn ': number;
Mgnt: number;
'Ylw ': number;
Blck: number;
} | {
'Gry ': number;
} | {
Lmnc: number;
'A ': number;
'B ': number;
} | {
redFloat: number;
greenFloat: number;
blueFloat: number;
};
export interface DesciptorPattern {
'Nm ': string;
Idnt: string;
}
export type DesciptorGradient = {
'Nm ': string;
GrdF: 'GrdF.CstS';
Intr: number;
Clrs: {
'Clr ': DescriptorColor;
Type: 'Clry.UsrS';
Lctn: number;
Mdpn: number;
}[];
Trns: {
Opct: DescriptorUnitsValue;
Lctn: number;
Mdpn: number;
}[];
} | {
GrdF: 'GrdF.ClNs';
Smth: number;
'Nm ': string;
ClrS: string;
RndS: number;
VctC?: boolean;
ShTr?: boolean;
'Mnm ': number[];
'Mxm ': number[];
};
export interface DescriptorColorContent {
'Clr ': DescriptorColor;
}
export interface DescriptorGradientContent {
Grad: DesciptorGradient;
Type: string;
Dthr?: boolean;
Rvrs?: boolean;
Angl?: DescriptorUnitsValue;
'Scl '?: DescriptorUnitsValue;
Algn?: boolean;
Ofst?: {
Hrzn: DescriptorUnitsValue;
Vrtc: DescriptorUnitsValue;
};
}
export interface DescriptorPatternContent {
Ptrn: DesciptorPattern;
Lnkd?: boolean;
phase?: {
Hrzn: number;
Vrtc: number;
};
}
export type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent;
export interface StrokeDescriptor {
strokeStyleVersion: number;
strokeEnabled: boolean;
fillEnabled: boolean;
strokeStyleLineWidth: DescriptorUnitsValue;
strokeStyleLineDashOffset: DescriptorUnitsValue;
strokeStyleMiterLimit: number;
strokeStyleLineCapType: string;
strokeStyleLineJoinType: string;
strokeStyleLineAlignment: string;
strokeStyleScaleLock: boolean;
strokeStyleStrokeAdjust: boolean;
strokeStyleLineDashSet: DescriptorUnitsValue[];
strokeStyleBlendMode: string;
strokeStyleOpacity: DescriptorUnitsValue;
strokeStyleContent: DescriptorVectorContent;
strokeStyleResolution: number;
}
export interface TextDescriptor {
'Txt ': string;
textGridding: string;
Ornt: string;
AntA: string;
TextIndex: number;
EngineData?: Uint8Array;
}
export interface WarpDescriptor {
warpStyle: string;
warpValue?: number;
warpValues?: number[];
warpPerspective: number;
warpPerspectiveOther: number;
warpRotate: string;
bounds?: {
'Top ': DescriptorUnitsValue;
Left: DescriptorUnitsValue;
Btom: DescriptorUnitsValue;
Rght: DescriptorUnitsValue;
};
uOrder: number;
vOrder: number;
customEnvelopeWarp?: {
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface QuiltWarpDescriptor extends WarpDescriptor {
deformNumRows: number;
deformNumCols: number;
customEnvelopeWarp: {
quiltSliceX: {
type: 'quiltSliceX';
values: number[];
}[];
quiltSliceY: {
type: 'quiltSliceY';
values: number[];
}[];
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface FractionDescriptor {
numerator: number;
denominator: number;
}
export interface HrznVrtcDescriptor {
Hrzn: number;
Vrtc: number;
}
export interface FrameDescriptor {
FrLs: number[];
enab?: boolean;
IMsk?: {
Ofst: HrznVrtcDescriptor;
};
VMsk?: {
Ofst: HrznVrtcDescriptor;
};
Ofst?: HrznVrtcDescriptor;
FXRf?: HrznVrtcDescriptor;
Lefx?: Lfx2Descriptor;
blendOptions?: {
Opct: DescriptorUnitsValue;
};
}
export interface FrameListDescriptor {
LaID: number;
LaSt: FrameDescriptor[];
}
export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): {
x: number;
y: number;
};
export declare function xyToHorzVrtc(xy: {
x: number;
y: number;
}): HrznVrtcDescriptor;
export type TimelineAnimKeyDescriptor = {
Type: 'keyType.Opct';
Opct: DescriptorUnitsValue;
} | {
Type: 'keyType.Trnf';
'Scl ': HrznVrtcDescriptor;
Skew: HrznVrtcDescriptor;
rotation: number;
translation: HrznVrtcDescriptor;
} | {
Type: 'keyType.Pstn';
Hrzn: number;
Vrtc: number;
} | {
Type: 'keyType.sheetStyle';
sheetStyle: {
Vrsn: number;
Lefx?: Lfx2Descriptor;
blendOptions: {};
};
} | {
Type: 'keyType.globalLighting';
gblA: number;
globalAltitude: number;
};
export interface TimelineKeyDescriptor {
Vrsn: 1;
animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold';
time: FractionDescriptor;
animKey: TimelineAnimKeyDescriptor;
selected: boolean;
}
export interface TimelineTrackDescriptor {
trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack';
Vrsn: 1;
enab: boolean;
Effc: boolean;
effectParams?: {
keyList: TimelineKeyDescriptor[];
fillCanvas: boolean;
zoomOrigin: number;
};
keyList: TimelineKeyDescriptor[];
}
export interface TimeScopeDescriptor {
Vrsn: 1;
Strt: FractionDescriptor;
duration: FractionDescriptor;
inTime: FractionDescriptor;
outTime: FractionDescriptor;
}
export interface TimelineDescriptor {
Vrsn: 1;
timeScope: TimeScopeDescriptor;
autoScope: boolean;
audioLevel: number;
LyrI: number;
trackList?: TimelineTrackDescriptor[];
}
export interface EffectDescriptor extends Partial<DescriptorGradientContent>, Partial<DescriptorPatternContent> {
enab?: boolean;
Styl: string;
PntT?: string;
'Md '?: string;
Opct?: DescriptorUnitsValue;
'Sz '?: DescriptorUnitsValue;
'Clr '?: DescriptorColor;
present?: boolean;
showInDialog?: boolean;
overprint?: boolean;
}
export interface Lfx2Descriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
DrSh?: EffectDescriptor;
IrSh?: EffectDescriptor;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
SoFi?: EffectDescriptor;
patternFill?: EffectDescriptor;
GrFl?: EffectDescriptor;
ChFX?: EffectDescriptor;
FrFX?: EffectDescriptor;
}
export interface LmfxDescriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
numModifyingFX?: number;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
ChFX?: EffectDescriptor;
dropShadowMulti?: EffectDescriptor[];
innerShadowMulti?: EffectDescriptor[];
solidFillMulti?: EffectDescriptor[];
gradientFillMulti?: EffectDescriptor[];
frameFXMulti?: EffectDescriptor[];
patternFill?: EffectDescriptor;
}
export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor;
export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo;
export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[];
export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[];
export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent;
export declare function serializeVectorContent(content: VectorContent): {
descriptor: DescriptorVectorContent;
key: string;
};
export declare function parseColor(color: DescriptorColor): Color;
export declare function serializeColor(color: Color | undefined): DescriptorColor;
export declare function parseAngle(x: DescriptorUnitsValue): number;
export declare function parsePercent(x: DescriptorUnitsValue | undefined): number;
export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number;
export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue;
export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue;
export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number;
export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue;
export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue;
export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue;
export declare const textGridding: {
decode: (val: string) => TextGridding;
encode: (val: TextGridding | undefined) => string;
};
export declare const Ornt: {
decode: (val: string) => Orientation;
encode: (val: Orientation | undefined) => string;
};
export declare const Annt: {
decode: (val: string) => AntiAlias;
encode: (val: AntiAlias | undefined) => string;
};
export declare const warpStyle: {
decode: (val: string) => WarpStyle;
encode: (val: WarpStyle | undefined) => string;
};
export declare const BlnM: {
decode: (val: string) => BlendMode;
encode: (val: BlendMode | undefined) => string;
};
export declare const BESl: {
decode: (val: string) => BevelStyle;
encode: (val: BevelStyle | undefined) => string;
};
export declare const bvlT: {
decode: (val: string) => BevelTechnique;
encode: (val: BevelTechnique | undefined) => string;
};
export declare const BESs: {
decode: (val: string) => BevelDirection;
encode: (val: BevelDirection | undefined) => string;
};
export declare const BETE: {
decode: (val: string) => GlowTechnique;
encode: (val: GlowTechnique | undefined) => string;
};
export declare const IGSr: {
decode: (val: string) => GlowSource;
encode: (val: GlowSource | undefined) => string;
};
export declare const GrdT: {
decode: (val: string) => GradientStyle;
encode: (val: GradientStyle | undefined) => string;
};
export declare const animInterpStyleEnum: {
decode: (val: string) => TimelineKeyInterpolation;
encode: (val: TimelineKeyInterpolation | undefined) => string;
};
export declare const stdTrackID: {
decode: (val: string) => TimelineTrackType;
encode: (val: TimelineTrackType | undefined) => string;
};
export declare const gradientInterpolationMethodType: {
decode: (val: string) => InterpolationMethod;
encode: (val: InterpolationMethod | undefined) => string;
};
export declare const ClrS: {
decode: (val: string) => "rgb" | "hsb" | "lab";
encode: (val: "rgb" | "hsb" | "lab" | undefined) => string;
};
export declare const FStl: {
decode: (val: string) => "center" | "inside" | "outside";
encode: (val: "center" | "inside" | "outside" | undefined) => string;
};
export declare const FrFl: {
decode: (val: string) => "color" | "pattern" | "gradient";
encode: (val: "color" | "pattern" | "gradient" | undefined) => string;
};
export declare const ESliceType: {
decode: (val: string) => "image" | "noImage";
encode: (val: "image" | "noImage" | undefined) => string;
};
export declare const ESliceHorzAlign: {
decode: (val: string) => "default";
encode: (val: "default" | undefined) => string;
};
export declare const ESliceVertAlign: {
decode: (val: string) => "default";
encode: (val: "default" | undefined) => string;
};
export declare const ESliceOrigin: {
decode: (val: string) => "userGenerated" | "autoGenerated" | "layer";
encode: (val: "userGenerated" | "autoGenerated" | "layer" | undefined) => string;
};
export declare const ESliceBGColorType: {
decode: (val: string) => "none" | "color" | "matte";
encode: (val: "none" | "color" | "matte" | undefined) => string;
};
export declare const strokeStyleLineCapType: {
decode: (val: string) => LineCapType;
encode: (val: LineCapType | undefined) => string;
};
export declare const strokeStyleLineJoinType: {
decode: (val: string) => LineJoinType;
encode: (val: LineJoinType | undefined) => string;
};
export declare const strokeStyleLineAlignment: {
decode: (val: string) => LineAlignment;
encode: (val: LineAlignment | undefined) => string;
};
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';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function setLogErrors(value: boolean): void;
export declare function readAsciiStringOrClassId(reader: PsdReader): string;
export declare function readDescriptorStructure(reader: PsdReader): any;
export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void;
export declare function readVersionAndDescriptor(reader: PsdReader): any;
export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void;
export declare type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters';
export interface DescriptorUnitsValue {
units: DescriptorUnits;
value: number;
}
export declare type DescriptorColor = {
'Rd ': number;
'Grn ': number;
'Bl ': number;
} | {
'H ': DescriptorUnitsValue;
Strt: number;
Brgh: number;
} | {
'Cyn ': number;
Mgnt: number;
'Ylw ': number;
Blck: number;
} | {
'Gry ': number;
} | {
Lmnc: number;
'A ': number;
'B ': number;
};
export interface DesciptorPattern {
'Nm ': string;
Idnt: string;
}
export declare type DesciptorGradient = {
'Nm ': string;
GrdF: 'GrdF.CstS';
Intr: number;
Clrs: {
'Clr ': DescriptorColor;
Type: 'Clry.UsrS';
Lctn: number;
Mdpn: number;
}[];
Trns: {
Opct: DescriptorUnitsValue;
Lctn: number;
Mdpn: number;
}[];
} | {
GrdF: 'GrdF.ClNs';
Smth: number;
'Nm ': string;
ClrS: string;
RndS: number;
VctC?: boolean;
ShTr?: boolean;
'Mnm ': number[];
'Mxm ': number[];
};
export interface DescriptorColorContent {
'Clr ': DescriptorColor;
}
export interface DescriptorGradientContent {
Grad: DesciptorGradient;
Type: string;
Dthr?: boolean;
Rvrs?: boolean;
Angl?: DescriptorUnitsValue;
'Scl '?: DescriptorUnitsValue;
Algn?: boolean;
Ofst?: {
Hrzn: DescriptorUnitsValue;
Vrtc: DescriptorUnitsValue;
};
}
export interface DescriptorPatternContent {
Ptrn: DesciptorPattern;
Lnkd?: boolean;
phase?: {
Hrzn: number;
Vrtc: number;
};
}
export declare type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent;
export interface StrokeDescriptor {
strokeStyleVersion: number;
strokeEnabled: boolean;
fillEnabled: boolean;
strokeStyleLineWidth: DescriptorUnitsValue;
strokeStyleLineDashOffset: DescriptorUnitsValue;
strokeStyleMiterLimit: number;
strokeStyleLineCapType: string;
strokeStyleLineJoinType: string;
strokeStyleLineAlignment: string;
strokeStyleScaleLock: boolean;
strokeStyleStrokeAdjust: boolean;
strokeStyleLineDashSet: DescriptorUnitsValue[];
strokeStyleBlendMode: string;
strokeStyleOpacity: DescriptorUnitsValue;
strokeStyleContent: DescriptorVectorContent;
strokeStyleResolution: number;
}
export interface TextDescriptor {
'Txt ': string;
textGridding: string;
Ornt: string;
AntA: string;
TextIndex: number;
EngineData?: Uint8Array;
}
export interface WarpDescriptor {
warpStyle: string;
warpValue: number;
warpPerspective: number;
warpPerspectiveOther: number;
warpRotate: string;
bounds?: {
'Top ': DescriptorUnitsValue;
Left: DescriptorUnitsValue;
Btom: DescriptorUnitsValue;
Rght: DescriptorUnitsValue;
};
uOrder: number;
vOrder: number;
customEnvelopeWarp?: {
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface QuiltWarpDescriptor extends WarpDescriptor {
deformNumRows: number;
deformNumCols: number;
customEnvelopeWarp: {
quiltSliceX: {
type: 'quiltSliceX';
values: number[];
}[];
quiltSliceY: {
type: 'quiltSliceY';
values: number[];
}[];
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface FractionDescriptor {
numerator: number;
denominator: number;
}
export interface HrznVrtcDescriptor {
Hrzn: number;
Vrtc: number;
}
export interface FrameDescriptor {
FrLs: number[];
enab?: boolean;
IMsk?: {
Ofst: HrznVrtcDescriptor;
};
VMsk?: {
Ofst: HrznVrtcDescriptor;
};
Ofst?: HrznVrtcDescriptor;
FXRf?: HrznVrtcDescriptor;
Lefx?: Lfx2Descriptor;
blendOptions?: {
Opct: DescriptorUnitsValue;
};
}
export interface FrameListDescriptor {
LaID: number;
LaSt: FrameDescriptor[];
}
export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): {
x: number;
y: number;
};
export declare function xyToHorzVrtc(xy: {
x: number;
y: number;
}): HrznVrtcDescriptor;
export declare type TimelineAnimKeyDescriptor = {
Type: 'keyType.Opct';
Opct: DescriptorUnitsValue;
} | {
Type: 'keyType.Trnf';
'Scl ': HrznVrtcDescriptor;
Skew: HrznVrtcDescriptor;
rotation: number;
translation: HrznVrtcDescriptor;
} | {
Type: 'keyType.Pstn';
Hrzn: number;
Vrtc: number;
} | {
Type: 'keyType.sheetStyle';
sheetStyle: {
Vrsn: number;
Lefx?: Lfx2Descriptor;
blendOptions: {};
};
} | {
Type: 'keyType.globalLighting';
gblA: number;
globalAltitude: number;
};
export interface TimelineKeyDescriptor {
Vrsn: 1;
animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold';
time: FractionDescriptor;
animKey: TimelineAnimKeyDescriptor;
selected: boolean;
}
export interface TimelineTrackDescriptor {
trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack';
Vrsn: 1;
enab: boolean;
Effc: boolean;
effectParams?: {
keyList: TimelineKeyDescriptor[];
fillCanvas: boolean;
zoomOrigin: number;
};
keyList: TimelineKeyDescriptor[];
}
export interface TimeScopeDescriptor {
Vrsn: 1;
Strt: FractionDescriptor;
duration: FractionDescriptor;
inTime: FractionDescriptor;
outTime: FractionDescriptor;
}
export interface TimelineDescriptor {
Vrsn: 1;
timeScope: TimeScopeDescriptor;
autoScope: boolean;
audioLevel: number;
LyrI: number;
trackList?: TimelineTrackDescriptor[];
}
export interface EffectDescriptor extends Partial<DescriptorGradientContent>, Partial<DescriptorPatternContent> {
enab?: boolean;
Styl: string;
PntT?: string;
'Md '?: string;
Opct?: DescriptorUnitsValue;
'Sz '?: DescriptorUnitsValue;
'Clr '?: DescriptorColor;
present?: boolean;
showInDialog?: boolean;
overprint?: boolean;
}
export interface Lfx2Descriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
DrSh?: EffectDescriptor;
IrSh?: EffectDescriptor;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
SoFi?: EffectDescriptor;
patternFill?: EffectDescriptor;
GrFl?: EffectDescriptor;
ChFX?: EffectDescriptor;
FrFX?: EffectDescriptor;
}
export interface LmfxDescriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
numModifyingFX?: number;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
ChFX?: EffectDescriptor;
dropShadowMulti?: EffectDescriptor[];
innerShadowMulti?: EffectDescriptor[];
solidFillMulti?: EffectDescriptor[];
gradientFillMulti?: EffectDescriptor[];
frameFXMulti?: EffectDescriptor[];
patternFill?: EffectDescriptor;
}
export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor;
export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo;
export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[];
export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[];
export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent;
export declare function serializeVectorContent(content: VectorContent): {
descriptor: DescriptorVectorContent;
key: string;
};
export declare function parseColor(color: DescriptorColor): Color;
export declare function serializeColor(color: Color | undefined): DescriptorColor;
export declare function parseAngle(x: DescriptorUnitsValue): number;
export declare function parsePercent(x: DescriptorUnitsValue | undefined): number;
export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number;
export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue;
export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue;
export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number;
export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue;
export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue;
export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue;
export declare const textGridding: {
decode: (val: string) => TextGridding;
encode: (val: TextGridding | undefined) => string;
};
export declare const Ornt: {
decode: (val: string) => Orientation;
encode: (val: Orientation | undefined) => string;
};
export declare const Annt: {
decode: (val: string) => AntiAlias;
encode: (val: AntiAlias | undefined) => string;
};
export declare const warpStyle: {
decode: (val: string) => WarpStyle;
encode: (val: WarpStyle | undefined) => string;
};
export declare const BlnM: {
decode: (val: string) => BlendMode;
encode: (val: BlendMode | undefined) => string;
};
export declare const BESl: {
decode: (val: string) => BevelStyle;
encode: (val: BevelStyle | undefined) => string;
};
export declare const bvlT: {
decode: (val: string) => BevelTechnique;
encode: (val: BevelTechnique | undefined) => string;
};
export declare const BESs: {
decode: (val: string) => BevelDirection;
encode: (val: BevelDirection | undefined) => string;
};
export declare const BETE: {
decode: (val: string) => GlowTechnique;
encode: (val: GlowTechnique | undefined) => string;
};
export declare const IGSr: {
decode: (val: string) => GlowSource;
encode: (val: GlowSource | undefined) => string;
};
export declare const GrdT: {
decode: (val: string) => GradientStyle;
encode: (val: GradientStyle | undefined) => string;
};
export declare const animInterpStyleEnum: {
decode: (val: string) => TimelineKeyInterpolation;
encode: (val: TimelineKeyInterpolation | undefined) => string;
};
export declare const stdTrackID: {
decode: (val: string) => TimelineTrackType;
encode: (val: TimelineTrackType | undefined) => string;
};
export declare const gradientInterpolationMethodType: {
decode: (val: string) => InterpolationMethod;
encode: (val: InterpolationMethod | undefined) => string;
};
export declare const ClrS: {
decode: (val: string) => "rgb" | "hsb" | "lab";
encode: (val: "rgb" | "hsb" | "lab" | undefined) => string;
};
export declare const FStl: {
decode: (val: string) => "center" | "inside" | "outside";
encode: (val: "center" | "inside" | "outside" | undefined) => string;
};
export declare const FrFl: {
decode: (val: string) => "color" | "pattern" | "gradient";
encode: (val: "color" | "pattern" | "gradient" | undefined) => string;
};
export declare const strokeStyleLineCapType: {
decode: (val: string) => LineCapType;
encode: (val: LineCapType | undefined) => string;
};
export declare const strokeStyleLineJoinType: {
decode: (val: string) => LineJoinType;
encode: (val: LineJoinType | undefined) => string;
};
export declare const strokeStyleLineAlignment: {
decode: (val: string) => LineAlignment;
encode: (val: LineAlignment | undefined) => string;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
import { LayerEffectsInfo } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function readEffects(reader: PsdReader): LayerEffectsInfo;
export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void;
import { LayerEffectsInfo } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function readEffects(reader: PsdReader): LayerEffectsInfo;
export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
export declare function parseEngineData(data: number[] | Uint8Array): any;
export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array;
export declare function parseEngineData(data: number[] | Uint8Array): any;
export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,93 +1,93 @@
import { Layer, BlendMode, LayerColor } from './psd';
export declare const MOCK_HANDLERS = false;
export declare const RAW_IMAGE_DATA = false;
export declare const fromBlendMode: {
[key: string]: string;
};
export declare const toBlendMode: {
[key: string]: BlendMode;
};
export declare const layerColors: LayerColor[];
export declare const largeAdditionalInfoKeys: string[];
export interface Dict {
[key: string]: string;
}
export declare function revMap(map: Dict): Dict;
export declare function createEnum<T>(prefix: string, def: string, map: Dict): {
decode: (val: string) => T;
encode: (val: T | undefined) => string;
};
export declare const enum ColorSpace {
RGB = 0,
HSB = 1,
CMYK = 2,
Lab = 7,
Grayscale = 8
}
export declare const enum LayerMaskFlags {
PositionRelativeToLayer = 1,
LayerMaskDisabled = 2,
InvertLayerMaskWhenBlending = 4,
LayerMaskFromRenderingOtherData = 8,
MaskHasParametersAppliedToIt = 16
}
export declare const enum MaskParams {
UserMaskDensity = 1,
UserMaskFeather = 2,
VectorMaskDensity = 4,
VectorMaskFeather = 8
}
export declare const enum ChannelID {
Color0 = 0,
Color1 = 1,
Color2 = 2,
Color3 = 3,
Transparency = -1,
UserMask = -2,
RealUserMask = -3
}
export declare const enum Compression {
RawData = 0,
RleCompressed = 1,
ZipWithoutPrediction = 2,
ZipWithPrediction = 3
}
export interface ChannelData {
channelId: ChannelID;
compression: Compression;
buffer: Uint8Array | undefined;
length: number;
}
export interface Bounds {
top: number;
left: number;
right: number;
bottom: number;
}
export interface LayerChannelData {
layer: Layer;
channels: ChannelData[];
top: number;
left: number;
right: number;
bottom: number;
mask?: Bounds;
}
export type PixelArray = Uint8ClampedArray | Uint8Array;
export interface PixelData {
data: PixelArray;
width: number;
height: number;
}
export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number;
export declare function clamp(value: number, min: number, max: number): number;
export declare function hasAlpha(data: PixelData): boolean;
export declare function resetImageData({ data }: PixelData): void;
export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void;
export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined;
export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined;
export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array;
export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement;
export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement;
export declare let createImageData: (width: number, height: number) => ImageData;
export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void;
import { Layer, BlendMode, LayerColor } from './psd';
export declare const MOCK_HANDLERS = false;
export declare const RAW_IMAGE_DATA = false;
export declare const fromBlendMode: {
[key: string]: string;
};
export declare const toBlendMode: {
[key: string]: BlendMode;
};
export declare const layerColors: LayerColor[];
export declare const largeAdditionalInfoKeys: string[];
export interface Dict {
[key: string]: string;
}
export declare function revMap(map: Dict): Dict;
export declare function createEnum<T>(prefix: string, def: string, map: Dict): {
decode: (val: string) => T;
encode: (val: T | undefined) => string;
};
export declare const enum ColorSpace {
RGB = 0,
HSB = 1,
CMYK = 2,
Lab = 7,
Grayscale = 8
}
export declare const enum LayerMaskFlags {
PositionRelativeToLayer = 1,
LayerMaskDisabled = 2,
InvertLayerMaskWhenBlending = 4,
LayerMaskFromRenderingOtherData = 8,
MaskHasParametersAppliedToIt = 16
}
export declare const enum MaskParams {
UserMaskDensity = 1,
UserMaskFeather = 2,
VectorMaskDensity = 4,
VectorMaskFeather = 8
}
export declare const enum ChannelID {
Color0 = 0,
Color1 = 1,
Color2 = 2,
Color3 = 3,
Transparency = -1,
UserMask = -2,
RealUserMask = -3
}
export declare const enum Compression {
RawData = 0,
RleCompressed = 1,
ZipWithoutPrediction = 2,
ZipWithPrediction = 3
}
export interface ChannelData {
channelId: ChannelID;
compression: Compression;
buffer: Uint8Array | undefined;
length: number;
}
export interface Bounds {
top: number;
left: number;
right: number;
bottom: number;
}
export interface LayerChannelData {
layer: Layer;
channels: ChannelData[];
top: number;
left: number;
right: number;
bottom: number;
mask?: Bounds;
}
export declare type PixelArray = Uint8ClampedArray | Uint8Array;
export interface PixelData {
data: PixelArray;
width: number;
height: number;
}
export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number;
export declare function clamp(value: number, min: number, max: number): number;
export declare function hasAlpha(data: PixelData): boolean;
export declare function resetImageData({ data }: PixelData): void;
export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void;
export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined;
export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined;
export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array;
export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement;
export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement;
export declare let createImageData: (width: number, height: number) => ImageData;
export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
import { ImageResources, ReadOptions } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ResourceHandler {
key: number;
has: (target: ImageResources) => boolean | number;
read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void;
write: (writer: PsdWriter, target: ImageResources, index: number) => void;
}
export declare const resourceHandlers: ResourceHandler[];
export declare const resourceHandlersMap: {
[key: number]: ResourceHandler;
};
import { ImageResources, ReadOptions } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ResourceHandler {
key: number;
has: (target: ImageResources) => boolean;
read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void;
write: (writer: PsdWriter, target: ImageResources) => void;
}
export declare const resourceHandlers: ResourceHandler[];
export declare const resourceHandlersMap: {
[key: number]: ResourceHandler;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,20 @@
/// <reference types="node" />
import { Psd, ReadOptions, WriteOptions } from './psd';
import { PsdWriter } from './psdWriter';
import { PsdReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export { PsdReader, PsdWriter };
interface BufferLike {
buffer: ArrayBuffer;
byteOffset: number;
byteLength: number;
}
export declare const byteArrayToBase64: typeof fromByteArray;
export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd;
export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer;
export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array;
export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer;
/// <reference types="node" />
import { Psd, ReadOptions, WriteOptions } from './psd';
import { PsdWriter } from './psdWriter';
import { PsdReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export { PsdReader, PsdWriter };
interface BufferLike {
buffer: ArrayBuffer;
byteOffset: number;
byteLength: number;
}
export declare const byteArrayToBase64: typeof fromByteArray;
export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd;
export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer;
export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array;
export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer;

View File

@ -1,31 +1,32 @@
import { writePsd as writePsdInternal, getWriterBuffer, createWriter, getWriterBufferNoCopy } from './psdWriter';
import { readPsd as readPsdInternal, createReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export var byteArrayToBase64 = fromByteArray;
export function readPsd(buffer, options) {
var reader = 'buffer' in buffer ?
createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength) :
createReader(buffer);
return readPsdInternal(reader, options);
}
export function writePsd(psd, options) {
var writer = createWriter();
writePsdInternal(writer, psd, options);
return getWriterBuffer(writer);
}
export function writePsdUint8Array(psd, options) {
var writer = createWriter();
writePsdInternal(writer, psd, options);
return getWriterBufferNoCopy(writer);
}
export function writePsdBuffer(psd, options) {
if (typeof Buffer === 'undefined') {
throw new Error('Buffer not supported on this platform');
}
return Buffer.from(writePsdUint8Array(psd, options));
}
//# sourceMappingURL=index.js.map
import { writePsd as writePsdInternal, getWriterBuffer, createWriter, getWriterBufferNoCopy } from './psdWriter';
import { readPsd as readPsdInternal, createReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export var byteArrayToBase64 = fromByteArray;
export function readPsd(buffer, options) {
var reader = 'buffer' in buffer ?
createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength) :
createReader(buffer);
return readPsdInternal(reader, options);
}
export function writePsd(psd, options) {
var writer = createWriter();
writePsdInternal(writer, psd, options);
return getWriterBuffer(writer);
}
export function writePsdUint8Array(psd, options) {
var writer = createWriter();
writePsdInternal(writer, psd, options);
return getWriterBufferNoCopy(writer);
}
export function writePsdBuffer(psd, options) {
if (typeof Buffer === 'undefined') {
throw new Error('Buffer not supported on this platform');
}
return Buffer.from(writePsdUint8Array(psd, options));
}
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBYSxRQUFRLElBQUksZ0JBQWdCLEVBQUUsZUFBZSxFQUFFLFlBQVksRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUM1SCxPQUFPLEVBQWEsT0FBTyxJQUFJLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDbEYsY0FBYyxPQUFPLENBQUM7QUFDdEIsY0FBYyxPQUFPLENBQUM7QUFDdEIsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQzdDLGNBQWMsT0FBTyxDQUFDO0FBQ3RCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxXQUFX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,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAQ,EAAE,OAAsB;IAClE,IAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAQ,EAAE,OAAsB;IAC9D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACzD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC"}

View File

@ -1 +1 @@
export declare function initialize(): void;
export declare function initialize(): void;

View File

@ -1,22 +1,23 @@
import { createCanvas } from 'canvas';
import { initializeCanvas } from './index';
import { decodeJpeg } from './jpeg';
function createCanvasFromData(data) {
var canvas = createCanvas(100, 100);
try {
var context_1 = canvas.getContext('2d');
var imageData = decodeJpeg(data, function (w, h) { return context_1.createImageData(w, h); });
canvas.width = imageData.width;
canvas.height = imageData.height;
context_1.putImageData(imageData, 0, 0);
}
catch (e) {
console.error('JPEG decompression error', e.message);
}
return canvas;
}
initializeCanvas(createCanvas, createCanvasFromData);
export function initialize() {
initializeCanvas(createCanvas, createCanvasFromData);
}
//# sourceMappingURL=initializeCanvas.js.map
import { createCanvas } from 'canvas';
import { initializeCanvas } from './index';
import { decodeJpeg } from './jpeg';
function createCanvasFromData(data) {
var canvas = createCanvas(100, 100);
try {
var context_1 = canvas.getContext('2d');
var imageData = decodeJpeg(data, function (w, h) { return context_1.createImageData(w, h); });
canvas.width = imageData.width;
canvas.height = imageData.height;
context_1.putImageData(imageData, 0, 0);
}
catch (e) {
console.error('JPEG decompression error', e.message);
}
return canvas;
}
initializeCanvas(createCanvas, createCanvasFromData);
export function initialize() {
initializeCanvas(createCanvas, createCanvasF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AAoB,CAAC,CAAC;AAErD,MAAM,UAAU,UAAU;IACzB,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;AACtD,CAAC"}

View File

@ -1 +1 @@
export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData;
export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":3,"file":"psd.js","sourceRoot":"../src/","sources":["psd.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAkB,SASjB;AATD,WAAkB,SAAS;IAC1B,6CAAU,CAAA;IACV,mDAAa,CAAA;IACb,+CAAW,CAAA;IACX,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,+CAAW,CAAA;IACX,uCAAO,CAAA;AACR,CAAC,EATiB,SAAS,KAAT,SAAS,QAS1B;AAED,MAAM,CAAN,IAAkB,kBAKjB;AALD,WAAkB,kBAAkB;IACnC,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAChB,+FAA0B,CAAA;AAC3B,CAAC,EALiB,kBAAkB,KAAlB,kBAAkB,QAKnC"}

View File

@ -1,36 +1,36 @@
import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd';
import { PixelData } from './helpers';
export declare const supportedColorModes: ColorMode[];
export interface PsdReader {
offset: number;
view: DataView;
strict: boolean;
debug: boolean;
}
export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader;
export declare function warnOrThrow(reader: PsdReader, message: string): void;
export declare function readUint8(reader: PsdReader): number;
export declare function peekUint8(reader: PsdReader): number;
export declare function readInt16(reader: PsdReader): number;
export declare function readUint16(reader: PsdReader): number;
export declare function readInt32(reader: PsdReader): number;
export declare function readInt32LE(reader: PsdReader): number;
export declare function readUint32(reader: PsdReader): number;
export declare function readFloat32(reader: PsdReader): number;
export declare function readFloat64(reader: PsdReader): number;
export declare function readFixedPoint32(reader: PsdReader): number;
export declare function readFixedPointPath32(reader: PsdReader): number;
export declare function readBytes(reader: PsdReader, length: number): Uint8Array;
export declare function readSignature(reader: PsdReader): string;
export declare function readPascalString(reader: PsdReader, padTo: number): string;
export declare function readUnicodeString(reader: PsdReader): string;
export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string;
export declare function readAsciiString(reader: PsdReader, length: number): string;
export declare function skipBytes(reader: PsdReader, count: number): void;
export declare function checkSignature(reader: PsdReader, a: string, b?: string): void;
export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd;
export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void;
export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void;
export declare function readSection<T>(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined;
export declare function readColor(reader: PsdReader): Color;
export declare function readPattern(reader: PsdReader): PatternInfo;
import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd';
import { PixelData } from './helpers';
export declare const supportedColorModes: ColorMode[];
export interface PsdReader {
offset: number;
view: DataView;
strict: boolean;
debug: boolean;
}
export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader;
export declare function warnOrThrow(reader: PsdReader, message: string): void;
export declare function readUint8(reader: PsdReader): number;
export declare function peekUint8(reader: PsdReader): number;
export declare function readInt16(reader: PsdReader): number;
export declare function readUint16(reader: PsdReader): number;
export declare function readInt32(reader: PsdReader): number;
export declare function readInt32LE(reader: PsdReader): number;
export declare function readUint32(reader: PsdReader): number;
export declare function readFloat32(reader: PsdReader): number;
export declare function readFloat64(reader: PsdReader): number;
export declare function readFixedPoint32(reader: PsdReader): number;
export declare function readFixedPointPath32(reader: PsdReader): number;
export declare function readBytes(reader: PsdReader, length: number): Uint8Array;
export declare function readSignature(reader: PsdReader): string;
export declare function readPascalString(reader: PsdReader, padTo: number): string;
export declare function readUnicodeString(reader: PsdReader): string;
export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string;
export declare function readAsciiString(reader: PsdReader, length: number): string;
export declare function skipBytes(reader: PsdReader, count: number): void;
export declare function checkSignature(reader: PsdReader, a: string, b?: string): void;
export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd;
export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void;
export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void;
export declare function readSection<T>(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined;
export declare function readColor(reader: PsdReader): Color;
export declare function readPattern(reader: PsdReader): PatternInfo;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,27 +1,27 @@
import { Psd, WriteOptions, Color } from './psd';
export interface PsdWriter {
offset: number;
buffer: ArrayBuffer;
view: DataView;
}
export declare function createWriter(size?: number): PsdWriter;
export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer;
export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array;
export declare function writeUint8(writer: PsdWriter, value: number): void;
export declare function writeInt16(writer: PsdWriter, value: number): void;
export declare function writeUint16(writer: PsdWriter, value: number): void;
export declare function writeInt32(writer: PsdWriter, value: number): void;
export declare function writeUint32(writer: PsdWriter, value: number): void;
export declare function writeFloat32(writer: PsdWriter, value: number): void;
export declare function writeFloat64(writer: PsdWriter, value: number): void;
export declare function writeFixedPoint32(writer: PsdWriter, value: number): void;
export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void;
export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void;
export declare function writeZeros(writer: PsdWriter, count: number): void;
export declare function writeSignature(writer: PsdWriter, signature: string): void;
export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void;
export declare function writeUnicodeString(writer: PsdWriter, text: string): void;
export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void;
export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void;
export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void;
export declare function writeColor(writer: PsdWriter, color: Color | undefined): void;
import { Psd, WriteOptions, Color } from './psd';
export interface PsdWriter {
offset: number;
buffer: ArrayBuffer;
view: DataView;
}
export declare function createWriter(size?: number): PsdWriter;
export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer;
export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array;
export declare function writeUint8(writer: PsdWriter, value: number): void;
export declare function writeInt16(writer: PsdWriter, value: number): void;
export declare function writeUint16(writer: PsdWriter, value: number): void;
export declare function writeInt32(writer: PsdWriter, value: number): void;
export declare function writeUint32(writer: PsdWriter, value: number): void;
export declare function writeFloat32(writer: PsdWriter, value: number): void;
export declare function writeFloat64(writer: PsdWriter, value: number): void;
export declare function writeFixedPoint32(writer: PsdWriter, value: number): void;
export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void;
export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void;
export declare function writeZeros(writer: PsdWriter, count: number): void;
export declare function writeSignature(writer: PsdWriter, signature: string): void;
export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void;
export declare function writeUnicodeString(writer: PsdWriter, text: string): void;
export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void;
export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void;
export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void;
export declare function writeColor(writer: PsdWriter, color: Color | undefined): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,168 +1,168 @@
import { LayerTextData } from './psd';
interface Adjustments {
Axis: number[];
XY: number[];
}
interface TypeValues {
Type: number;
Values: number[];
}
interface ParagraphProperties {
Justification?: number;
FirstLineIndent?: number;
StartIndent?: number;
EndIndent?: number;
SpaceBefore?: number;
SpaceAfter?: number;
AutoHyphenate?: boolean;
HyphenatedWordSize?: number;
PreHyphen?: number;
PostHyphen?: number;
ConsecutiveHyphens?: number;
Zone?: number;
WordSpacing?: number[];
LetterSpacing?: number[];
GlyphSpacing?: number[];
AutoLeading?: number;
LeadingType?: number;
Hanging?: boolean;
Burasagari?: boolean;
KinsokuOrder?: number;
EveryLineComposer?: boolean;
}
interface ParagraphSheet {
Name?: string;
DefaultStyleSheet: number;
Properties: ParagraphProperties;
}
interface StyleSheetData {
Font?: number;
FontSize?: number;
FauxBold?: boolean;
FauxItalic?: boolean;
AutoLeading?: boolean;
Leading?: number;
HorizontalScale?: number;
VerticalScale?: number;
Tracking?: number;
AutoKerning?: boolean;
Kerning?: number;
BaselineShift?: number;
FontCaps?: number;
FontBaseline?: number;
Underline?: boolean;
Strikethrough?: boolean;
Ligatures?: boolean;
DLigatures?: boolean;
BaselineDirection?: number;
Tsume?: number;
StyleRunAlignment?: number;
Language?: number;
NoBreak?: boolean;
FillColor?: TypeValues;
StrokeColor?: TypeValues;
FillFlag?: boolean;
StrokeFlag?: boolean;
FillFirst?: boolean;
YUnderline?: number;
OutlineWidth?: number;
CharacterDirection?: number;
HindiNumbers?: boolean;
Kashida?: number;
DiacriticPos?: number;
}
interface FontSet {
Name: string;
Script: number;
FontType: number;
Synthetic: number;
}
interface ResourceDict {
KinsokuSet: any[];
MojiKumiSet: any[];
TheNormalStyleSheet: number;
TheNormalParagraphSheet: number;
ParagraphSheetSet: ParagraphSheet[];
StyleSheetSet: {
Name: string;
StyleSheetData: StyleSheetData;
}[];
FontSet: FontSet[];
SuperscriptSize: number;
SuperscriptPosition: number;
SubscriptSize: number;
SubscriptPosition: number;
SmallCapSize: number;
}
interface ParagraphRun {
ParagraphSheet: ParagraphSheet;
Adjustments: Adjustments;
}
interface StyleRun {
StyleSheet: {
StyleSheetData: StyleSheetData;
};
}
interface PhotoshopNode {
ShapeType?: number;
PointBase?: number[];
BoxBounds?: number[];
Base?: {
ShapeType: number;
TransformPoint0: number[];
TransformPoint1: number[];
TransformPoint2: number[];
};
}
interface EngineData {
EngineDict: {
Editor: {
Text: string;
};
ParagraphRun: {
DefaultRunData: ParagraphRun;
RunArray: ParagraphRun[];
RunLengthArray: number[];
IsJoinable: number;
};
StyleRun: {
DefaultRunData: StyleRun;
RunArray: StyleRun[];
RunLengthArray: number[];
IsJoinable: number;
};
GridInfo: {
GridIsOn: boolean;
ShowGrid: boolean;
GridSize: number;
GridLeading: number;
GridColor: TypeValues;
GridLeadingFillColor: TypeValues;
AlignLineHeightToGridFlags: boolean;
};
AntiAlias: number;
UseFractionalGlyphWidths: boolean;
Rendered?: {
Version: number;
Shapes?: {
WritingDirection: number;
Children?: {
ShapeType?: number;
Procession: number;
Lines: {
WritingDirection: number;
Children: any[];
};
Cookie?: {
Photoshop?: PhotoshopNode;
};
}[];
};
};
};
ResourceDict: ResourceDict;
DocumentResources: ResourceDict;
}
export declare function decodeEngineData(engineData: EngineData): LayerTextData;
export declare function encodeEngineData(data: LayerTextData): EngineData;
export {};
import { LayerTextData } from './psd';
interface Adjustments {
Axis: number[];
XY: number[];
}
interface TypeValues {
Type: number;
Values: number[];
}
interface ParagraphProperties {
Justification?: number;
FirstLineIndent?: number;
StartIndent?: number;
EndIndent?: number;
SpaceBefore?: number;
SpaceAfter?: number;
AutoHyphenate?: boolean;
HyphenatedWordSize?: number;
PreHyphen?: number;
PostHyphen?: number;
ConsecutiveHyphens?: number;
Zone?: number;
WordSpacing?: number[];
LetterSpacing?: number[];
GlyphSpacing?: number[];
AutoLeading?: number;
LeadingType?: number;
Hanging?: boolean;
Burasagari?: boolean;
KinsokuOrder?: number;
EveryLineComposer?: boolean;
}
interface ParagraphSheet {
Name?: string;
DefaultStyleSheet: number;
Properties: ParagraphProperties;
}
interface StyleSheetData {
Font?: number;
FontSize?: number;
FauxBold?: boolean;
FauxItalic?: boolean;
AutoLeading?: boolean;
Leading?: number;
HorizontalScale?: number;
VerticalScale?: number;
Tracking?: number;
AutoKerning?: boolean;
Kerning?: number;
BaselineShift?: number;
FontCaps?: number;
FontBaseline?: number;
Underline?: boolean;
Strikethrough?: boolean;
Ligatures?: boolean;
DLigatures?: boolean;
BaselineDirection?: number;
Tsume?: number;
StyleRunAlignment?: number;
Language?: number;
NoBreak?: boolean;
FillColor?: TypeValues;
StrokeColor?: TypeValues;
FillFlag?: boolean;
StrokeFlag?: boolean;
FillFirst?: boolean;
YUnderline?: number;
OutlineWidth?: number;
CharacterDirection?: number;
HindiNumbers?: boolean;
Kashida?: number;
DiacriticPos?: number;
}
interface FontSet {
Name: string;
Script: number;
FontType: number;
Synthetic: number;
}
interface ResourceDict {
KinsokuSet: any[];
MojiKumiSet: any[];
TheNormalStyleSheet: number;
TheNormalParagraphSheet: number;
ParagraphSheetSet: ParagraphSheet[];
StyleSheetSet: {
Name: string;
StyleSheetData: StyleSheetData;
}[];
FontSet: FontSet[];
SuperscriptSize: number;
SuperscriptPosition: number;
SubscriptSize: number;
SubscriptPosition: number;
SmallCapSize: number;
}
interface ParagraphRun {
ParagraphSheet: ParagraphSheet;
Adjustments: Adjustments;
}
interface StyleRun {
StyleSheet: {
StyleSheetData: StyleSheetData;
};
}
interface PhotoshopNode {
ShapeType?: number;
PointBase?: number[];
BoxBounds?: number[];
Base?: {
ShapeType: number;
TransformPoint0: number[];
TransformPoint1: number[];
TransformPoint2: number[];
};
}
interface EngineData {
EngineDict: {
Editor: {
Text: string;
};
ParagraphRun: {
DefaultRunData: ParagraphRun;
RunArray: ParagraphRun[];
RunLengthArray: number[];
IsJoinable: number;
};
StyleRun: {
DefaultRunData: StyleRun;
RunArray: StyleRun[];
RunLengthArray: number[];
IsJoinable: number;
};
GridInfo: {
GridIsOn: boolean;
ShowGrid: boolean;
GridSize: number;
GridLeading: number;
GridColor: TypeValues;
GridLeadingFillColor: TypeValues;
AlignLineHeightToGridFlags: boolean;
};
AntiAlias: number;
UseFractionalGlyphWidths: boolean;
Rendered?: {
Version: number;
Shapes?: {
WritingDirection: number;
Children?: {
ShapeType?: number;
Procession: number;
Lines: {
WritingDirection: number;
Children: any[];
};
Cookie?: {
Photoshop?: PhotoshopNode;
};
}[];
};
};
};
ResourceDict: ResourceDict;
DocumentResources: ResourceDict;
}
export declare function decodeEngineData(engineData: EngineData): LayerTextData;
export declare function encodeEngineData(data: LayerTextData): EngineData;
export {};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/// <reference types="node" />
export declare function stringLengthInBytes(value: string): number;
export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number;
export declare function encodeString(value: string): Uint8Array;
export declare function decodeString(value: Uint8Array): string;
/// <reference types="node" />
export declare function stringLengthInBytes(value: string): number;
export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number;
export declare function encodeString(value: string): Uint8Array;
export declare function decodeString(value: Uint8Array): string;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,132 +1,132 @@
import { BlendMode, PatternInfo } from './psd';
export interface Abr {
brushes: Brush[];
samples: SampleInfo[];
patterns: PatternInfo[];
}
export interface SampleInfo {
id: string;
bounds: {
x: number;
y: number;
w: number;
h: number;
};
alpha: Uint8Array;
}
export interface BrushDynamics {
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
steps: number;
jitter: number;
minimum: number;
}
export interface BrushShape {
name?: string;
size: number;
angle: number;
roundness: number;
hardness?: number;
spacingOn: boolean;
spacing: number;
flipX: boolean;
flipY: boolean;
sampledData?: string;
}
export interface Brush {
name: string;
shape: BrushShape;
shapeDynamics?: {
sizeDynamics: BrushDynamics;
minimumDiameter: number;
tiltScale: number;
angleDynamics: BrushDynamics;
roundnessDynamics: BrushDynamics;
minimumRoundness: number;
flipX: boolean;
flipY: boolean;
brushProjection: boolean;
};
scatter?: {
bothAxes: boolean;
scatterDynamics: BrushDynamics;
countDynamics: BrushDynamics;
count: number;
};
texture?: {
id: string;
name: string;
invert: boolean;
scale: number;
brightness: number;
contrast: number;
blendMode: BlendMode;
depth: number;
depthMinimum: number;
depthDynamics: BrushDynamics;
};
dualBrush?: {
flip: boolean;
shape: BrushShape;
blendMode: BlendMode;
useScatter: boolean;
spacing: number;
count: number;
bothAxes: boolean;
countDynamics: BrushDynamics;
scatterDynamics: BrushDynamics;
};
colorDynamics?: {
foregroundBackground: BrushDynamics;
hue: number;
saturation: number;
brightness: number;
purity: number;
perTip: boolean;
};
transfer?: {
flowDynamics: BrushDynamics;
opacityDynamics: BrushDynamics;
wetnessDynamics: BrushDynamics;
mixDynamics: BrushDynamics;
};
brushPose?: {
overrideAngle: boolean;
overrideTiltX: boolean;
overrideTiltY: boolean;
overridePressure: boolean;
pressure: number;
tiltX: number;
tiltY: number;
angle: number;
};
noise: boolean;
wetEdges: boolean;
protectTexture?: boolean;
spacing: number;
brushGroup?: undefined;
interpretation?: boolean;
useBrushSize: boolean;
toolOptions?: {
brushPreset: boolean;
flow: number;
smooth: number;
mode: BlendMode;
opacity: number;
smoothing: boolean;
smoothingValue: number;
smoothingRadiusMode: boolean;
smoothingCatchup: boolean;
smoothingCatchupAtEnd: boolean;
smoothingZoomCompensation: boolean;
pressureSmoothing: boolean;
usePressureOverridesSize: boolean;
usePressureOverridesOpacity: boolean;
useLegacy: boolean;
flowDynamics?: BrushDynamics;
opacityDynamics?: BrushDynamics;
sizeDynamics?: BrushDynamics;
};
}
export declare function readAbr(buffer: ArrayBufferView, options?: {
logMissingFeatures?: boolean;
}): Abr;
import { BlendMode, PatternInfo } from './psd';
export interface Abr {
brushes: Brush[];
samples: SampleInfo[];
patterns: PatternInfo[];
}
export interface SampleInfo {
id: string;
bounds: {
x: number;
y: number;
w: number;
h: number;
};
alpha: Uint8Array;
}
export interface BrushDynamics {
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
steps: number;
jitter: number;
minimum: number;
}
export interface BrushShape {
name?: string;
size: number;
angle: number;
roundness: number;
hardness?: number;
spacingOn: boolean;
spacing: number;
flipX: boolean;
flipY: boolean;
sampledData?: string;
}
export interface Brush {
name: string;
shape: BrushShape;
shapeDynamics?: {
sizeDynamics: BrushDynamics;
minimumDiameter: number;
tiltScale: number;
angleDynamics: BrushDynamics;
roundnessDynamics: BrushDynamics;
minimumRoundness: number;
flipX: boolean;
flipY: boolean;
brushProjection: boolean;
};
scatter?: {
bothAxes: boolean;
scatterDynamics: BrushDynamics;
countDynamics: BrushDynamics;
count: number;
};
texture?: {
id: string;
name: string;
invert: boolean;
scale: number;
brightness: number;
contrast: number;
blendMode: BlendMode;
depth: number;
depthMinimum: number;
depthDynamics: BrushDynamics;
};
dualBrush?: {
flip: boolean;
shape: BrushShape;
blendMode: BlendMode;
useScatter: boolean;
spacing: number;
count: number;
bothAxes: boolean;
countDynamics: BrushDynamics;
scatterDynamics: BrushDynamics;
};
colorDynamics?: {
foregroundBackground: BrushDynamics;
hue: number;
saturation: number;
brightness: number;
purity: number;
perTip: boolean;
};
transfer?: {
flowDynamics: BrushDynamics;
opacityDynamics: BrushDynamics;
wetnessDynamics: BrushDynamics;
mixDynamics: BrushDynamics;
};
brushPose?: {
overrideAngle: boolean;
overrideTiltX: boolean;
overrideTiltY: boolean;
overridePressure: boolean;
pressure: number;
tiltX: number;
tiltY: number;
angle: number;
};
noise: boolean;
wetEdges: boolean;
protectTexture?: boolean;
spacing: number;
brushGroup?: undefined;
interpretation?: boolean;
useBrushSize: boolean;
toolOptions?: {
brushPreset: boolean;
flow: number;
smooth: number;
mode: BlendMode;
opacity: number;
smoothing: boolean;
smoothingValue: number;
smoothingRadiusMode: boolean;
smoothingCatchup: boolean;
smoothingCatchupAtEnd: boolean;
smoothingZoomCompensation: boolean;
pressureSmoothing: boolean;
usePressureOverridesSize: boolean;
usePressureOverridesOpacity: boolean;
useLegacy: boolean;
flowDynamics?: BrushDynamics;
opacityDynamics?: BrushDynamics;
sizeDynamics?: BrushDynamics;
};
}
export declare function readAbr(buffer: ArrayBufferView, options?: {
logMissingFeatures?: boolean;
}): Abr;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,25 +1,25 @@
import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ExtendedWriteOptions extends WriteOptions {
layerIds: Set<number>;
layerToId: Map<any, number>;
}
type HasMethod = (target: LayerAdditionalInfo) => boolean;
type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void;
type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void;
export interface InfoHandler {
key: string;
has: HasMethod;
read: ReadMethod;
write: WriteMethod;
}
export declare const infoHandlers: InfoHandler[];
export declare const infoHandlersMap: {
[key: string]: InfoHandler;
};
export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[];
export declare const booleanOperations: BooleanOperation[];
export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[];
export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean;
export {};
import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ExtendedWriteOptions extends WriteOptions {
layerIds: Set<number>;
layerToId: Map<any, number>;
}
declare type HasMethod = (target: LayerAdditionalInfo) => boolean;
declare type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void;
declare type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void;
export interface InfoHandler {
key: string;
has: HasMethod;
read: ReadMethod;
write: WriteMethod;
}
export declare const infoHandlers: InfoHandler[];
export declare const infoHandlersMap: {
[key: string]: InfoHandler;
};
export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[];
export declare const booleanOperations: BooleanOperation[];
export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[];
export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean;
export {};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
import { LayerVectorMask } from './psd';
export interface Csh {
shapes: (LayerVectorMask & {
name: string;
id: string;
width: number;
height: number;
})[];
}
export declare function readCsh(buffer: ArrayBufferView): Csh;
import { LayerVectorMask } from './psd';
export interface Csh {
shapes: (LayerVectorMask & {
name: string;
id: string;
width: number;
height: number;
})[];
}
export declare function readCsh(buffer: ArrayBufferView): Csh;

View File

@ -1,48 +1,49 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.readCsh = void 0;
var additionalInfo_1 = require("./additionalInfo");
var psdReader_1 = require("./psdReader");
function readCsh(buffer) {
var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength);
var csh = { shapes: [] };
(0, psdReader_1.checkSignature)(reader, 'cush');
if ((0, psdReader_1.readUint32)(reader) !== 2)
throw new Error('Invalid version');
var count = (0, psdReader_1.readUint32)(reader);
for (var i = 0; i < count; i++) {
var name_1 = (0, psdReader_1.readUnicodeString)(reader);
while (reader.offset % 4)
reader.offset++; // pad to 4byte bounds
if ((0, psdReader_1.readUint32)(reader) !== 1)
throw new Error('Invalid shape version');
var size = (0, psdReader_1.readUint32)(reader);
var end = reader.offset + size;
var id = (0, psdReader_1.readPascalString)(reader, 1);
// this might not be correct ???
var y1 = (0, psdReader_1.readUint32)(reader);
var x1 = (0, psdReader_1.readUint32)(reader);
var y2 = (0, psdReader_1.readUint32)(reader);
var x2 = (0, psdReader_1.readUint32)(reader);
var width = x2 - x1;
var height = y2 - y1;
var mask = { paths: [] };
(0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset);
csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask));
reader.offset = end;
}
return csh;
}
exports.readCsh = readCsh;
//# sourceMappingURL=csh.js.map
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.readCsh = void 0;
var additionalInfo_1 = require("./additionalInfo");
var psdReader_1 = require("./psdReader");
function readCsh(buffer) {
var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength);
var csh = { shapes: [] };
(0, psdReader_1.checkSignature)(reader, 'cush');
if ((0, psdReader_1.readUint32)(reader) !== 2)
throw new Error('Invalid version');
var count = (0, psdReader_1.readUint32)(reader);
for (var i = 0; i < count; i++) {
var name_1 = (0, psdReader_1.readUnicodeString)(reader);
while (reader.offset % 4)
reader.offset++; // pad to 4byte bounds
if ((0, psdReader_1.readUint32)(reader) !== 1)
throw new Error('Invalid shape version');
var size = (0, psdReader_1.readUint32)(reader);
var end = reader.offset + size;
var id = (0, psdReader_1.readPascalString)(reader, 1);
// this might not be correct ???
var y1 = (0, psdReader_1.readUint32)(reader);
var x1 = (0, psdReader_1.readUint32)(reader);
var y2 = (0, psdReader_1.readUint32)(reader);
var x2 = (0, psdReader_1.readUint32)(reader);
var width = x2 - x1;
var height = y2 - y1;
var mask = { paths: [] };
(0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset);
csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask));
reader.offset = end;
}
return csh;
}
exports.readCsh = readCsh;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLG1EQUFrRDtBQUVsRCx5Q0FBNEc7QUFXNUcsU0FBZ0IsT0FBTyxDQUFDLE1BQXVCO0lBQzlDLElBQU0sTUFBTSxHQUFHLElBQUEsd0JBQVksRUFBQyxNQUFNLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQ2pGLElBQU0sR0FBRyxHQUFRLEVBQUUsTUFBTSxFQUFFLEVBQUUsRUFBRSxDQUFDO0lBRWhDLElBQUEsMEJBQWMsRUFBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDL0IsSUFBSSxJQUFBLHNCQUFVLEVBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQztRQUFFLE1BQU0sSUFBSSxLQUFLLENBQUMsaUJBQWlCLENBQUMsQ0FBQztJQUNqRSxJQUFNLEtBQUssR0FBRyxJQUFBLHNCQUFVLEVBQUMsTUFBTSxDQUFDLENBQUM7SUFFakMsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUMvQixJQUFNLE1BQUksR0FBRyxJQUFBLDZCQUFpQixFQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3ZDLE9BQU8sTUFBTS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K,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvE,IAAM,IAAI,GAAG,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QACjC,IAAM,EAAE,GAAG,IAAA,4BAAgB,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvC,gCAAgC;QAChC,IAAM,EAAE,GAAG,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,IAAA,sBAAU,EAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC;QACtB,IAAM,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC;QACvB,IAAM,IAAI,GAAoB,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAC5C,IAAA,+BAAc,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACjE,GAAG,CAAC,MAAM,CAAC,IAAI,YAAG,IAAI,QAAA,EAAE,EAAE,IAAA,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,IAAK,IAAI,EAAG,CAAC;QAEtD,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACpB;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AA9BD,0BA8BC"}

View File

@ -1,415 +1,390 @@
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';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function setLogErrors(value: boolean): void;
export declare function readAsciiStringOrClassId(reader: PsdReader): string;
export declare function readDescriptorStructure(reader: PsdReader): any;
export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void;
export declare function readVersionAndDescriptor(reader: PsdReader): any;
export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void;
export type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters';
export interface DescriptorUnitsValue {
units: DescriptorUnits;
value: number;
}
export type DescriptorColor = {
'Rd ': number;
'Grn ': number;
'Bl ': number;
} | {
'H ': DescriptorUnitsValue;
Strt: number;
Brgh: number;
} | {
'Cyn ': number;
Mgnt: number;
'Ylw ': number;
Blck: number;
} | {
'Gry ': number;
} | {
Lmnc: number;
'A ': number;
'B ': number;
} | {
redFloat: number;
greenFloat: number;
blueFloat: number;
};
export interface DesciptorPattern {
'Nm ': string;
Idnt: string;
}
export type DesciptorGradient = {
'Nm ': string;
GrdF: 'GrdF.CstS';
Intr: number;
Clrs: {
'Clr ': DescriptorColor;
Type: 'Clry.UsrS';
Lctn: number;
Mdpn: number;
}[];
Trns: {
Opct: DescriptorUnitsValue;
Lctn: number;
Mdpn: number;
}[];
} | {
GrdF: 'GrdF.ClNs';
Smth: number;
'Nm ': string;
ClrS: string;
RndS: number;
VctC?: boolean;
ShTr?: boolean;
'Mnm ': number[];
'Mxm ': number[];
};
export interface DescriptorColorContent {
'Clr ': DescriptorColor;
}
export interface DescriptorGradientContent {
Grad: DesciptorGradient;
Type: string;
Dthr?: boolean;
Rvrs?: boolean;
Angl?: DescriptorUnitsValue;
'Scl '?: DescriptorUnitsValue;
Algn?: boolean;
Ofst?: {
Hrzn: DescriptorUnitsValue;
Vrtc: DescriptorUnitsValue;
};
}
export interface DescriptorPatternContent {
Ptrn: DesciptorPattern;
Lnkd?: boolean;
phase?: {
Hrzn: number;
Vrtc: number;
};
}
export type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent;
export interface StrokeDescriptor {
strokeStyleVersion: number;
strokeEnabled: boolean;
fillEnabled: boolean;
strokeStyleLineWidth: DescriptorUnitsValue;
strokeStyleLineDashOffset: DescriptorUnitsValue;
strokeStyleMiterLimit: number;
strokeStyleLineCapType: string;
strokeStyleLineJoinType: string;
strokeStyleLineAlignment: string;
strokeStyleScaleLock: boolean;
strokeStyleStrokeAdjust: boolean;
strokeStyleLineDashSet: DescriptorUnitsValue[];
strokeStyleBlendMode: string;
strokeStyleOpacity: DescriptorUnitsValue;
strokeStyleContent: DescriptorVectorContent;
strokeStyleResolution: number;
}
export interface TextDescriptor {
'Txt ': string;
textGridding: string;
Ornt: string;
AntA: string;
TextIndex: number;
EngineData?: Uint8Array;
}
export interface WarpDescriptor {
warpStyle: string;
warpValue?: number;
warpValues?: number[];
warpPerspective: number;
warpPerspectiveOther: number;
warpRotate: string;
bounds?: {
'Top ': DescriptorUnitsValue;
Left: DescriptorUnitsValue;
Btom: DescriptorUnitsValue;
Rght: DescriptorUnitsValue;
};
uOrder: number;
vOrder: number;
customEnvelopeWarp?: {
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface QuiltWarpDescriptor extends WarpDescriptor {
deformNumRows: number;
deformNumCols: number;
customEnvelopeWarp: {
quiltSliceX: {
type: 'quiltSliceX';
values: number[];
}[];
quiltSliceY: {
type: 'quiltSliceY';
values: number[];
}[];
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface FractionDescriptor {
numerator: number;
denominator: number;
}
export interface HrznVrtcDescriptor {
Hrzn: number;
Vrtc: number;
}
export interface FrameDescriptor {
FrLs: number[];
enab?: boolean;
IMsk?: {
Ofst: HrznVrtcDescriptor;
};
VMsk?: {
Ofst: HrznVrtcDescriptor;
};
Ofst?: HrznVrtcDescriptor;
FXRf?: HrznVrtcDescriptor;
Lefx?: Lfx2Descriptor;
blendOptions?: {
Opct: DescriptorUnitsValue;
};
}
export interface FrameListDescriptor {
LaID: number;
LaSt: FrameDescriptor[];
}
export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): {
x: number;
y: number;
};
export declare function xyToHorzVrtc(xy: {
x: number;
y: number;
}): HrznVrtcDescriptor;
export type TimelineAnimKeyDescriptor = {
Type: 'keyType.Opct';
Opct: DescriptorUnitsValue;
} | {
Type: 'keyType.Trnf';
'Scl ': HrznVrtcDescriptor;
Skew: HrznVrtcDescriptor;
rotation: number;
translation: HrznVrtcDescriptor;
} | {
Type: 'keyType.Pstn';
Hrzn: number;
Vrtc: number;
} | {
Type: 'keyType.sheetStyle';
sheetStyle: {
Vrsn: number;
Lefx?: Lfx2Descriptor;
blendOptions: {};
};
} | {
Type: 'keyType.globalLighting';
gblA: number;
globalAltitude: number;
};
export interface TimelineKeyDescriptor {
Vrsn: 1;
animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold';
time: FractionDescriptor;
animKey: TimelineAnimKeyDescriptor;
selected: boolean;
}
export interface TimelineTrackDescriptor {
trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack';
Vrsn: 1;
enab: boolean;
Effc: boolean;
effectParams?: {
keyList: TimelineKeyDescriptor[];
fillCanvas: boolean;
zoomOrigin: number;
};
keyList: TimelineKeyDescriptor[];
}
export interface TimeScopeDescriptor {
Vrsn: 1;
Strt: FractionDescriptor;
duration: FractionDescriptor;
inTime: FractionDescriptor;
outTime: FractionDescriptor;
}
export interface TimelineDescriptor {
Vrsn: 1;
timeScope: TimeScopeDescriptor;
autoScope: boolean;
audioLevel: number;
LyrI: number;
trackList?: TimelineTrackDescriptor[];
}
export interface EffectDescriptor extends Partial<DescriptorGradientContent>, Partial<DescriptorPatternContent> {
enab?: boolean;
Styl: string;
PntT?: string;
'Md '?: string;
Opct?: DescriptorUnitsValue;
'Sz '?: DescriptorUnitsValue;
'Clr '?: DescriptorColor;
present?: boolean;
showInDialog?: boolean;
overprint?: boolean;
}
export interface Lfx2Descriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
DrSh?: EffectDescriptor;
IrSh?: EffectDescriptor;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
SoFi?: EffectDescriptor;
patternFill?: EffectDescriptor;
GrFl?: EffectDescriptor;
ChFX?: EffectDescriptor;
FrFX?: EffectDescriptor;
}
export interface LmfxDescriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
numModifyingFX?: number;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
ChFX?: EffectDescriptor;
dropShadowMulti?: EffectDescriptor[];
innerShadowMulti?: EffectDescriptor[];
solidFillMulti?: EffectDescriptor[];
gradientFillMulti?: EffectDescriptor[];
frameFXMulti?: EffectDescriptor[];
patternFill?: EffectDescriptor;
}
export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor;
export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo;
export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[];
export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[];
export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent;
export declare function serializeVectorContent(content: VectorContent): {
descriptor: DescriptorVectorContent;
key: string;
};
export declare function parseColor(color: DescriptorColor): Color;
export declare function serializeColor(color: Color | undefined): DescriptorColor;
export declare function parseAngle(x: DescriptorUnitsValue): number;
export declare function parsePercent(x: DescriptorUnitsValue | undefined): number;
export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number;
export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue;
export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue;
export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number;
export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue;
export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue;
export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue;
export declare const textGridding: {
decode: (val: string) => TextGridding;
encode: (val: TextGridding | undefined) => string;
};
export declare const Ornt: {
decode: (val: string) => Orientation;
encode: (val: Orientation | undefined) => string;
};
export declare const Annt: {
decode: (val: string) => AntiAlias;
encode: (val: AntiAlias | undefined) => string;
};
export declare const warpStyle: {
decode: (val: string) => WarpStyle;
encode: (val: WarpStyle | undefined) => string;
};
export declare const BlnM: {
decode: (val: string) => BlendMode;
encode: (val: BlendMode | undefined) => string;
};
export declare const BESl: {
decode: (val: string) => BevelStyle;
encode: (val: BevelStyle | undefined) => string;
};
export declare const bvlT: {
decode: (val: string) => BevelTechnique;
encode: (val: BevelTechnique | undefined) => string;
};
export declare const BESs: {
decode: (val: string) => BevelDirection;
encode: (val: BevelDirection | undefined) => string;
};
export declare const BETE: {
decode: (val: string) => GlowTechnique;
encode: (val: GlowTechnique | undefined) => string;
};
export declare const IGSr: {
decode: (val: string) => GlowSource;
encode: (val: GlowSource | undefined) => string;
};
export declare const GrdT: {
decode: (val: string) => GradientStyle;
encode: (val: GradientStyle | undefined) => string;
};
export declare const animInterpStyleEnum: {
decode: (val: string) => TimelineKeyInterpolation;
encode: (val: TimelineKeyInterpolation | undefined) => string;
};
export declare const stdTrackID: {
decode: (val: string) => TimelineTrackType;
encode: (val: TimelineTrackType | undefined) => string;
};
export declare const gradientInterpolationMethodType: {
decode: (val: string) => InterpolationMethod;
encode: (val: InterpolationMethod | undefined) => string;
};
export declare const ClrS: {
decode: (val: string) => "rgb" | "hsb" | "lab";
encode: (val: "rgb" | "hsb" | "lab" | undefined) => string;
};
export declare const FStl: {
decode: (val: string) => "center" | "inside" | "outside";
encode: (val: "center" | "inside" | "outside" | undefined) => string;
};
export declare const FrFl: {
decode: (val: string) => "color" | "pattern" | "gradient";
encode: (val: "color" | "pattern" | "gradient" | undefined) => string;
};
export declare const ESliceType: {
decode: (val: string) => "image" | "noImage";
encode: (val: "image" | "noImage" | undefined) => string;
};
export declare const ESliceHorzAlign: {
decode: (val: string) => "default";
encode: (val: "default" | undefined) => string;
};
export declare const ESliceVertAlign: {
decode: (val: string) => "default";
encode: (val: "default" | undefined) => string;
};
export declare const ESliceOrigin: {
decode: (val: string) => "userGenerated" | "autoGenerated" | "layer";
encode: (val: "userGenerated" | "autoGenerated" | "layer" | undefined) => string;
};
export declare const ESliceBGColorType: {
decode: (val: string) => "none" | "color" | "matte";
encode: (val: "none" | "color" | "matte" | undefined) => string;
};
export declare const strokeStyleLineCapType: {
decode: (val: string) => LineCapType;
encode: (val: LineCapType | undefined) => string;
};
export declare const strokeStyleLineJoinType: {
decode: (val: string) => LineJoinType;
encode: (val: LineJoinType | undefined) => string;
};
export declare const strokeStyleLineAlignment: {
decode: (val: string) => LineAlignment;
encode: (val: LineAlignment | undefined) => string;
};
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';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function setLogErrors(value: boolean): void;
export declare function readAsciiStringOrClassId(reader: PsdReader): string;
export declare function readDescriptorStructure(reader: PsdReader): any;
export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void;
export declare function readVersionAndDescriptor(reader: PsdReader): any;
export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void;
export declare type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters';
export interface DescriptorUnitsValue {
units: DescriptorUnits;
value: number;
}
export declare type DescriptorColor = {
'Rd ': number;
'Grn ': number;
'Bl ': number;
} | {
'H ': DescriptorUnitsValue;
Strt: number;
Brgh: number;
} | {
'Cyn ': number;
Mgnt: number;
'Ylw ': number;
Blck: number;
} | {
'Gry ': number;
} | {
Lmnc: number;
'A ': number;
'B ': number;
};
export interface DesciptorPattern {
'Nm ': string;
Idnt: string;
}
export declare type DesciptorGradient = {
'Nm ': string;
GrdF: 'GrdF.CstS';
Intr: number;
Clrs: {
'Clr ': DescriptorColor;
Type: 'Clry.UsrS';
Lctn: number;
Mdpn: number;
}[];
Trns: {
Opct: DescriptorUnitsValue;
Lctn: number;
Mdpn: number;
}[];
} | {
GrdF: 'GrdF.ClNs';
Smth: number;
'Nm ': string;
ClrS: string;
RndS: number;
VctC?: boolean;
ShTr?: boolean;
'Mnm ': number[];
'Mxm ': number[];
};
export interface DescriptorColorContent {
'Clr ': DescriptorColor;
}
export interface DescriptorGradientContent {
Grad: DesciptorGradient;
Type: string;
Dthr?: boolean;
Rvrs?: boolean;
Angl?: DescriptorUnitsValue;
'Scl '?: DescriptorUnitsValue;
Algn?: boolean;
Ofst?: {
Hrzn: DescriptorUnitsValue;
Vrtc: DescriptorUnitsValue;
};
}
export interface DescriptorPatternContent {
Ptrn: DesciptorPattern;
Lnkd?: boolean;
phase?: {
Hrzn: number;
Vrtc: number;
};
}
export declare type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent;
export interface StrokeDescriptor {
strokeStyleVersion: number;
strokeEnabled: boolean;
fillEnabled: boolean;
strokeStyleLineWidth: DescriptorUnitsValue;
strokeStyleLineDashOffset: DescriptorUnitsValue;
strokeStyleMiterLimit: number;
strokeStyleLineCapType: string;
strokeStyleLineJoinType: string;
strokeStyleLineAlignment: string;
strokeStyleScaleLock: boolean;
strokeStyleStrokeAdjust: boolean;
strokeStyleLineDashSet: DescriptorUnitsValue[];
strokeStyleBlendMode: string;
strokeStyleOpacity: DescriptorUnitsValue;
strokeStyleContent: DescriptorVectorContent;
strokeStyleResolution: number;
}
export interface TextDescriptor {
'Txt ': string;
textGridding: string;
Ornt: string;
AntA: string;
TextIndex: number;
EngineData?: Uint8Array;
}
export interface WarpDescriptor {
warpStyle: string;
warpValue: number;
warpPerspective: number;
warpPerspectiveOther: number;
warpRotate: string;
bounds?: {
'Top ': DescriptorUnitsValue;
Left: DescriptorUnitsValue;
Btom: DescriptorUnitsValue;
Rght: DescriptorUnitsValue;
};
uOrder: number;
vOrder: number;
customEnvelopeWarp?: {
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface QuiltWarpDescriptor extends WarpDescriptor {
deformNumRows: number;
deformNumCols: number;
customEnvelopeWarp: {
quiltSliceX: {
type: 'quiltSliceX';
values: number[];
}[];
quiltSliceY: {
type: 'quiltSliceY';
values: number[];
}[];
meshPoints: {
type: 'Hrzn' | 'Vrtc';
values: number[];
}[];
};
}
export interface FractionDescriptor {
numerator: number;
denominator: number;
}
export interface HrznVrtcDescriptor {
Hrzn: number;
Vrtc: number;
}
export interface FrameDescriptor {
FrLs: number[];
enab?: boolean;
IMsk?: {
Ofst: HrznVrtcDescriptor;
};
VMsk?: {
Ofst: HrznVrtcDescriptor;
};
Ofst?: HrznVrtcDescriptor;
FXRf?: HrznVrtcDescriptor;
Lefx?: Lfx2Descriptor;
blendOptions?: {
Opct: DescriptorUnitsValue;
};
}
export interface FrameListDescriptor {
LaID: number;
LaSt: FrameDescriptor[];
}
export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): {
x: number;
y: number;
};
export declare function xyToHorzVrtc(xy: {
x: number;
y: number;
}): HrznVrtcDescriptor;
export declare type TimelineAnimKeyDescriptor = {
Type: 'keyType.Opct';
Opct: DescriptorUnitsValue;
} | {
Type: 'keyType.Trnf';
'Scl ': HrznVrtcDescriptor;
Skew: HrznVrtcDescriptor;
rotation: number;
translation: HrznVrtcDescriptor;
} | {
Type: 'keyType.Pstn';
Hrzn: number;
Vrtc: number;
} | {
Type: 'keyType.sheetStyle';
sheetStyle: {
Vrsn: number;
Lefx?: Lfx2Descriptor;
blendOptions: {};
};
} | {
Type: 'keyType.globalLighting';
gblA: number;
globalAltitude: number;
};
export interface TimelineKeyDescriptor {
Vrsn: 1;
animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold';
time: FractionDescriptor;
animKey: TimelineAnimKeyDescriptor;
selected: boolean;
}
export interface TimelineTrackDescriptor {
trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack';
Vrsn: 1;
enab: boolean;
Effc: boolean;
effectParams?: {
keyList: TimelineKeyDescriptor[];
fillCanvas: boolean;
zoomOrigin: number;
};
keyList: TimelineKeyDescriptor[];
}
export interface TimeScopeDescriptor {
Vrsn: 1;
Strt: FractionDescriptor;
duration: FractionDescriptor;
inTime: FractionDescriptor;
outTime: FractionDescriptor;
}
export interface TimelineDescriptor {
Vrsn: 1;
timeScope: TimeScopeDescriptor;
autoScope: boolean;
audioLevel: number;
LyrI: number;
trackList?: TimelineTrackDescriptor[];
}
export interface EffectDescriptor extends Partial<DescriptorGradientContent>, Partial<DescriptorPatternContent> {
enab?: boolean;
Styl: string;
PntT?: string;
'Md '?: string;
Opct?: DescriptorUnitsValue;
'Sz '?: DescriptorUnitsValue;
'Clr '?: DescriptorColor;
present?: boolean;
showInDialog?: boolean;
overprint?: boolean;
}
export interface Lfx2Descriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
DrSh?: EffectDescriptor;
IrSh?: EffectDescriptor;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
SoFi?: EffectDescriptor;
patternFill?: EffectDescriptor;
GrFl?: EffectDescriptor;
ChFX?: EffectDescriptor;
FrFX?: EffectDescriptor;
}
export interface LmfxDescriptor {
'Scl '?: DescriptorUnitsValue;
masterFXSwitch?: boolean;
numModifyingFX?: number;
OrGl?: EffectDescriptor;
IrGl?: EffectDescriptor;
ebbl?: EffectDescriptor;
ChFX?: EffectDescriptor;
dropShadowMulti?: EffectDescriptor[];
innerShadowMulti?: EffectDescriptor[];
solidFillMulti?: EffectDescriptor[];
gradientFillMulti?: EffectDescriptor[];
frameFXMulti?: EffectDescriptor[];
patternFill?: EffectDescriptor;
}
export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor;
export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo;
export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[];
export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[];
export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent;
export declare function serializeVectorContent(content: VectorContent): {
descriptor: DescriptorVectorContent;
key: string;
};
export declare function parseColor(color: DescriptorColor): Color;
export declare function serializeColor(color: Color | undefined): DescriptorColor;
export declare function parseAngle(x: DescriptorUnitsValue): number;
export declare function parsePercent(x: DescriptorUnitsValue | undefined): number;
export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number;
export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue;
export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue;
export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number;
export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue;
export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue;
export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue;
export declare const textGridding: {
decode: (val: string) => TextGridding;
encode: (val: TextGridding | undefined) => string;
};
export declare const Ornt: {
decode: (val: string) => Orientation;
encode: (val: Orientation | undefined) => string;
};
export declare const Annt: {
decode: (val: string) => AntiAlias;
encode: (val: AntiAlias | undefined) => string;
};
export declare const warpStyle: {
decode: (val: string) => WarpStyle;
encode: (val: WarpStyle | undefined) => string;
};
export declare const BlnM: {
decode: (val: string) => BlendMode;
encode: (val: BlendMode | undefined) => string;
};
export declare const BESl: {
decode: (val: string) => BevelStyle;
encode: (val: BevelStyle | undefined) => string;
};
export declare const bvlT: {
decode: (val: string) => BevelTechnique;
encode: (val: BevelTechnique | undefined) => string;
};
export declare const BESs: {
decode: (val: string) => BevelDirection;
encode: (val: BevelDirection | undefined) => string;
};
export declare const BETE: {
decode: (val: string) => GlowTechnique;
encode: (val: GlowTechnique | undefined) => string;
};
export declare const IGSr: {
decode: (val: string) => GlowSource;
encode: (val: GlowSource | undefined) => string;
};
export declare const GrdT: {
decode: (val: string) => GradientStyle;
encode: (val: GradientStyle | undefined) => string;
};
export declare const animInterpStyleEnum: {
decode: (val: string) => TimelineKeyInterpolation;
encode: (val: TimelineKeyInterpolation | undefined) => string;
};
export declare const stdTrackID: {
decode: (val: string) => TimelineTrackType;
encode: (val: TimelineTrackType | undefined) => string;
};
export declare const gradientInterpolationMethodType: {
decode: (val: string) => InterpolationMethod;
encode: (val: InterpolationMethod | undefined) => string;
};
export declare const ClrS: {
decode: (val: string) => "rgb" | "hsb" | "lab";
encode: (val: "rgb" | "hsb" | "lab" | undefined) => string;
};
export declare const FStl: {
decode: (val: string) => "center" | "inside" | "outside";
encode: (val: "center" | "inside" | "outside" | undefined) => string;
};
export declare const FrFl: {
decode: (val: string) => "color" | "pattern" | "gradient";
encode: (val: "color" | "pattern" | "gradient" | undefined) => string;
};
export declare const strokeStyleLineCapType: {
decode: (val: string) => LineCapType;
encode: (val: LineCapType | undefined) => string;
};
export declare const strokeStyleLineJoinType: {
decode: (val: string) => LineJoinType;
encode: (val: LineJoinType | undefined) => string;
};
export declare const strokeStyleLineAlignment: {
decode: (val: string) => LineAlignment;
encode: (val: LineAlignment | undefined) => string;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
import { LayerEffectsInfo } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function readEffects(reader: PsdReader): LayerEffectsInfo;
export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void;
import { LayerEffectsInfo } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export declare function readEffects(reader: PsdReader): LayerEffectsInfo;
export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
export declare function parseEngineData(data: number[] | Uint8Array): any;
export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array;
export declare function parseEngineData(data: number[] | Uint8Array): any;
export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,93 +1,93 @@
import { Layer, BlendMode, LayerColor } from './psd';
export declare const MOCK_HANDLERS = false;
export declare const RAW_IMAGE_DATA = false;
export declare const fromBlendMode: {
[key: string]: string;
};
export declare const toBlendMode: {
[key: string]: BlendMode;
};
export declare const layerColors: LayerColor[];
export declare const largeAdditionalInfoKeys: string[];
export interface Dict {
[key: string]: string;
}
export declare function revMap(map: Dict): Dict;
export declare function createEnum<T>(prefix: string, def: string, map: Dict): {
decode: (val: string) => T;
encode: (val: T | undefined) => string;
};
export declare const enum ColorSpace {
RGB = 0,
HSB = 1,
CMYK = 2,
Lab = 7,
Grayscale = 8
}
export declare const enum LayerMaskFlags {
PositionRelativeToLayer = 1,
LayerMaskDisabled = 2,
InvertLayerMaskWhenBlending = 4,
LayerMaskFromRenderingOtherData = 8,
MaskHasParametersAppliedToIt = 16
}
export declare const enum MaskParams {
UserMaskDensity = 1,
UserMaskFeather = 2,
VectorMaskDensity = 4,
VectorMaskFeather = 8
}
export declare const enum ChannelID {
Color0 = 0,
Color1 = 1,
Color2 = 2,
Color3 = 3,
Transparency = -1,
UserMask = -2,
RealUserMask = -3
}
export declare const enum Compression {
RawData = 0,
RleCompressed = 1,
ZipWithoutPrediction = 2,
ZipWithPrediction = 3
}
export interface ChannelData {
channelId: ChannelID;
compression: Compression;
buffer: Uint8Array | undefined;
length: number;
}
export interface Bounds {
top: number;
left: number;
right: number;
bottom: number;
}
export interface LayerChannelData {
layer: Layer;
channels: ChannelData[];
top: number;
left: number;
right: number;
bottom: number;
mask?: Bounds;
}
export type PixelArray = Uint8ClampedArray | Uint8Array;
export interface PixelData {
data: PixelArray;
width: number;
height: number;
}
export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number;
export declare function clamp(value: number, min: number, max: number): number;
export declare function hasAlpha(data: PixelData): boolean;
export declare function resetImageData({ data }: PixelData): void;
export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void;
export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined;
export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined;
export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array;
export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement;
export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement;
export declare let createImageData: (width: number, height: number) => ImageData;
export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void;
import { Layer, BlendMode, LayerColor } from './psd';
export declare const MOCK_HANDLERS = false;
export declare const RAW_IMAGE_DATA = false;
export declare const fromBlendMode: {
[key: string]: string;
};
export declare const toBlendMode: {
[key: string]: BlendMode;
};
export declare const layerColors: LayerColor[];
export declare const largeAdditionalInfoKeys: string[];
export interface Dict {
[key: string]: string;
}
export declare function revMap(map: Dict): Dict;
export declare function createEnum<T>(prefix: string, def: string, map: Dict): {
decode: (val: string) => T;
encode: (val: T | undefined) => string;
};
export declare const enum ColorSpace {
RGB = 0,
HSB = 1,
CMYK = 2,
Lab = 7,
Grayscale = 8
}
export declare const enum LayerMaskFlags {
PositionRelativeToLayer = 1,
LayerMaskDisabled = 2,
InvertLayerMaskWhenBlending = 4,
LayerMaskFromRenderingOtherData = 8,
MaskHasParametersAppliedToIt = 16
}
export declare const enum MaskParams {
UserMaskDensity = 1,
UserMaskFeather = 2,
VectorMaskDensity = 4,
VectorMaskFeather = 8
}
export declare const enum ChannelID {
Color0 = 0,
Color1 = 1,
Color2 = 2,
Color3 = 3,
Transparency = -1,
UserMask = -2,
RealUserMask = -3
}
export declare const enum Compression {
RawData = 0,
RleCompressed = 1,
ZipWithoutPrediction = 2,
ZipWithPrediction = 3
}
export interface ChannelData {
channelId: ChannelID;
compression: Compression;
buffer: Uint8Array | undefined;
length: number;
}
export interface Bounds {
top: number;
left: number;
right: number;
bottom: number;
}
export interface LayerChannelData {
layer: Layer;
channels: ChannelData[];
top: number;
left: number;
right: number;
bottom: number;
mask?: Bounds;
}
export declare type PixelArray = Uint8ClampedArray | Uint8Array;
export interface PixelData {
data: PixelArray;
width: number;
height: number;
}
export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number;
export declare function clamp(value: number, min: number, max: number): number;
export declare function hasAlpha(data: PixelData): boolean;
export declare function resetImageData({ data }: PixelData): void;
export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void;
export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined;
export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined;
export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array;
export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement;
export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement;
export declare let createImageData: (width: number, height: number) => ImageData;
export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
import { ImageResources, ReadOptions } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ResourceHandler {
key: number;
has: (target: ImageResources) => boolean | number;
read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void;
write: (writer: PsdWriter, target: ImageResources, index: number) => void;
}
export declare const resourceHandlers: ResourceHandler[];
export declare const resourceHandlersMap: {
[key: number]: ResourceHandler;
};
import { ImageResources, ReadOptions } from './psd';
import { PsdReader } from './psdReader';
import { PsdWriter } from './psdWriter';
export interface ResourceHandler {
key: number;
has: (target: ImageResources) => boolean;
read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void;
write: (writer: PsdWriter, target: ImageResources) => void;
}
export declare const resourceHandlers: ResourceHandler[];
export declare const resourceHandlersMap: {
[key: number]: ResourceHandler;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,20 @@
/// <reference types="node" />
import { Psd, ReadOptions, WriteOptions } from './psd';
import { PsdWriter } from './psdWriter';
import { PsdReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export { PsdReader, PsdWriter };
interface BufferLike {
buffer: ArrayBuffer;
byteOffset: number;
byteLength: number;
}
export declare const byteArrayToBase64: typeof fromByteArray;
export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd;
export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer;
export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array;
export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer;
/// <reference types="node" />
import { Psd, ReadOptions, WriteOptions } from './psd';
import { PsdWriter } from './psdWriter';
import { PsdReader } from './psdReader';
export * from './abr';
export * from './csh';
export { initializeCanvas } from './helpers';
export * from './psd';
import { fromByteArray } from 'base64-js';
export { PsdReader, PsdWriter };
interface BufferLike {
buffer: ArrayBuffer;
byteOffset: number;
byteLength: number;
}
export declare const byteArrayToBase64: typeof fromByteArray;
export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd;
export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer;
export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array;
export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer;

View File

@ -1,53 +1,54 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0;
var psdWriter_1 = require("./psdWriter");
var psdReader_1 = require("./psdReader");
__exportStar(require("./abr"), exports);
__exportStar(require("./csh"), exports);
var helpers_1 = require("./helpers");
Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } });
__exportStar(require("./psd"), exports);
var base64_js_1 = require("base64-js");
exports.byteArrayToBase64 = base64_js_1.fromByteArray;
function readPsd(buffer, options) {
var reader = 'buffer' in buffer ?
(0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) :
(0, psdReader_1.createReader)(buffer);
return (0, psdReader_1.readPsd)(reader, options);
}
exports.readPsd = readPsd;
function writePsd(psd, options) {
var writer = (0, psdWriter_1.createWriter)();
(0, psdWriter_1.writePsd)(writer, psd, options);
return (0, psdWriter_1.getWriterBuffer)(writer);
}
exports.writePsd = writePsd;
function writePsdUint8Array(psd, options) {
var writer = (0, psdWriter_1.createWriter)();
(0, psdWriter_1.writePsd)(writer, psd, options);
return (0, psdWriter_1.getWriterBufferNoCopy)(writer);
}
exports.writePsdUint8Array = writePsdUint8Array;
function writePsdBuffer(psd, options) {
if (typeof Buffer === 'undefined') {
throw new Error('Buffer not supported on this platform');
}
return Buffer.from(writePsdUint8Array(psd, options));
}
exports.writePsdBuffer = writePsdBuffer;
//# sourceMappingURL=index.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0;
var psdWriter_1 = require("./psdWriter");
var psdReader_1 = require("./psdReader");
__exportStar(require("./abr"), exports);
__exportStar(require("./csh"), exports);
var helpers_1 = require("./helpers");
Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } });
__exportStar(require("./psd"), exports);
var base64_js_1 = require("base64-js");
exports.byteArrayToBase64 = base64_js_1.fromByteArray;
function readPsd(buffer, options) {
var reader = 'buffer' in buffer ?
(0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) :
(0, psdReader_1.createReader)(buffer);
return (0, psdReader_1.readPsd)(reader, options);
}
exports.readPsd = readPsd;
function writePsd(psd, options) {
var writer = (0, psdWriter_1.createWriter)();
(0, psdWriter_1.writePsd)(writer, psd, options);
return (0, psdWriter_1.getWriterBuffer)(writer);
}
exports.writePsd = writePsd;
function writePsdUint8Array(psd, options) {
var writer = (0, psdWriter_1.createWriter)();
(0, psdWriter_1.writePsd)(writer, psd, options);
return (0, psdWriter_1.getWriterBufferNoCopy)(writer);
}
exports.writePsdUint8Array = writePsdUint8Array;
function writePsdBuffer(psd, options) {
if (typeof Buffer === 'undefined') {
throw new Error('Buffer not supported on this platform');
}
return Buffer.from(writePsdUint8Array(psd, options));
}
exports.writePsdBuffer = writePsdBuffer;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EseUNBQTRIO0FBQzVILHlDQUFrRjtBQUNsRix3Q0FBc0I7QUFDdEIsd0NBQXNCO0FBQ3RCLHFDQUE2QztBQUFwQywyR0FBQSxnQkFBZ0IsT0FBQTtBQUN6Qix3Q0FBc0I7QUFDdEIsdUNBQTBDO0FBUzdCLFFBQUEsaUJBQWlCLEdBQUcseUJBQWEsQ0FBQztBQUUvQyxTQUFnQixPQUFPLENBQUMsTUFBZ0MsRUFBRSxPQUFxQjtJQUM5RSxJQUFNLE1BQU0sR0FBRyxRQUFRLElBQUksTUFBTSxDQUFDLENBQUM7UUFDbEMsSUFBQSx3QkFBWSxFQUFDLE1BQU0sQ0FBQyxN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AO,MAAM,KAAK,WAAW,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACzD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC;AAND,wCAMC"}

View File

@ -1 +1 @@
export declare function initialize(): void;
export declare function initialize(): void;

View File

@ -1,26 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initialize = void 0;
var canvas_1 = require("canvas");
var index_1 = require("./index");
var jpeg_1 = require("./jpeg");
function createCanvasFromData(data) {
var canvas = (0, canvas_1.createCanvas)(100, 100);
try {
var context_1 = canvas.getContext('2d');
var imageData = (0, jpeg_1.decodeJpeg)(data, function (w, h) { return context_1.createImageData(w, h); });
canvas.width = imageData.width;
canvas.height = imageData.height;
context_1.putImageData(imageData, 0, 0);
}
catch (e) {
console.error('JPEG decompression error', e.message);
}
return canvas;
}
(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData);
function initialize() {
(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData);
}
exports.initialize = initialize;
//# sourceMappingURL=initializeCanvas.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initialize = void 0;
var canvas_1 = require("canvas");
var index_1 = require("./index");
var jpeg_1 = require("./jpeg");
function createCanvasFromData(data) {
var canvas = (0, canvas_1.createCanvas)(100, 100);
try {
var context_1 = canvas.getContext('2d');
var imageData = (0, jpeg_1.decodeJpeg)(data, function (w, h) { return context_1.createImageData(w, h); });
canvas.width = imageData.width;
canvas.height = imageData.height;
context_1.putImageData(imageData, 0, 0);
}
catch (e) {
console.error('JPEG decompression error', e.message);
}
return canvas;
}
(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData);
function initialize() {
(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData);
}
exports.initialize = initialize;
//# sourceMappingURL=data:application/json;charset=utf8;base64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WFsaXplKCkge1xyXG5cdGluaXRpYWxpemVDYW52YXMoY3JlYXRlQ2FudmFzLCBjcmVhdGVDYW52YXNGcm9tRGF0YSk7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ==

View File

@ -1 +0,0 @@
{"version":3,"file":"initializeCanvas.js","sourceRoot":"../src/","sources":["initializeCanvas.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AACtC,iCAA2C;AAC3C,+BAAoC;AAEpC,SAAS,oBAAoB,CAAC,IAAgB;IAC7C,IAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAEtC,IAAI;QACH,IAAM,SAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;QACzC,IAAM,SAAS,GAAG,IAAA,iBAAU,EAAC,IAAI,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAO,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAC;QAC5E,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;QAC/B,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;QACjC,SAAO,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;KACtC;IAAC,OAAO,CAAM,EAAE;QAChB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,IAAA,wBAAgB,EAAC,qBAAY,EAAE,oBAAoB,CAAC,CAAC;AAErD,SAAgB,UAAU;IACzB,IAAA,wBAAgB,EAAC,qBAAY,EAAE,oBAAoB,CAAC,CAAC;AACtD,CAAC;AAFD,gCAEC"}

View File

@ -1 +1 @@
export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData;
export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":3,"file":"psd.js","sourceRoot":"../src/","sources":["psd.ts"],"names":[],"mappings":";;;AAMA,IAAkB,SASjB;AATD,WAAkB,SAAS;IAC1B,6CAAU,CAAA;IACV,mDAAa,CAAA;IACb,+CAAW,CAAA;IACX,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,+CAAW,CAAA;IACX,uCAAO,CAAA;AACR,CAAC,EATiB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAS1B;AAED,IAAkB,kBAKjB;AALD,WAAkB,kBAAkB;IACnC,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAChB,+FAA0B,CAAA;AAC3B,CAAC,EALiB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAKnC"}

View File

@ -1,36 +1,36 @@
import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd';
import { PixelData } from './helpers';
export declare const supportedColorModes: ColorMode[];
export interface PsdReader {
offset: number;
view: DataView;
strict: boolean;
debug: boolean;
}
export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader;
export declare function warnOrThrow(reader: PsdReader, message: string): void;
export declare function readUint8(reader: PsdReader): number;
export declare function peekUint8(reader: PsdReader): number;
export declare function readInt16(reader: PsdReader): number;
export declare function readUint16(reader: PsdReader): number;
export declare function readInt32(reader: PsdReader): number;
export declare function readInt32LE(reader: PsdReader): number;
export declare function readUint32(reader: PsdReader): number;
export declare function readFloat32(reader: PsdReader): number;
export declare function readFloat64(reader: PsdReader): number;
export declare function readFixedPoint32(reader: PsdReader): number;
export declare function readFixedPointPath32(reader: PsdReader): number;
export declare function readBytes(reader: PsdReader, length: number): Uint8Array;
export declare function readSignature(reader: PsdReader): string;
export declare function readPascalString(reader: PsdReader, padTo: number): string;
export declare function readUnicodeString(reader: PsdReader): string;
export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string;
export declare function readAsciiString(reader: PsdReader, length: number): string;
export declare function skipBytes(reader: PsdReader, count: number): void;
export declare function checkSignature(reader: PsdReader, a: string, b?: string): void;
export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd;
export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void;
export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void;
export declare function readSection<T>(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined;
export declare function readColor(reader: PsdReader): Color;
export declare function readPattern(reader: PsdReader): PatternInfo;
import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd';
import { PixelData } from './helpers';
export declare const supportedColorModes: ColorMode[];
export interface PsdReader {
offset: number;
view: DataView;
strict: boolean;
debug: boolean;
}
export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader;
export declare function warnOrThrow(reader: PsdReader, message: string): void;
export declare function readUint8(reader: PsdReader): number;
export declare function peekUint8(reader: PsdReader): number;
export declare function readInt16(reader: PsdReader): number;
export declare function readUint16(reader: PsdReader): number;
export declare function readInt32(reader: PsdReader): number;
export declare function readInt32LE(reader: PsdReader): number;
export declare function readUint32(reader: PsdReader): number;
export declare function readFloat32(reader: PsdReader): number;
export declare function readFloat64(reader: PsdReader): number;
export declare function readFixedPoint32(reader: PsdReader): number;
export declare function readFixedPointPath32(reader: PsdReader): number;
export declare function readBytes(reader: PsdReader, length: number): Uint8Array;
export declare function readSignature(reader: PsdReader): string;
export declare function readPascalString(reader: PsdReader, padTo: number): string;
export declare function readUnicodeString(reader: PsdReader): string;
export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string;
export declare function readAsciiString(reader: PsdReader, length: number): string;
export declare function skipBytes(reader: PsdReader, count: number): void;
export declare function checkSignature(reader: PsdReader, a: string, b?: string): void;
export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd;
export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void;
export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void;
export declare function readSection<T>(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined;
export declare function readColor(reader: PsdReader): Color;
export declare function readPattern(reader: PsdReader): PatternInfo;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,27 +1,27 @@
import { Psd, WriteOptions, Color } from './psd';
export interface PsdWriter {
offset: number;
buffer: ArrayBuffer;
view: DataView;
}
export declare function createWriter(size?: number): PsdWriter;
export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer;
export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array;
export declare function writeUint8(writer: PsdWriter, value: number): void;
export declare function writeInt16(writer: PsdWriter, value: number): void;
export declare function writeUint16(writer: PsdWriter, value: number): void;
export declare function writeInt32(writer: PsdWriter, value: number): void;
export declare function writeUint32(writer: PsdWriter, value: number): void;
export declare function writeFloat32(writer: PsdWriter, value: number): void;
export declare function writeFloat64(writer: PsdWriter, value: number): void;
export declare function writeFixedPoint32(writer: PsdWriter, value: number): void;
export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void;
export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void;
export declare function writeZeros(writer: PsdWriter, count: number): void;
export declare function writeSignature(writer: PsdWriter, signature: string): void;
export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void;
export declare function writeUnicodeString(writer: PsdWriter, text: string): void;
export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void;
export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void;
export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void;
export declare function writeColor(writer: PsdWriter, color: Color | undefined): void;
import { Psd, WriteOptions, Color } from './psd';
export interface PsdWriter {
offset: number;
buffer: ArrayBuffer;
view: DataView;
}
export declare function createWriter(size?: number): PsdWriter;
export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer;
export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array;
export declare function writeUint8(writer: PsdWriter, value: number): void;
export declare function writeInt16(writer: PsdWriter, value: number): void;
export declare function writeUint16(writer: PsdWriter, value: number): void;
export declare function writeInt32(writer: PsdWriter, value: number): void;
export declare function writeUint32(writer: PsdWriter, value: number): void;
export declare function writeFloat32(writer: PsdWriter, value: number): void;
export declare function writeFloat64(writer: PsdWriter, value: number): void;
export declare function writeFixedPoint32(writer: PsdWriter, value: number): void;
export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void;
export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void;
export declare function writeZeros(writer: PsdWriter, count: number): void;
export declare function writeSignature(writer: PsdWriter, signature: string): void;
export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void;
export declare function writeUnicodeString(writer: PsdWriter, text: string): void;
export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void;
export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void;
export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void;
export declare function writeColor(writer: PsdWriter, color: Color | undefined): void;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,168 +1,168 @@
import { LayerTextData } from './psd';
interface Adjustments {
Axis: number[];
XY: number[];
}
interface TypeValues {
Type: number;
Values: number[];
}
interface ParagraphProperties {
Justification?: number;
FirstLineIndent?: number;
StartIndent?: number;
EndIndent?: number;
SpaceBefore?: number;
SpaceAfter?: number;
AutoHyphenate?: boolean;
HyphenatedWordSize?: number;
PreHyphen?: number;
PostHyphen?: number;
ConsecutiveHyphens?: number;
Zone?: number;
WordSpacing?: number[];
LetterSpacing?: number[];
GlyphSpacing?: number[];
AutoLeading?: number;
LeadingType?: number;
Hanging?: boolean;
Burasagari?: boolean;
KinsokuOrder?: number;
EveryLineComposer?: boolean;
}
interface ParagraphSheet {
Name?: string;
DefaultStyleSheet: number;
Properties: ParagraphProperties;
}
interface StyleSheetData {
Font?: number;
FontSize?: number;
FauxBold?: boolean;
FauxItalic?: boolean;
AutoLeading?: boolean;
Leading?: number;
HorizontalScale?: number;
VerticalScale?: number;
Tracking?: number;
AutoKerning?: boolean;
Kerning?: number;
BaselineShift?: number;
FontCaps?: number;
FontBaseline?: number;
Underline?: boolean;
Strikethrough?: boolean;
Ligatures?: boolean;
DLigatures?: boolean;
BaselineDirection?: number;
Tsume?: number;
StyleRunAlignment?: number;
Language?: number;
NoBreak?: boolean;
FillColor?: TypeValues;
StrokeColor?: TypeValues;
FillFlag?: boolean;
StrokeFlag?: boolean;
FillFirst?: boolean;
YUnderline?: number;
OutlineWidth?: number;
CharacterDirection?: number;
HindiNumbers?: boolean;
Kashida?: number;
DiacriticPos?: number;
}
interface FontSet {
Name: string;
Script: number;
FontType: number;
Synthetic: number;
}
interface ResourceDict {
KinsokuSet: any[];
MojiKumiSet: any[];
TheNormalStyleSheet: number;
TheNormalParagraphSheet: number;
ParagraphSheetSet: ParagraphSheet[];
StyleSheetSet: {
Name: string;
StyleSheetData: StyleSheetData;
}[];
FontSet: FontSet[];
SuperscriptSize: number;
SuperscriptPosition: number;
SubscriptSize: number;
SubscriptPosition: number;
SmallCapSize: number;
}
interface ParagraphRun {
ParagraphSheet: ParagraphSheet;
Adjustments: Adjustments;
}
interface StyleRun {
StyleSheet: {
StyleSheetData: StyleSheetData;
};
}
interface PhotoshopNode {
ShapeType?: number;
PointBase?: number[];
BoxBounds?: number[];
Base?: {
ShapeType: number;
TransformPoint0: number[];
TransformPoint1: number[];
TransformPoint2: number[];
};
}
interface EngineData {
EngineDict: {
Editor: {
Text: string;
};
ParagraphRun: {
DefaultRunData: ParagraphRun;
RunArray: ParagraphRun[];
RunLengthArray: number[];
IsJoinable: number;
};
StyleRun: {
DefaultRunData: StyleRun;
RunArray: StyleRun[];
RunLengthArray: number[];
IsJoinable: number;
};
GridInfo: {
GridIsOn: boolean;
ShowGrid: boolean;
GridSize: number;
GridLeading: number;
GridColor: TypeValues;
GridLeadingFillColor: TypeValues;
AlignLineHeightToGridFlags: boolean;
};
AntiAlias: number;
UseFractionalGlyphWidths: boolean;
Rendered?: {
Version: number;
Shapes?: {
WritingDirection: number;
Children?: {
ShapeType?: number;
Procession: number;
Lines: {
WritingDirection: number;
Children: any[];
};
Cookie?: {
Photoshop?: PhotoshopNode;
};
}[];
};
};
};
ResourceDict: ResourceDict;
DocumentResources: ResourceDict;
}
export declare function decodeEngineData(engineData: EngineData): LayerTextData;
export declare function encodeEngineData(data: LayerTextData): EngineData;
export {};
import { LayerTextData } from './psd';
interface Adjustments {
Axis: number[];
XY: number[];
}
interface TypeValues {
Type: number;
Values: number[];
}
interface ParagraphProperties {
Justification?: number;
FirstLineIndent?: number;
StartIndent?: number;
EndIndent?: number;
SpaceBefore?: number;
SpaceAfter?: number;
AutoHyphenate?: boolean;
HyphenatedWordSize?: number;
PreHyphen?: number;
PostHyphen?: number;
ConsecutiveHyphens?: number;
Zone?: number;
WordSpacing?: number[];
LetterSpacing?: number[];
GlyphSpacing?: number[];
AutoLeading?: number;
LeadingType?: number;
Hanging?: boolean;
Burasagari?: boolean;
KinsokuOrder?: number;
EveryLineComposer?: boolean;
}
interface ParagraphSheet {
Name?: string;
DefaultStyleSheet: number;
Properties: ParagraphProperties;
}
interface StyleSheetData {
Font?: number;
FontSize?: number;
FauxBold?: boolean;
FauxItalic?: boolean;
AutoLeading?: boolean;
Leading?: number;
HorizontalScale?: number;
VerticalScale?: number;
Tracking?: number;
AutoKerning?: boolean;
Kerning?: number;
BaselineShift?: number;
FontCaps?: number;
FontBaseline?: number;
Underline?: boolean;
Strikethrough?: boolean;
Ligatures?: boolean;
DLigatures?: boolean;
BaselineDirection?: number;
Tsume?: number;
StyleRunAlignment?: number;
Language?: number;
NoBreak?: boolean;
FillColor?: TypeValues;
StrokeColor?: TypeValues;
FillFlag?: boolean;
StrokeFlag?: boolean;
FillFirst?: boolean;
YUnderline?: number;
OutlineWidth?: number;
CharacterDirection?: number;
HindiNumbers?: boolean;
Kashida?: number;
DiacriticPos?: number;
}
interface FontSet {
Name: string;
Script: number;
FontType: number;
Synthetic: number;
}
interface ResourceDict {
KinsokuSet: any[];
MojiKumiSet: any[];
TheNormalStyleSheet: number;
TheNormalParagraphSheet: number;
ParagraphSheetSet: ParagraphSheet[];
StyleSheetSet: {
Name: string;
StyleSheetData: StyleSheetData;
}[];
FontSet: FontSet[];
SuperscriptSize: number;
SuperscriptPosition: number;
SubscriptSize: number;
SubscriptPosition: number;
SmallCapSize: number;
}
interface ParagraphRun {
ParagraphSheet: ParagraphSheet;
Adjustments: Adjustments;
}
interface StyleRun {
StyleSheet: {
StyleSheetData: StyleSheetData;
};
}
interface PhotoshopNode {
ShapeType?: number;
PointBase?: number[];
BoxBounds?: number[];
Base?: {
ShapeType: number;
TransformPoint0: number[];
TransformPoint1: number[];
TransformPoint2: number[];
};
}
interface EngineData {
EngineDict: {
Editor: {
Text: string;
};
ParagraphRun: {
DefaultRunData: ParagraphRun;
RunArray: ParagraphRun[];
RunLengthArray: number[];
IsJoinable: number;
};
StyleRun: {
DefaultRunData: StyleRun;
RunArray: StyleRun[];
RunLengthArray: number[];
IsJoinable: number;
};
GridInfo: {
GridIsOn: boolean;
ShowGrid: boolean;
GridSize: number;
GridLeading: number;
GridColor: TypeValues;
GridLeadingFillColor: TypeValues;
AlignLineHeightToGridFlags: boolean;
};
AntiAlias: number;
UseFractionalGlyphWidths: boolean;
Rendered?: {
Version: number;
Shapes?: {
WritingDirection: number;
Children?: {
ShapeType?: number;
Procession: number;
Lines: {
WritingDirection: number;
Children: any[];
};
Cookie?: {
Photoshop?: PhotoshopNode;
};
}[];
};
};
};
ResourceDict: ResourceDict;
DocumentResources: ResourceDict;
}
export declare function decodeEngineData(engineData: EngineData): LayerTextData;
export declare function encodeEngineData(data: LayerTextData): EngineData;
export {};

Some files were not shown because too many files have changed in this diff Show More