@pixerate/editor 0.97.0 → 0.98.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 (52) hide show
  1. package/THIRD_PARTY_NOTICES.md +4 -2
  2. package/dist/animation-editor/index.cjs +55 -53
  3. package/dist/animation-editor/index.cjs.map +1 -1
  4. package/dist/animation-editor/index.d.cts +3 -2
  5. package/dist/animation-editor/index.d.ts +3 -2
  6. package/dist/animation-editor/index.js +11 -9
  7. package/dist/animation-editor/index.js.map +1 -1
  8. package/dist/chunk-DWGZUSES.cjs +694 -0
  9. package/dist/chunk-DWGZUSES.cjs.map +1 -0
  10. package/dist/chunk-GX332W2C.js +181 -0
  11. package/dist/chunk-GX332W2C.js.map +1 -0
  12. package/dist/{chunk-7MD7C6XQ.cjs → chunk-JF5PXN7W.cjs} +96 -744
  13. package/dist/chunk-JF5PXN7W.cjs.map +1 -0
  14. package/dist/chunk-KKREERP2.js +694 -0
  15. package/dist/chunk-KKREERP2.js.map +1 -0
  16. package/dist/chunk-MUUXNRU4.cjs +181 -0
  17. package/dist/chunk-MUUXNRU4.cjs.map +1 -0
  18. package/dist/{chunk-OEVSVA6V.js → chunk-WIR377F6.js} +788 -22
  19. package/dist/chunk-WIR377F6.js.map +1 -0
  20. package/dist/{chunk-4AB5BHYK.cjs → chunk-WT6ZAWJP.cjs} +788 -22
  21. package/dist/chunk-WT6ZAWJP.cjs.map +1 -0
  22. package/dist/{chunk-4JLB2USO.js → chunk-YGZNGDIT.js} +45 -693
  23. package/dist/chunk-YGZNGDIT.js.map +1 -0
  24. package/dist/image-editor/index.cjs +1280 -299
  25. package/dist/image-editor/index.cjs.map +1 -1
  26. package/dist/image-editor/index.d.cts +304 -5
  27. package/dist/image-editor/index.d.ts +304 -5
  28. package/dist/image-editor/index.js +991 -10
  29. package/dist/image-editor/index.js.map +1 -1
  30. package/dist/raster/index.cjs +23 -2
  31. package/dist/raster/index.cjs.map +1 -1
  32. package/dist/raster/index.d.cts +98 -2
  33. package/dist/raster/index.d.ts +98 -2
  34. package/dist/raster/index.js +23 -2
  35. package/dist/{svg-ymShkNtu.d.cts → svg-C9r284x8.d.cts} +6 -9
  36. package/dist/{svg-Dh17jCyA.d.ts → svg-MVKBqwD4.d.ts} +6 -9
  37. package/dist/types-CwMPoRMU.d.cts +40 -0
  38. package/dist/types-CwMPoRMU.d.ts +40 -0
  39. package/dist/vector/index.cjs +490 -554
  40. package/dist/vector/index.cjs.map +1 -1
  41. package/dist/vector/index.d.cts +154 -292
  42. package/dist/vector/index.d.ts +154 -292
  43. package/dist/vector/index.js +91 -155
  44. package/dist/vector/index.js.map +1 -1
  45. package/dist/warp-B8rAguzs.d.ts +165 -0
  46. package/dist/warp-nYs2DPrx.d.cts +165 -0
  47. package/package.json +1 -1
  48. package/skills/pixerate-image-editor/SKILL.md +49 -3
  49. package/dist/chunk-4AB5BHYK.cjs.map +0 -1
  50. package/dist/chunk-4JLB2USO.js.map +0 -1
  51. package/dist/chunk-7MD7C6XQ.cjs.map +0 -1
  52. package/dist/chunk-OEVSVA6V.js.map +0 -1
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Plain geometry types shared by the vector and image editors. No DOM, no editor types.
3
+ */
4
+ /** A point (or a vector) in some 2D space. */
5
+ interface Vec2 {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ /** An axis-aligned box: top-left corner, width and height. */
10
+ interface Box {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ }
16
+ /** An affine matrix `[a, b, c, d, e, f]`: `x' = a·x + c·y + e`, `y' = b·x + d·y + f` (SVG order). */
17
+ type AffineMatrix = readonly [number, number, number, number, number, number];
18
+ /**
19
+ * A 3×3 projective map, row-major: `[x', y', w'] = H · [x, y, 1]`, so `x' = (h0 x + h1 y + h2) / w'`
20
+ * and `y' = (h3 x + h4 y + h5) / w'` with `w' = h6 x + h7 y + h8`.
21
+ */
22
+ type Homography = readonly [number, number, number, number, number, number, number, number, number];
23
+ /** A quadrilateral's corners clockwise on screen (y down) from the top left: TL, TR, BR, BL. */
24
+ type Quad = readonly [Vec2, Vec2, Vec2, Vec2];
25
+ /** Warp presets (Photoshop's fifteen, in menu order). */
26
+ type WarpStyle = 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist';
27
+ /**
28
+ * A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
29
+ * boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
30
+ * `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the output
31
+ * space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
32
+ * of 3, handles where one is.
33
+ */
34
+ interface WarpMesh {
35
+ us: number[];
36
+ vs: number[];
37
+ points: Vec2[];
38
+ }
39
+
40
+ export type { AffineMatrix as A, Box as B, Homography as H, Quad as Q, Vec2 as V, WarpStyle as W, WarpMesh as a };