@pixerate/editor 0.97.0 → 0.99.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/THIRD_PARTY_NOTICES.md +4 -2
- package/dist/animation-editor/index.cjs +55 -53
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +3 -2
- package/dist/animation-editor/index.d.ts +3 -2
- package/dist/animation-editor/index.js +11 -9
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/chunk-DWGZUSES.cjs +694 -0
- package/dist/chunk-DWGZUSES.cjs.map +1 -0
- package/dist/chunk-GX332W2C.js +181 -0
- package/dist/chunk-GX332W2C.js.map +1 -0
- package/dist/{chunk-7MD7C6XQ.cjs → chunk-JF5PXN7W.cjs} +96 -744
- package/dist/chunk-JF5PXN7W.cjs.map +1 -0
- package/dist/chunk-KKREERP2.js +694 -0
- package/dist/chunk-KKREERP2.js.map +1 -0
- package/dist/chunk-MUUXNRU4.cjs +181 -0
- package/dist/chunk-MUUXNRU4.cjs.map +1 -0
- package/dist/{chunk-OEVSVA6V.js → chunk-WIR377F6.js} +788 -22
- package/dist/chunk-WIR377F6.js.map +1 -0
- package/dist/{chunk-4AB5BHYK.cjs → chunk-WT6ZAWJP.cjs} +788 -22
- package/dist/chunk-WT6ZAWJP.cjs.map +1 -0
- package/dist/{chunk-4JLB2USO.js → chunk-YGZNGDIT.js} +45 -693
- package/dist/chunk-YGZNGDIT.js.map +1 -0
- package/dist/image-editor/index.cjs +1798 -333
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +482 -6
- package/dist/image-editor/index.d.ts +482 -6
- package/dist/image-editor/index.js +1488 -23
- package/dist/image-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +23 -2
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.d.cts +98 -2
- package/dist/raster/index.d.ts +98 -2
- package/dist/raster/index.js +23 -2
- package/dist/{svg-ymShkNtu.d.cts → svg-C9r284x8.d.cts} +6 -9
- package/dist/{svg-Dh17jCyA.d.ts → svg-MVKBqwD4.d.ts} +6 -9
- package/dist/types-CwMPoRMU.d.cts +40 -0
- package/dist/types-CwMPoRMU.d.ts +40 -0
- package/dist/vector/index.cjs +490 -554
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +154 -292
- package/dist/vector/index.d.ts +154 -292
- package/dist/vector/index.js +91 -155
- package/dist/vector/index.js.map +1 -1
- package/dist/warp-B8rAguzs.d.ts +165 -0
- package/dist/warp-nYs2DPrx.d.cts +165 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +49 -3
- package/dist/chunk-4AB5BHYK.cjs.map +0 -1
- package/dist/chunk-4JLB2USO.js.map +0 -1
- package/dist/chunk-7MD7C6XQ.cjs.map +0 -1
- 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 };
|