@design-edito/tools 0.1.62 → 0.1.64

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 (145) hide show
  1. package/agnostic/arrays/index.js +3 -3
  2. package/agnostic/css/index.js +6 -6
  3. package/agnostic/html/hyper-json/cast/index.js +2 -2
  4. package/agnostic/html/hyper-json/index.js +3 -3
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +2 -2
  6. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +2 -2
  7. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +2 -2
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +2 -2
  9. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +2 -2
  10. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +2 -2
  11. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +2 -2
  12. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +2 -2
  13. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +2 -2
  14. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +2 -2
  15. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +2 -2
  16. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +2 -2
  17. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +2 -2
  18. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +2 -2
  19. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +2 -2
  20. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +2 -2
  21. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +2 -2
  22. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +2 -2
  23. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +2 -2
  24. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +2 -2
  25. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +2 -2
  26. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +2 -2
  27. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +2 -2
  28. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +2 -2
  29. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +2 -2
  30. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +2 -2
  31. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +2 -2
  32. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +2 -2
  33. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +2 -2
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +2 -2
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +2 -2
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +2 -2
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +2 -2
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +2 -2
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +2 -2
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +2 -2
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +2 -2
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +2 -2
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +2 -2
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +2 -2
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +2 -2
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +2 -2
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +2 -2
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +2 -2
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +2 -2
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +2 -2
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +2 -2
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +2 -2
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +2 -2
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +2 -2
  55. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +2 -2
  56. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +2 -2
  57. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +2 -2
  58. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +2 -2
  59. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +2 -2
  60. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +2 -2
  61. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +2 -2
  62. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +2 -2
  63. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +2 -2
  64. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +2 -2
  65. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +2 -2
  66. package/agnostic/html/hyper-json/tree/index.js +2 -2
  67. package/agnostic/html/hyper-json/utils/index.js +2 -2
  68. package/agnostic/html/index.js +9 -9
  69. package/agnostic/misc/index.js +6 -6
  70. package/agnostic/misc/logs/index.js +2 -2
  71. package/agnostic/misc/lorem-ipsum/index.js +4 -4
  72. package/agnostic/numbers/index.js +4 -4
  73. package/agnostic/objects/index.js +5 -5
  74. package/agnostic/optim/index.js +3 -3
  75. package/agnostic/strings/index.js +9 -9
  76. package/chunks/chunk-46HTGOCE.js +56 -0
  77. package/chunks/chunk-4DNPGCIM.js +191 -0
  78. package/chunks/chunk-55MT7BMY.js +16 -0
  79. package/chunks/chunk-5J7H5WYC.js +82 -0
  80. package/chunks/chunk-5JAITHS2.js +48 -0
  81. package/chunks/chunk-6V7VQ32U.js +56 -0
  82. package/chunks/chunk-6Y7RZ5WD.js +48 -0
  83. package/chunks/chunk-7SS2R4B6.js +82 -0
  84. package/chunks/chunk-7SZ3QPTM.js +191 -0
  85. package/chunks/chunk-7WYDM5OX.js +37 -0
  86. package/chunks/chunk-D5E2CIDK.js +20 -0
  87. package/chunks/chunk-EBVYO2TY.js +48 -0
  88. package/chunks/chunk-ECWDSMDZ.js +20 -0
  89. package/chunks/chunk-HUT6SDJH.js +2369 -0
  90. package/chunks/chunk-I37MGRCT.js +20 -0
  91. package/chunks/chunk-IH25CV3F.js +20 -0
  92. package/chunks/chunk-JLXITDAV.js +48 -0
  93. package/chunks/chunk-JYYW4KOZ.js +72 -0
  94. package/chunks/chunk-KDTKA3SG.js +31 -0
  95. package/chunks/chunk-LVBXPZUO.js +104 -0
  96. package/chunks/chunk-NOBTN4IW.js +4471 -0
  97. package/chunks/chunk-OSCBZIZF.js +28 -0
  98. package/chunks/chunk-OXV3LVNK.js +191 -0
  99. package/chunks/chunk-QN3UAKIU.js +21 -0
  100. package/chunks/chunk-R6F2MFZZ.js +173 -0
  101. package/chunks/chunk-TC7A4P5S.js +34 -0
  102. package/chunks/chunk-VLHSIIPO.js +20 -0
  103. package/chunks/chunk-WO2R3QFK.js +20 -0
  104. package/chunks/chunk-X24BLY5H.js +31 -0
  105. package/chunks/chunk-X4XXZ44B.js +37 -0
  106. package/chunks/chunk-YSDPTGYO.js +31 -0
  107. package/chunks/chunk-YUJJEKYY.js +144 -0
  108. package/chunks/chunk-YZYA7LFK.js +20 -0
  109. package/node/@aws-s3/index.js +3 -3
  110. package/node/@aws-s3/storage/file/index.js +4 -4
  111. package/node/@aws-s3/storage/index.js +3 -3
  112. package/node/@design-edito/index.js +2 -2
  113. package/node/@design-edito/thumbnails/colors/index.d.ts +7 -4
  114. package/node/@design-edito/thumbnails/colors/index.js +7 -3
  115. package/node/@design-edito/thumbnails/index.js +4 -4
  116. package/node/@google-cloud/index.js +12 -12
  117. package/node/@google-cloud/storage/file/index.js +17 -17
  118. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
  119. package/node/@google-cloud/storage/index.js +14 -14
  120. package/node/cloud-storage/index.js +11 -11
  121. package/node/cloud-storage/operations/download/index.d.ts +2 -2
  122. package/node/cloud-storage/operations/download/index.js +3 -4
  123. package/node/cloud-storage/operations/index.js +10 -11
  124. package/node/cloud-storage/operations/upload/index.d.ts +1 -2
  125. package/node/cloud-storage/operations/upload/index.js +3 -4
  126. package/node/files/index.js +3 -3
  127. package/node/ftps/file/index.js +4 -4
  128. package/node/ftps/index.js +2 -2
  129. package/node/images/index.js +9 -5
  130. package/node/images/prepare/index.js +9 -5
  131. package/node/images/transform/index.d.ts +4 -205
  132. package/node/images/transform/index.js +8 -6
  133. package/node/images/transform/operations/area-composition/area-line-composition/index.d.ts +19 -0
  134. package/node/images/transform/operations/area-composition/area-line-composition/index.js +14 -0
  135. package/node/images/transform/operations/area-composition/area-tile-composition/index.d.ts +30 -0
  136. package/node/images/transform/operations/area-composition/area-tile-composition/index.js +15 -0
  137. package/node/images/transform/operations/area-composition/index.d.ts +31 -0
  138. package/node/images/transform/operations/area-composition/index.js +15 -0
  139. package/node/images/transform/operations/index.d.ts +207 -0
  140. package/node/images/transform/operations/index.js +21 -0
  141. package/node/images/transform/operations/inner-resize/index.d.ts +25 -0
  142. package/node/images/transform/operations/inner-resize/index.js +13 -0
  143. package/node/sftp/file/index.js +4 -4
  144. package/node/sftp/index.js +2 -2
  145. package/package.json +1 -1
@@ -2,16 +2,20 @@ import {
2
2
  MAX_NB_OUTPUTS,
3
3
  OUTPUT_ZIP_FOLDER,
4
4
  prepareImage
5
- } from "../../../chunks/chunk-QPT6R6CL.js";
5
+ } from "../../../chunks/chunk-LVBXPZUO.js";
6
6
  import "../../../chunks/chunk-5RGHYFQH.js";
7
- import "../../../chunks/chunk-HGQGQLLC.js";
8
- import "../../../chunks/chunk-YVEMIEOT.js";
7
+ import "../../../chunks/chunk-TC7A4P5S.js";
8
+ import "../../../chunks/chunk-NOBTN4IW.js";
9
+ import "../../../chunks/chunk-5J7H5WYC.js";
10
+ import "../../../chunks/chunk-R6F2MFZZ.js";
11
+ import "../../../chunks/chunk-7SS2R4B6.js";
12
+ import "../../../chunks/chunk-JYYW4KOZ.js";
9
13
  import "../../../chunks/chunk-L7EUEQZP.js";
10
- import "../../../chunks/chunk-DW4ILX77.js";
14
+ import "../../../chunks/chunk-OSCBZIZF.js";
11
15
  import "../../../chunks/chunk-454MZ5UE.js";
12
16
  import "../../../chunks/chunk-JJWKHBXD.js";
13
- import "../../../chunks/chunk-X5FAZBWL.js";
14
17
  import "../../../chunks/chunk-7DDXALPH.js";
18
+ import "../../../chunks/chunk-YUJJEKYY.js";
15
19
  import "../../../chunks/chunk-WSFCRVEQ.js";
16
20
  export {
17
21
  MAX_NB_OUTPUTS,
@@ -1,207 +1,6 @@
1
- import sharp from "sharp";
2
- declare const OperationNames: {
3
- readonly Rotate: "rotate";
4
- readonly Resize: "resize";
5
- readonly InnerResize: "inner-resize";
6
- readonly Extract: "extract";
7
- readonly Extend: "extend";
8
- readonly AreaComposition: "area-composition";
9
- readonly Composite: "composite";
10
- readonly Flop: "flop";
11
- readonly Flip: "flip";
12
- readonly Blur: "blur";
13
- readonly Flatten: "flatten";
14
- readonly Normalise: "normalise";
15
- readonly Brightness: "brightness";
16
- readonly Saturation: "saturation";
17
- readonly Hue: "hue";
18
- readonly Lightness: "lightness";
19
- readonly Modulate: "modulate";
20
- readonly Linear: "linear";
21
- };
22
- export type RotateOperationParams = {
23
- angle: number;
24
- };
25
- export type RotateOperation = {
26
- name: typeof OperationNames.Rotate;
27
- params: RotateOperationParams;
28
- };
29
- export type ResizeOperationParams = {
1
+ import { Operations } from "./operations";
2
+ export declare function transformImage(imageBuffer: Buffer, operations: Operations, maxOutputDimensions: {
30
3
  width: number;
31
4
  height: number;
32
- fit?: keyof sharp.FitEnum;
33
- };
34
- export type ResizeOperation = {
35
- name: typeof OperationNames.Resize;
36
- params: ResizeOperationParams;
37
- };
38
- export type InnerResizeOperationParams = {
39
- ratio: number;
40
- background?: {
41
- r: number;
42
- g: number;
43
- b: number;
44
- } | string;
45
- };
46
- export type InnerResizeOperation = {
47
- name: typeof OperationNames.InnerResize;
48
- params: InnerResizeOperationParams;
49
- };
50
- export type ExtractOperationParams = {
51
- left: number;
52
- top: number;
53
- width: number;
54
- height: number;
55
- };
56
- export type ExtractOperation = {
57
- name: typeof OperationNames.Extract;
58
- params: ExtractOperationParams;
59
- };
60
- export type ExtendOperationParams = {
61
- left: number;
62
- right: number;
63
- top: number;
64
- bottom: number;
65
- extendWith?: sharp.ExtendWith;
66
- background?: {
67
- r: number;
68
- g: number;
69
- b: number;
70
- } | string;
71
- };
72
- export type ExtendOperation = {
73
- name: typeof OperationNames.Extend;
74
- params: ExtendOperationParams;
75
- };
76
- export type AreaCompositionOperationParams = Partial<{}>;
77
- export type AreaCompositionOperation = {
78
- name: typeof OperationNames.AreaComposition;
79
- params: AreaCompositionOperationParams;
80
- };
81
- export type FlipOperationParams = {
82
- flip?: boolean;
83
- };
84
- export type FlipOperation = {
85
- name: typeof OperationNames.Flip;
86
- params: FlipOperationParams;
87
- };
88
- export type FlopOperationParams = {
89
- flop?: boolean;
90
- };
91
- export type FlopOperation = {
92
- name: typeof OperationNames.Flop;
93
- params: FlopOperationParams;
94
- };
95
- export type BlurOperationParams = {
96
- sigma: number;
97
- };
98
- export type BlurOperation = {
99
- name: typeof OperationNames.Blur;
100
- params: BlurOperationParams;
101
- };
102
- export type FlattenOperationParams = {
103
- background: {
104
- r: number;
105
- g: number;
106
- b: number;
107
- } | string;
108
- };
109
- export type FlattenOperation = {
110
- name: typeof OperationNames.Flatten;
111
- params: FlattenOperationParams;
112
- };
113
- export type NormaliseOperationParams = {
114
- lower: number;
115
- upper: number;
116
- };
117
- export type NormaliseOperation = {
118
- name: typeof OperationNames.Normalise;
119
- params: NormaliseOperationParams;
120
- };
121
- export type BrightnessOperationParams = {
122
- brightness: number;
123
- };
124
- export type BrightnessOperation = {
125
- name: typeof OperationNames.Brightness;
126
- params: BrightnessOperationParams;
127
- };
128
- export type SaturationOperationParams = {
129
- saturation: number;
130
- };
131
- export type SaturationOperation = {
132
- name: typeof OperationNames.Saturation;
133
- params: SaturationOperationParams;
134
- };
135
- export type HueOperationParams = {
136
- hue: number;
137
- };
138
- export type HueOperation = {
139
- name: typeof OperationNames.Hue;
140
- params: HueOperationParams;
141
- };
142
- export type LightnessOperationParams = {
143
- lightness: number;
144
- };
145
- export type LightnessOperation = {
146
- name: typeof OperationNames.Lightness;
147
- params: LightnessOperationParams;
148
- };
149
- export type ModulateOperationParams = {
150
- brightness?: number;
151
- lightness?: number;
152
- hue?: number;
153
- saturation?: number;
154
- };
155
- export type ModulateOperation = {
156
- name: typeof OperationNames.Modulate;
157
- params: ModulateOperationParams;
158
- };
159
- export type LinearOperationParams = {
160
- multiplier: number | [number, number, number];
161
- offset?: number | [number, number, number];
162
- };
163
- export type LinearOperation = {
164
- name: typeof OperationNames.Linear;
165
- params: LinearOperationParams;
166
- };
167
- export type CompositeOperationParamsOverlayFill = {
168
- mode: 'fill';
169
- channels?: sharp.Create['channels'];
170
- background: sharp.Create['background'];
171
- };
172
- export type CompositeOperationParamsOverlayGradient = {
173
- mode: 'gradient';
174
- angle: number;
175
- stops: {
176
- color: string;
177
- offset: number;
178
- }[];
179
- };
180
- export type CompositeOperationParams = {
181
- images: {
182
- input: Buffer | {
183
- overlay: {
184
- width?: sharp.Create['width'];
185
- height?: sharp.Create['height'];
186
- } & (CompositeOperationParamsOverlayFill | CompositeOperationParamsOverlayGradient);
187
- };
188
- blend: sharp.Blend;
189
- gravity: sharp.Gravity;
190
- top?: number;
191
- left?: number;
192
- tile?: boolean;
193
- }[];
194
- };
195
- export type CompositeOperation = {
196
- name: typeof OperationNames.Composite;
197
- params: CompositeOperationParams;
198
- };
199
- export type Operation = RotateOperation | InnerResizeOperation | ResizeOperation | ExtractOperation | AreaCompositionOperation | CompositeOperation | FlipOperation | FlopOperation | BlurOperation | BrightnessOperation | SaturationOperation | HueOperation | FlattenOperation | NormaliseOperation | ExtendOperation | LightnessOperation | ModulateOperation | LinearOperation;
200
- export type Operations = Operation[];
201
- export type Dimensions = {
202
- width: number;
203
- height: number;
204
- };
205
- export declare function transformImage(imageBuffer: Buffer, operations: Operations, maxDimensions: Dimensions): Promise<Buffer<ArrayBufferLike>>;
206
- export declare function isOperation(operation: unknown): operation is Operation;
207
- export {};
5
+ }): Promise<Buffer<ArrayBufferLike>>;
6
+ export { Operations };
@@ -1,16 +1,18 @@
1
1
  import {
2
- isOperation,
3
2
  transformImage
4
- } from "../../../chunks/chunk-HGQGQLLC.js";
5
- import "../../../chunks/chunk-YVEMIEOT.js";
3
+ } from "../../../chunks/chunk-TC7A4P5S.js";
4
+ import "../../../chunks/chunk-NOBTN4IW.js";
5
+ import "../../../chunks/chunk-5J7H5WYC.js";
6
+ import "../../../chunks/chunk-R6F2MFZZ.js";
7
+ import "../../../chunks/chunk-7SS2R4B6.js";
8
+ import "../../../chunks/chunk-JYYW4KOZ.js";
6
9
  import "../../../chunks/chunk-L7EUEQZP.js";
7
- import "../../../chunks/chunk-DW4ILX77.js";
10
+ import "../../../chunks/chunk-OSCBZIZF.js";
8
11
  import "../../../chunks/chunk-454MZ5UE.js";
9
12
  import "../../../chunks/chunk-JJWKHBXD.js";
10
- import "../../../chunks/chunk-X5FAZBWL.js";
11
13
  import "../../../chunks/chunk-7DDXALPH.js";
14
+ import "../../../chunks/chunk-YUJJEKYY.js";
12
15
  import "../../../chunks/chunk-WSFCRVEQ.js";
13
16
  export {
14
- isOperation,
15
17
  transformImage
16
18
  };
@@ -0,0 +1,19 @@
1
+ import sharp from "sharp";
2
+ export type ColorTransformation = {
3
+ type: 'saturate' | 'lighten' | 'complement';
4
+ intensity: number;
5
+ intensityMode: 'add' | 'set';
6
+ };
7
+ export type LineAreaComposition = {
8
+ type: 'line';
9
+ params: {
10
+ nbLines: number;
11
+ colors: {
12
+ base: 'first' | 'last' | number;
13
+ primary: ColorTransformation[];
14
+ secondary: ColorTransformation[];
15
+ };
16
+ };
17
+ };
18
+ export declare const DEFAULT_COMPOSITION_LINE_PARAMS: LineAreaComposition['params'];
19
+ export declare function areaLineCompose(inputSharp: sharp.Sharp, composition: LineAreaComposition, options: CompositionOptions): Promise<sharp.OverlayOptions[]>;
@@ -0,0 +1,14 @@
1
+ import {
2
+ DEFAULT_COMPOSITION_LINE_PARAMS,
3
+ areaLineCompose
4
+ } from "../../../../../../chunks/chunk-JYYW4KOZ.js";
5
+ import "../../../../../../chunks/chunk-OSCBZIZF.js";
6
+ import "../../../../../../chunks/chunk-454MZ5UE.js";
7
+ import "../../../../../../chunks/chunk-JJWKHBXD.js";
8
+ import "../../../../../../chunks/chunk-7DDXALPH.js";
9
+ import "../../../../../../chunks/chunk-YUJJEKYY.js";
10
+ import "../../../../../../chunks/chunk-WSFCRVEQ.js";
11
+ export {
12
+ DEFAULT_COMPOSITION_LINE_PARAMS,
13
+ areaLineCompose
14
+ };
@@ -0,0 +1,30 @@
1
+ import { Thumbnails } from "../../../../../@design-edito";
2
+ import sharp from "sharp";
3
+ export type TileAreaComposition = {
4
+ type: 'tile';
5
+ params: {
6
+ coverage: number;
7
+ densityA: {
8
+ min: number;
9
+ max: number;
10
+ };
11
+ densityB: {
12
+ min: number;
13
+ max: number;
14
+ };
15
+ format: 'random' | 'default' | 'portrait' | 'landscape';
16
+ xEasing: string;
17
+ yEasing: string;
18
+ };
19
+ };
20
+ export type Dimensions = {
21
+ w: number;
22
+ h: number;
23
+ };
24
+ export declare function getSharpTilesInputs(tiles: {
25
+ x: number;
26
+ y: number;
27
+ w: number;
28
+ h: number;
29
+ }[], palette: Thumbnails.Colors.Palette): Array<SharpInput>;
30
+ export declare function areaTileCompose(inputSharp: sharp.Sharp, composition: TileAreaComposition, options: CompositionOptions): Promise<sharp.OverlayOptions[]>;
@@ -0,0 +1,15 @@
1
+ import {
2
+ areaTileCompose,
3
+ getSharpTilesInputs
4
+ } from "../../../../../../chunks/chunk-7SS2R4B6.js";
5
+ import "../../../../../../chunks/chunk-L7EUEQZP.js";
6
+ import "../../../../../../chunks/chunk-OSCBZIZF.js";
7
+ import "../../../../../../chunks/chunk-454MZ5UE.js";
8
+ import "../../../../../../chunks/chunk-JJWKHBXD.js";
9
+ import "../../../../../../chunks/chunk-7DDXALPH.js";
10
+ import "../../../../../../chunks/chunk-YUJJEKYY.js";
11
+ import "../../../../../../chunks/chunk-WSFCRVEQ.js";
12
+ export {
13
+ areaTileCompose,
14
+ getSharpTilesInputs
15
+ };
@@ -0,0 +1,31 @@
1
+ import sharp from "sharp";
2
+ import { Palette } from "../../../../@design-edito/thumbnails/colors";
3
+ import { LineAreaComposition } from "./area-line-composition";
4
+ import { TileAreaComposition } from "./area-tile-composition";
5
+ type CompositionType = TileAreaComposition | LineAreaComposition;
6
+ type RequiredAreaCompositionParams = {
7
+ innerTransformation: {
8
+ w: number;
9
+ h: number;
10
+ x: number;
11
+ y: number;
12
+ };
13
+ palette: {
14
+ additionalColors: Palette;
15
+ createFrom: ('default' | 'default-lighten' | 'default-saturate' | 'complementary' | 'complementary-lighten' | 'complementary-saturate')[];
16
+ maxDensity: number;
17
+ useAdditionalColorsOnly: boolean;
18
+ useExtractFromInner: boolean;
19
+ extractDensity: number;
20
+ lightenIntensity: number;
21
+ saturateIntensity: number;
22
+ };
23
+ composition: CompositionType | undefined;
24
+ };
25
+ export type AreaCompositionParams = {
26
+ innerTransformation: RequiredAreaCompositionParams['innerTransformation'];
27
+ palette?: Partial<RequiredAreaCompositionParams['palette']>;
28
+ composition?: Partial<RequiredAreaCompositionParams['composition']>;
29
+ };
30
+ export declare function areaCompose(inputSharp: sharp.Sharp, customParams?: Partial<AreaCompositionParams>): Promise<sharp.Sharp>;
31
+ export {};
@@ -0,0 +1,15 @@
1
+ import {
2
+ areaCompose
3
+ } from "../../../../../chunks/chunk-R6F2MFZZ.js";
4
+ import "../../../../../chunks/chunk-7SS2R4B6.js";
5
+ import "../../../../../chunks/chunk-JYYW4KOZ.js";
6
+ import "../../../../../chunks/chunk-L7EUEQZP.js";
7
+ import "../../../../../chunks/chunk-OSCBZIZF.js";
8
+ import "../../../../../chunks/chunk-454MZ5UE.js";
9
+ import "../../../../../chunks/chunk-JJWKHBXD.js";
10
+ import "../../../../../chunks/chunk-7DDXALPH.js";
11
+ import "../../../../../chunks/chunk-YUJJEKYY.js";
12
+ import "../../../../../chunks/chunk-WSFCRVEQ.js";
13
+ export {
14
+ areaCompose
15
+ };
@@ -0,0 +1,207 @@
1
+ import sharp from "sharp";
2
+ import { AreaCompositionParams } from "./area-composition";
3
+ import { InnerResizeParams } from "./inner-resize";
4
+ declare const OperationNames: {
5
+ readonly Rotate: "rotate";
6
+ readonly Resize: "resize";
7
+ readonly InnerResize: "inner-resize";
8
+ readonly Extract: "extract";
9
+ readonly Extend: "extend";
10
+ readonly AreaComposition: "area-composition";
11
+ readonly Composite: "composite";
12
+ readonly Flop: "flop";
13
+ readonly Flip: "flip";
14
+ readonly Blur: "blur";
15
+ readonly Flatten: "flatten";
16
+ readonly Normalise: "normalise";
17
+ readonly Brightness: "brightness";
18
+ readonly Saturation: "saturation";
19
+ readonly Hue: "hue";
20
+ readonly Lightness: "lightness";
21
+ readonly Modulate: "modulate";
22
+ readonly Linear: "linear";
23
+ };
24
+ export { OperationNames };
25
+ export type RotateOperationParams = {
26
+ angle: number;
27
+ };
28
+ export type RotateOperation = {
29
+ name: typeof OperationNames.Rotate;
30
+ params: RotateOperationParams;
31
+ };
32
+ export type ResizeOperationParams = {
33
+ width: number;
34
+ height: number;
35
+ fit?: keyof sharp.FitEnum;
36
+ };
37
+ export type ResizeOperation = {
38
+ name: typeof OperationNames.Resize;
39
+ params: ResizeOperationParams;
40
+ };
41
+ export type InnerResizeOperationParams = InnerResizeParams;
42
+ export type InnerResizeOperation = {
43
+ name: typeof OperationNames.InnerResize;
44
+ params: InnerResizeOperationParams;
45
+ };
46
+ export type ExtractOperationParams = {
47
+ left: number;
48
+ top: number;
49
+ width: number;
50
+ height: number;
51
+ };
52
+ export type ExtractOperation = {
53
+ name: typeof OperationNames.Extract;
54
+ params: ExtractOperationParams;
55
+ };
56
+ export type ExtendOperationParams = {
57
+ left: number;
58
+ right: number;
59
+ top: number;
60
+ bottom: number;
61
+ extendWith?: sharp.ExtendWith;
62
+ background?: {
63
+ r: number;
64
+ g: number;
65
+ b: number;
66
+ } | string;
67
+ };
68
+ export type ExtendOperation = {
69
+ name: typeof OperationNames.Extend;
70
+ params: ExtendOperationParams;
71
+ };
72
+ export type AreaCompositionOperationParams = Partial<AreaCompositionParams>;
73
+ export type AreaCompositionOperation = {
74
+ name: typeof OperationNames.AreaComposition;
75
+ params: AreaCompositionOperationParams;
76
+ };
77
+ export type FlipOperationParams = {
78
+ flip?: boolean;
79
+ };
80
+ export type FlipOperation = {
81
+ name: typeof OperationNames.Flip;
82
+ params: FlipOperationParams;
83
+ };
84
+ export type FlopOperationParams = {
85
+ flop?: boolean;
86
+ };
87
+ export type FlopOperation = {
88
+ name: typeof OperationNames.Flop;
89
+ params: FlopOperationParams;
90
+ };
91
+ export type BlurOperationParams = {
92
+ sigma: number;
93
+ };
94
+ export type BlurOperation = {
95
+ name: typeof OperationNames.Blur;
96
+ params: BlurOperationParams;
97
+ };
98
+ export type FlattenOperationParams = {
99
+ background: {
100
+ r: number;
101
+ g: number;
102
+ b: number;
103
+ } | string;
104
+ };
105
+ export type FlattenOperation = {
106
+ name: typeof OperationNames.Flatten;
107
+ params: FlattenOperationParams;
108
+ };
109
+ export type NormaliseOperationParams = {
110
+ lower: number;
111
+ upper: number;
112
+ };
113
+ export type NormaliseOperation = {
114
+ name: typeof OperationNames.Normalise;
115
+ params: NormaliseOperationParams;
116
+ };
117
+ export type BrightnessOperationParams = {
118
+ brightness: number;
119
+ };
120
+ export type BrightnessOperation = {
121
+ name: typeof OperationNames.Brightness;
122
+ params: BrightnessOperationParams;
123
+ };
124
+ export type SaturationOperationParams = {
125
+ saturation: number;
126
+ };
127
+ export type SaturationOperation = {
128
+ name: typeof OperationNames.Saturation;
129
+ params: SaturationOperationParams;
130
+ };
131
+ export type HueOperationParams = {
132
+ hue: number;
133
+ };
134
+ export type HueOperation = {
135
+ name: typeof OperationNames.Hue;
136
+ params: HueOperationParams;
137
+ };
138
+ export type LightnessOperationParams = {
139
+ lightness: number;
140
+ };
141
+ export type LightnessOperation = {
142
+ name: typeof OperationNames.Lightness;
143
+ params: LightnessOperationParams;
144
+ };
145
+ export type ModulateOperationParams = {
146
+ brightness?: number;
147
+ lightness?: number;
148
+ hue?: number;
149
+ saturation?: number;
150
+ };
151
+ export type ModulateOperation = {
152
+ name: typeof OperationNames.Modulate;
153
+ params: ModulateOperationParams;
154
+ };
155
+ export type LinearOperationParams = {
156
+ multiplier: number | [number, number, number];
157
+ offset?: number | [number, number, number];
158
+ };
159
+ export type LinearOperation = {
160
+ name: typeof OperationNames.Linear;
161
+ params: LinearOperationParams;
162
+ };
163
+ export type CompositeOperationParamsOverlayFill = {
164
+ mode: 'fill';
165
+ channels?: sharp.Create['channels'];
166
+ background: sharp.Create['background'];
167
+ };
168
+ export type CompositeOperationParamsOverlayGradient = {
169
+ mode: 'gradient';
170
+ angle: number;
171
+ stops: {
172
+ color: string;
173
+ offset: number;
174
+ }[];
175
+ };
176
+ export type CompositeOperationParams = {
177
+ images: {
178
+ input: Buffer | {
179
+ overlay: {
180
+ width?: sharp.Create['width'];
181
+ height?: sharp.Create['height'];
182
+ } & (CompositeOperationParamsOverlayFill | CompositeOperationParamsOverlayGradient);
183
+ };
184
+ blend: sharp.Blend;
185
+ gravity: sharp.Gravity;
186
+ top?: number;
187
+ left?: number;
188
+ tile?: boolean;
189
+ }[];
190
+ };
191
+ export type CompositeOperation = {
192
+ name: typeof OperationNames.Composite;
193
+ params: CompositeOperationParams;
194
+ };
195
+ export type Operation = RotateOperation | InnerResizeOperation | ResizeOperation | ExtractOperation | AreaCompositionOperation | CompositeOperation | FlipOperation | FlopOperation | BlurOperation | BrightnessOperation | SaturationOperation | HueOperation | FlattenOperation | NormaliseOperation | ExtendOperation | LightnessOperation | ModulateOperation | LinearOperation;
196
+ export type Operations = Operation[];
197
+ export declare function isOperation(operation: unknown): operation is Operation;
198
+ export type Transformation = {
199
+ width: number;
200
+ height: number;
201
+ x: number;
202
+ y: number;
203
+ };
204
+ export declare function applyOperation(imageSharp: sharp.Sharp, operation: Operation, transformation: Transformation): Promise<{
205
+ sharp: sharp.Sharp;
206
+ transformation?: Partial<Transformation>;
207
+ }>;
@@ -0,0 +1,21 @@
1
+ import {
2
+ OperationNames,
3
+ applyOperation,
4
+ isOperation
5
+ } from "../../../../chunks/chunk-NOBTN4IW.js";
6
+ import "../../../../chunks/chunk-5J7H5WYC.js";
7
+ import "../../../../chunks/chunk-R6F2MFZZ.js";
8
+ import "../../../../chunks/chunk-7SS2R4B6.js";
9
+ import "../../../../chunks/chunk-JYYW4KOZ.js";
10
+ import "../../../../chunks/chunk-L7EUEQZP.js";
11
+ import "../../../../chunks/chunk-OSCBZIZF.js";
12
+ import "../../../../chunks/chunk-454MZ5UE.js";
13
+ import "../../../../chunks/chunk-JJWKHBXD.js";
14
+ import "../../../../chunks/chunk-7DDXALPH.js";
15
+ import "../../../../chunks/chunk-YUJJEKYY.js";
16
+ import "../../../../chunks/chunk-WSFCRVEQ.js";
17
+ export {
18
+ OperationNames,
19
+ applyOperation,
20
+ isOperation
21
+ };
@@ -0,0 +1,25 @@
1
+ import sharp from "sharp";
2
+ export type InnerGravity = 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right';
3
+ export type InnerResizeTransformation = {
4
+ width: number;
5
+ height: number;
6
+ x: number;
7
+ y: number;
8
+ };
9
+ export type InnerResizeParams = {
10
+ outputDimensions?: {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ innerRatio?: number;
15
+ innerGravity?: InnerGravity;
16
+ background?: {
17
+ r: number;
18
+ g: number;
19
+ b: number;
20
+ } | string;
21
+ };
22
+ export declare function innerResize(imageSharp: sharp.Sharp, params: InnerResizeParams): Promise<{
23
+ sharp: sharp.Sharp;
24
+ transformation: InnerResizeTransformation;
25
+ }>;
@@ -0,0 +1,13 @@
1
+ import {
2
+ innerResize
3
+ } from "../../../../../chunks/chunk-5J7H5WYC.js";
4
+ import "../../../../../chunks/chunk-L7EUEQZP.js";
5
+ import "../../../../../chunks/chunk-OSCBZIZF.js";
6
+ import "../../../../../chunks/chunk-454MZ5UE.js";
7
+ import "../../../../../chunks/chunk-JJWKHBXD.js";
8
+ import "../../../../../chunks/chunk-7DDXALPH.js";
9
+ import "../../../../../chunks/chunk-YUJJEKYY.js";
10
+ import "../../../../../chunks/chunk-WSFCRVEQ.js";
11
+ export {
12
+ innerResize
13
+ };
@@ -1,10 +1,10 @@
1
- import "../../../chunks/chunk-WDXNM5YB.js";
2
- import {
3
- download_exports
4
- } from "../../../chunks/chunk-OD33BN4K.js";
1
+ import "../../../chunks/chunk-VLHSIIPO.js";
5
2
  import {
6
3
  upload_exports
7
4
  } from "../../../chunks/chunk-AZLVQV5A.js";
5
+ import {
6
+ download_exports
7
+ } from "../../../chunks/chunk-OD33BN4K.js";
8
8
  import "../../../chunks/chunk-JMU5PDBD.js";
9
9
  import "../../../chunks/chunk-FENXVJYO.js";
10
10
  import "../../../chunks/chunk-WSFCRVEQ.js";