@pixerate/editor 0.279.0 → 0.280.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/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/{chunk-MITQGHN3.cjs → chunk-4BMRQSPB.cjs} +15 -1
- package/dist/{chunk-DWPFGWW5.js → chunk-FKO3CY2C.js} +1 -1
- package/dist/{chunk-N4MCWQZ7.js → chunk-HN57I7KT.js} +1 -1
- package/dist/{chunk-4NZTK7LM.cjs → chunk-K4ANWBF7.cjs} +35 -35
- package/dist/{chunk-VNF7A2JA.cjs → chunk-MNHP3AQT.cjs} +23 -23
- package/dist/{chunk-FNIWHSLI.js → chunk-NJDEKU5D.js} +1 -1
- package/dist/{chunk-CTHWXW5M.js → chunk-V6LQND7D.js} +14 -0
- package/dist/{chunk-QBZEC2JJ.cjs → chunk-WCC4NXWY.cjs} +86 -86
- package/dist/{chunk-PEQWARCP.cjs → chunk-WZYRYYXN.cjs} +29 -25
- package/dist/{chunk-HHX7ST6Z.js → chunk-YOM76H2V.js} +7 -3
- package/dist/image-editor/index.cjs +783 -783
- package/dist/image-editor/index.js +4 -4
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.js +1 -1
- package/dist/paint/wet/gpu.d.cts +2 -0
- package/dist/paint/wet/gpu.d.ts +2 -0
- package/dist/paint-editor/index.cjs +128 -128
- package/dist/paint-editor/index.js +3 -3
- package/dist/vector/commands.d.cts +25 -0
- package/dist/vector/commands.d.ts +25 -0
- package/dist/vector/index.cjs +1056 -1034
- package/dist/vector/index.js +65 -43
- package/package.json +5 -5
- package/skills/pixerate-vector/SKILL.md +1 -1
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveExternalAssets,
|
|
43
43
|
serializeLayers,
|
|
44
44
|
serializeLayersExternal
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-NJDEKU5D.js";
|
|
46
46
|
import "../chunk-ADMRNWR7.js";
|
|
47
47
|
import "../chunk-WJ4WQJCC.js";
|
|
48
48
|
import {
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
wetPaperInput,
|
|
126
126
|
wetPigmentOf,
|
|
127
127
|
withStrokePath
|
|
128
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-YOM76H2V.js";
|
|
129
129
|
import {
|
|
130
130
|
BRUSH_ID,
|
|
131
131
|
BRUSH_PRESETS,
|
|
@@ -250,7 +250,7 @@ import {
|
|
|
250
250
|
normalizeWetParams,
|
|
251
251
|
pigmentOf,
|
|
252
252
|
wetSupport
|
|
253
|
-
} from "../chunk-
|
|
253
|
+
} from "../chunk-V6LQND7D.js";
|
|
254
254
|
import "../chunk-J23JOHPR.js";
|
|
255
255
|
import {
|
|
256
256
|
CoverageMap,
|
|
@@ -4,6 +4,7 @@ import type { VectorBooleanOperation } from './types.cjs';
|
|
|
4
4
|
import { type VectorEffect } from './types.cjs';
|
|
5
5
|
import { type VectorBlendMode, type VectorFilter, type VectorPaintLayer, type VectorStrokeLayer } from './types.cjs';
|
|
6
6
|
import { type VectorMaskSummary } from './mask.cjs';
|
|
7
|
+
import { type VectorTracePixels } from './trace.cjs';
|
|
7
8
|
import { type VectorLens, type VectorSymmetry } from './types.cjs';
|
|
8
9
|
import { type VectorConnector } from './types.cjs';
|
|
9
10
|
import { type VectorFrame, type VectorResizing } from './types.cjs';
|
|
@@ -14,7 +15,31 @@ export interface VectorCommandOptions {
|
|
|
14
15
|
group?: string;
|
|
15
16
|
/** Command scope. Omit for global commands. */
|
|
16
17
|
scope?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Loads an image that `vector.traceImage` and the stylise commands (`vector.mosaicImage`, …)
|
|
20
|
+
* are given by reference instead of as a PNG data URL: an http(s) or asset URL, or a host id
|
|
21
|
+
* such as a canvas node's. Agents can name an image but cannot write out its bytes, so without
|
|
22
|
+
* this they can only trace PNGs they produced themselves. Return `null` when there is no such
|
|
23
|
+
* image; throw (or reject) with a sentence when it cannot be loaded. `maxPixels` is the most the
|
|
24
|
+
* commands trace: scale larger images down to fit.
|
|
25
|
+
*/
|
|
26
|
+
resolveImage?: VectorImageResolver;
|
|
27
|
+
/**
|
|
28
|
+
* What `resolveImage` accepts, for the `image` argument's description (default "an image
|
|
29
|
+
* URL"), e.g. "the id of an image node on the canvas, or an http(s) URL".
|
|
30
|
+
*/
|
|
31
|
+
imageReferences?: string;
|
|
17
32
|
}
|
|
33
|
+
/** An image a host loaded for a reference: RGBA pixels, or a PNG (data URL or bytes). */
|
|
34
|
+
export type VectorResolvedImage = {
|
|
35
|
+
image: VectorTracePixels;
|
|
36
|
+
} | {
|
|
37
|
+
png: string | Uint8Array;
|
|
38
|
+
};
|
|
39
|
+
/** See `VectorCommandOptions.resolveImage`. */
|
|
40
|
+
export type VectorImageResolver = (ref: string, options: {
|
|
41
|
+
maxPixels: number;
|
|
42
|
+
}) => VectorResolvedImage | null | undefined | Promise<VectorResolvedImage | null | undefined>;
|
|
18
43
|
/** A node as listed for agents. */
|
|
19
44
|
export interface VectorNodeListing {
|
|
20
45
|
id: string;
|
|
@@ -4,6 +4,7 @@ import type { VectorBooleanOperation } from './types.js';
|
|
|
4
4
|
import { type VectorEffect } from './types.js';
|
|
5
5
|
import { type VectorBlendMode, type VectorFilter, type VectorPaintLayer, type VectorStrokeLayer } from './types.js';
|
|
6
6
|
import { type VectorMaskSummary } from './mask.js';
|
|
7
|
+
import { type VectorTracePixels } from './trace.js';
|
|
7
8
|
import { type VectorLens, type VectorSymmetry } from './types.js';
|
|
8
9
|
import { type VectorConnector } from './types.js';
|
|
9
10
|
import { type VectorFrame, type VectorResizing } from './types.js';
|
|
@@ -14,7 +15,31 @@ export interface VectorCommandOptions {
|
|
|
14
15
|
group?: string;
|
|
15
16
|
/** Command scope. Omit for global commands. */
|
|
16
17
|
scope?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Loads an image that `vector.traceImage` and the stylise commands (`vector.mosaicImage`, …)
|
|
20
|
+
* are given by reference instead of as a PNG data URL: an http(s) or asset URL, or a host id
|
|
21
|
+
* such as a canvas node's. Agents can name an image but cannot write out its bytes, so without
|
|
22
|
+
* this they can only trace PNGs they produced themselves. Return `null` when there is no such
|
|
23
|
+
* image; throw (or reject) with a sentence when it cannot be loaded. `maxPixels` is the most the
|
|
24
|
+
* commands trace: scale larger images down to fit.
|
|
25
|
+
*/
|
|
26
|
+
resolveImage?: VectorImageResolver;
|
|
27
|
+
/**
|
|
28
|
+
* What `resolveImage` accepts, for the `image` argument's description (default "an image
|
|
29
|
+
* URL"), e.g. "the id of an image node on the canvas, or an http(s) URL".
|
|
30
|
+
*/
|
|
31
|
+
imageReferences?: string;
|
|
17
32
|
}
|
|
33
|
+
/** An image a host loaded for a reference: RGBA pixels, or a PNG (data URL or bytes). */
|
|
34
|
+
export type VectorResolvedImage = {
|
|
35
|
+
image: VectorTracePixels;
|
|
36
|
+
} | {
|
|
37
|
+
png: string | Uint8Array;
|
|
38
|
+
};
|
|
39
|
+
/** See `VectorCommandOptions.resolveImage`. */
|
|
40
|
+
export type VectorImageResolver = (ref: string, options: {
|
|
41
|
+
maxPixels: number;
|
|
42
|
+
}) => VectorResolvedImage | null | undefined | Promise<VectorResolvedImage | null | undefined>;
|
|
18
43
|
/** A node as listed for agents. */
|
|
19
44
|
export interface VectorNodeListing {
|
|
20
45
|
id: string;
|