@underlayerdev/ui 0.10.1 → 0.11.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
|
@@ -885,14 +885,14 @@ type ImageCropperShape = 'rectangle' | 'round';
|
|
|
885
885
|
* third-party crop mechanics never leak outside the design system —
|
|
886
886
|
* consumers only ever see `ul-image-cropper`.
|
|
887
887
|
*
|
|
888
|
-
*
|
|
889
|
-
* -
|
|
890
|
-
*
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
888
|
+
* The frame is always what moves/resizes, never the photo: ngx-image-cropper
|
|
889
|
+
* only bounds-checks that path (`checkCropperWithinMaxSizeBounds`) — its
|
|
890
|
+
* alternative "drag the photo within a fixed frame" mode applies pan
|
|
891
|
+
* offsets with no clamping at all, so the photo could be dragged clean out
|
|
892
|
+
* of the frame. `aspectRatio` just decides whether that frame is locked to
|
|
893
|
+
* a ratio (e.g. `1` for an avatar) or freely resizable (the default — for
|
|
894
|
+
* listing photos, which keep their own shape today, see `um-image-upload`'s
|
|
895
|
+
* auto-width carousel).
|
|
896
896
|
*
|
|
897
897
|
* Emits a resized `File`, ready to hand to any upload call that accepts
|
|
898
898
|
* one — this component only produces the file, it never uploads it.
|
|
@@ -922,11 +922,7 @@ declare class ImageCropperComponent {
|
|
|
922
922
|
readonly imageFile: _angular_core.InputSignal<File | null>;
|
|
923
923
|
/** Visual shape of the crop mask. */
|
|
924
924
|
readonly shape: _angular_core.InputSignal<ImageCropperShape>;
|
|
925
|
-
/**
|
|
926
|
-
* Locks the crop frame to this width/height ratio and switches to
|
|
927
|
-
* pan-and-zoom mode. Omit (or pass null) for a free-form resizable frame
|
|
928
|
-
* with no ratio imposed.
|
|
929
|
-
*/
|
|
925
|
+
/** Locks the crop frame to this width/height ratio. Omit (or pass null) for a free-form frame. */
|
|
930
926
|
readonly aspectRatio: _angular_core.InputSignal<number | null>;
|
|
931
927
|
/** Longest side (px) of the final output image; scales down without distorting. */
|
|
932
928
|
readonly maxOutputSize: _angular_core.InputSignal<number>;
|
|
@@ -934,15 +930,11 @@ declare class ImageCropperComponent {
|
|
|
934
930
|
readonly title: _angular_core.InputSignal<string>;
|
|
935
931
|
/** Label for the confirm button. */
|
|
936
932
|
readonly confirmLabel: _angular_core.InputSignal<string>;
|
|
937
|
-
/** Label for the cancel button. */
|
|
938
|
-
readonly cancelLabel: _angular_core.InputSignal<string>;
|
|
939
|
-
/** Label next to the zoom slider (locked-aspect mode only). */
|
|
940
|
-
readonly zoomLabel: _angular_core.InputSignal<string>;
|
|
941
933
|
/** Accessible label for the crop frame. */
|
|
942
934
|
readonly frameAriaLabel: _angular_core.InputSignal<string>;
|
|
943
935
|
/** Emitted with the cropped, resized photo once the user confirms. */
|
|
944
936
|
readonly cropped: _angular_core.OutputEmitterRef<File>;
|
|
945
|
-
/** Emitted when the user
|
|
937
|
+
/** Emitted when the user dismisses the modal (backdrop, Escape, close button) without cropping. */
|
|
946
938
|
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
947
939
|
/** Emitted when the source photo fails to load in the cropper. */
|
|
948
940
|
readonly loadFailed: _angular_core.OutputEmitterRef<void>;
|
|
@@ -952,22 +944,13 @@ declare class ImageCropperComponent {
|
|
|
952
944
|
protected readonly isLocked: _angular_core.Signal<boolean>;
|
|
953
945
|
/** ngx-image-cropper always wants a number here; unused while isLocked() is false. */
|
|
954
946
|
protected readonly effectiveAspectRatio: _angular_core.Signal<number>;
|
|
955
|
-
protected readonly
|
|
956
|
-
protected readonly frameHeight: _angular_core.Signal<number | undefined>;
|
|
957
|
-
protected readonly minZoom = 1;
|
|
958
|
-
protected readonly maxZoom = 3;
|
|
959
|
-
protected readonly zoomStep = 0.01;
|
|
960
|
-
protected readonly zoom: _angular_core.WritableSignal<number>;
|
|
961
|
-
protected readonly transform: _angular_core.Signal<{
|
|
962
|
-
scale: number;
|
|
963
|
-
}>;
|
|
947
|
+
protected readonly minFrameDimension = 40;
|
|
964
948
|
protected readonly cropperReady: _angular_core.WritableSignal<boolean>;
|
|
965
949
|
constructor();
|
|
966
|
-
protected onZoomInput(event: Event): void;
|
|
967
950
|
protected onConfirm(): Promise<void>;
|
|
968
|
-
protected
|
|
951
|
+
protected onClosed(): void;
|
|
969
952
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImageCropperComponent, never>;
|
|
970
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImageCropperComponent, "ul-image-cropper", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "imageFile": { "alias": "imageFile"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; "maxOutputSize": { "alias": "maxOutputSize"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "
|
|
953
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImageCropperComponent, "ul-image-cropper", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "imageFile": { "alias": "imageFile"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; "maxOutputSize": { "alias": "maxOutputSize"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "frameAriaLabel": { "alias": "frameAriaLabel"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "cropped": "cropped"; "cancelled": "cancelled"; "loadFailed": "loadFailed"; }, never, never, true, never>;
|
|
971
954
|
}
|
|
972
955
|
|
|
973
956
|
type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|