@pixerate/editor 0.265.0 → 0.266.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +4 -3
- package/dist/agent/index.js +3 -2
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/brushes/index.cjs +56 -56
- package/dist/brushes/index.js +3 -3
- package/dist/brushes/presets.d.cts +3 -3
- package/dist/brushes/presets.d.ts +3 -3
- package/dist/brushes/resolve.d.cts +1 -1
- package/dist/brushes/resolve.d.ts +1 -1
- package/dist/{brushstrokeRender-JQ2XQRUD.cjs → brushstrokeRender-FSUWXUZY.cjs} +15 -15
- package/dist/{brushstrokeRender-4UB6NRJW.js → brushstrokeRender-KD453OBX.js} +3 -3
- package/dist/canvas/index.cjs +15 -14
- package/dist/canvas/index.js +3 -2
- package/dist/{chunk-Q6RVVJW6.js → chunk-3C33YTNN.js} +1 -1
- package/dist/{chunk-NOP4Y5AB.cjs → chunk-3SBLVGOM.cjs} +23 -23
- package/dist/{chunk-TMDDMJCR.js → chunk-472INMWH.js} +4 -2
- package/dist/{chunk-ZS7LB2MV.js → chunk-4ODRXQRW.js} +1 -1
- package/dist/chunk-55ALHYJY.js +289 -0
- package/dist/{chunk-NHA26O5X.cjs → chunk-7KNW3WXZ.cjs} +14 -12
- package/dist/{chunk-O53MOGXG.cjs → chunk-AQZQWXEU.cjs} +35 -35
- package/dist/{chunk-J4SGJCPW.js → chunk-CIJBSUM5.js} +1133 -1806
- package/dist/{chunk-XDNWQMHY.js → chunk-DXYHQ2VN.js} +1 -1
- package/dist/chunk-E2Z4UARJ.cjs +289 -0
- package/dist/{chunk-BLR4KWYQ.js → chunk-EZOJBP4D.js} +1 -1
- package/dist/chunk-HAEB3MZD.js +664 -0
- package/dist/chunk-KIJIONZF.cjs +664 -0
- package/dist/{chunk-Z2Z2OHRM.js → chunk-LK4SXL3V.js} +1 -1
- package/dist/{chunk-DGXTEPCU.cjs → chunk-MVUQSK5J.cjs} +86 -86
- package/dist/{chunk-LPFQHVCO.js → chunk-PXXXRCME.js} +1 -284
- package/dist/{chunk-T7QSEKDY.cjs → chunk-QJVOJUTD.cjs} +4 -287
- package/dist/{chunk-WY23AUCA.js → chunk-R44Y3EFS.js} +1 -1
- package/dist/{chunk-677777GH.cjs → chunk-RFJZGTHA.cjs} +1137 -1810
- package/dist/{chunk-7PW6VCNW.js → chunk-T2LDTEXK.js} +1 -1
- package/dist/{chunk-7NQOGWLM.cjs → chunk-TOID45I2.cjs} +1 -1
- package/dist/{chunk-DEBIFWY6.cjs → chunk-VRK322ZC.cjs} +2 -2
- package/dist/{chunk-5OE4ZZ6V.cjs → chunk-WLUVZKVD.cjs} +30 -30
- package/dist/{chunk-ZHRVCW3M.cjs → chunk-XRXFVRGY.cjs} +10 -10
- package/dist/commands/index.cjs +26 -656
- package/dist/commands/index.js +18 -648
- package/dist/image-editor/index.cjs +786 -786
- package/dist/image-editor/index.js +4 -4
- package/dist/paint-editor/brush-model.d.cts +273 -0
- package/dist/paint-editor/brush-model.d.ts +273 -0
- package/dist/paint-editor/brushes.d.cts +6 -270
- package/dist/paint-editor/brushes.d.ts +6 -270
- package/dist/paint-editor/index.cjs +79 -79
- package/dist/paint-editor/index.js +5 -5
- package/dist/paint-editor/ui.d.cts +1 -1
- package/dist/paint-editor/ui.d.ts +1 -1
- package/dist/vector/contract.d.cts +52 -0
- package/dist/vector/contract.d.ts +52 -0
- package/dist/vector/index.cjs +1167 -969
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +203 -5
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
mergeBrushPatch,
|
|
12
12
|
multiColorSliders,
|
|
13
13
|
patchBrushValue
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-3C33YTNN.js";
|
|
15
15
|
import {
|
|
16
16
|
createStickerTools,
|
|
17
17
|
describeStickerRef
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
BRUSH_PREVIEW_DARK_PAPER,
|
|
21
21
|
brushPreviewsOnDark
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-4ODRXQRW.js";
|
|
23
23
|
import {
|
|
24
24
|
toVideoFfmpeg
|
|
25
25
|
} from "../chunk-MWUZCEFT.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveExternalAssets,
|
|
35
35
|
serializeLayers,
|
|
36
36
|
serializeLayersExternal
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-R44Y3EFS.js";
|
|
38
38
|
import "../chunk-WJ4WQJCC.js";
|
|
39
39
|
import {
|
|
40
40
|
LAYER_EFFECT_KINDS,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
realPresenceClock,
|
|
93
93
|
tweenPresenceCursor
|
|
94
94
|
} from "../chunk-IVSWRVB4.js";
|
|
95
|
-
import "../chunk-
|
|
95
|
+
import "../chunk-T2LDTEXK.js";
|
|
96
96
|
import {
|
|
97
97
|
BRUSH_ID,
|
|
98
98
|
BRUSH_PRESETS,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
parseBrushLibrary,
|
|
148
148
|
resolveBrush,
|
|
149
149
|
usesPaintExchange
|
|
150
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-CIJBSUM5.js";
|
|
151
151
|
import {
|
|
152
152
|
STAMP_KINDS,
|
|
153
153
|
StickersSlot,
|
|
@@ -256,9 +256,9 @@ export declare const PATH_STROKE_TAPERS: ReadonlyArray<{
|
|
|
256
256
|
label: string;
|
|
257
257
|
pressure?: readonly number[];
|
|
258
258
|
}>;
|
|
259
|
-
/** The sticker panel's sliders for the selected sticker. */
|
|
260
259
|
/** The brush sliders of a picked stroke on a stroke layer (paths into its brush; see `updateStroke`). */
|
|
261
260
|
export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
261
|
+
/** The sticker panel's sliders for the selected sticker. */
|
|
262
262
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
263
263
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
264
264
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
@@ -256,9 +256,9 @@ export declare const PATH_STROKE_TAPERS: ReadonlyArray<{
|
|
|
256
256
|
label: string;
|
|
257
257
|
pressure?: readonly number[];
|
|
258
258
|
}>;
|
|
259
|
-
/** The sticker panel's sliders for the selected sticker. */
|
|
260
259
|
/** The brush sliders of a picked stroke on a stroke layer (paths into its brush; see `updateStroke`). */
|
|
261
260
|
export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
261
|
+
/** The sticker panel's sliders for the selected sticker. */
|
|
262
262
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
263
263
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
264
264
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vector editor as language-neutral contracts (`@pixerate/conformance` `domains/vector`), so
|
|
3
|
+
* another implementation (the Swift port, #618) offers the same commands, tools, controls and
|
|
4
|
+
* documents: the commands agents run through `run_command` (`createVectorCommands`), the tools of
|
|
5
|
+
* the command, effect and generation providers, the UI tables React and Svelte render, and a JSON
|
|
6
|
+
* Schema of a saved vector document. `scripts/export-contracts.mjs` writes them; a core test fails
|
|
7
|
+
* when the committed files differ from what this returns.
|
|
8
|
+
*
|
|
9
|
+
* Everything here is data from this module's own tables and providers; nothing depends on the
|
|
10
|
+
* package version, so a release does not change the files.
|
|
11
|
+
*/
|
|
12
|
+
import type { EffectProvider } from '../effects/types.cjs';
|
|
13
|
+
import type { ModelCapabilities } from '../generation/capabilities.cjs';
|
|
14
|
+
import type { ConformanceHost } from '../tools/conformance.cjs';
|
|
15
|
+
import type { JsonSchema } from '../tools/schema.cjs';
|
|
16
|
+
import { type VectorArtGenerator } from './generate.cjs';
|
|
17
|
+
/** Bumped when a contract file changes shape (not when its data changes). */
|
|
18
|
+
export declare const VECTOR_CONTRACT_FORMAT_VERSION = 1;
|
|
19
|
+
/**
|
|
20
|
+
* JSON Schema of a saved vector document: the `pixerate.editor-document` envelope of kind
|
|
21
|
+
* `vector` around a `VectorDocument` (`createVectorEditorDocument`). Readers keep fields they do
|
|
22
|
+
* not know, so objects stay open; nodes are described by their common fields and `type`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const VECTOR_DOCUMENT_JSON_SCHEMA: JsonSchema;
|
|
25
|
+
/**
|
|
26
|
+
* The generation models and generator the contracts and scenarios use: one text model that
|
|
27
|
+
* writes a fixed SVG from the prompt (a circle whose size and colour follow the prompt's length),
|
|
28
|
+
* so generation tools replay the same everywhere without a network.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FAKE_VECTOR_ART_MODELS: readonly ModelCapabilities[];
|
|
31
|
+
export declare const fakeVectorArtGenerator: VectorArtGenerator;
|
|
32
|
+
/**
|
|
33
|
+
* Every vector contract file, by its path under `domains/vector/` (plain JSON values). `effects`
|
|
34
|
+
* is the effect provider the effect tools are listed with (the export uses the fake provider, so
|
|
35
|
+
* the files do not depend on a catalogue).
|
|
36
|
+
*/
|
|
37
|
+
export declare function vectorContracts(options: {
|
|
38
|
+
effects: EffectProvider;
|
|
39
|
+
}): Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* A fresh vector editor for replaying a conformance scenario (`domains/vector/fixtures`): every
|
|
42
|
+
* vector tool provider in one registry that validates arguments, and the saved document. Node ids
|
|
43
|
+
* come from a counter (`n1`, `n2`, …), so they are part of the contract; text uses the metric
|
|
44
|
+
* shaper, the one every implementation can match. `setup` is the scenario's artboard size
|
|
45
|
+
* (`{ width, height }`, default the editor's); `effects` is the effect provider the effect tools use.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createVectorConformanceHost(setup: {
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
}, options: {
|
|
51
|
+
effects: EffectProvider;
|
|
52
|
+
}): ConformanceHost;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vector editor as language-neutral contracts (`@pixerate/conformance` `domains/vector`), so
|
|
3
|
+
* another implementation (the Swift port, #618) offers the same commands, tools, controls and
|
|
4
|
+
* documents: the commands agents run through `run_command` (`createVectorCommands`), the tools of
|
|
5
|
+
* the command, effect and generation providers, the UI tables React and Svelte render, and a JSON
|
|
6
|
+
* Schema of a saved vector document. `scripts/export-contracts.mjs` writes them; a core test fails
|
|
7
|
+
* when the committed files differ from what this returns.
|
|
8
|
+
*
|
|
9
|
+
* Everything here is data from this module's own tables and providers; nothing depends on the
|
|
10
|
+
* package version, so a release does not change the files.
|
|
11
|
+
*/
|
|
12
|
+
import type { EffectProvider } from '../effects/types.js';
|
|
13
|
+
import type { ModelCapabilities } from '../generation/capabilities.js';
|
|
14
|
+
import type { ConformanceHost } from '../tools/conformance.js';
|
|
15
|
+
import type { JsonSchema } from '../tools/schema.js';
|
|
16
|
+
import { type VectorArtGenerator } from './generate.js';
|
|
17
|
+
/** Bumped when a contract file changes shape (not when its data changes). */
|
|
18
|
+
export declare const VECTOR_CONTRACT_FORMAT_VERSION = 1;
|
|
19
|
+
/**
|
|
20
|
+
* JSON Schema of a saved vector document: the `pixerate.editor-document` envelope of kind
|
|
21
|
+
* `vector` around a `VectorDocument` (`createVectorEditorDocument`). Readers keep fields they do
|
|
22
|
+
* not know, so objects stay open; nodes are described by their common fields and `type`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const VECTOR_DOCUMENT_JSON_SCHEMA: JsonSchema;
|
|
25
|
+
/**
|
|
26
|
+
* The generation models and generator the contracts and scenarios use: one text model that
|
|
27
|
+
* writes a fixed SVG from the prompt (a circle whose size and colour follow the prompt's length),
|
|
28
|
+
* so generation tools replay the same everywhere without a network.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FAKE_VECTOR_ART_MODELS: readonly ModelCapabilities[];
|
|
31
|
+
export declare const fakeVectorArtGenerator: VectorArtGenerator;
|
|
32
|
+
/**
|
|
33
|
+
* Every vector contract file, by its path under `domains/vector/` (plain JSON values). `effects`
|
|
34
|
+
* is the effect provider the effect tools are listed with (the export uses the fake provider, so
|
|
35
|
+
* the files do not depend on a catalogue).
|
|
36
|
+
*/
|
|
37
|
+
export declare function vectorContracts(options: {
|
|
38
|
+
effects: EffectProvider;
|
|
39
|
+
}): Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* A fresh vector editor for replaying a conformance scenario (`domains/vector/fixtures`): every
|
|
42
|
+
* vector tool provider in one registry that validates arguments, and the saved document. Node ids
|
|
43
|
+
* come from a counter (`n1`, `n2`, …), so they are part of the contract; text uses the metric
|
|
44
|
+
* shaper, the one every implementation can match. `setup` is the scenario's artboard size
|
|
45
|
+
* (`{ width, height }`, default the editor's); `effects` is the effect provider the effect tools use.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createVectorConformanceHost(setup: {
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
}, options: {
|
|
51
|
+
effects: EffectProvider;
|
|
52
|
+
}): ConformanceHost;
|