@sealpixel/core 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/assets.d.ts +37 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +96 -0
- package/dist/assets.js.map +1 -0
- package/dist/canonical-json.d.ts +11 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +48 -0
- package/dist/canonical-json.js.map +1 -0
- package/dist/compile.d.ts +30 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +64 -0
- package/dist/compile.js.map +1 -0
- package/dist/embedded.d.ts +13 -0
- package/dist/embedded.d.ts.map +1 -0
- package/dist/embedded.js +145 -0
- package/dist/embedded.js.map +1 -0
- package/dist/errors.d.ts +9 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +19 -0
- package/dist/errors.js.map +1 -0
- package/dist/external-kernel.d.ts +13 -0
- package/dist/external-kernel.d.ts.map +1 -0
- package/dist/external-kernel.js +68 -0
- package/dist/external-kernel.js.map +1 -0
- package/dist/generated/geometry.d.ts +33 -0
- package/dist/generated/geometry.d.ts.map +1 -0
- package/dist/generated/geometry.js +3 -0
- package/dist/generated/geometry.js.map +1 -0
- package/dist/generated/output.d.ts +40 -0
- package/dist/generated/output.d.ts.map +1 -0
- package/dist/generated/output.js +3 -0
- package/dist/generated/output.js.map +1 -0
- package/dist/generated/plan.d.ts +292 -0
- package/dist/generated/plan.d.ts.map +1 -0
- package/dist/generated/plan.js +3 -0
- package/dist/generated/plan.js.map +1 -0
- package/dist/history.d.ts +16 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +38 -0
- package/dist/history.js.map +1 -0
- package/dist/image-size.d.ts +12 -0
- package/dist/image-size.d.ts.map +1 -0
- package/dist/image-size.js +86 -0
- package/dist/image-size.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/inline-renderer.d.ts +28 -0
- package/dist/inline-renderer.d.ts.map +1 -0
- package/dist/inline-renderer.js +48 -0
- package/dist/inline-renderer.js.map +1 -0
- package/dist/options.d.ts +13 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +35 -0
- package/dist/options.js.map +1 -0
- package/dist/plan.d.ts +16 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +15 -0
- package/dist/plan.js.map +1 -0
- package/dist/plugin.d.ts +200 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +2 -0
- package/dist/plugin.js.map +1 -0
- package/dist/registry.d.ts +58 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +187 -0
- package/dist/registry.js.map +1 -0
- package/dist/render.d.ts +25 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +164 -0
- package/dist/render.js.map +1 -0
- package/dist/renderer-core.d.ts +82 -0
- package/dist/renderer-core.d.ts.map +1 -0
- package/dist/renderer-core.js +228 -0
- package/dist/renderer-core.js.map +1 -0
- package/dist/renderer.d.ts +29 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/renderer.js +2 -0
- package/dist/renderer.js.map +1 -0
- package/dist/session.d.ts +188 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +513 -0
- package/dist/session.js.map +1 -0
- package/dist/types.d.ts +114 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/worker-protocol.d.ts +100 -0
- package/dist/worker-protocol.d.ts.map +1 -0
- package/dist/worker-protocol.js +30 -0
- package/dist/worker-protocol.js.map +1 -0
- package/dist/worker-renderer.d.ts +35 -0
- package/dist/worker-renderer.d.ts.map +1 -0
- package/dist/worker-renderer.js +85 -0
- package/dist/worker-renderer.js.map +1 -0
- package/dist/worker.d.ts +23 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +81 -0
- package/dist/worker.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type Geometry = {
|
|
2
|
+
stages: Array<StageGeometry>;
|
|
3
|
+
logicalOut: Size;
|
|
4
|
+
actualOut: Size;
|
|
5
|
+
/**
|
|
6
|
+
* `actual_in.width / logical_in.width` of the source: the proxy factor.
|
|
7
|
+
*/
|
|
8
|
+
scale: number;
|
|
9
|
+
};
|
|
10
|
+
export type Size = {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Geometry of one stage in both coordinate systems.
|
|
16
|
+
*/
|
|
17
|
+
export type StageGeometry = {
|
|
18
|
+
name: string;
|
|
19
|
+
logicalIn: Size;
|
|
20
|
+
logicalOut: Size;
|
|
21
|
+
actualIn: Size;
|
|
22
|
+
actualOut: Size;
|
|
23
|
+
/**
|
|
24
|
+
* Crop only: maps actual output pixel coordinates to actual input pixel
|
|
25
|
+
* coordinates (inverse mapping, what the sampler needs).
|
|
26
|
+
*/
|
|
27
|
+
transform?: [number, number, number, number, number, number];
|
|
28
|
+
/**
|
|
29
|
+
* Resize with `cover`: the source rectangle (actual px) that is scaled to the output.
|
|
30
|
+
*/
|
|
31
|
+
cropRect?: [number, number, number, number];
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/generated/geometry.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG;IAAE,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IACzF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CAAE,CAAC;AAEjB,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IAC/G;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7D;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../src/generated/geometry.ts"],"names":[],"mappings":"AAAA,kFAAkF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JPEG chroma subsampling.
|
|
3
|
+
*/
|
|
4
|
+
export type ChromaSubsampling = "4:2:0" | "4:4:4";
|
|
5
|
+
/**
|
|
6
|
+
* Output container format.
|
|
7
|
+
*/
|
|
8
|
+
export type Format = "png" | "jpeg" | "webp";
|
|
9
|
+
/**
|
|
10
|
+
* Encoder parameters. Mirrors `RenderOptions.output` on the TypeScript side.
|
|
11
|
+
*/
|
|
12
|
+
export type OutputOptions = {
|
|
13
|
+
format: Format;
|
|
14
|
+
/**
|
|
15
|
+
* 0.0..=1.0, lossy formats only. Ignored by PNG and lossless WebP.
|
|
16
|
+
*/
|
|
17
|
+
quality?: number;
|
|
18
|
+
/**
|
|
19
|
+
* JPEG only.
|
|
20
|
+
*/
|
|
21
|
+
progressive?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* JPEG only.
|
|
24
|
+
*/
|
|
25
|
+
chromaSubsampling?: ChromaSubsampling;
|
|
26
|
+
/**
|
|
27
|
+
* WebP only. V1 always encodes lossless; `false` is accepted and treated as lossless.
|
|
28
|
+
*/
|
|
29
|
+
lossless?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Opaque colour alpha is flattened onto for formats without alpha (JPEG).
|
|
32
|
+
*/
|
|
33
|
+
background?: [number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* UTF-8 text stored in the container's metadata (PNG iTXt, JPEG XMP,
|
|
36
|
+
* WebP XMP). Sealpixel stores the canonical edit log here. Pixels are unaffected.
|
|
37
|
+
*/
|
|
38
|
+
embed?: string;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/generated/output.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/generated/output.ts"],"names":[],"mappings":"AAAA,kFAAkF"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
export type Anchor = "tl" | "tc" | "tr" | "cl" | "c" | "cr" | "bl" | "bc" | "br";
|
|
2
|
+
/**
|
|
3
|
+
* Draws shapes and text over the image in image space.
|
|
4
|
+
*/
|
|
5
|
+
export type AnnotateStage = {
|
|
6
|
+
shapes?: Array<Shape>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Colour adjustments. All parameters are identity at their defaults.
|
|
10
|
+
*/
|
|
11
|
+
export type ColorStage = {
|
|
12
|
+
brightness?: number;
|
|
13
|
+
contrast?: number;
|
|
14
|
+
saturation?: number;
|
|
15
|
+
exposure?: number;
|
|
16
|
+
gamma?: number;
|
|
17
|
+
clarity?: number;
|
|
18
|
+
vignette?: number;
|
|
19
|
+
/**
|
|
20
|
+
* 4x5 colour matrix (rows r, g, b, a; columns r, g, b, a, offset). Identity when absent.
|
|
21
|
+
*/
|
|
22
|
+
matrix?: [[number, number, number, number, number], [number, number, number, number, number], [number, number, number, number, number], [number, number, number, number, number]];
|
|
23
|
+
/**
|
|
24
|
+
* Blend between identity (0) and the matrix (1).
|
|
25
|
+
*/
|
|
26
|
+
strength?: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Shape that keeps its interior; everything outside becomes transparent.
|
|
30
|
+
*/
|
|
31
|
+
export type CropMask = "circle";
|
|
32
|
+
/**
|
|
33
|
+
* Flip, rotate about the centre, then crop a rectangle of the rotated bounding box.
|
|
34
|
+
*/
|
|
35
|
+
export type CropStage = {
|
|
36
|
+
/**
|
|
37
|
+
* Radians, clockwise positive in image space (y down).
|
|
38
|
+
*/
|
|
39
|
+
rotation?: number;
|
|
40
|
+
flipX?: boolean;
|
|
41
|
+
flipY?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* In rotated-bounding-box space, 0..1.
|
|
44
|
+
*/
|
|
45
|
+
rect?: Rect;
|
|
46
|
+
/**
|
|
47
|
+
* Colour for areas outside the source. Transparent when absent.
|
|
48
|
+
*/
|
|
49
|
+
fill?: [number, number, number, number];
|
|
50
|
+
/**
|
|
51
|
+
* Alpha mask applied to the crop output, for round avatars. Absent = none.
|
|
52
|
+
*/
|
|
53
|
+
mask?: CropMask;
|
|
54
|
+
};
|
|
55
|
+
export type Fit = "contain" | "cover" | "fill";
|
|
56
|
+
export type FrameKind = "solid" | "inset" | "polaroid";
|
|
57
|
+
/**
|
|
58
|
+
* Draws a frame inside the image bounds. Dimensions do not change.
|
|
59
|
+
*/
|
|
60
|
+
export type FrameStage = {
|
|
61
|
+
/**
|
|
62
|
+
* Named `style` because `kind` is the stage discriminator.
|
|
63
|
+
*/
|
|
64
|
+
style: FrameKind;
|
|
65
|
+
color: [number, number, number, number];
|
|
66
|
+
/**
|
|
67
|
+
* Logical pixels.
|
|
68
|
+
*/
|
|
69
|
+
thickness: number;
|
|
70
|
+
/**
|
|
71
|
+
* Corner radius of the inner edge, logical pixels.
|
|
72
|
+
*/
|
|
73
|
+
radius?: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Normalised rectangle, 0..1 in the space named by the stage.
|
|
77
|
+
*/
|
|
78
|
+
export type Rect = {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
width: number;
|
|
82
|
+
height: number;
|
|
83
|
+
};
|
|
84
|
+
export type RedactMode = "pixelate" | "blur";
|
|
85
|
+
/**
|
|
86
|
+
* Pixelate or blur regions. Coordinates are in the stage input's image space.
|
|
87
|
+
*/
|
|
88
|
+
export type RedactStage = {
|
|
89
|
+
regions?: Array<Redaction>;
|
|
90
|
+
};
|
|
91
|
+
export type Redaction = {
|
|
92
|
+
region: Region;
|
|
93
|
+
mode: RedactMode;
|
|
94
|
+
/**
|
|
95
|
+
* Pixelate cell size or blur diameter, in logical source pixels.
|
|
96
|
+
*/
|
|
97
|
+
amount: number;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* A region in normalised image space.
|
|
101
|
+
*/
|
|
102
|
+
export type Region = {
|
|
103
|
+
"kind": "rect";
|
|
104
|
+
rect: Rect;
|
|
105
|
+
} | {
|
|
106
|
+
"kind": "path";
|
|
107
|
+
points: Array<[number, number]>;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The flat, versioned plan the executor runs. This is not the edit log: the
|
|
111
|
+
* TypeScript `compile()` reduces the log to this structure.
|
|
112
|
+
*/
|
|
113
|
+
export type RenderPlan = {
|
|
114
|
+
version: number;
|
|
115
|
+
source: SourceInfo;
|
|
116
|
+
/**
|
|
117
|
+
* 1.0 for a truth render, below 1.0 when the buffer is a proxy.
|
|
118
|
+
*/
|
|
119
|
+
proxyScale: number;
|
|
120
|
+
stages?: Array<Stage>;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Scale to a target size in logical output pixels.
|
|
124
|
+
*/
|
|
125
|
+
export type ResizeStage = {
|
|
126
|
+
width?: number;
|
|
127
|
+
height?: number;
|
|
128
|
+
fit?: Fit;
|
|
129
|
+
upscale?: boolean;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* A vector shape in normalised image space. Lengths are logical source pixels.
|
|
133
|
+
*/
|
|
134
|
+
export type Shape = {
|
|
135
|
+
"kind": "rect";
|
|
136
|
+
rect: Rect;
|
|
137
|
+
stroke?: Stroke;
|
|
138
|
+
fill?: [number, number, number, number];
|
|
139
|
+
/**
|
|
140
|
+
* Corner radius in logical pixels.
|
|
141
|
+
*/
|
|
142
|
+
radius?: number;
|
|
143
|
+
} | {
|
|
144
|
+
"kind": "ellipse";
|
|
145
|
+
rect: Rect;
|
|
146
|
+
stroke?: Stroke;
|
|
147
|
+
fill?: [number, number, number, number];
|
|
148
|
+
} | {
|
|
149
|
+
"kind": "line";
|
|
150
|
+
from: [number, number];
|
|
151
|
+
to: [number, number];
|
|
152
|
+
stroke: Stroke;
|
|
153
|
+
} | {
|
|
154
|
+
"kind": "arrow";
|
|
155
|
+
from: [number, number];
|
|
156
|
+
to: [number, number];
|
|
157
|
+
stroke: Stroke;
|
|
158
|
+
/**
|
|
159
|
+
* Head length in logical pixels; defaults to four stroke widths.
|
|
160
|
+
*/
|
|
161
|
+
head?: number;
|
|
162
|
+
} | {
|
|
163
|
+
"kind": "path";
|
|
164
|
+
points: Array<[number, number]>;
|
|
165
|
+
stroke: Stroke;
|
|
166
|
+
closed?: boolean;
|
|
167
|
+
fill?: [number, number, number, number];
|
|
168
|
+
} | {
|
|
169
|
+
"kind": "text";
|
|
170
|
+
/**
|
|
171
|
+
* Top-left anchor and wrap width. Height is advisory for the UI.
|
|
172
|
+
*/
|
|
173
|
+
rect: Rect;
|
|
174
|
+
text: string;
|
|
175
|
+
/**
|
|
176
|
+
* Asset id of a TrueType or OpenType font.
|
|
177
|
+
*/
|
|
178
|
+
font: string;
|
|
179
|
+
/**
|
|
180
|
+
* Font size in logical pixels.
|
|
181
|
+
*/
|
|
182
|
+
size: number;
|
|
183
|
+
color: [number, number, number, number];
|
|
184
|
+
align?: TextAlign;
|
|
185
|
+
/**
|
|
186
|
+
* Multiplier of the font size.
|
|
187
|
+
*/
|
|
188
|
+
lineHeight?: number;
|
|
189
|
+
background?: [number, number, number, number];
|
|
190
|
+
/**
|
|
191
|
+
* Background padding in logical pixels.
|
|
192
|
+
*/
|
|
193
|
+
padding?: number;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Logical (full-resolution) dimensions of the source image after EXIF
|
|
197
|
+
* orientation. The buffer handed to the executor may be a smaller proxy.
|
|
198
|
+
*/
|
|
199
|
+
export type SourceInfo = {
|
|
200
|
+
width: number;
|
|
201
|
+
height: number;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* One stage of the fixed-order pipeline. An absent stage is the identity.
|
|
205
|
+
* Order is enforced by the TypeScript compiler, not by the executor.
|
|
206
|
+
*/
|
|
207
|
+
export type Stage = {
|
|
208
|
+
"kind": "color";
|
|
209
|
+
} & ColorStage | {
|
|
210
|
+
"kind": "redact";
|
|
211
|
+
} & RedactStage | {
|
|
212
|
+
"kind": "annotate";
|
|
213
|
+
} & AnnotateStage | {
|
|
214
|
+
"kind": "crop";
|
|
215
|
+
} & CropStage | {
|
|
216
|
+
"kind": "sticker";
|
|
217
|
+
} & StickerStage | {
|
|
218
|
+
"kind": "frame";
|
|
219
|
+
} & FrameStage | {
|
|
220
|
+
"kind": "watermark";
|
|
221
|
+
} & WatermarkStage | {
|
|
222
|
+
"kind": "resize";
|
|
223
|
+
} & ResizeStage;
|
|
224
|
+
/**
|
|
225
|
+
* An image asset placed in crop space.
|
|
226
|
+
*/
|
|
227
|
+
export type Sticker = {
|
|
228
|
+
/**
|
|
229
|
+
* Asset id of a PNG, JPEG or WebP.
|
|
230
|
+
*/
|
|
231
|
+
asset: string;
|
|
232
|
+
/**
|
|
233
|
+
* Placement in crop space, 0..1.
|
|
234
|
+
*/
|
|
235
|
+
rect: Rect;
|
|
236
|
+
/**
|
|
237
|
+
* Radians, clockwise, about the rect centre.
|
|
238
|
+
*/
|
|
239
|
+
rotation?: number;
|
|
240
|
+
opacity?: number;
|
|
241
|
+
flipX?: boolean;
|
|
242
|
+
flipY?: boolean;
|
|
243
|
+
};
|
|
244
|
+
export type StickerStage = {
|
|
245
|
+
items?: Array<Sticker>;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Stroke style. Width is in logical source pixels.
|
|
249
|
+
*/
|
|
250
|
+
export type Stroke = {
|
|
251
|
+
color: [number, number, number, number];
|
|
252
|
+
width: number;
|
|
253
|
+
};
|
|
254
|
+
export type TextAlign = "left" | "center" | "right";
|
|
255
|
+
export type Tile = {
|
|
256
|
+
/**
|
|
257
|
+
* Gaps between tiles, logical pixels.
|
|
258
|
+
*/
|
|
259
|
+
gapX: number;
|
|
260
|
+
gapY: number;
|
|
261
|
+
/**
|
|
262
|
+
* Radians, applied to every tile about its centre.
|
|
263
|
+
*/
|
|
264
|
+
rotation?: number;
|
|
265
|
+
};
|
|
266
|
+
export type WatermarkSource = {
|
|
267
|
+
"kind": "asset";
|
|
268
|
+
asset: string;
|
|
269
|
+
} | {
|
|
270
|
+
"kind": "text";
|
|
271
|
+
text: string;
|
|
272
|
+
font: string;
|
|
273
|
+
color: [number, number, number, number];
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* One stamp (image or text) at an anchor, or tiled across the image.
|
|
277
|
+
*/
|
|
278
|
+
export type WatermarkStage = {
|
|
279
|
+
source: WatermarkSource;
|
|
280
|
+
anchor?: Anchor;
|
|
281
|
+
/**
|
|
282
|
+
* Distance from the edges, logical pixels.
|
|
283
|
+
*/
|
|
284
|
+
margin?: number;
|
|
285
|
+
/**
|
|
286
|
+
* Stamp width as a fraction of the image width (text: font size as a fraction).
|
|
287
|
+
*/
|
|
288
|
+
scale?: number;
|
|
289
|
+
opacity?: number;
|
|
290
|
+
tile?: Tile;
|
|
291
|
+
};
|
|
292
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/generated/plan.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CAAE,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC/J;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EA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AAC;AAEvD;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE,CAAC;AAEjF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,MAAM,IAAI,GAAG;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAAE,CAAC;AAErB,MAAM,MAAM,eAAe,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAAE,CAAC;AAE7J;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACxE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/generated/plan.ts"],"names":[],"mappings":"AAAA,kFAAkF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EditLog, History, Operation } from './types.js';
|
|
2
|
+
export declare function createHistory(log: EditLog, index?: number): History;
|
|
3
|
+
/** The log as of the current position: `ops[0..index)`. */
|
|
4
|
+
export declare function current(history: History): EditLog;
|
|
5
|
+
/**
|
|
6
|
+
* Appends `op` at the current position, discarding any redo tail. An op whose
|
|
7
|
+
* id already exists anywhere in the log is ignored, which makes retried
|
|
8
|
+
* dispatches idempotent.
|
|
9
|
+
*/
|
|
10
|
+
export declare function dispatch(history: History, op: Operation): History;
|
|
11
|
+
export declare function canUndo(history: History): boolean;
|
|
12
|
+
export declare function canRedo(history: History): boolean;
|
|
13
|
+
export declare function undo(history: History): History;
|
|
14
|
+
export declare function redo(history: History): History;
|
|
15
|
+
export declare function timeTravel(history: History, index: number): History;
|
|
16
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE9D,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,GAAE,MAAuB,GAAG,OAAO,CAEnF;AAED,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAKjE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE9C;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE9C;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEnE"}
|
package/dist/history.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function createHistory(log, index = log.ops.length) {
|
|
2
|
+
return { log, index: clampIndex(index, log) };
|
|
3
|
+
}
|
|
4
|
+
/** The log as of the current position: `ops[0..index)`. */
|
|
5
|
+
export function current(history) {
|
|
6
|
+
return { ...history.log, ops: history.log.ops.slice(0, history.index) };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Appends `op` at the current position, discarding any redo tail. An op whose
|
|
10
|
+
* id already exists anywhere in the log is ignored, which makes retried
|
|
11
|
+
* dispatches idempotent.
|
|
12
|
+
*/
|
|
13
|
+
export function dispatch(history, op) {
|
|
14
|
+
const { log, index } = history;
|
|
15
|
+
if (log.ops.some((existing) => existing.id === op.id))
|
|
16
|
+
return history;
|
|
17
|
+
const ops = [...log.ops.slice(0, index), op];
|
|
18
|
+
return { log: { ...log, ops }, index: ops.length };
|
|
19
|
+
}
|
|
20
|
+
export function canUndo(history) {
|
|
21
|
+
return history.index > 0;
|
|
22
|
+
}
|
|
23
|
+
export function canRedo(history) {
|
|
24
|
+
return history.index < history.log.ops.length;
|
|
25
|
+
}
|
|
26
|
+
export function undo(history) {
|
|
27
|
+
return canUndo(history) ? { ...history, index: history.index - 1 } : history;
|
|
28
|
+
}
|
|
29
|
+
export function redo(history) {
|
|
30
|
+
return canRedo(history) ? { ...history, index: history.index + 1 } : history;
|
|
31
|
+
}
|
|
32
|
+
export function timeTravel(history, index) {
|
|
33
|
+
return { ...history, index: clampIndex(index, history.log) };
|
|
34
|
+
}
|
|
35
|
+
function clampIndex(index, log) {
|
|
36
|
+
return Math.max(0, Math.min(Math.floor(index), log.ops.length));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,GAAY,EAAE,QAAgB,GAAG,CAAC,GAAG,CAAC,MAAM;IACx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EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAgB;IACnC,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,KAAa;IACxD,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,GAAY;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ImageSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
mimeType: 'image/png' | 'image/jpeg' | 'image/webp';
|
|
5
|
+
}
|
|
6
|
+
export declare function readImageSize(bytes: Uint8Array): ImageSize;
|
|
7
|
+
/**
|
|
8
|
+
* Peak memory a server render needs: four RGBA buffers of the image plus the
|
|
9
|
+
* runtime. Lambda sizes: 12 MP needs 1024 MB, 24 MP 1769 MB, 50 MP 3008 MB.
|
|
10
|
+
*/
|
|
11
|
+
export declare function estimateMemoryMB(width: number, height: number): number;
|
|
12
|
+
//# sourceMappingURL=image-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-size.d.ts","sourceRoot":"","sources":["../src/image-size.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC;CACrD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAsE1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads width, height and container from the first bytes of a PNG, JPEG or
|
|
3
|
+
* WebP without decoding pixels. Used to enforce size limits before decoding.
|
|
4
|
+
* EXIF orientation is not applied; callers only need the pixel count.
|
|
5
|
+
*/
|
|
6
|
+
import { SealpixelError } from './errors.js';
|
|
7
|
+
export function readImageSize(bytes) {
|
|
8
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
9
|
+
if (bytes.length >= 24 &&
|
|
10
|
+
bytes[0] === 0x89 &&
|
|
11
|
+
bytes[1] === 0x50 &&
|
|
12
|
+
bytes[2] === 0x4e &&
|
|
13
|
+
bytes[3] === 0x47) {
|
|
14
|
+
return { width: view.getUint32(16), height: view.getUint32(20), mimeType: 'image/png' };
|
|
15
|
+
}
|
|
16
|
+
if (bytes.length >= 4 && bytes[0] === 0xff && bytes[1] === 0xd8) {
|
|
17
|
+
let pos = 2;
|
|
18
|
+
while (pos + 9 < bytes.length) {
|
|
19
|
+
if (bytes[pos] !== 0xff) {
|
|
20
|
+
pos++;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const marker = bytes[pos + 1];
|
|
24
|
+
if (marker === 0xd8 ||
|
|
25
|
+
(marker >= 0xd0 && marker <= 0xd7) ||
|
|
26
|
+
marker === 0x01 ||
|
|
27
|
+
marker === 0xff) {
|
|
28
|
+
pos += marker === 0xff ? 1 : 2;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const len = view.getUint16(pos + 2);
|
|
32
|
+
const isSof = marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc;
|
|
33
|
+
if (isSof) {
|
|
34
|
+
return {
|
|
35
|
+
height: view.getUint16(pos + 5),
|
|
36
|
+
width: view.getUint16(pos + 7),
|
|
37
|
+
mimeType: 'image/jpeg',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (marker === 0xd9 || marker === 0xda)
|
|
41
|
+
break;
|
|
42
|
+
pos += 2 + len;
|
|
43
|
+
}
|
|
44
|
+
throw new SealpixelError('DECODE_FAILED', 'JPEG has no frame header');
|
|
45
|
+
}
|
|
46
|
+
if (bytes.length >= 30 && ascii(bytes, 0, 4) === 'RIFF' && ascii(bytes, 8, 12) === 'WEBP') {
|
|
47
|
+
const chunk = ascii(bytes, 12, 16);
|
|
48
|
+
if (chunk === 'VP8 ') {
|
|
49
|
+
return {
|
|
50
|
+
width: view.getUint16(26, true) & 0x3fff,
|
|
51
|
+
height: view.getUint16(28, true) & 0x3fff,
|
|
52
|
+
mimeType: 'image/webp',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (chunk === 'VP8L') {
|
|
56
|
+
const b0 = bytes[21];
|
|
57
|
+
const b1 = bytes[22];
|
|
58
|
+
const b2 = bytes[23];
|
|
59
|
+
const b3 = bytes[24];
|
|
60
|
+
const width = 1 + (((b1 & 0x3f) << 8) | b0);
|
|
61
|
+
const height = 1 + (((b3 & 0x0f) << 10) | (b2 << 2) | ((b1 & 0xc0) >> 6));
|
|
62
|
+
return { width, height, mimeType: 'image/webp' };
|
|
63
|
+
}
|
|
64
|
+
if (chunk === 'VP8X') {
|
|
65
|
+
const width = 1 + (bytes[24] | (bytes[25] << 8) | (bytes[26] << 16));
|
|
66
|
+
const height = 1 + (bytes[27] | (bytes[28] << 8) | (bytes[29] << 16));
|
|
67
|
+
return { width, height, mimeType: 'image/webp' };
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
throw new SealpixelError('UNSUPPORTED_FORMAT', 'unknown container');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Peak memory a server render needs: four RGBA buffers of the image plus the
|
|
74
|
+
* runtime. Lambda sizes: 12 MP needs 1024 MB, 24 MP 1769 MB, 50 MP 3008 MB.
|
|
75
|
+
*/
|
|
76
|
+
export function estimateMemoryMB(width, height) {
|
|
77
|
+
const megapixels = (width * height) / 1e6;
|
|
78
|
+
return Math.ceil(megapixels * 4 * 4 + 256);
|
|
79
|
+
}
|
|
80
|
+
function ascii(bytes, start, end) {
|
|
81
|
+
let s = '';
|
|
82
|
+
for (let i = start; i < end; i++)
|
|
83
|
+
s += String.fromCharCode(bytes[i]);
|
|
84
|
+
return s;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=image-size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-size.js","sourceRoot":"","sources":["../src/image-size.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ7C,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC5E,IACE,KAAK,CAAC,MAAM,IAAI,EAAE;QAClB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EACjB,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAC1F,CAAC;IACD,IAAI,KAAK,C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ResolverOptions, createAssetResolver, missingAssetId, staticAssetResolver, wasmSha256, webCryptoSha256, withAssets, } from './assets.js';
|
|
2
|
+
export { canonicalJson } from './canonical-json.js';
|
|
3
|
+
export { compile, type PipelineStage, toCoreStages, toPipeline } from './compile.js';
|
|
4
|
+
export { PNG_KEYWORD, readEmbeddedEditLog, readEmbeddedState } from './embedded.js';
|
|
5
|
+
export { SealpixelError, type SealpixelErrorCode } from './errors.js';
|
|
6
|
+
export { resetExternalKernels, runExternalKernel } from './external-kernel.js';
|
|
7
|
+
export { canRedo, canUndo, createHistory, current, dispatch, redo, timeTravel, undo, } from './history.js';
|
|
8
|
+
export { estimateMemoryMB, type ImageSize, readImageSize } from './image-size.js';
|
|
9
|
+
export { InlineRenderer } from './inline-renderer.js';
|
|
10
|
+
export { configurePlugins, type PluginOptionsMap, pluginOptionsOf } from './options.js';
|
|
11
|
+
export { type ChromaSubsampling, type ColorStage, type CoreFormat, type CoreOutputOptions, type CropStage, type Fit, type Geometry, PLAN_VERSION, type PlanRect, type RenderPlan, type ResizeStage, type Size, type SourceInfo, type Stage, type StageGeometry, toRenderPlan, } from './plan.js';
|
|
12
|
+
export type * from './plugin.js';
|
|
13
|
+
export { createRegistry, type ParseIssue, type ParseOptions, type ParseResult, type RegisteredOperation, type Registry, } from './registry.js';
|
|
14
|
+
export { type PipelineOptions, render, runPipeline, toCoreOutput } from './render.js';
|
|
15
|
+
export type { Renderer } from './renderer.js';
|
|
16
|
+
export { type ExportRequest, type ExportResult, type LoadedSource, RendererCore, type RendererCoreOptions, type RenderRequest, } from './renderer-core.js';
|
|
17
|
+
export { browserSaveFile, createEditorSession, type DownloadOptions, type EditorSession, type ExportOptions, type LoadOptions, type LoadSource, type PreviewState, type ServerRenderOptions, type ServerRenderResult, type SessionOptions, type SessionState, } from './session.js';
|
|
18
|
+
export type * from './types.js';
|
|
19
|
+
export { type Transport, transferablesOf, type WorkerRequest, type WorkerResponse, webTransport, } from './worker-protocol.js';
|
|
20
|
+
export { WorkerRenderer } from './worker-renderer.js';
|
|
21
|
+
import type { EditLog, SourceDescriptor } from './types.js';
|
|
22
|
+
/** Creates an empty edit log for `source`, recording the registered plugin versions. */
|
|
23
|
+
export declare function createEditLog(source: SourceDescriptor, registry?: import('./registry.js').Registry): EditLog;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EACL,OAAO,EACP,OAAO,EACP,aAAa,EACb,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,iBAAi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AAgB,EACxB,QAAQ,CAAC,EAAE,OAAO,eAAe,EAAE,QAAQ,GAC1C,OAAO,CAET"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { createAssetResolver, missingAssetId, staticAssetResolver, wasmSha256, webCryptoSha256, withAssets, } from './assets.js';
|
|
2
|
+
export { canonicalJson } from './canonical-json.js';
|
|
3
|
+
export { compile, toCoreStages, toPipeline } from './compile.js';
|
|
4
|
+
export { PNG_KEYWORD, readEmbeddedEditLog, readEmbeddedState } from './embedded.js';
|
|
5
|
+
export { SealpixelError } from './errors.js';
|
|
6
|
+
export { resetExternalKernels, runExternalKernel } from './external-kernel.js';
|
|
7
|
+
export { canRedo, canUndo, createHistory, current, dispatch, redo, timeTravel, undo, } from './history.js';
|
|
8
|
+
export { estimateMemoryMB, readImageSize } from './image-size.js';
|
|
9
|
+
export { InlineRenderer } from './inline-renderer.js';
|
|
10
|
+
export { configurePlugins, pluginOptionsOf } from './options.js';
|
|
11
|
+
export { PLAN_VERSION, toRenderPlan, } from './plan.js';
|
|
12
|
+
export { createRegistry, } from './registry.js';
|
|
13
|
+
export { render, runPipeline, toCoreOutput } from './render.js';
|
|
14
|
+
export { RendererCore, } from './renderer-core.js';
|
|
15
|
+
export { browserSaveFile, createEditorSession, } from './session.js';
|
|
16
|
+
export { transferablesOf, webTransport, } from './worker-protocol.js';
|
|
17
|
+
export { WorkerRenderer } from './worker-renderer.js';
|
|
18
|
+
/** Creates an empty edit log for `source`, recording the registered plugin versions. */
|
|
19
|
+
export function createEditLog(source, registry) {
|
|
20
|
+
return { version: 1, source, plugins: registry?.pluginVersions() ?? {}, ops: [] };
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,UA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