@pixerate/editor 0.248.0 → 0.249.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 +1 -0
- package/dist/animation-editor/index.cjs +64 -61
- package/dist/animation-editor/index.js +8 -5
- package/dist/{brushstrokeRender-DTDPFBLC.cjs → brushstrokeRender-GCKK7V2I.cjs} +14 -11
- package/dist/{brushstrokeRender-QLCXROJK.js → brushstrokeRender-T3JZST44.js} +7 -4
- package/dist/canvas/index.cjs +8 -8
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-IBDU6EGZ.cjs → chunk-2SMMZDMG.cjs} +35 -35
- package/dist/{chunk-SC2RZ5EF.js → chunk-2VJAVXLI.js} +2 -2
- package/dist/{chunk-OLNIPTB3.cjs → chunk-2VX55NFM.cjs} +1 -320
- package/dist/chunk-3K6HWEXZ.cjs +92 -0
- package/dist/{chunk-UOOK7HTX.js → chunk-3PPJRMIG.js} +1 -1
- package/dist/chunk-4D6KP5BV.js +92 -0
- package/dist/chunk-5RH3VXAK.js +269 -0
- package/dist/{chunk-NZ3O3A5C.js → chunk-6BIDVPED.js} +1 -1
- package/dist/{chunk-2ONK3ERD.cjs → chunk-75K3W4D6.cjs} +20 -20
- package/dist/{chunk-7T7JWTVE.cjs → chunk-BOHDJJ2O.cjs} +8 -8
- package/dist/{chunk-2PBZBRP5.js → chunk-D5KGAO4Z.js} +10 -92
- package/dist/{chunk-5GLYUSNT.js → chunk-DOIU7VJG.js} +1 -1
- package/dist/{chunk-HB4ICNNA.cjs → chunk-DPYAO5U6.cjs} +42 -42
- package/dist/chunk-EJLRBS5Q.js +301 -0
- package/dist/{chunk-6G6ZDDDB.cjs → chunk-H4AOUUBE.cjs} +301 -149
- package/dist/{chunk-PQ3H2AAN.cjs → chunk-I7NJPHWV.cjs} +122 -204
- package/dist/{chunk-L6REDLNB.cjs → chunk-IOFVM3L3.cjs} +7 -7
- package/dist/{chunk-42TWUPNJ.js → chunk-IRSTHLQQ.js} +1 -320
- package/dist/{chunk-VNBUDVD4.js → chunk-J7T5QZ45.js} +226 -74
- package/dist/{chunk-VMROIWLL.cjs → chunk-KBYB7OWB.cjs} +3 -3
- package/dist/{chunk-TPWB4Y6L.cjs → chunk-KYX7NZ5V.cjs} +1 -1
- package/dist/chunk-LJRCU3BJ.cjs +301 -0
- package/dist/{chunk-WVS5KQDH.cjs → chunk-LP2MCSBE.cjs} +246 -244
- package/dist/{chunk-XNRBMYNB.js → chunk-O75V4ZS3.js} +1 -1
- package/dist/chunk-OTTT5N3K.js +322 -0
- package/dist/{chunk-Q2HA52V4.js → chunk-PZP2SZIZ.js} +2 -2
- package/dist/{chunk-ZFSLEOSQ.js → chunk-UBRJOIR5.js} +11 -9
- package/dist/chunk-W5M3J7PV.cjs +322 -0
- package/dist/{chunk-4P6H35HU.js → chunk-WA44NKPF.js} +2 -2
- package/dist/{chunk-XWTRATIM.cjs → chunk-WLJZZHUZ.cjs} +23 -23
- package/dist/{chunk-P3NIPIKS.js → chunk-WQCNC4DK.js} +1 -1
- package/dist/chunk-ZEYMKDYS.cjs +269 -0
- package/dist/image-editor/index.cjs +1055 -1050
- package/dist/image-editor/index.js +28 -23
- package/dist/paint/index.cjs +8 -5
- package/dist/paint/index.js +13 -10
- package/dist/paint-editor/controller.d.cts +37 -1
- package/dist/paint-editor/controller.d.ts +37 -1
- package/dist/paint-editor/index.cjs +745 -602
- package/dist/paint-editor/index.d.cts +3 -0
- package/dist/paint-editor/index.d.ts +3 -0
- package/dist/paint-editor/index.js +184 -41
- package/dist/paint-editor/sticker-art.d.cts +55 -0
- package/dist/paint-editor/sticker-art.d.ts +55 -0
- package/dist/paint-editor/stickers.d.cts +30 -17
- package/dist/paint-editor/stickers.d.ts +30 -17
- package/dist/paint-editor/stroke.d.cts +4 -0
- package/dist/paint-editor/stroke.d.ts +4 -0
- package/dist/paint-editor/ui.d.cts +10 -2
- package/dist/paint-editor/ui.d.ts +10 -2
- package/dist/raster/index.cjs +6 -4
- package/dist/raster/index.js +12 -10
- package/dist/stickers/browser.d.cts +48 -0
- package/dist/stickers/browser.d.ts +48 -0
- package/dist/stickers/combine.d.cts +10 -0
- package/dist/stickers/combine.d.ts +10 -0
- package/dist/stickers/conformance.d.cts +18 -0
- package/dist/stickers/conformance.d.ts +18 -0
- package/dist/stickers/editor.d.cts +14 -0
- package/dist/stickers/editor.d.ts +14 -0
- package/dist/stickers/errors.d.cts +6 -0
- package/dist/stickers/errors.d.ts +6 -0
- package/dist/stickers/fake.d.cts +16 -0
- package/dist/stickers/fake.d.ts +16 -0
- package/dist/stickers/helpers.d.cts +51 -0
- package/dist/stickers/helpers.d.ts +51 -0
- package/dist/stickers/index.cjs +331 -0
- package/dist/stickers/index.d.cts +16 -0
- package/dist/stickers/index.d.ts +16 -0
- package/dist/stickers/index.js +331 -0
- package/dist/stickers/stamps.d.cts +13 -0
- package/dist/stickers/stamps.d.ts +13 -0
- package/dist/stickers/tools.d.cts +25 -0
- package/dist/stickers/tools.d.ts +25 -0
- package/dist/stickers/types.d.cts +123 -0
- package/dist/stickers/types.d.ts +123 -0
- package/dist/vector/index.cjs +978 -975
- package/dist/vector/index.js +9 -6
- package/package.json +11 -1
- package/skills/README.md +1 -0
- package/skills/pixerate-paint-editor/SKILL.md +8 -5
- package/skills/pixerate-stickers/SKILL.md +45 -0
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-DOIU7VJG.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-O75V4ZS3.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_VECTOR_FONT,
|
|
59
59
|
IDENTITY_MATRIX,
|
|
@@ -526,8 +526,9 @@ import {
|
|
|
526
526
|
withVectorStrokes,
|
|
527
527
|
withVectorTargetPaint,
|
|
528
528
|
zigzagPaths
|
|
529
|
-
} from "../chunk-
|
|
530
|
-
import "../chunk-
|
|
529
|
+
} from "../chunk-PZP2SZIZ.js";
|
|
530
|
+
import "../chunk-J7T5QZ45.js";
|
|
531
|
+
import "../chunk-5RH3VXAK.js";
|
|
531
532
|
import {
|
|
532
533
|
createProvenance
|
|
533
534
|
} from "../chunk-M6DNZNVY.js";
|
|
@@ -562,14 +563,16 @@ import {
|
|
|
562
563
|
import "../chunk-V2ZCJRDM.js";
|
|
563
564
|
import {
|
|
564
565
|
GRAIN_PATTERNS
|
|
565
|
-
} from "../chunk-
|
|
566
|
+
} from "../chunk-D5KGAO4Z.js";
|
|
567
|
+
import "../chunk-4D6KP5BV.js";
|
|
566
568
|
import "../chunk-ODBT55Q7.js";
|
|
569
|
+
import "../chunk-IRSTHLQQ.js";
|
|
567
570
|
import {
|
|
568
571
|
bytesToBase64,
|
|
569
572
|
decodePng,
|
|
570
573
|
isPng,
|
|
571
574
|
parseDataUrl
|
|
572
|
-
} from "../chunk-
|
|
575
|
+
} from "../chunk-OTTT5N3K.js";
|
|
573
576
|
import "../chunk-HVVR5PZW.js";
|
|
574
577
|
import {
|
|
575
578
|
deflate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.249.0",
|
|
4
4
|
"description": "UI-agnostic rich text and media editing core library",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -334,6 +334,16 @@
|
|
|
334
334
|
"default": "./dist/effects/index.cjs"
|
|
335
335
|
}
|
|
336
336
|
},
|
|
337
|
+
"./stickers": {
|
|
338
|
+
"import": {
|
|
339
|
+
"types": "./dist/stickers/index.d.ts",
|
|
340
|
+
"default": "./dist/stickers/index.js"
|
|
341
|
+
},
|
|
342
|
+
"require": {
|
|
343
|
+
"types": "./dist/stickers/index.d.cts",
|
|
344
|
+
"default": "./dist/stickers/index.cjs"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
337
347
|
"./diagram": {
|
|
338
348
|
"import": {
|
|
339
349
|
"types": "./dist/diagram/index.d.ts",
|
package/skills/README.md
CHANGED
|
@@ -29,6 +29,7 @@ model and its general practice.
|
|
|
29
29
|
| [`pixerate-effect-authoring`](pixerate-effect-authoring/SKILL.md) | Authoring shaders and procedural effects: inspecting parameters and source code, setting values and presets, keyframing animation tracks, playback timing, and previewing. |
|
|
30
30
|
| [`pixerate-color`](pixerate-color/SKILL.md) | Colour inspection, WCAG accessibility and contrast optimization, CVD simulation, palette audits, harmonies, and OKLab/OKLCH blends. |
|
|
31
31
|
| [`pixerate-typography`](pixerate-typography/SKILL.md) | Fonts and fallback stacks, font loading, modular type scales and hierarchies, fluid sizes, readability and type-aware contrast audits, text segmentation, the font picker. |
|
|
32
|
+
| [`pixerate-stickers`](pixerate-stickers/SKILL.md) | Sticker libraries: finding stickers by ref (`provider:id`), categories, tags, tintable art and licences, for the editors that spray or place them. |
|
|
32
33
|
|
|
33
34
|
## Workflow skills
|
|
34
35
|
|
|
@@ -184,8 +184,9 @@ inner glow, shadows, stroke, bevel, satin and overlays, as in the image editor
|
|
|
184
184
|
- **Bristle brushes** (category `bristle`): `bristle-round`, `bristle-flat`, `dry-brush`. Every
|
|
185
185
|
bristle draws its own line: press harder to splay the tuft, tilt to flatten it; soft bristles
|
|
186
186
|
bend into curves at turns; a low `bristle.load` runs dry into broken streaks.
|
|
187
|
-
- **Sticker spray** (category `sticker`):
|
|
188
|
-
|
|
187
|
+
- **Sticker spray** (category `sticker`): stickers by ref (`editor:star`, `editor:leaf`… or any
|
|
188
|
+
from the host's library: `find_stickers`; tintable ones take the paint colour) sprayed onto an
|
|
189
|
+
**empty layer**, each staying an object:
|
|
189
190
|
`add_stickers` (exact places), `sticker_at`, `list_stickers`, `update_sticker`, `arrange_stickers`,
|
|
190
191
|
`remove_stickers`. A sticker layer takes no other paint; sprays are refused under an enabled
|
|
191
192
|
mask stencil (hide it with `update_stencil` `enabled` false, then remove unwanted stickers).
|
|
@@ -372,10 +373,12 @@ is a canvas coordinate: read [references/canvas-hosted.md](references/canvas-hos
|
|
|
372
373
|
|
|
373
374
|
| Tool | Use |
|
|
374
375
|
| --- | --- |
|
|
375
|
-
| `list_stickers` | Read a layer's stickers bottom first: id, stamp, x, y, size, rotation, color, opacity. |
|
|
376
|
-
| `add_stickers` | Place stickers exactly (`
|
|
376
|
+
| `list_stickers` | Read a layer's stickers bottom first: id, `ref` (and `stamp` for the editor's own), x, y, size, rotation, color, opacity. |
|
|
377
|
+
| `add_stickers` | Place stickers exactly (`ref` from `find_stickers`, `x`, `y`, optional `size`, `rotation`, `color`, `opacity`, `seed`) on a sticker layer or an empty layer; a provider's art loads first. Use it for deliberate placement, a sticker brush for a scatter. One undo step. Returns the new stickers with ids. |
|
|
377
378
|
| `sticker_at` | Read the top-most sticker under a point (`x`, `y`), or null. Use it to pick one sticker among many similar ones before `update_sticker`, `arrange_stickers` or `remove_stickers`. |
|
|
378
|
-
| `update_sticker` | Change one sticker by `id`: `
|
|
379
|
+
| `update_sticker` | Change one sticker by `id`: `ref`, `x`, `y`, `size`, `rotation`, `color`, `opacity`. One undo step. Returns it. |
|
|
380
|
+
| `find_stickers` | Search the sticker library (the editor's stamps unless the host plugged in its own) by words, category, tags and commercial licence, a page at a time. Returns refs (`provider:id`) for sticker brushes (`set_brush` `sticker.stamps`) and `add_stickers`, with tintable and licence. |
|
|
381
|
+
| `describe_sticker` | One sticker by `ref`: licence and attribution, colours, outline. Unknown refs are refused with the closest ones. |
|
|
379
382
|
| `arrange_stickers` | Move stickers (`ids`) to the `front` or `back` of their layer. One undo step. |
|
|
380
383
|
| `remove_stickers` | Delete stickers by `ids`, or all on the layer. One undo step. |
|
|
381
384
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stickers
|
|
7
|
+
|
|
8
|
+
A sticker library is a `StickerProvider` the host plugs in (`@pixerate/editor/stickers`); with
|
|
9
|
+
none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:star`,
|
|
10
|
+
`editor:heart`, `editor:leaf`, `editor:flower`, `editor:confetti`, `editor:splat`,
|
|
11
|
+
`editor:sparkle`, `editor:ring`, all MIT and tintable). Every sticker is named by a **ref**,
|
|
12
|
+
`provider:id`; the editors' sticker tools take refs.
|
|
13
|
+
|
|
14
|
+
## Working method
|
|
15
|
+
|
|
16
|
+
1. **Find.** `find_stickers` with a few words (`query`) and, when the result's `categories`
|
|
17
|
+
suggest one, a `category`. Pages are small: pass `next` as `after` for more, or narrow the
|
|
18
|
+
query. Filter with `commercial: true` for anything that will be sold or used in marketing.
|
|
19
|
+
2. **Check.** `describe_sticker` when the choice matters: its licence (and the attribution line
|
|
20
|
+
it asks for), dominant colours, variants and outline.
|
|
21
|
+
3. **Use.** Pass refs to the editor that places them: in the paint editor, a sticker brush
|
|
22
|
+
(`set_brush` `sticker.stamps`, then `paint_stroke`) sprays them and `add_stickers` places
|
|
23
|
+
them exactly. A provider's art loads before it is drawn.
|
|
24
|
+
4. **Colour.** Tintable stickers (flat, single-colour art) take the paint colour or a sticker's
|
|
25
|
+
`color`; the rest keep their own colours.
|
|
26
|
+
|
|
27
|
+
## Best practices
|
|
28
|
+
|
|
29
|
+
- Keep refs exactly as `find_stickers` returns them; a bare editor stamp (`star`) also works
|
|
30
|
+
and means `editor:star`.
|
|
31
|
+
- Credit stickers whose licence has an `attribution` wherever the work is published.
|
|
32
|
+
- Prefer tintable stickers when they must match a palette.
|
|
33
|
+
|
|
34
|
+
## Pitfalls
|
|
35
|
+
|
|
36
|
+
- An unknown ref is refused with the closest refs: pick one of those or search again.
|
|
37
|
+
- A category that the library doesn't have is refused with the list of its categories.
|
|
38
|
+
- `limit` is 1..100; results beyond a page need `after`, not a larger limit.
|
|
39
|
+
|
|
40
|
+
## Tool reference
|
|
41
|
+
|
|
42
|
+
| Tool | Use |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `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. |
|
|
45
|
+
| `describe_sticker` | One sticker by `ref`: everything `find_stickers` returns plus `silhouette` (SVG path data), `colours` and `variants`. Unknown refs are refused with the closest ones. Changes nothing. |
|