@sveltia/cms 0.68.0 → 0.69.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/cms",
3
- "version": "0.68.0",
3
+ "version": "0.69.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
package/types/public.d.ts CHANGED
@@ -17,6 +17,10 @@ export type MediaLibraryName = "default" | "cloudinary" | "uploadcare";
17
17
  * Supported raster image format.
18
18
  */
19
19
  export type RasterImageFormat = "avif" | "bmp" | "gif" | "jpeg" | "png" | "webp";
20
+ /**
21
+ * Supported vector image format.
22
+ */
23
+ export type VectorImageFormat = "svg";
20
24
  /**
21
25
  * Supported raster image conversion format. We don’t support AVIF at this time because no browser
22
26
  * supports AVIF encoding natively and `@jsquash/avif` is slow. Meanwhile, browsers other than
@@ -48,10 +52,23 @@ export type RasterImageTransformationOptions = {
48
52
  * Raster image transformation option map.
49
53
  */
50
54
  export type RasterImageTransformations = Record<RasterImageFormat | "raster_image", RasterImageTransformationOptions>;
55
+ /**
56
+ * Vector image transformation option map.
57
+ */
58
+ export type VectorImageTransformationOptions = {
59
+ /**
60
+ * Whether to optimize the image.
61
+ */
62
+ optimize?: boolean;
63
+ };
64
+ /**
65
+ * Vector image transformation option map.
66
+ */
67
+ export type VectorImageTransformations = Record<VectorImageFormat, VectorImageTransformationOptions>;
51
68
  /**
52
69
  * Image transformation option map.
53
70
  */
54
- export type ImageTransformations = RasterImageTransformations;
71
+ export type ImageTransformations = RasterImageTransformations & VectorImageTransformations;
55
72
  /**
56
73
  * File transformation option map.
57
74
  */