@pixerate/editor 0.262.0 → 0.263.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 +60 -60
- package/dist/animation-editor/index.js +4 -4
- package/dist/brushes/index.cjs +52 -52
- package/dist/brushes/index.js +4 -4
- package/dist/{brushstrokeRender-N6UPZSQS.cjs → brushstrokeRender-2GBME4XD.cjs} +13 -13
- package/dist/{brushstrokeRender-25Q5BEY6.js → brushstrokeRender-S5DABANG.js} +3 -3
- package/dist/canvas/index.cjs +15 -14
- package/dist/canvas/index.js +3 -2
- package/dist/canvas/stickers.d.cts +5 -1
- package/dist/canvas/stickers.d.ts +5 -1
- package/dist/{chunk-6NZL24W4.js → chunk-34HIZXFX.js} +1 -1
- package/dist/{chunk-UVZ7RQOE.cjs → chunk-4E6BGHWN.cjs} +1 -1
- package/dist/{chunk-J5UQHWVL.js → chunk-6JL2D5SG.js} +27 -15
- package/dist/{chunk-QAR2N7HZ.js → chunk-6XX7E7O2.js} +1 -1
- package/dist/{chunk-3TQW5MPW.cjs → chunk-73QFSPDG.cjs} +23 -23
- package/dist/{chunk-APX63ILU.js → chunk-ACFSFUQH.js} +31 -0
- package/dist/{chunk-X2EXYY4J.js → chunk-CNLO6E2K.js} +2 -2
- package/dist/{chunk-F7CPSRLN.js → chunk-DOZ6F2K2.js} +12 -4
- package/dist/{chunk-CQVTGBQI.js → chunk-JGI4PZWO.js} +1 -1
- package/dist/{chunk-EHALWBBD.js → chunk-LG6MEEV7.js} +1 -1
- package/dist/{chunk-7AUQ2UJ3.cjs → chunk-LWHUU6A6.cjs} +10 -10
- package/dist/{chunk-JSDND7DF.cjs → chunk-OTN6VB5S.cjs} +32 -1
- package/dist/{chunk-5IW65VQ6.js → chunk-P5343XZO.js} +1 -1
- package/dist/{chunk-AVTPZO4Z.cjs → chunk-PE6YJMQT.cjs} +37 -25
- package/dist/{chunk-D4TE5JNW.js → chunk-QW7LKWKE.js} +1 -1
- package/dist/{chunk-YLUIFXSL.cjs → chunk-TIHW7CUY.cjs} +35 -35
- package/dist/{chunk-PYTJBVW5.cjs → chunk-TILEUVRO.cjs} +31 -31
- package/dist/{chunk-RVGP2XLF.cjs → chunk-XORJ7UZO.cjs} +21 -13
- package/dist/{chunk-43NT242D.cjs → chunk-XQW6R7VW.cjs} +86 -86
- package/dist/{chunk-TZOX7KWV.cjs → chunk-ZBACQHW3.cjs} +8 -8
- package/dist/image-editor/index.cjs +789 -788
- package/dist/image-editor/index.js +7 -6
- package/dist/image-editor/stickers.d.cts +7 -2
- package/dist/image-editor/stickers.d.ts +7 -2
- package/dist/paint-editor/controller.d.cts +7 -2
- package/dist/paint-editor/controller.d.ts +7 -2
- package/dist/paint-editor/index.cjs +576 -523
- package/dist/paint-editor/index.js +99 -46
- package/dist/paint-editor/sticker-art.d.cts +20 -10
- package/dist/paint-editor/sticker-art.d.ts +20 -10
- package/dist/paint-editor/stickers.d.cts +8 -1
- package/dist/paint-editor/stickers.d.ts +8 -1
- package/dist/paint-editor/stroke.d.cts +2 -0
- package/dist/paint-editor/stroke.d.ts +2 -0
- package/dist/stickers/browser.d.cts +10 -3
- package/dist/stickers/browser.d.ts +10 -3
- package/dist/stickers/combine.d.cts +2 -0
- package/dist/stickers/combine.d.ts +2 -0
- package/dist/stickers/conformance.d.cts +1 -1
- package/dist/stickers/conformance.d.ts +1 -1
- package/dist/stickers/errors.d.cts +1 -1
- package/dist/stickers/errors.d.ts +1 -1
- package/dist/stickers/fake.d.cts +4 -2
- package/dist/stickers/fake.d.ts +4 -2
- package/dist/stickers/helpers.d.cts +16 -2
- package/dist/stickers/helpers.d.ts +16 -2
- package/dist/stickers/index.cjs +116 -29
- package/dist/stickers/index.js +106 -19
- package/dist/stickers/tools.d.cts +9 -2
- package/dist/stickers/tools.d.ts +9 -2
- package/dist/stickers/types.d.cts +32 -5
- package/dist/stickers/types.d.ts +32 -5
- package/dist/vector/index.cjs +972 -971
- package/dist/vector/index.js +7 -6
- package/dist/vector/stickers.d.cts +7 -2
- package/dist/vector/stickers.d.ts +7 -2
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +1 -1
- package/skills/pixerate-stickers/SKILL.md +20 -9
package/dist/vector/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
traceField,
|
|
27
27
|
traceVectorImage,
|
|
28
28
|
vectorTraceContours
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-JGI4PZWO.js";
|
|
30
30
|
import {
|
|
31
31
|
applyHomography,
|
|
32
32
|
homographyFromPoints,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
reverseMorphContour,
|
|
54
54
|
subpathToMorphContour,
|
|
55
55
|
turnMorphContour
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-6XX7E7O2.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_VECTOR_FONT,
|
|
59
59
|
IDENTITY_MATRIX,
|
|
@@ -529,11 +529,11 @@ import {
|
|
|
529
529
|
withVectorStrokes,
|
|
530
530
|
withVectorTargetPaint,
|
|
531
531
|
zigzagPaths
|
|
532
|
-
} from "../chunk-
|
|
532
|
+
} from "../chunk-34HIZXFX.js";
|
|
533
533
|
import {
|
|
534
534
|
snapshotBrushLibrary
|
|
535
|
-
} from "../chunk-
|
|
536
|
-
import "../chunk-
|
|
535
|
+
} from "../chunk-P5343XZO.js";
|
|
536
|
+
import "../chunk-ACFSFUQH.js";
|
|
537
537
|
import {
|
|
538
538
|
createProvenance
|
|
539
539
|
} from "../chunk-M6DNZNVY.js";
|
|
@@ -18372,10 +18372,11 @@ function stickerVectorGroup(placement, id = "sticker") {
|
|
|
18372
18372
|
const s = placement.width / box.width;
|
|
18373
18373
|
return transformVectorNode(group, [s, 0, 0, s, placement.x - box.width * s / 2, placement.y - box.height * s / 2]);
|
|
18374
18374
|
}
|
|
18375
|
-
function createVectorStickerHost(controller) {
|
|
18375
|
+
function createVectorStickerHost(controller, options = {}) {
|
|
18376
18376
|
return {
|
|
18377
18377
|
noun: "group of editable paths",
|
|
18378
18378
|
format: "svg",
|
|
18379
|
+
...options.dark ? { dark: options.dark } : {},
|
|
18379
18380
|
defaultCentre: () => {
|
|
18380
18381
|
const d = controller.getDocument();
|
|
18381
18382
|
return { x: d.width / 2, y: d.height / 2 };
|
|
@@ -7,5 +7,10 @@ import type { VectorEditorController } from './controller.cjs';
|
|
|
7
7
|
import type { VectorGroupNode } from './types.cjs';
|
|
8
8
|
/** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
|
|
9
9
|
export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. With
|
|
12
|
+
* `dark` (the host's dark theme or artboard), stickers that have a dark variant use it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createVectorStickerHost(controller: VectorEditorController, options?: {
|
|
15
|
+
dark?: () => boolean;
|
|
16
|
+
}): StickerInsertHost;
|
|
@@ -7,5 +7,10 @@ import type { VectorEditorController } from './controller.js';
|
|
|
7
7
|
import type { VectorGroupNode } from './types.js';
|
|
8
8
|
/** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
|
|
9
9
|
export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. With
|
|
12
|
+
* `dark` (the host's dark theme or artboard), stickers that have a dark variant use it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createVectorStickerHost(controller: VectorEditorController, options?: {
|
|
15
|
+
dark?: () => boolean;
|
|
16
|
+
}): StickerInsertHost;
|
package/package.json
CHANGED
|
@@ -348,7 +348,7 @@ Listing, saving, sharing and previewing brushes are the brush library's tools (`
|
|
|
348
348
|
| `set_canvas_tilt` | Tilt the canvas (`angle` 0..90°, `direction` downhill clockwise from the bottom): wet paint runs downhill, very wet paint drips. Returns `tilt`, `stillWet`. |
|
|
349
349
|
| `pause_wet_paint` | Stop or resume time (`paused`) and set `speed` (steps per second). Editor state. |
|
|
350
350
|
| `set_water_overlay` | Show where the water is (`visible`), view only. |
|
|
351
|
-
| `set_wet_engine` | Let Engine B (WebGPU) shade large washes (`gpu` "auto", the default) or force the CPU (`gpu` "off"); `minTiles` sets the wet area at which the GPU takes over. Never changes the result, only how it is drawn; editor setting, not saved, not an undo step. Returns `engine` (`state`: off, not-started, starting, unavailable, standby, active, failed; `reason`, `adapter`). |
|
|
351
|
+
| `set_wet_engine` | Let Engine B (WebGPU in browsers, Metal in the Swift editors) shade large washes (`gpu` "auto", the default) or force the CPU (`gpu` "off"); `minTiles` sets the wet area at which the GPU takes over. Never changes the result, only how it is drawn; editor setting, not saved, not an undo step. Returns `engine` (`state`: off, not-started, starting, unavailable, standby, active, failed; `reason`, `adapter`). |
|
|
352
352
|
| `set_instant_dry` | `on`: every wet stroke dries as it ends (same undo step); off (default) wet paint keeps moving. Returns `instantDry`. |
|
|
353
353
|
|
|
354
354
|
### Thick paint and light
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixerate-stickers
|
|
3
|
-
description: How to find, check and use stickers from the Pixerate sticker library through find_stickers and describe_sticker - the editor's own stamps (editor:star, editor:heart, ...) or any library a host plugged in (brand packs, uploads, third-party APIs), with refs (provider:id), categories, tags, tintable art and licences. Use when asked to add, spray, place, search for or credit stickers, or when find_stickers or describe_sticker are available.
|
|
3
|
+
description: How to find, check and use stickers from the Pixerate sticker library through find_stickers and describe_sticker - the editor's own stamps (editor:star, editor:heart, ...) or any library a host plugged in (brand packs, uploads, third-party APIs), with refs (provider:id), categories, collections, tags, tintable art, light / dark variants, AI-generated labels and licences. Use when asked to add, spray, place, search for or credit stickers, or when find_stickers or describe_sticker are available.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Stickers
|
|
@@ -14,17 +14,22 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
|
|
|
14
14
|
## Working method
|
|
15
15
|
|
|
16
16
|
1. **Find.** `find_stickers` with a few words (`query`) and, when the result's `categories`
|
|
17
|
-
suggest one, a `category`.
|
|
18
|
-
|
|
17
|
+
suggest one, a `category`. When the result lists `collections` (themed sets, such as one per
|
|
18
|
+
brand) and the job names one, pass its id as `collection`. Pages are small: pass `next` as
|
|
19
|
+
`after` for more, or narrow the query. Filter with `commercial: true` for anything that will
|
|
20
|
+
be sold or used in marketing.
|
|
19
21
|
2. **Check.** `describe_sticker` when the choice matters: its licence (and the attribution line
|
|
20
|
-
it asks for), dominant colours
|
|
22
|
+
it asks for), whether the art is `aiGenerated`, its `variants`, dominant colours and outline.
|
|
21
23
|
3. **Use.** Pass refs to the editor that places them: in the paint editor, a sticker brush
|
|
22
24
|
(`set_brush` `tip.stamps`, then `paint_stroke`) sprays them and `add_stickers` places
|
|
23
25
|
them exactly. In the vector, image and canvas editors, `insert_sticker` puts one in (`x`,
|
|
24
26
|
`y` centre, `width`): vector, a group of editable paths; image, a pixel layer; canvas, a
|
|
25
27
|
shape node from its outline in one colour. A provider's art loads before it is drawn.
|
|
26
28
|
4. **Colour.** Tintable stickers (flat, single-colour art) take the paint colour or a sticker's
|
|
27
|
-
`color`; the rest keep their own colours.
|
|
29
|
+
`color`; the rest keep their own colours. A sticker whose `variants` include `dark` has art
|
|
30
|
+
drawn for dark backgrounds: `insert_sticker` uses it when the host's canvas or theme is dark
|
|
31
|
+
(or pass `variant`), and the paint editor's sticker brush sprays it on a dark colour scheme
|
|
32
|
+
(each sticker keeps the variant it was drawn in).
|
|
28
33
|
5. **Treat it with an effect.** In the image editor, `insert_sticker` returns the layer `id`;
|
|
29
34
|
`apply_effect` with that `target` and any effect whose `describe_effect` inputs take an
|
|
30
35
|
image (`appliesHere`) uses the sticker as its picture (holo foil, cut-out). For a whole set,
|
|
@@ -35,6 +40,10 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
|
|
|
35
40
|
- Keep refs exactly as `find_stickers` returns them; a bare editor stamp (`star`) also works
|
|
36
41
|
and means `editor:star`.
|
|
37
42
|
- Credit stickers whose licence has an `attribution` wherever the work is published.
|
|
43
|
+
- Say when art is `aiGenerated: true` if the user asked for hand-made art or must disclose AI
|
|
44
|
+
content; absent means the provider didn't say, not that it is hand-made.
|
|
45
|
+
- Leave `variant` out of `insert_sticker` unless the user asked for one: the default matches the
|
|
46
|
+
background.
|
|
38
47
|
- Prefer tintable stickers when they must match a palette.
|
|
39
48
|
- Vector stickers need SVG art and canvas stickers an outline (`silhouette`); `find_stickers`
|
|
40
49
|
lists `formats`, and `describe_sticker` the outline. The image editor takes either.
|
|
@@ -42,7 +51,9 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
|
|
|
42
51
|
## Pitfalls
|
|
43
52
|
|
|
44
53
|
- An unknown ref is refused with the closest refs: pick one of those or search again.
|
|
45
|
-
- A category that the library doesn't have is refused with the list of its
|
|
54
|
+
- A category or collection that the library doesn't have is refused with the list of its
|
|
55
|
+
categories or collections. In a combined library, collection ids are `provider:collection`.
|
|
56
|
+
- `variant: "dark"` on a sticker without a dark variant is refused; check `variants` first.
|
|
46
57
|
- `limit` is 1..100; results beyond a page need `after`, not a larger limit.
|
|
47
58
|
- `color` on a sticker that is not tintable is refused; leave it out.
|
|
48
59
|
- On the canvas, multi-colour art becomes its outline in its dominant colour; for the art itself,
|
|
@@ -52,6 +63,6 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
|
|
|
52
63
|
|
|
53
64
|
| Tool | Use |
|
|
54
65
|
| --- | --- |
|
|
55
|
-
| `find_stickers` | Search or list the library: `query`, `category`, `tags`, `commercial`, `limit`, `after`. Returns `items` (each `ref`, name, category, tags, width, height, formats, tintable, licence), `total`, `next`, `categories`. Changes nothing. |
|
|
56
|
-
| `insert_sticker` | Put one sticker (`ref`) into the vector, image or canvas editor, centred at `x`, `y` (default the middle), `width` wide (default natural), tinted with `color` when tintable. One undo step. Returns the new group, layer or node `id`, the size and the licence. |
|
|
57
|
-
| `describe_sticker` | One sticker by `ref`: everything `find_stickers` returns plus `silhouette` (SVG path data)
|
|
66
|
+
| `find_stickers` | Search or list the library: `query`, `category`, `collection`, `tags`, `commercial`, `limit`, `after`. Returns `items` (each `ref`, name, category, collection, tags, width, height, formats, tintable, aiGenerated, variants, licence), `total`, `next`, `categories`, `collections`. Changes nothing. |
|
|
67
|
+
| `insert_sticker` | Put one sticker (`ref`) into the vector, image or canvas editor, centred at `x`, `y` (default the middle), `width` wide (default natural), tinted with `color` when tintable, in its dark `variant` on a dark background (or the one passed). One undo step. Returns the new group, layer or node `id`, the size, the `variant` used and the licence. |
|
|
68
|
+
| `describe_sticker` | One sticker by `ref`: everything `find_stickers` returns plus `silhouette` (SVG path data) and `colours`. Unknown refs are refused with the closest ones. Changes nothing. |
|