@pixerate/editor 0.264.0 → 0.265.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 (46) hide show
  1. package/dist/animation-editor/index.cjs +60 -61
  2. package/dist/animation-editor/index.js +4 -5
  3. package/dist/brushes/index.cjs +73 -60
  4. package/dist/brushes/index.d.cts +1 -0
  5. package/dist/brushes/index.d.ts +1 -0
  6. package/dist/brushes/index.js +17 -4
  7. package/dist/brushes/preview.d.cts +59 -0
  8. package/dist/brushes/preview.d.ts +59 -0
  9. package/dist/brushes/tools.d.cts +12 -5
  10. package/dist/brushes/tools.d.ts +12 -5
  11. package/dist/{brushstrokeRender-3MOI7PH4.js → brushstrokeRender-4UB6NRJW.js} +11 -4
  12. package/dist/{brushstrokeRender-SMMPIJF2.cjs → brushstrokeRender-JQ2XQRUD.cjs} +22 -15
  13. package/dist/canvas/brushstroke.d.cts +6 -1
  14. package/dist/canvas/brushstroke.d.ts +6 -1
  15. package/dist/canvas/index.cjs +16 -17
  16. package/dist/canvas/index.js +2 -3
  17. package/dist/{chunk-F3KKR6DD.cjs → chunk-5OE4ZZ6V.cjs} +30 -30
  18. package/dist/{chunk-BY5EBP26.cjs → chunk-677777GH.cjs} +3 -3
  19. package/dist/{chunk-G5ADO47G.cjs → chunk-7NQOGWLM.cjs} +3 -2
  20. package/dist/{chunk-WWI6FLH2.js → chunk-7PW6VCNW.js} +2 -2
  21. package/dist/{chunk-CECCP2V7.js → chunk-BLR4KWYQ.js} +1 -1
  22. package/dist/chunk-DEBIFWY6.cjs +77 -0
  23. package/dist/{chunk-KXNZNOEF.cjs → chunk-DGXTEPCU.cjs} +94 -94
  24. package/dist/{chunk-3CI7FRMK.js → chunk-DVPQFMH6.js} +13 -1
  25. package/dist/{chunk-EE7SAYBF.js → chunk-J4SGJCPW.js} +3 -3
  26. package/dist/{chunk-A2IS7EHE.cjs → chunk-JBZRVLXV.cjs} +14 -2
  27. package/dist/{chunk-V7MJ4HIN.cjs → chunk-NOP4Y5AB.cjs} +23 -23
  28. package/dist/{chunk-FQC5TDB6.cjs → chunk-O53MOGXG.cjs} +35 -35
  29. package/dist/{chunk-4OJC4MCD.js → chunk-Q6RVVJW6.js} +1 -1
  30. package/dist/{chunk-HAUDEVMC.js → chunk-WY23AUCA.js} +2 -2
  31. package/dist/{chunk-JEML4FSA.js → chunk-XDNWQMHY.js} +3 -2
  32. package/dist/{chunk-ROBSFJ6F.js → chunk-Z2Z2OHRM.js} +1 -1
  33. package/dist/{chunk-USJX5SW4.cjs → chunk-ZHRVCW3M.cjs} +12 -12
  34. package/dist/chunk-ZS7LB2MV.js +77 -0
  35. package/dist/image-editor/index.cjs +788 -790
  36. package/dist/image-editor/index.js +6 -8
  37. package/dist/paint-editor/controller.d.cts +1 -1
  38. package/dist/paint-editor/controller.d.ts +1 -1
  39. package/dist/paint-editor/index.cjs +92 -87
  40. package/dist/paint-editor/index.js +16 -11
  41. package/dist/vector/index.cjs +970 -971
  42. package/dist/vector/index.js +5 -6
  43. package/package.json +1 -1
  44. package/skills/pixerate-brushes/SKILL.md +7 -2
  45. package/dist/chunk-FJBQTZS4.js +0 -17
  46. package/dist/chunk-LRTR4ASZ.cjs +0 -17
@@ -26,7 +26,7 @@ import {
26
26
  traceField,
27
27
  traceVectorImage,
28
28
  vectorTraceContours
29
- } from "../chunk-CECCP2V7.js";
29
+ } from "../chunk-BLR4KWYQ.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-ROBSFJ6F.js";
56
+ } from "../chunk-Z2Z2OHRM.js";
57
57
  import {
58
58
  DEFAULT_VECTOR_FONT,
59
59
  IDENTITY_MATRIX,
@@ -529,10 +529,10 @@ import {
529
529
  withVectorStrokes,
530
530
  withVectorTargetPaint,
531
531
  zigzagPaths
532
- } from "../chunk-WWI6FLH2.js";
532
+ } from "../chunk-7PW6VCNW.js";
533
533
  import {
534
534
  snapshotBrushLibrary
535
- } from "../chunk-EE7SAYBF.js";
535
+ } from "../chunk-J4SGJCPW.js";
536
536
  import "../chunk-ACFSFUQH.js";
537
537
  import {
538
538
  createProvenance
@@ -559,8 +559,7 @@ import {
559
559
  fitCubics,
560
560
  parseSvgPath
561
561
  } from "../chunk-PWBZH3FK.js";
562
- import "../chunk-FJBQTZS4.js";
563
- import "../chunk-3CI7FRMK.js";
562
+ import "../chunk-DVPQFMH6.js";
564
563
  import {
565
564
  StickerError
566
565
  } from "../chunk-SZTI6EER.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.264.0",
3
+ "version": "0.265.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -83,8 +83,13 @@ drawn.
83
83
  - Give a brush a `colour.default` only when the medium has a typical colour (blue ballpoint,
84
84
  yellow highlighter): choosing the brush sets it as the user's colour. Use a light / dark pair
85
85
  when the right colour depends on the background (white chalk on a dark board, graphite on
86
- paper), and a `palette` for the other usual colours. `colour.own` only for brushes that must
87
- always paint their own (a rainbow marker).
86
+ paper), and a `palette` for the other usual colours. Dark inks need a pair too (navy / light
87
+ blue, near-black / near-white): a single dark default vanishes in a dark-scheme editor. Check
88
+ each side against the background it is for (3:1 at least). `colour.own` only for brushes that
89
+ must always paint their own (a rainbow marker).
90
+ - Previews and thumbnails pick their own colour against what they are drawn on (the brush's
91
+ default when it reads there, else a colour for the medium). Don't give a brush a default just
92
+ to make its preview visible: choosing the brush makes that default the user's colour.
88
93
  - Stamp tips paint the sticker's shape in the paint colour; to keep a sticker's own colours, use
89
94
  `marks` objects instead.
90
95
 
@@ -1,17 +0,0 @@
1
- import {
2
- parseCssColor
3
- } from "./chunk-3CI7FRMK.js";
4
- import {
5
- isDualColor,
6
- resolveColor
7
- } from "./chunk-VR6OGHU5.js";
8
-
9
- // src/brushes/colour.ts
10
- function brushColourHex(value, scheme) {
11
- const css = typeof value === "string" || isDualColor(value) ? resolveColor(value, scheme) : null;
12
- return css ? parseCssColor(css)?.hex.toLowerCase() ?? null : null;
13
- }
14
-
15
- export {
16
- brushColourHex
17
- };
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _chunkA2IS7EHEcjs = require('./chunk-A2IS7EHE.cjs');
4
-
5
-
6
-
7
- var _chunkMLLTWAXHcjs = require('./chunk-MLLTWAXH.cjs');
8
-
9
- // src/brushes/colour.ts
10
- function brushColourHex(value, scheme) {
11
- const css = typeof value === "string" || _chunkMLLTWAXHcjs.isDualColor.call(void 0, value) ? _chunkMLLTWAXHcjs.resolveColor.call(void 0, value, scheme) : null;
12
- return css ? _nullishCoalesce(_optionalChain([_chunkA2IS7EHEcjs.parseCssColor.call(void 0, css), 'optionalAccess', _ => _.hex, 'access', _2 => _2.toLowerCase, 'call', _3 => _3()]), () => ( null)) : null;
13
- }
14
-
15
-
16
-
17
- exports.brushColourHex = brushColourHex;