@pixerate/editor 0.242.0 → 0.243.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.
Files changed (45) hide show
  1. package/dist/animation-editor/index.cjs +59 -59
  2. package/dist/animation-editor/index.js +3 -3
  3. package/dist/{brushstrokeRender-MOYGEXOC.js → brushstrokeRender-274HGNZR.js} +3 -3
  4. package/dist/{brushstrokeRender-UKADOV5D.cjs → brushstrokeRender-C7RJZPMC.cjs} +5 -5
  5. package/dist/canvas/index.cjs +8 -8
  6. package/dist/canvas/index.js +1 -1
  7. package/dist/{chunk-KCMV2534.cjs → chunk-3WOZEBXZ.cjs} +2 -2
  8. package/dist/{chunk-ZDPLZDTT.js → chunk-4ZHXLFXS.js} +1 -1
  9. package/dist/{chunk-5BR7LC24.cjs → chunk-5FZS7J7C.cjs} +50 -4
  10. package/dist/{chunk-ILM6GYAX.js → chunk-6L3WWIDW.js} +1 -1
  11. package/dist/{chunk-UDBDYZET.js → chunk-H4Z72Z4Z.js} +1 -1
  12. package/dist/{chunk-XBZK47LV.js → chunk-HQZHOPNE.js} +49 -3
  13. package/dist/{chunk-QP2B3MID.js → chunk-IXI5KATU.js} +1 -1
  14. package/dist/{chunk-HGGJ36HR.cjs → chunk-KK2FWMA2.cjs} +1 -1
  15. package/dist/{chunk-AFLMXITL.cjs → chunk-OONFIFEU.cjs} +23 -23
  16. package/dist/{chunk-HW72ABGR.cjs → chunk-R2FVAKFH.cjs} +86 -86
  17. package/dist/{chunk-NE6OOKWJ.js → chunk-SRXWDOUI.js} +1 -1
  18. package/dist/{chunk-7F4G74UQ.cjs → chunk-UV7OOZJQ.cjs} +35 -35
  19. package/dist/image-editor/index.cjs +775 -775
  20. package/dist/image-editor/index.js +4 -4
  21. package/dist/paint-editor/brushes.d.cts +18 -2
  22. package/dist/paint-editor/brushes.d.ts +18 -2
  23. package/dist/paint-editor/controller.d.cts +28 -0
  24. package/dist/paint-editor/controller.d.ts +28 -0
  25. package/dist/paint-editor/document.d.cts +3 -0
  26. package/dist/paint-editor/document.d.ts +3 -0
  27. package/dist/paint-editor/index.cjs +1011 -493
  28. package/dist/paint-editor/index.js +560 -42
  29. package/dist/paint-editor/light.d.cts +74 -0
  30. package/dist/paint-editor/light.d.ts +74 -0
  31. package/dist/paint-editor/stroke.d.cts +14 -0
  32. package/dist/paint-editor/stroke.d.ts +14 -0
  33. package/dist/paint-editor/thick-tools.d.cts +2 -2
  34. package/dist/paint-editor/thick-tools.d.ts +2 -2
  35. package/dist/paint-editor/thick.d.cts +5 -1
  36. package/dist/paint-editor/thick.d.ts +5 -1
  37. package/dist/paint-editor/ui.d.cts +2 -0
  38. package/dist/paint-editor/ui.d.ts +2 -0
  39. package/dist/vector/index.cjs +962 -962
  40. package/dist/vector/index.js +4 -4
  41. package/package.json +1 -1
  42. package/skills/pixerate-paint-editor/SKILL.md +9 -9
  43. package/skills/pixerate-paint-editor/references/canvas-hosted.md +8 -0
  44. package/skills/pixerate-paint-editor/references/light-paint.md +31 -0
  45. package/skills/pixerate-paint-oil-impasto/SKILL.md +1 -0
@@ -26,7 +26,7 @@ import {
26
26
  traceField,
27
27
  traceVectorImage,
28
28
  vectorTraceContours
29
- } from "../chunk-UDBDYZET.js";
29
+ } from "../chunk-H4Z72Z4Z.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-ZDPLZDTT.js";
56
+ } from "../chunk-4ZHXLFXS.js";
57
57
  import {
58
58
  DEFAULT_VECTOR_FONT,
59
59
  IDENTITY_MATRIX,
@@ -526,8 +526,8 @@ import {
526
526
  withVectorStrokes,
527
527
  withVectorTargetPaint,
528
528
  zigzagPaths
529
- } from "../chunk-ILM6GYAX.js";
530
- import "../chunk-XBZK47LV.js";
529
+ } from "../chunk-6L3WWIDW.js";
530
+ import "../chunk-HQZHOPNE.js";
531
531
  import {
532
532
  createProvenance
533
533
  } from "../chunk-M6DNZNVY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.242.0",
3
+ "version": "0.243.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -159,8 +159,9 @@ read [references/wet-media.md](references/wet-media.md) for the engine and the w
159
159
 
160
160
  ## Oils and thick paint
161
161
 
162
- Wet oil barely flows and blends where the brush meets it; impasto brushes add relief lit by
163
- `set_lighting`. Load `pixerate-paint-oil-impasto`, and read [references/oils.md](references/oils.md).
162
+ Wet oil blends where the brush meets it; impasto adds relief lit by `set_lighting`: load
163
+ `pixerate-paint-oil-impasto` and read [references/oils.md](references/oils.md). **Light paint**
164
+ (neon, glowing glass: `light.amount`, the Light category): [references/light-paint.md](references/light-paint.md).
164
165
 
165
166
  ## Gradient paint
166
167
 
@@ -261,12 +262,8 @@ When to use which:
261
262
 
262
263
  ## Canvas-hosted layer
263
264
 
264
- A host can mount the painting as a layer of a larger canvas (`createPaintEditorToolProvider` with
265
- `origin`). Then every position you pass or read back is a canvas coordinate, not a document
266
- pixel: stroke points, picks, bounds, guides, stencils, stickers and wet areas alike.
267
- `get_canvas_info` `bounds` says where the painting lies on that canvas; paint inside it. The
268
- host may leave out tools it owns (`new_canvas`, `set_canvas`, `extend_canvas`, exports, the
269
- view), so work with the tools you are given.
265
+ When `get_canvas_info` has `bounds`, the painting is a layer of a larger canvas and every position
266
+ is a canvas coordinate: read [references/canvas-hosted.md](references/canvas-hosted.md).
270
267
 
271
268
  ## Tool reference
272
269
 
@@ -375,7 +372,10 @@ view), so work with the tools you are given.
375
372
  | --- | --- |
376
373
  | `set_lighting` | Move the light for thick paint and metallic paper: `azimuth` (degrees clockwise from the top), `elevation` (5..90), `relief` (0..1). Nothing is repainted; not an undo step. Returns the lighting. Use a low elevation to show brushwork. |
377
374
  | `get_relief` | Read a layer's relief (`bounds`, `maxHeight` 0..255, null when flat) and the lighting. Changes nothing. |
378
- | `flatten_relief` | Remove a layer's relief and material, keeping its colour. One undo step. Returns whether anything was flattened. |
375
+ | `flatten_relief` | Remove a layer's relief and material (rim and clarity too), keeping its colour and light. One undo step. Returns whether anything was flattened. |
376
+ | `get_light` | Read a layer's light paint: `hasLight`, `bounds`, `peak` 0..255 and its `spill`. Changes nothing. |
377
+ | `set_light_spill` | How far a layer's light spills (`radius` px, 0 off) and how strongly (`strength` 0..2). Not an undo step; nothing is repainted. |
378
+ | `clear_light` | Take a layer's light away, keeping its colour. One undo step. |
379
379
 
380
380
  ### Stickers
381
381
 
@@ -0,0 +1,8 @@
1
+ # Canvas-hosted layer
2
+
3
+ A host can mount the painting as a layer of a larger canvas (`createPaintEditorToolProvider` with
4
+ `origin`). Then every position you pass or read back is a canvas coordinate, not a document
5
+ pixel: stroke points, picks, bounds, guides, stencils, stickers and wet areas alike.
6
+ `get_canvas_info` `bounds` says where the painting lies on that canvas; paint inside it. The
7
+ host may leave out tools it owns (`new_canvas`, `set_canvas`, `extend_canvas`, exports, the
8
+ view), so work with the tools you are given.
@@ -0,0 +1,31 @@
1
+ # Light paint
2
+
3
+ Light paint is paint that gives off light: neon, light painting, glow-in-the-dark, glowing glassy
4
+ tubes. Any dab, particle, bristle, Mixer Brush or impasto brush lays it with `light.amount` above 0
5
+ (`set_brush`); the Light category presets are ready-made (`glow-gel`, `neon-marker`,
6
+ `light-airbrush`, `spark-trail`).
7
+
8
+ - **What it does.** Each layer keeps a light channel next to its colour. The light's colour is the
9
+ paint's colour at that pixel, so recolouring paint recolours its light. It glows (the paint
10
+ itself is brighter, whatever `set_lighting` says) and spills onto everything around and below it
11
+ in each stroke's own colour.
12
+ - **It behaves like paint.** Plain paint over glowing paint dims it; erasers remove it; smudges,
13
+ blenders, the knife, the Mixer Brush and pick-up brushes carry it with the colour they move. A
14
+ smeared neon line glows along the smear. `clear_light` takes it away and keeps the colour.
15
+ - **Spill** (`set_light_spill`, per layer): `radius` px (default 24; 0 turns it off) and
16
+ `strength` 0..2 (default 1). It is not an undo step and repaints nothing; it shows the
17
+ painting as committed, so a stroke's spill appears when the stroke ends. It spills onto
18
+ everything below, paper included, so it reads best on dark paper (`set_paper` colour).
19
+ - **Glassy beads** (impasto): `impasto.rim` makes a bead's light stronger at its edges, where its
20
+ surface turns away (backlit glass); `impasto.clarity` lets the middle of a bead show the layers
21
+ below while its edges stay solid. `glow-gel` uses both: paint loops with a distance-mapped
22
+ gradient (`set_paint`) for glowing glass tubes.
23
+ - **Crossings.** Beads on one layer fuse where they cross (their heights combine by maximum), so
24
+ clarity only shows other layers: paint one loop per layer for glassy crossings.
25
+ - **Spill vs a glow layer style.** Spill takes each stroke's colour and strength. For a one-colour
26
+ halo around everything on a layer, use a blend or an effect layer instead.
27
+ - **Not yet:** wet brushes (glowing watercolour is planned, #494), sticker sprays and stroke layers
28
+ refuse light above 0, with the alternatives.
29
+ - **PSD.** `export_psd` writes each layer's pixels with their glow, and its spill as a
30
+ "‹layer› light" Linear Dodge (Add) layer directly above it. Re-importing gives plain pixel
31
+ layers, not editable light.
@@ -66,6 +66,7 @@ This skill is the method. `pixerate-paint-editor` has the full tool reference an
66
66
  | Scraped, smeared texture | `palette-knife` |
67
67
  | Blobs of paint straight from the tube | `paint-tube` |
68
68
  | A glossy bead or line | `gloop-pen` |
69
+ | A glowing, glassy bead (a neon or glass tube) | `glow-gel` (light paint with rim and clarity, on dark paper; one loop per layer where they cross) |
69
70
  | Dry, broken strokes over texture | `dry-brush`, or a lower `impasto.load` |
70
71
  | A metallic highlight | `metallic-paint` |
71
72
  | Paint that stays exactly as laid | `set_instant_dry` on |