fluxfiles 0.2.7 → 0.2.8

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/fluxfiles.d.ts CHANGED
@@ -85,6 +85,8 @@ interface FluxFilesSDK {
85
85
  aiTag(): void;
86
86
  /** Switch locale/language at runtime. */
87
87
  setLocale(locale: string): void;
88
+ /** Crops the currently open detail file. savePath omitted/'' = overwrite in place, otherwise saves as a new file (must keep the same extension). */
89
+ crop(x: number, y: number, width: number, height: number, savePath?: string): void;
88
90
  /** Build an on-demand WebP URL for a selected image from its `img_base`. Returns '' if unavailable. */
89
91
  imgUrl(file: FluxFile, opts?: { width?: number; quality?: number; format?: 'webp' | 'auto' }): string;
90
92
  /** Push a new token (e.g. after background refresh). */
package/fluxfiles.js CHANGED
@@ -261,6 +261,11 @@
261
261
  crossMove: function(dstDisk, dstPath) { this.command('crossMove', { dst_disk: dstDisk, dst_path: dstPath || '' }); },
262
262
  aiTag: function() { this.command('aiTag'); },
263
263
  setLocale: function(locale) { this.command('setLocale', { locale: locale }); },
264
+ // Crops the currently open detail file. savePath omitted/'' = overwrite in place,
265
+ // otherwise saves as a new file (must keep the same extension).
266
+ crop: function(x, y, width, height, savePath) {
267
+ this.command('crop', { x: x, y: y, width: width, height: height, save_path: savePath || '' });
268
+ },
264
269
 
265
270
  // Build an on-demand WebP URL for a selected image file, from its
266
271
  // `img_base` (present on image entries when the webp feature is enabled).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxfiles",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "FluxFiles JavaScript SDK — embed the file manager in any web app",
5
5
  "license": "MIT",
6
6
  "main": "fluxfiles.js",