@pixerate/editor 0.101.0 → 0.103.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 (67) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -0
  2. package/dist/agent/index.cjs +7 -7
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.js +7 -7
  5. package/dist/canvas/index.cjs +3 -3
  6. package/dist/canvas/index.cjs.map +1 -1
  7. package/dist/canvas/index.js +4 -4
  8. package/dist/{chunk-WIR377F6.js → chunk-67FRIOPZ.js} +15 -12
  9. package/dist/chunk-67FRIOPZ.js.map +1 -0
  10. package/dist/chunk-6BU5WU4R.cjs +1 -0
  11. package/dist/chunk-6BU5WU4R.cjs.map +1 -0
  12. package/dist/{chunk-IB53LVGV.js → chunk-DS7KDKPX.js} +1 -1
  13. package/dist/chunk-NQLQ2JOI.js +7176 -0
  14. package/dist/chunk-NQLQ2JOI.js.map +1 -0
  15. package/dist/{chunk-ZZOTHJ4K.cjs → chunk-PV42JITT.cjs} +1 -1
  16. package/dist/{chunk-ZZOTHJ4K.cjs.map → chunk-PV42JITT.cjs.map} +1 -1
  17. package/dist/chunk-VSMM7B3P.cjs +7176 -0
  18. package/dist/chunk-VSMM7B3P.cjs.map +1 -0
  19. package/dist/{chunk-WT6ZAWJP.cjs → chunk-WSTEXEKD.cjs} +27 -24
  20. package/dist/chunk-WSTEXEKD.cjs.map +1 -0
  21. package/dist/chunk-XYBJKUAU.js +1 -0
  22. package/dist/chunk-XYBJKUAU.js.map +1 -0
  23. package/dist/compositor-B1ZrKR89.d.ts +835 -0
  24. package/dist/compositor-CTMU-B1t.d.cts +835 -0
  25. package/dist/export-BLpMyCYg.d.ts +3139 -0
  26. package/dist/export-X9rY79p0.d.cts +3139 -0
  27. package/dist/homography-CZ-tFjay.d.cts +50 -0
  28. package/dist/homography-Ctfjoc1b.d.ts +50 -0
  29. package/dist/image-editor/index.cjs +3889 -8657
  30. package/dist/image-editor/index.cjs.map +1 -1
  31. package/dist/image-editor/index.d.cts +224 -2723
  32. package/dist/image-editor/index.d.ts +224 -2723
  33. package/dist/image-editor/index.js +3326 -8094
  34. package/dist/image-editor/index.js.map +1 -1
  35. package/dist/mixer-DG_9Yu2W.d.ts +282 -0
  36. package/dist/mixer-DGcH6HLu.d.cts +282 -0
  37. package/dist/paint/index.cjs +4 -3
  38. package/dist/paint/index.cjs.map +1 -1
  39. package/dist/paint/index.d.cts +3 -281
  40. package/dist/paint/index.d.ts +3 -281
  41. package/dist/paint/index.js +2 -1
  42. package/dist/paint-editor/index.cjs +3330 -0
  43. package/dist/paint-editor/index.cjs.map +1 -0
  44. package/dist/paint-editor/index.d.cts +1233 -0
  45. package/dist/paint-editor/index.d.ts +1233 -0
  46. package/dist/paint-editor/index.js +3330 -0
  47. package/dist/paint-editor/index.js.map +1 -0
  48. package/dist/raster/index.cjs +2 -2
  49. package/dist/raster/index.d.cts +6 -827
  50. package/dist/raster/index.d.ts +6 -827
  51. package/dist/raster/index.js +1 -1
  52. package/dist/{surface-DIA-XatS.d.cts → surface-AfHCH7BR.d.cts} +1 -1
  53. package/dist/{surface-DIA-XatS.d.ts → surface-AfHCH7BR.d.ts} +1 -1
  54. package/dist/tools/index.cjs +3 -3
  55. package/dist/tools/index.cjs.map +1 -1
  56. package/dist/tools/index.js +3 -3
  57. package/dist/vector/index.d.cts +2 -1
  58. package/dist/vector/index.d.ts +2 -1
  59. package/dist/{warp-B8rAguzs.d.ts → warp-CWHZzE3x.d.ts} +2 -49
  60. package/dist/{warp-nYs2DPrx.d.cts → warp-D5jz_tN7.d.cts} +2 -49
  61. package/package.json +6 -1
  62. package/skills/README.md +1 -0
  63. package/skills/pixerate-image-editor/SKILL.md +69 -11
  64. package/skills/pixerate-paint-editor/SKILL.md +162 -0
  65. package/dist/chunk-WIR377F6.js.map +0 -1
  66. package/dist/chunk-WT6ZAWJP.cjs.map +0 -1
  67. /package/dist/{chunk-IB53LVGV.js.map → chunk-DS7KDKPX.js.map} +0 -0
@@ -0,0 +1,50 @@
1
+ import { H as Homography, V as Vec2, B as Box, Q as Quad, A as AffineMatrix } from './types-CwMPoRMU.cjs';
2
+
3
+ /**
4
+ * Perspective (projective) maps between quadrilaterals: Free Distort and Perspective in both the
5
+ * vector and the image editor. Pure maths; degenerate or non-finite input gives `null` instead of
6
+ * NaNs.
7
+ *
8
+ * Ported from ArtCraft (MIT OR Apache-2.0, © ArtCraft Team and contributors; see
9
+ * THIRD_PARTY_NOTICES.md): pdfcraft `crates/geom/src/perspective.rs` (`Homography::from_points`,
10
+ * `Homography::apply`, `solve8`, `order_quad`) and photocraft `crates/algo/src/transform.rs`
11
+ * (`Homography::square_to_quad`, `rect_to_quad`, `inverse`, `mul`, `local_scale`, `front_side`,
12
+ * `warp_output_bounds`, `convex_quad`).
13
+ */
14
+
15
+ /**
16
+ * Gaussian elimination with partial pivoting on an 8×8 system (the 9th column of each row is the
17
+ * right-hand side). Null when the system is singular.
18
+ */
19
+ declare function solve8(rows: readonly (readonly number[])[]): number[] | null;
20
+ /** The image of `p`, or null where the map sends it to infinity. */
21
+ declare function applyHomography(h: Homography, p: Vec2): Vec2 | null;
22
+ /**
23
+ * The projective map that takes each of `from` to the point at the same index of `to`. Null when
24
+ * three of either set are collinear or a coordinate is not finite.
25
+ */
26
+ declare function homographyFromPoints(from: readonly Vec2[], to: readonly Vec2[]): Homography | null;
27
+ /**
28
+ * Whether `h` maps the whole convex quad `quad` without sending any of it through infinity (the
29
+ * denominator keeps one sign over it): what a usable distortion needs.
30
+ */
31
+ declare function homographyKeepsQuad(h: Homography, quad: readonly Vec2[]): boolean;
32
+ /**
33
+ * The four corners in reading order for a y-down space: top-left, top-right, bottom-right,
34
+ * bottom-left, whatever order they come in. Null unless they form a convex quadrilateral with a
35
+ * non-negligible area.
36
+ */
37
+ declare function orderQuad(points: readonly Vec2[]): Vec2[] | null;
38
+ /** The inverse map, or null for a singular one. */
39
+ declare function invertHomography(m: Homography): Homography | null;
40
+ /** An affine matrix (SVG order) as a homography. */
41
+ declare function homographyFromAffine(m: AffineMatrix): Homography;
42
+ /**
43
+ * The map taking box `r`'s corners onto `quad` (TL, TR, BR, BL), exact for parallelograms (then
44
+ * affine). Null for an empty box, a non-finite or degenerate quad, or a singular result.
45
+ */
46
+ declare function rectToQuad(r: Box, quad: readonly Vec2[]): Homography | null;
47
+ /** Box `r`'s corners as a quad (TL, TR, BR, BL). */
48
+ declare function boxQuad(r: Box): Quad;
49
+
50
+ export { applyHomography as a, homographyKeepsQuad as b, boxQuad as c, homographyFromAffine as d, homographyFromPoints as h, invertHomography as i, orderQuad as o, rectToQuad as r, solve8 as s };
@@ -0,0 +1,50 @@
1
+ import { H as Homography, V as Vec2, B as Box, Q as Quad, A as AffineMatrix } from './types-CwMPoRMU.js';
2
+
3
+ /**
4
+ * Perspective (projective) maps between quadrilaterals: Free Distort and Perspective in both the
5
+ * vector and the image editor. Pure maths; degenerate or non-finite input gives `null` instead of
6
+ * NaNs.
7
+ *
8
+ * Ported from ArtCraft (MIT OR Apache-2.0, © ArtCraft Team and contributors; see
9
+ * THIRD_PARTY_NOTICES.md): pdfcraft `crates/geom/src/perspective.rs` (`Homography::from_points`,
10
+ * `Homography::apply`, `solve8`, `order_quad`) and photocraft `crates/algo/src/transform.rs`
11
+ * (`Homography::square_to_quad`, `rect_to_quad`, `inverse`, `mul`, `local_scale`, `front_side`,
12
+ * `warp_output_bounds`, `convex_quad`).
13
+ */
14
+
15
+ /**
16
+ * Gaussian elimination with partial pivoting on an 8×8 system (the 9th column of each row is the
17
+ * right-hand side). Null when the system is singular.
18
+ */
19
+ declare function solve8(rows: readonly (readonly number[])[]): number[] | null;
20
+ /** The image of `p`, or null where the map sends it to infinity. */
21
+ declare function applyHomography(h: Homography, p: Vec2): Vec2 | null;
22
+ /**
23
+ * The projective map that takes each of `from` to the point at the same index of `to`. Null when
24
+ * three of either set are collinear or a coordinate is not finite.
25
+ */
26
+ declare function homographyFromPoints(from: readonly Vec2[], to: readonly Vec2[]): Homography | null;
27
+ /**
28
+ * Whether `h` maps the whole convex quad `quad` without sending any of it through infinity (the
29
+ * denominator keeps one sign over it): what a usable distortion needs.
30
+ */
31
+ declare function homographyKeepsQuad(h: Homography, quad: readonly Vec2[]): boolean;
32
+ /**
33
+ * The four corners in reading order for a y-down space: top-left, top-right, bottom-right,
34
+ * bottom-left, whatever order they come in. Null unless they form a convex quadrilateral with a
35
+ * non-negligible area.
36
+ */
37
+ declare function orderQuad(points: readonly Vec2[]): Vec2[] | null;
38
+ /** The inverse map, or null for a singular one. */
39
+ declare function invertHomography(m: Homography): Homography | null;
40
+ /** An affine matrix (SVG order) as a homography. */
41
+ declare function homographyFromAffine(m: AffineMatrix): Homography;
42
+ /**
43
+ * The map taking box `r`'s corners onto `quad` (TL, TR, BR, BL), exact for parallelograms (then
44
+ * affine). Null for an empty box, a non-finite or degenerate quad, or a singular result.
45
+ */
46
+ declare function rectToQuad(r: Box, quad: readonly Vec2[]): Homography | null;
47
+ /** Box `r`'s corners as a quad (TL, TR, BR, BL). */
48
+ declare function boxQuad(r: Box): Quad;
49
+
50
+ export { applyHomography as a, homographyKeepsQuad as b, boxQuad as c, homographyFromAffine as d, homographyFromPoints as h, invertHomography as i, orderQuad as o, rectToQuad as r, solve8 as s };