@eagami/ui 5.89.0 → 5.90.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": "@eagami/ui",
3
- "version": "5.89.0",
3
+ "version": "5.90.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -1197,9 +1197,12 @@ export interface AvatarEditorCropState {
1197
1197
  /**
1198
1198
  * Canvas-based image editor for cropping avatars. Supports drag-and-drop
1199
1199
  * upload, mouse/touch panning, zoom via slider or scroll wheel, and exports
1200
- * the cropped image as either a `Blob` or a data URL.
1200
+ * the cropped image as either a `Blob` or a data URL. With `letterbox` on, the
1201
+ * image can be zoomed out until it fits the frame whole, and
1202
+ * `--ea-avatar-editor-letterbox` fills the frame around it.
1201
1203
  */
1202
1204
  export declare class AvatarEditorComponent implements OnDestroy {
1205
+ readonly rootEl: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
1203
1206
  readonly canvasEl: import("@angular/core").Signal<ElementRef<HTMLCanvasElement> | undefined>;
1204
1207
  readonly fileInputEl: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
1205
1208
  protected readonly i18n: EagamiI18nService;
@@ -1215,6 +1218,7 @@ export declare class AvatarEditorComponent implements OnDestroy {
1215
1218
  readonly exportQuality: import("@angular/core").InputSignal<number>;
1216
1219
  readonly exportType: import("@angular/core").InputSignal<string>;
1217
1220
  readonly displayWidth: import("@angular/core").InputSignal<number | undefined>;
1221
+ readonly letterbox: import("@angular/core").InputSignal<boolean>;
1218
1222
  readonly cropState: import("@angular/core").InputSignal<AvatarEditorCropState | null | undefined>;
1219
1223
  /** Fires when the user finalises a crop via {@link exportCrop}; payload contains both `Blob` and data URL. */
1220
1224
  readonly cropped: import("@angular/core").OutputEmitterRef<AvatarEditorCropEvent>;
@@ -1236,6 +1240,8 @@ export declare class AvatarEditorComponent implements OnDestroy {
1236
1240
  readonly canRevert: import("@angular/core").Signal<boolean>;
1237
1241
  /** Height of the crop frame, from `canvasSize` as its width and `aspectRatio`. */
1238
1242
  readonly frameHeight: import("@angular/core").Signal<number>;
1243
+ /** Lowest zoom the controls reach, down to the whole image fitting the frame when `letterbox` is on. */
1244
+ readonly lowestZoom: import("@angular/core").Signal<number>;
1239
1245
  /** True when the part of the image inside the frame is narrower than `displayWidth`, so the exported crop would be upscaled. */
1240
1246
  readonly isLowResolution: import("@angular/core").Signal<boolean>;
1241
1247
  /** True when the visible crop is darker than mid-grey; drives the `--on-light` class on the overlay so the "Change photo" affordance stays readable. */
@@ -1312,6 +1318,8 @@ export declare class AvatarEditorComponent implements OnDestroy {
1312
1318
  private getDrawParams;
1313
1319
  private applyZoom;
1314
1320
  private clampOffset;
1321
+ private clampAxis;
1322
+ private letterboxColor;
1315
1323
  private draw;
1316
1324
  /**
1317
1325
  * Samples the visible crop region and stores whether it's darker than
@@ -1388,6 +1396,11 @@ export declare class AvatarEditorComponent implements OnDestroy {
1388
1396
  "required": false;
1389
1397
  "isSignal": true;
1390
1398
  };
1399
+ "letterbox": {
1400
+ "alias": "letterbox";
1401
+ "required": false;
1402
+ "isSignal": true;
1403
+ };
1391
1404
  "cropState": {
1392
1405
  "alias": "cropState";
1393
1406
  "required": false;