@radix-ng/primitives 1.0.5 → 1.0.6
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/fesm2022/radix-ng-primitives-accordion.mjs +35 -27
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
- package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +11 -7
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs +7 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +44 -28
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
- package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +69 -42
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +25 -16
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +41 -22
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +7 -5
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
- package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +58 -35
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +595 -102
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +23 -18
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
- package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/package.json +2 -2
- package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
- package/types/radix-ng-primitives-combobox.d.ts +28 -9
- package/types/radix-ng-primitives-context-menu.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +6 -3
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
- package/types/radix-ng-primitives-menu.d.ts +47 -15
- package/types/radix-ng-primitives-menubar.d.ts +6 -1
- package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
- package/types/radix-ng-primitives-popover.d.ts +12 -4
- package/types/radix-ng-primitives-preview-card.d.ts +18 -5
- package/types/radix-ng-primitives-select.d.ts +186 -391
- package/types/radix-ng-primitives-tooltip.d.ts +17 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, input, Component, inject, ElementRef, Injector, PLATFORM_ID, numberAttribute, booleanAttribute, output, signal, computed, afterNextRender, effect, untracked, NgModule } from '@angular/core';
|
|
2
|
+
import { Directive, input, ChangeDetectionStrategy, Component, inject, ElementRef, Injector, PLATFORM_ID, numberAttribute, booleanAttribute, output, signal, computed, afterNextRender, effect, untracked, NgModule } from '@angular/core';
|
|
3
3
|
import { createContext, clamp, injectId, resizeEffect } from '@radix-ng/primitives/core';
|
|
4
4
|
import { isPlatformBrowser } from '@angular/common';
|
|
5
5
|
|
|
@@ -9,10 +9,10 @@ class RdxCropperCropAreaDirective {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.rootContext = injectCropperRootContext();
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperCropAreaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxCropperCropAreaDirective, isStandalone: true, selector: "[rdxCropperCropArea]", host: { properties: { "style": "rootContext.cropAreaStyle()" } }, ngImport: i0 }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperCropAreaDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
18
18
|
selector: '[rdxCropperCropArea]',
|
|
@@ -26,10 +26,10 @@ class RdxCropperDescriptionDirective {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
this.rootContext = injectCropperRootContext();
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxCropperDescriptionDirective, isStandalone: true, selector: "[rdxCropperDescription]", host: { properties: { "attr.id": "rootContext.descriptionId" } }, ngImport: i0 }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperDescriptionDirective, decorators: [{
|
|
33
33
|
type: Directive,
|
|
34
34
|
args: [{
|
|
35
35
|
selector: '[rdxCropperDescription]',
|
|
@@ -42,17 +42,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
42
42
|
class RdxCropperImageComponent {
|
|
43
43
|
constructor() {
|
|
44
44
|
this.rootContext = injectCropperRootContext();
|
|
45
|
-
this.imgClass = input(
|
|
46
|
-
|
|
45
|
+
this.imgClass = input(/* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [undefined, { debugName: "imgClass" }] : /* istanbul ignore next */ []));
|
|
47
|
+
this.imgStyles = input(/* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [undefined, { debugName: "imgStyles" }] : /* istanbul ignore next */ []));
|
|
47
49
|
/**
|
|
48
50
|
* `alt` text for the rendered image. Defaults to `''` (decorative — screen readers skip it, since
|
|
49
51
|
* the cropper widget describes itself via the root's label/description). Set a non-empty value to
|
|
50
52
|
* give the image a meaningful accessible name.
|
|
51
53
|
*/
|
|
52
|
-
this.imgAlt = input('',
|
|
54
|
+
this.imgAlt = input('', /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "imgAlt" }] : /* istanbul ignore next */ []));
|
|
53
56
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: RdxCropperImageComponent, isStandalone: true, selector: "[rdxCropperImage]", inputs: { imgClass: { classPropertyName: "imgClass", publicName: "imgClass", isSignal: true, isRequired: false, transformFunction: null }, imgStyles: { classPropertyName: "imgStyles", publicName: "imgStyles", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "rootContext.imageWrapperStyle()" } }, ngImport: i0, template: `
|
|
56
59
|
<img
|
|
57
60
|
[class]="imgClass()"
|
|
58
61
|
[src]="rootContext.image()"
|
|
@@ -60,11 +63,12 @@ class RdxCropperImageComponent {
|
|
|
60
63
|
[draggable]="false"
|
|
61
64
|
[alt]="imgAlt()"
|
|
62
65
|
/>
|
|
63
|
-
`, isInline: true }); }
|
|
66
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
64
67
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperImageComponent, decorators: [{
|
|
66
69
|
type: Component,
|
|
67
70
|
args: [{
|
|
71
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
68
72
|
selector: '[rdxCropperImage]',
|
|
69
73
|
host: {
|
|
70
74
|
'[style]': 'rootContext.imageWrapperStyle()'
|
|
@@ -159,7 +163,8 @@ class RdxCropperRootDirective {
|
|
|
159
163
|
this.injector = inject(Injector);
|
|
160
164
|
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
161
165
|
this.CROPPER_DESC_WARN_MESSAGE = `Warning: \`Cropper\` requires a description element for accessibility.`;
|
|
162
|
-
this.image = input.required(
|
|
166
|
+
this.image = input.required(/* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []));
|
|
163
168
|
this.cropPadding = input(25, { ...(ngDevMode ? { debugName: "cropPadding" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
164
169
|
this.aspectRatio = input(1, { ...(ngDevMode ? { debugName: "aspectRatio" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
165
170
|
this.minZoom = input(1, { ...(ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
@@ -171,16 +176,20 @@ class RdxCropperRootDirective {
|
|
|
171
176
|
this.zoomKeyboardStep = input(0.1, { ...(ngDevMode ? { debugName: "zoomKeyboardStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
172
177
|
this.zoom = input(undefined, { ...(ngDevMode ? { debugName: "zoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
173
178
|
/** Accessible name for the cropper widget. */
|
|
174
|
-
this.ariaLabel = input('Interactive image cropper',
|
|
179
|
+
this.ariaLabel = input('Interactive image cropper', /* @ts-ignore */
|
|
180
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
175
181
|
/** Disables all interaction (drag, wheel/pinch zoom, keyboard); exposed as `data-disabled`. */
|
|
176
182
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
177
183
|
this.onCropChange = output();
|
|
178
184
|
this.onZoomChange = output();
|
|
179
185
|
// State signals
|
|
180
|
-
this.imgWidth = signal(null,
|
|
181
|
-
|
|
186
|
+
this.imgWidth = signal(null, /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "imgWidth" }] : /* istanbul ignore next */ []));
|
|
188
|
+
this.imgHeight = signal(null, /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "imgHeight" }] : /* istanbul ignore next */ []));
|
|
182
190
|
/** Raw content-box size (px) of the root, fed by the ResizeObserver / initial measure. */
|
|
183
|
-
this.containerSize = signal({ width: 0, height: 0 },
|
|
191
|
+
this.containerSize = signal({ width: 0, height: 0 }, /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "containerSize" }] : /* istanbul ignore next */ []));
|
|
184
193
|
/**
|
|
185
194
|
* Crop-area size derived from the container minus padding, fitted to `aspectRatio`. A `computed`
|
|
186
195
|
* (not a written signal) so it stays reactive to `aspectRatio` / `cropPadding` changes, not only
|
|
@@ -199,20 +208,30 @@ class RdxCropperRootDirective {
|
|
|
199
208
|
return { width: maxPossibleHeight * aspectRatio, height: maxPossibleHeight };
|
|
200
209
|
}
|
|
201
210
|
return { width: maxPossibleWidth, height: maxPossibleWidth / aspectRatio };
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
this.
|
|
205
|
-
|
|
206
|
-
this.
|
|
211
|
+
}, /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "cropAreaSize" }] : /* istanbul ignore next */ []));
|
|
213
|
+
this.cropAreaWidth = computed(() => this.cropAreaSize().width, /* @ts-ignore */
|
|
214
|
+
...(ngDevMode ? [{ debugName: "cropAreaWidth" }] : /* istanbul ignore next */ []));
|
|
215
|
+
this.cropAreaHeight = computed(() => this.cropAreaSize().height, /* @ts-ignore */
|
|
216
|
+
...(ngDevMode ? [{ debugName: "cropAreaHeight" }] : /* istanbul ignore next */ []));
|
|
217
|
+
this.imageWrapperWidth = signal(0, /* @ts-ignore */
|
|
218
|
+
...(ngDevMode ? [{ debugName: "imageWrapperWidth" }] : /* istanbul ignore next */ []));
|
|
219
|
+
this.imageWrapperHeight = signal(0, /* @ts-ignore */
|
|
220
|
+
...(ngDevMode ? [{ debugName: "imageWrapperHeight" }] : /* istanbul ignore next */ []));
|
|
207
221
|
/** Raw (unclamped) pan-offset intent (px) written by gestures; clamping lives in `clampedOffset`. */
|
|
208
|
-
this.offset = signal({ x: 0, y: 0 },
|
|
209
|
-
|
|
210
|
-
this.
|
|
222
|
+
this.offset = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
223
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
224
|
+
this.internalZoom = signal(this.minZoom(), /* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [{ debugName: "internalZoom" }] : /* istanbul ignore next */ []));
|
|
226
|
+
this.isDragging = signal(false, /* @ts-ignore */
|
|
227
|
+
...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
|
|
211
228
|
// SSR-stable, deterministic id (the project's CDK-free `_IdGenerator` replacement) so the
|
|
212
229
|
// `aria-describedby` reference matches between server and client renders.
|
|
213
230
|
this.descriptionId = injectId('rdx-cropper-description-');
|
|
214
|
-
this.isZoomControlled = computed(() => this.zoom() !== undefined,
|
|
215
|
-
|
|
231
|
+
this.isZoomControlled = computed(() => this.zoom() !== undefined, /* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "isZoomControlled" }] : /* istanbul ignore next */ []));
|
|
233
|
+
this.effectiveZoom = computed(() => (this.isZoomControlled() ? this.zoom() : this.internalZoom()), /* @ts-ignore */
|
|
234
|
+
...(ngDevMode ? [{ debugName: "effectiveZoom" }] : /* istanbul ignore next */ []));
|
|
216
235
|
/**
|
|
217
236
|
* The applied pan offset (px): the raw intent clamped to keep the image covering the crop window
|
|
218
237
|
* at the current geometry/zoom. Derived (not an effect) so it self-corrects when the container
|
|
@@ -230,13 +249,20 @@ class RdxCropperRootDirective {
|
|
|
230
249
|
height: this.imgHeight()
|
|
231
250
|
}), { ...(ngDevMode ? { debugName: "cropData" } : /* istanbul ignore next */ {}), equal: areaEqual });
|
|
232
251
|
// Refs
|
|
233
|
-
this.dragStartPoint = signal({ x: 0, y: 0 },
|
|
234
|
-
|
|
235
|
-
this.
|
|
236
|
-
|
|
237
|
-
this.
|
|
238
|
-
|
|
239
|
-
this.
|
|
252
|
+
this.dragStartPoint = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "dragStartPoint" }] : /* istanbul ignore next */ []));
|
|
254
|
+
this.dragStartOffset = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
255
|
+
...(ngDevMode ? [{ debugName: "dragStartOffset" }] : /* istanbul ignore next */ []));
|
|
256
|
+
this.latestZoom = signal(this.minZoom(), /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "latestZoom" }] : /* istanbul ignore next */ []));
|
|
258
|
+
this.initialPinchDistance = signal(0, /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "initialPinchDistance" }] : /* istanbul ignore next */ []));
|
|
260
|
+
this.initialPinchZoom = signal(1, /* @ts-ignore */
|
|
261
|
+
...(ngDevMode ? [{ debugName: "initialPinchZoom" }] : /* istanbul ignore next */ []));
|
|
262
|
+
this.isPinching = signal(false, /* @ts-ignore */
|
|
263
|
+
...(ngDevMode ? [{ debugName: "isPinching" }] : /* istanbul ignore next */ []));
|
|
264
|
+
this.hasWarned = signal(false, /* @ts-ignore */
|
|
265
|
+
...(ngDevMode ? [{ debugName: "hasWarned" }] : /* istanbul ignore next */ []));
|
|
240
266
|
/**
|
|
241
267
|
* Inline style for the image wrapper: measured size, centered in the root, then translated and
|
|
242
268
|
* scaled by the current pan offset and zoom. A `computed` (not a method) so the `[style]` binding
|
|
@@ -257,12 +283,14 @@ class RdxCropperRootDirective {
|
|
|
257
283
|
top: `calc(50% - ${wrapperH / 2}px)`,
|
|
258
284
|
willChange: 'transform'
|
|
259
285
|
};
|
|
260
|
-
},
|
|
286
|
+
}, /* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [{ debugName: "imageWrapperStyle" }] : /* istanbul ignore next */ []));
|
|
261
288
|
/** Inline style for the crop-area overlay (its measured width/height). */
|
|
262
289
|
this.cropAreaStyle = computed(() => ({
|
|
263
290
|
width: `${this.cropAreaWidth()}px`,
|
|
264
291
|
height: `${this.cropAreaHeight()}px`
|
|
265
|
-
}),
|
|
292
|
+
}), /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "cropAreaStyle" }] : /* istanbul ignore next */ []));
|
|
266
294
|
afterNextRender(() => {
|
|
267
295
|
this.initializeContainerDimensions();
|
|
268
296
|
});
|
|
@@ -604,10 +632,10 @@ class RdxCropperRootDirective {
|
|
|
604
632
|
// Anchor at the crop center (pointer 0,0 relative to center) against the live zoom/offset.
|
|
605
633
|
this.zoomToPoint(0, 0, this.effectiveZoom() + delta, this.effectiveZoom(), this.clampedOffset());
|
|
606
634
|
}
|
|
607
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
608
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
635
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
636
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxCropperRootDirective, isStandalone: true, selector: "[rdxCropperRoot]", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: true, transformFunction: null }, cropPadding: { classPropertyName: "cropPadding", publicName: "cropPadding", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, zoomSensitivity: { classPropertyName: "zoomSensitivity", publicName: "zoomSensitivity", isSignal: true, isRequired: false, transformFunction: null }, keyboardStep: { classPropertyName: "keyboardStep", publicName: "keyboardStep", isSignal: true, isRequired: false, transformFunction: null }, zoomKeyboardStep: { classPropertyName: "zoomKeyboardStep", publicName: "zoomKeyboardStep", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCropChange: "onCropChange", onZoomChange: "onZoomChange" }, host: { attributes: { "role": "application" }, properties: { "attr.tabindex": "disabled() ? -1 : 0", "attr.aria-label": "ariaLabel()", "attr.aria-describedby": "descriptionId", "attr.aria-disabled": "disabled() ? \"true\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-dragging": "isDragging() ? \"\" : undefined" } }, providers: [provideCropperRootContext(rootContext)], ngImport: i0 }); }
|
|
609
637
|
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperRootDirective, decorators: [{
|
|
611
639
|
type: Directive,
|
|
612
640
|
args: [{
|
|
613
641
|
selector: '[rdxCropperRoot]',
|
|
@@ -635,17 +663,17 @@ const _imports = [
|
|
|
635
663
|
RdxCropperDescriptionDirective
|
|
636
664
|
];
|
|
637
665
|
class RdxCropperModule {
|
|
638
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
639
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
667
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperModule, imports: [RdxCropperRootDirective,
|
|
640
668
|
RdxCropperImageComponent,
|
|
641
669
|
RdxCropperCropAreaDirective,
|
|
642
670
|
RdxCropperDescriptionDirective], exports: [RdxCropperRootDirective,
|
|
643
671
|
RdxCropperImageComponent,
|
|
644
672
|
RdxCropperCropAreaDirective,
|
|
645
673
|
RdxCropperDescriptionDirective] }); }
|
|
646
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
674
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperModule }); }
|
|
647
675
|
}
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCropperModule, decorators: [{
|
|
649
677
|
type: NgModule,
|
|
650
678
|
args: [{
|
|
651
679
|
imports: [..._imports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-cropper.mjs","sources":["../../../packages/primitives/cropper/src/cropper-context.token.ts","../../../packages/primitives/cropper/src/cropper-crop-area.directive.ts","../../../packages/primitives/cropper/src/cropper-description.directive.ts","../../../packages/primitives/cropper/src/cropper-image.component.ts","../../../packages/primitives/cropper/src/cropper-math.ts","../../../packages/primitives/cropper/src/cropper-root.directive.ts","../../../packages/primitives/cropper/index.ts","../../../packages/primitives/cropper/radix-ng-primitives-cropper.ts"],"sourcesContent":["import { InputSignal, Signal } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nexport interface CropperRootContext {\n image: InputSignal<string>;\n imageWrapperStyle: Signal<Record<string, string>>;\n cropAreaStyle: Signal<Record<string, string>>;\n descriptionId: string;\n}\n\nexport const [injectCropperRootContext, provideCropperRootContext] = createContext<CropperRootContext>(\n 'CropperRoot',\n 'components/cropper'\n);\n","import { Directive } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Directive({\n selector: '[rdxCropperCropArea]',\n host: {\n '[style]': 'rootContext.cropAreaStyle()'\n }\n})\nexport class RdxCropperCropAreaDirective {\n readonly rootContext = injectCropperRootContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Directive({\n selector: '[rdxCropperDescription]',\n host: {\n '[attr.id]': 'rootContext.descriptionId'\n }\n})\nexport class RdxCropperDescriptionDirective {\n readonly rootContext = injectCropperRootContext();\n}\n","import { Component, input } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Component({\n selector: '[rdxCropperImage]',\n host: {\n '[style]': 'rootContext.imageWrapperStyle()'\n },\n template: `\n <img\n [class]=\"imgClass()\"\n [src]=\"rootContext.image()\"\n [style]=\"imgStyles()\"\n [draggable]=\"false\"\n [alt]=\"imgAlt()\"\n />\n `\n})\nexport class RdxCropperImageComponent {\n protected readonly rootContext = injectCropperRootContext();\n\n readonly imgClass = input<string>();\n\n readonly imgStyles = input<string>();\n\n /**\n * `alt` text for the rendered image. Defaults to `''` (decorative — screen readers skip it, since\n * the cropper widget describes itself via the root's label/description). Set a non-empty value to\n * give the image a meaningful accessible name.\n */\n readonly imgAlt = input('');\n}\n","import { clamp } from '@radix-ng/primitives/core';\n\n/** A crop rectangle in the source image's natural-pixel coordinate space. */\nexport type Area = { x: number; y: number; width: number; height: number };\n\n/** The rendered geometry the crop math operates on (all in CSS px, wrapper measured at zoom 1). */\nexport interface CropperGeometry {\n /** Image-wrapper width at zoom 1. */\n wrapperWidth: number;\n /** Image-wrapper height at zoom 1. */\n wrapperHeight: number;\n /** Crop window width. */\n cropWidth: number;\n /** Crop window height. */\n cropHeight: number;\n}\n\n/**\n * Clamp a pan offset so the zoomed image always fully covers the crop window — the user can never\n * drag an image edge inside the crop frame. The offset is measured from the centered position, so the\n * allowed travel on each axis is half the overflow of the scaled wrapper past the crop window.\n *\n * Returns `{ x: 0, y: 0 }` when the geometry is not ready yet (any dimension `<= 0`).\n */\nexport function restrictOffset(\n offsetX: number,\n offsetY: number,\n zoom: number,\n geometry: CropperGeometry\n): { x: number; y: number } {\n const { wrapperWidth, wrapperHeight, cropWidth, cropHeight } = geometry;\n\n if (wrapperWidth <= 0 || wrapperHeight <= 0 || cropWidth <= 0 || cropHeight <= 0) {\n return { x: 0, y: 0 };\n }\n\n const maxDragX = Math.max(0, (wrapperWidth * zoom - cropWidth) / 2);\n const maxDragY = Math.max(0, (wrapperHeight * zoom - cropHeight) / 2);\n\n return {\n x: clamp(offsetX, -maxDragX, maxDragX),\n y: clamp(offsetY, -maxDragY, maxDragY)\n };\n}\n\n/**\n * Project the current pan/zoom into a crop rectangle in the source image's natural pixels.\n *\n * The wrapper is centered in the crop window and scaled by `zoom`; `baseScale` converts rendered px\n * back to natural px. The result is rounded and clamped to the image bounds.\n *\n * Returns `null` when the geometry/image is not ready (any dimension `<= 0` or no image), or when the\n * computed crop collapses to zero area.\n */\nexport function calculateCropData(\n offsetX: number,\n offsetY: number,\n zoom: number,\n geometry: CropperGeometry,\n image: { width: number | null; height: number | null }\n): Area | null {\n const { wrapperWidth, wrapperHeight, cropWidth, cropHeight } = geometry;\n const imgW = image.width;\n const imgH = image.height;\n\n if (!imgW || !imgH || wrapperWidth <= 0 || wrapperHeight <= 0 || cropWidth <= 0 || cropHeight <= 0) {\n return null;\n }\n\n const scaledWrapperWidth = wrapperWidth * zoom;\n const scaledWrapperHeight = wrapperHeight * zoom;\n const topLeftOffsetX = offsetX + (cropWidth - scaledWrapperWidth) / 2;\n const topLeftOffsetY = offsetY + (cropHeight - scaledWrapperHeight) / 2;\n const baseScale = imgW / wrapperWidth;\n\n if (isNaN(baseScale) || baseScale === 0) {\n return null;\n }\n\n const sx = (-topLeftOffsetX * baseScale) / zoom;\n const sy = (-topLeftOffsetY * baseScale) / zoom;\n const sWidth = (cropWidth * baseScale) / zoom;\n const sHeight = (cropHeight * baseScale) / zoom;\n\n const finalX = clamp(Math.round(sx), 0, imgW);\n const finalY = clamp(Math.round(sy), 0, imgH);\n const finalWidth = clamp(Math.round(sWidth), 0, imgW - finalX);\n const finalHeight = clamp(Math.round(sHeight), 0, imgH - finalY);\n\n if (finalWidth <= 0 || finalHeight <= 0) {\n return null;\n }\n\n return { x: finalX, y: finalY, width: finalWidth, height: finalHeight };\n}\n","// Based on https://github.com/origin-space/image-cropper/blob/main/src/Cropper.tsx\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n output,\n PLATFORM_ID,\n signal,\n untracked\n} from '@angular/core';\nimport { BooleanInput, clamp, injectId, NumberInput, resizeEffect } from '@radix-ng/primitives/core';\nimport { CropperRootContext, provideCropperRootContext } from './cropper-context.token';\nimport {\n Area,\n calculateCropData as computeCropData,\n restrictOffset as computeRestrictedOffset,\n CropperGeometry\n} from './cropper-math';\n\nexport type { Area };\n\n/** Value equality for an `Area` so the crop `computed` only notifies when the rectangle changes. */\nconst areaEqual = (a: Area | null, b: Area | null): boolean =>\n a === b || (!!a && !!b && a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height);\n\n/** Value equality for an `{x,y}` point so the clamped-offset `computed` only notifies on real moves. */\nconst pointEqual = (a: { x: number; y: number }, b: { x: number; y: number }): boolean => a.x === b.x && a.y === b.y;\n\n/** Exposes the root's public state to the child parts (image, crop-area, description). */\nconst rootContext = (): CropperRootContext => {\n const instance = inject(RdxCropperRootDirective);\n return {\n image: instance.image,\n imageWrapperStyle: instance.imageWrapperStyle,\n cropAreaStyle: instance.cropAreaStyle,\n descriptionId: instance.descriptionId\n };\n};\n\n@Directive({\n selector: '[rdxCropperRoot]',\n providers: [provideCropperRootContext(rootContext)],\n host: {\n // `application` so a screen reader passes arrow/+/- keys straight to our handlers (pan + zoom)\n // instead of intercepting them for browse-mode navigation; instructions come via the\n // description element referenced by `aria-describedby`. The slider-style `aria-value*`\n // attributes were removed — they are only honored on range roles, so they were dead here.\n role: 'application',\n '[attr.tabindex]': 'disabled() ? -1 : 0',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-describedby]': 'descriptionId',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'isDragging() ? \"\" : undefined'\n }\n})\nexport class RdxCropperRootDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly injector = inject(Injector);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly CROPPER_DESC_WARN_MESSAGE = `Warning: \\`Cropper\\` requires a description element for accessibility.`;\n\n readonly image = input.required<string>();\n readonly cropPadding = input(25, { transform: numberAttribute });\n readonly aspectRatio = input(1, { transform: numberAttribute });\n readonly minZoom = input(1, { transform: numberAttribute });\n readonly maxZoom = input(3, { transform: numberAttribute });\n readonly zoomSensitivity = input(0.005, { transform: numberAttribute });\n /** Pan distance (px) per arrow-key press. */\n readonly keyboardStep = input(10, { transform: numberAttribute });\n /** Zoom delta per `+` / `-` / `PageUp` / `PageDown` press. */\n readonly zoomKeyboardStep = input(0.1, { transform: numberAttribute });\n readonly zoom = input<number, NumberInput>(undefined, { transform: numberAttribute });\n /** Accessible name for the cropper widget. */\n readonly ariaLabel = input('Interactive image cropper');\n /** Disables all interaction (drag, wheel/pinch zoom, keyboard); exposed as `data-disabled`. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly onCropChange = output<Area | null>();\n readonly onZoomChange = output<number>();\n\n // State signals\n private readonly imgWidth = signal<number | null>(null);\n private readonly imgHeight = signal<number | null>(null);\n /** Raw content-box size (px) of the root, fed by the ResizeObserver / initial measure. */\n private readonly containerSize = signal({ width: 0, height: 0 });\n /**\n * Crop-area size derived from the container minus padding, fitted to `aspectRatio`. A `computed`\n * (not a written signal) so it stays reactive to `aspectRatio` / `cropPadding` changes, not only\n * to container resizes — previously these inputs were read inside the ResizeObserver closure and\n * never recomputed until the next resize.\n */\n private readonly cropAreaSize = computed(() => {\n const { width, height } = this.containerSize();\n if (width <= 0 || height <= 0) {\n return { width: 0, height: 0 };\n }\n\n const maxPossibleWidth = Math.max(0, width - this.cropPadding() * 2);\n const maxPossibleHeight = Math.max(0, height - this.cropPadding() * 2);\n const aspectRatio = this.aspectRatio();\n\n if (maxPossibleWidth / aspectRatio >= maxPossibleHeight) {\n return { width: maxPossibleHeight * aspectRatio, height: maxPossibleHeight };\n }\n return { width: maxPossibleWidth, height: maxPossibleWidth / aspectRatio };\n });\n private readonly cropAreaWidth = computed(() => this.cropAreaSize().width);\n private readonly cropAreaHeight = computed(() => this.cropAreaSize().height);\n private readonly imageWrapperWidth = signal(0);\n private readonly imageWrapperHeight = signal(0);\n /** Raw (unclamped) pan-offset intent (px) written by gestures; clamping lives in `clampedOffset`. */\n private readonly offset = signal({ x: 0, y: 0 });\n private readonly internalZoom = signal(this.minZoom());\n protected readonly isDragging = signal(false);\n // SSR-stable, deterministic id (the project's CDK-free `_IdGenerator` replacement) so the\n // `aria-describedby` reference matches between server and client renders.\n readonly descriptionId = injectId('rdx-cropper-description-');\n\n private readonly isZoomControlled = computed(() => this.zoom() !== undefined);\n protected readonly effectiveZoom = computed(() => (this.isZoomControlled() ? this.zoom()! : this.internalZoom()));\n\n /**\n * The applied pan offset (px): the raw intent clamped to keep the image covering the crop window\n * at the current geometry/zoom. Derived (not an effect) so it self-corrects when the container\n * resizes or the zoom/aspect-ratio changes — no write-back, no `untracked` re-entrancy. This is the\n * value the view renders and the crop math reads.\n */\n private readonly clampedOffset = computed(\n () => this.restrictOffset(this.offset().x, this.offset().y, this.effectiveZoom()),\n { equal: pointEqual }\n );\n\n /**\n * Crop rectangle derived from the rendered pan/zoom — the single source of truth for emission.\n * `onCropChange` fires from one effect watching this, so interactions/handlers never emit directly\n * (which previously double-emitted). Value equality keeps it from notifying on equal results.\n */\n private readonly cropData = computed<Area | null>(\n () =>\n computeCropData(this.clampedOffset().x, this.clampedOffset().y, this.effectiveZoom(), this.geometry(), {\n width: this.imgWidth(),\n height: this.imgHeight()\n }),\n { equal: areaEqual }\n );\n\n // Refs\n private readonly dragStartPoint = signal({ x: 0, y: 0 });\n private readonly dragStartOffset = signal({ x: 0, y: 0 });\n private readonly latestZoom = signal(this.minZoom());\n private readonly initialPinchDistance = signal(0);\n private readonly initialPinchZoom = signal(1);\n private readonly isPinching = signal(false);\n private readonly hasWarned = signal(false);\n\n constructor() {\n afterNextRender(() => {\n this.initializeContainerDimensions();\n });\n\n this.setupImageLoadEffect();\n this.setupDimensionsEffects();\n this.setupAccessibilityWarningEffect();\n this.setupEventListenersEffect();\n\n effect(() => {\n this.latestZoom.set(this.effectiveZoom());\n });\n\n // Single source of crop emission: emit whenever the derived crop rectangle changes.\n effect(() => {\n const data = this.cropData();\n untracked(() => this.onCropChange.emit(data));\n });\n }\n\n private updateZoom(newZoomValue: number): number {\n const clampedZoom = clamp(newZoomValue, this.minZoom(), this.maxZoom());\n\n this.onZoomChange.emit(clampedZoom);\n\n if (!this.isZoomControlled()) {\n this.internalZoom.set(clampedZoom);\n }\n return clampedZoom;\n }\n\n private initializeContainerDimensions() {\n const element = this.elementRef.nativeElement;\n if (element && element.clientWidth > 0 && element.clientHeight > 0) {\n // Seed the size for the first paint; the ResizeObserver keeps it in sync afterwards.\n this.containerSize.set({ width: element.clientWidth, height: element.clientHeight });\n }\n }\n\n private setupImageLoadEffect() {\n effect(() => {\n const image = this.image();\n this.offset.set({ x: 0, y: 0 });\n\n if (!this.isZoomControlled()) {\n this.internalZoom.set(this.minZoom());\n }\n\n if (!image || !this.isBrowser) {\n this.imgWidth.set(null);\n this.imgHeight.set(null);\n return;\n }\n\n let isMounted = true;\n const img = new Image();\n img.onload = () => {\n if (isMounted) {\n this.imgWidth.set(img.naturalWidth);\n this.imgHeight.set(img.naturalHeight);\n }\n };\n img.onerror = () => {\n if (isMounted) {\n this.imgWidth.set(null);\n this.imgHeight.set(null);\n }\n };\n img.src = image;\n\n return () => {\n isMounted = false;\n };\n });\n }\n\n private setupDimensionsEffects(): void {\n // Track the container's content-box size via the shared resize-observer effect; `cropAreaSize`\n // derives crop dimensions from it reactively (so changing `aspectRatio` / `cropPadding`\n // recomputes without waiting for a resize). `element` is null on the server, so no observer is\n // constructed (SSR-safe).\n resizeEffect({\n injector: this.injector,\n element: computed(() => (this.isBrowser ? this.elementRef.nativeElement : null)),\n onResize: (entries) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect;\n if (width > 0 && height > 0) this.containerSize.set({ width, height });\n }\n }\n });\n\n // Update image wrapper dimensions when crop area or image dimensions change\n effect(() => {\n const cropW = this.cropAreaWidth();\n const cropH = this.cropAreaHeight();\n const imgW = this.imgWidth();\n const imgH = this.imgHeight();\n\n if (cropW <= 0 || cropH <= 0 || !imgW || !imgH) {\n this.imageWrapperWidth.set(0);\n this.imageWrapperHeight.set(0);\n return;\n }\n\n const naturalAspect = imgW / imgH;\n const cropAspect = cropW / cropH;\n let targetWrapperWidth: number, targetWrapperHeight: number;\n\n if (naturalAspect >= cropAspect) {\n targetWrapperHeight = cropH;\n targetWrapperWidth = targetWrapperHeight * naturalAspect;\n } else {\n targetWrapperWidth = cropW;\n targetWrapperHeight = targetWrapperWidth / naturalAspect;\n }\n\n this.imageWrapperWidth.set(targetWrapperWidth);\n this.imageWrapperHeight.set(targetWrapperHeight);\n });\n }\n\n /** Current rendered geometry the crop math operates on, read from the state signals. */\n private geometry(): CropperGeometry {\n return {\n wrapperWidth: this.imageWrapperWidth(),\n wrapperHeight: this.imageWrapperHeight(),\n cropWidth: this.cropAreaWidth(),\n cropHeight: this.cropAreaHeight()\n };\n }\n\n private restrictOffset(dragOffsetX: number, dragOffsetY: number, currentZoom: number): { x: number; y: number } {\n return computeRestrictedOffset(dragOffsetX, dragOffsetY, currentZoom, this.geometry());\n }\n\n private setupAccessibilityWarningEffect(): void {\n if (!this.isBrowser) return;\n\n effect(() => {\n const checkTimeout = setTimeout(() => {\n if (this.elementRef.nativeElement && !this.hasWarned()) {\n const hasDescription = document.getElementById(this.descriptionId);\n if (!hasDescription) {\n console.warn(this.CROPPER_DESC_WARN_MESSAGE);\n this.hasWarned.set(true);\n }\n }\n }, 100);\n\n return () => clearTimeout(checkTimeout);\n });\n }\n\n /**\n * Single attachment point for every interaction listener. Re-runs on `disabled()`, so a disabled\n * cropper has NO interaction listeners bound at all — there is no per-handler `disabled` check to\n * forget, and a new gesture path can't accidentally bypass the gate. Uses `{ passive: false }` so\n * the handlers can `preventDefault()` (wheel/touch scrolling, arrow-key page scroll).\n */\n private setupEventListenersEffect(): void {\n if (!this.isBrowser) return;\n\n effect((onCleanup) => {\n const node = this.elementRef.nativeElement;\n if (!node || this.disabled()) return;\n\n const options: AddEventListenerOptions = { passive: false };\n\n const mouseDownHandler = (e: MouseEvent) => this.onMouseDown(e);\n const keyDownHandler = (e: KeyboardEvent) => this.onKeyDown(e);\n const wheelHandler = (e: WheelEvent) => this.handleWheel(e);\n const touchStartHandler = (e: TouchEvent) => this.handleTouchStart(e);\n const touchMoveHandler = (e: TouchEvent) => this.handleTouchMove(e);\n const touchEndHandler = (e: TouchEvent) => this.handleTouchEnd(e);\n\n node.addEventListener('mousedown', mouseDownHandler, options);\n node.addEventListener('keydown', keyDownHandler, options);\n node.addEventListener('wheel', wheelHandler, options);\n node.addEventListener('touchstart', touchStartHandler, options);\n node.addEventListener('touchmove', touchMoveHandler, options);\n node.addEventListener('touchend', touchEndHandler, options);\n node.addEventListener('touchcancel', touchEndHandler, options);\n\n onCleanup(() => {\n node.removeEventListener('mousedown', mouseDownHandler, options);\n node.removeEventListener('keydown', keyDownHandler, options);\n node.removeEventListener('wheel', wheelHandler, options);\n node.removeEventListener('touchstart', touchStartHandler, options);\n node.removeEventListener('touchmove', touchMoveHandler, options);\n node.removeEventListener('touchend', touchEndHandler, options);\n node.removeEventListener('touchcancel', touchEndHandler, options);\n });\n });\n }\n\n private onMouseDown(e: MouseEvent): void {\n if (e.button !== 0) return;\n e.preventDefault();\n this.isDragging.set(true);\n this.isPinching.set(false);\n this.dragStartPoint.set({ x: e.clientX, y: e.clientY });\n this.dragStartOffset.set(this.clampedOffset());\n\n const handleMouseMove = (ev: MouseEvent) => {\n const deltaX = ev.clientX - this.dragStartPoint().x;\n const deltaY = ev.clientY - this.dragStartPoint().y;\n this.offset.set({ x: this.dragStartOffset().x + deltaX, y: this.dragStartOffset().y + deltaY });\n };\n\n const handleMouseUp = () => {\n this.isDragging.set(false);\n window.removeEventListener('mousemove', handleMouseMove);\n window.removeEventListener('mouseup', handleMouseUp);\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n window.addEventListener('mouseup', handleMouseUp);\n }\n\n /**\n * Zoom toward an anchor point (coordinates relative to the root's center). `fromZoom`/`fromOffset`\n * are the zoom/offset the anchor is measured against — the live state for wheel/keyboard, the\n * gesture-start baseline for pinch. Emits the zoom request via {@link updateZoom}, then re-anchors\n * the pan offset **only when the zoom is uncontrolled**: in controlled mode the rendered zoom does\n * not change until the parent writes `zoom` back, so writing an offset for a not-yet-applied zoom\n * would pan the image without rescaling it (`clampedOffset` re-derives once the new zoom applies).\n */\n private zoomToPoint(\n pointerX: number,\n pointerY: number,\n targetZoom: number,\n fromZoom: number,\n fromOffset: { x: number; y: number }\n ): void {\n const clampedZoom = clamp(targetZoom, this.minZoom(), this.maxZoom());\n if (clampedZoom === this.effectiveZoom()) return;\n\n const imagePointX = (pointerX - fromOffset.x) / fromZoom;\n const imagePointY = (pointerY - fromOffset.y) / fromZoom;\n\n const finalNewZoom = this.updateZoom(clampedZoom);\n if (this.isZoomControlled()) return;\n\n this.offset.set({ x: pointerX - imagePointX * finalNewZoom, y: pointerY - imagePointY * finalNewZoom });\n }\n\n private handleWheel(e: WheelEvent): void {\n e.preventDefault();\n e.stopPropagation();\n if (!this.elementRef.nativeElement || this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n\n const delta = e.deltaY * -this.zoomSensitivity();\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const pointerX = e.clientX - rect.left - rect.width / 2;\n const pointerY = e.clientY - rect.top - rect.height / 2;\n\n this.zoomToPoint(pointerX, pointerY, this.effectiveZoom() + delta, this.effectiveZoom(), this.clampedOffset());\n }\n\n private getPinchDistance(touches: TouchList): number {\n return Math.sqrt(\n Math.pow(touches[1].clientX - touches[0].clientX, 2) + Math.pow(touches[1].clientY - touches[0].clientY, 2)\n );\n }\n\n private getPinchCenter(touches: TouchList): { x: number; y: number } {\n return {\n x: (touches[0].clientX + touches[1].clientX) / 2,\n y: (touches[0].clientY + touches[1].clientY) / 2\n };\n }\n\n private handleTouchStart(e: TouchEvent): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n e.preventDefault();\n const touches = e.touches;\n\n if (touches.length === 1) {\n this.isDragging.set(true);\n this.isPinching.set(false);\n this.dragStartPoint.set({ x: touches[0].clientX, y: touches[0].clientY });\n this.dragStartOffset.set(this.clampedOffset());\n } else if (touches.length === 2) {\n this.isDragging.set(false);\n this.isPinching.set(true);\n this.initialPinchDistance.set(this.getPinchDistance(touches));\n this.initialPinchZoom.set(this.latestZoom());\n this.dragStartOffset.set(this.clampedOffset());\n }\n }\n\n private handleTouchMove(e: TouchEvent): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n e.preventDefault();\n const touches = e.touches;\n\n if (touches.length === 1 && this.isDragging() && !this.isPinching()) {\n const deltaX = touches[0].clientX - this.dragStartPoint().x;\n const deltaY = touches[0].clientY - this.dragStartPoint().y;\n this.offset.set({ x: this.dragStartOffset().x + deltaX, y: this.dragStartOffset().y + deltaY });\n } else if (touches.length === 2 && this.isPinching()) {\n const scale = this.getPinchDistance(touches) / this.initialPinchDistance();\n const pinchCenter = this.getPinchCenter(touches);\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const pinchCenterX = pinchCenter.x - rect.left - rect.width / 2;\n const pinchCenterY = pinchCenter.y - rect.top - rect.height / 2;\n\n // Pinch is baseline-relative: anchor against the zoom/offset captured at gesture start.\n this.zoomToPoint(\n pinchCenterX,\n pinchCenterY,\n this.initialPinchZoom() * scale,\n this.initialPinchZoom(),\n this.dragStartOffset()\n );\n }\n }\n\n private handleTouchEnd(e: TouchEvent): void {\n e.preventDefault();\n const touches = e.touches;\n\n if (this.isPinching() && touches.length < 2) {\n this.isPinching.set(false);\n\n if (touches.length === 1) {\n this.isDragging.set(true);\n this.dragStartPoint.set({ x: touches[0].clientX, y: touches[0].clientY });\n this.dragStartOffset.set(this.clampedOffset());\n } else {\n this.isDragging.set(false);\n }\n } else if (this.isDragging() && touches.length === 0) {\n this.isDragging.set(false);\n }\n }\n\n private onKeyDown(e: KeyboardEvent): void {\n if (this.imageWrapperWidth() <= 0) return;\n\n const base = this.clampedOffset();\n let targetOffsetX = base.x;\n let targetOffsetY = base.y;\n // eslint-disable-next-line no-useless-assignment\n let moved = false;\n\n switch (e.key) {\n case 'ArrowUp':\n targetOffsetY += this.keyboardStep();\n moved = true;\n break;\n case 'ArrowDown':\n targetOffsetY -= this.keyboardStep();\n moved = true;\n break;\n case 'ArrowLeft':\n targetOffsetX += this.keyboardStep();\n moved = true;\n break;\n case 'ArrowRight':\n targetOffsetX -= this.keyboardStep();\n moved = true;\n break;\n case '+':\n case '=':\n case 'PageUp':\n e.preventDefault();\n this.zoomFromCenter(this.zoomKeyboardStep());\n return;\n case '-':\n case '_':\n case 'PageDown':\n e.preventDefault();\n this.zoomFromCenter(-this.zoomKeyboardStep());\n return;\n default:\n return;\n }\n\n if (moved) {\n e.preventDefault();\n // Write the raw target; `clampedOffset` clamps it (and dedups a no-op at the boundary).\n this.offset.set({ x: targetOffsetX, y: targetOffsetY });\n }\n }\n\n /** Zoom by `delta` keeping the crop center fixed (the keyboard counterpart of wheel/pinch zoom). */\n private zoomFromCenter(delta: number): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n // Anchor at the crop center (pointer 0,0 relative to center) against the live zoom/offset.\n this.zoomToPoint(0, 0, this.effectiveZoom() + delta, this.effectiveZoom(), this.clampedOffset());\n }\n\n /**\n * Inline style for the image wrapper: measured size, centered in the root, then translated and\n * scaled by the current pan offset and zoom. A `computed` (not a method) so the `[style]` binding\n * only re-applies when an input actually changes — a per-change-detection method call would\n * allocate a new object every tick and force a constant re-bind.\n */\n readonly imageWrapperStyle = computed<Record<string, string>>(() => {\n const wrapperW = this.imageWrapperWidth();\n const wrapperH = this.imageWrapperHeight();\n const { x: offsetX, y: offsetY } = this.clampedOffset();\n const zoom = this.effectiveZoom();\n\n return {\n width: `${wrapperW}px`,\n height: `${wrapperH}px`,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0px) scale(${zoom})`,\n position: 'absolute',\n left: `calc(50% - ${wrapperW / 2}px)`,\n top: `calc(50% - ${wrapperH / 2}px)`,\n willChange: 'transform'\n };\n });\n\n /** Inline style for the crop-area overlay (its measured width/height). */\n readonly cropAreaStyle = computed<Record<string, string>>(() => ({\n width: `${this.cropAreaWidth()}px`,\n height: `${this.cropAreaHeight()}px`\n }));\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCropperCropAreaDirective } from './src/cropper-crop-area.directive';\nimport { RdxCropperDescriptionDirective } from './src/cropper-description.directive';\nimport { RdxCropperImageComponent } from './src/cropper-image.component';\nimport { RdxCropperRootDirective } from './src/cropper-root.directive';\n\nexport * from './src/cropper-context.token';\nexport * from './src/cropper-crop-area.directive';\nexport * from './src/cropper-description.directive';\nexport * from './src/cropper-image.component';\nexport * from './src/cropper-root.directive';\n\nconst _imports = [\n RdxCropperRootDirective,\n RdxCropperImageComponent,\n RdxCropperCropAreaDirective,\n RdxCropperDescriptionDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxCropperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["computeCropData","computeRestrictedOffset"],"mappings":";;;;;AAUO,MAAM,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,GAAG,aAAa,CAC9E,aAAa,EACb,oBAAoB;;MCHX,2BAA2B,CAAA;AANxC,IAAA,WAAA,GAAA;QAOa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,6BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;MCCY,8BAA8B,CAAA;AAN3C,IAAA,WAAA,GAAA;QAOa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a;AAClC,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,sBAAsB,EAAE,iCAAiC;AACzD,wBAAA,sBAAsB,EAAE,6BAA6B;AACrD,wBAAA,sBAAsB,EAAE;AAC3B;AACJ,iBAAA;;;ACpDD,MAAM,QAAQ,GAAG;IACb,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;IAC3B;CACH;MAMY,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAVzB,uBAAuB;YACvB,wBAAwB;YACxB,2BAA2B;AAC3B,YAAA,8BAA8B,aAH9B,uBAAuB;YACvB,wBAAwB;YACxB,2BAA2B;YAC3B,8BAA8B,CAAA,EAAA,CAAA,CAAA;+GAOrB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-cropper.mjs","sources":["../../../packages/primitives/cropper/src/cropper-context.token.ts","../../../packages/primitives/cropper/src/cropper-crop-area.directive.ts","../../../packages/primitives/cropper/src/cropper-description.directive.ts","../../../packages/primitives/cropper/src/cropper-image.component.ts","../../../packages/primitives/cropper/src/cropper-math.ts","../../../packages/primitives/cropper/src/cropper-root.directive.ts","../../../packages/primitives/cropper/index.ts","../../../packages/primitives/cropper/radix-ng-primitives-cropper.ts"],"sourcesContent":["import { InputSignal, Signal } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nexport interface CropperRootContext {\n image: InputSignal<string>;\n imageWrapperStyle: Signal<Record<string, string>>;\n cropAreaStyle: Signal<Record<string, string>>;\n descriptionId: string;\n}\n\nexport const [injectCropperRootContext, provideCropperRootContext] = createContext<CropperRootContext>(\n 'CropperRoot',\n 'components/cropper'\n);\n","import { Directive } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Directive({\n selector: '[rdxCropperCropArea]',\n host: {\n '[style]': 'rootContext.cropAreaStyle()'\n }\n})\nexport class RdxCropperCropAreaDirective {\n readonly rootContext = injectCropperRootContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Directive({\n selector: '[rdxCropperDescription]',\n host: {\n '[attr.id]': 'rootContext.descriptionId'\n }\n})\nexport class RdxCropperDescriptionDirective {\n readonly rootContext = injectCropperRootContext();\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { injectCropperRootContext } from './cropper-context.token';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.Eager,\n selector: '[rdxCropperImage]',\n host: {\n '[style]': 'rootContext.imageWrapperStyle()'\n },\n template: `\n <img\n [class]=\"imgClass()\"\n [src]=\"rootContext.image()\"\n [style]=\"imgStyles()\"\n [draggable]=\"false\"\n [alt]=\"imgAlt()\"\n />\n `\n})\nexport class RdxCropperImageComponent {\n protected readonly rootContext = injectCropperRootContext();\n\n readonly imgClass = input<string>();\n\n readonly imgStyles = input<string>();\n\n /**\n * `alt` text for the rendered image. Defaults to `''` (decorative — screen readers skip it, since\n * the cropper widget describes itself via the root's label/description). Set a non-empty value to\n * give the image a meaningful accessible name.\n */\n readonly imgAlt = input('');\n}\n","import { clamp } from '@radix-ng/primitives/core';\n\n/** A crop rectangle in the source image's natural-pixel coordinate space. */\nexport type Area = { x: number; y: number; width: number; height: number };\n\n/** The rendered geometry the crop math operates on (all in CSS px, wrapper measured at zoom 1). */\nexport interface CropperGeometry {\n /** Image-wrapper width at zoom 1. */\n wrapperWidth: number;\n /** Image-wrapper height at zoom 1. */\n wrapperHeight: number;\n /** Crop window width. */\n cropWidth: number;\n /** Crop window height. */\n cropHeight: number;\n}\n\n/**\n * Clamp a pan offset so the zoomed image always fully covers the crop window — the user can never\n * drag an image edge inside the crop frame. The offset is measured from the centered position, so the\n * allowed travel on each axis is half the overflow of the scaled wrapper past the crop window.\n *\n * Returns `{ x: 0, y: 0 }` when the geometry is not ready yet (any dimension `<= 0`).\n */\nexport function restrictOffset(\n offsetX: number,\n offsetY: number,\n zoom: number,\n geometry: CropperGeometry\n): { x: number; y: number } {\n const { wrapperWidth, wrapperHeight, cropWidth, cropHeight } = geometry;\n\n if (wrapperWidth <= 0 || wrapperHeight <= 0 || cropWidth <= 0 || cropHeight <= 0) {\n return { x: 0, y: 0 };\n }\n\n const maxDragX = Math.max(0, (wrapperWidth * zoom - cropWidth) / 2);\n const maxDragY = Math.max(0, (wrapperHeight * zoom - cropHeight) / 2);\n\n return {\n x: clamp(offsetX, -maxDragX, maxDragX),\n y: clamp(offsetY, -maxDragY, maxDragY)\n };\n}\n\n/**\n * Project the current pan/zoom into a crop rectangle in the source image's natural pixels.\n *\n * The wrapper is centered in the crop window and scaled by `zoom`; `baseScale` converts rendered px\n * back to natural px. The result is rounded and clamped to the image bounds.\n *\n * Returns `null` when the geometry/image is not ready (any dimension `<= 0` or no image), or when the\n * computed crop collapses to zero area.\n */\nexport function calculateCropData(\n offsetX: number,\n offsetY: number,\n zoom: number,\n geometry: CropperGeometry,\n image: { width: number | null; height: number | null }\n): Area | null {\n const { wrapperWidth, wrapperHeight, cropWidth, cropHeight } = geometry;\n const imgW = image.width;\n const imgH = image.height;\n\n if (!imgW || !imgH || wrapperWidth <= 0 || wrapperHeight <= 0 || cropWidth <= 0 || cropHeight <= 0) {\n return null;\n }\n\n const scaledWrapperWidth = wrapperWidth * zoom;\n const scaledWrapperHeight = wrapperHeight * zoom;\n const topLeftOffsetX = offsetX + (cropWidth - scaledWrapperWidth) / 2;\n const topLeftOffsetY = offsetY + (cropHeight - scaledWrapperHeight) / 2;\n const baseScale = imgW / wrapperWidth;\n\n if (isNaN(baseScale) || baseScale === 0) {\n return null;\n }\n\n const sx = (-topLeftOffsetX * baseScale) / zoom;\n const sy = (-topLeftOffsetY * baseScale) / zoom;\n const sWidth = (cropWidth * baseScale) / zoom;\n const sHeight = (cropHeight * baseScale) / zoom;\n\n const finalX = clamp(Math.round(sx), 0, imgW);\n const finalY = clamp(Math.round(sy), 0, imgH);\n const finalWidth = clamp(Math.round(sWidth), 0, imgW - finalX);\n const finalHeight = clamp(Math.round(sHeight), 0, imgH - finalY);\n\n if (finalWidth <= 0 || finalHeight <= 0) {\n return null;\n }\n\n return { x: finalX, y: finalY, width: finalWidth, height: finalHeight };\n}\n","// Based on https://github.com/origin-space/image-cropper/blob/main/src/Cropper.tsx\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n output,\n PLATFORM_ID,\n signal,\n untracked\n} from '@angular/core';\nimport { BooleanInput, clamp, injectId, NumberInput, resizeEffect } from '@radix-ng/primitives/core';\nimport { CropperRootContext, provideCropperRootContext } from './cropper-context.token';\nimport {\n Area,\n calculateCropData as computeCropData,\n restrictOffset as computeRestrictedOffset,\n CropperGeometry\n} from './cropper-math';\n\nexport type { Area };\n\n/** Value equality for an `Area` so the crop `computed` only notifies when the rectangle changes. */\nconst areaEqual = (a: Area | null, b: Area | null): boolean =>\n a === b || (!!a && !!b && a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height);\n\n/** Value equality for an `{x,y}` point so the clamped-offset `computed` only notifies on real moves. */\nconst pointEqual = (a: { x: number; y: number }, b: { x: number; y: number }): boolean => a.x === b.x && a.y === b.y;\n\n/** Exposes the root's public state to the child parts (image, crop-area, description). */\nconst rootContext = (): CropperRootContext => {\n const instance = inject(RdxCropperRootDirective);\n return {\n image: instance.image,\n imageWrapperStyle: instance.imageWrapperStyle,\n cropAreaStyle: instance.cropAreaStyle,\n descriptionId: instance.descriptionId\n };\n};\n\n@Directive({\n selector: '[rdxCropperRoot]',\n providers: [provideCropperRootContext(rootContext)],\n host: {\n // `application` so a screen reader passes arrow/+/- keys straight to our handlers (pan + zoom)\n // instead of intercepting them for browse-mode navigation; instructions come via the\n // description element referenced by `aria-describedby`. The slider-style `aria-value*`\n // attributes were removed — they are only honored on range roles, so they were dead here.\n role: 'application',\n '[attr.tabindex]': 'disabled() ? -1 : 0',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-describedby]': 'descriptionId',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'isDragging() ? \"\" : undefined'\n }\n})\nexport class RdxCropperRootDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly injector = inject(Injector);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly CROPPER_DESC_WARN_MESSAGE = `Warning: \\`Cropper\\` requires a description element for accessibility.`;\n\n readonly image = input.required<string>();\n readonly cropPadding = input(25, { transform: numberAttribute });\n readonly aspectRatio = input(1, { transform: numberAttribute });\n readonly minZoom = input(1, { transform: numberAttribute });\n readonly maxZoom = input(3, { transform: numberAttribute });\n readonly zoomSensitivity = input(0.005, { transform: numberAttribute });\n /** Pan distance (px) per arrow-key press. */\n readonly keyboardStep = input(10, { transform: numberAttribute });\n /** Zoom delta per `+` / `-` / `PageUp` / `PageDown` press. */\n readonly zoomKeyboardStep = input(0.1, { transform: numberAttribute });\n readonly zoom = input<number, NumberInput>(undefined, { transform: numberAttribute });\n /** Accessible name for the cropper widget. */\n readonly ariaLabel = input('Interactive image cropper');\n /** Disables all interaction (drag, wheel/pinch zoom, keyboard); exposed as `data-disabled`. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly onCropChange = output<Area | null>();\n readonly onZoomChange = output<number>();\n\n // State signals\n private readonly imgWidth = signal<number | null>(null);\n private readonly imgHeight = signal<number | null>(null);\n /** Raw content-box size (px) of the root, fed by the ResizeObserver / initial measure. */\n private readonly containerSize = signal({ width: 0, height: 0 });\n /**\n * Crop-area size derived from the container minus padding, fitted to `aspectRatio`. A `computed`\n * (not a written signal) so it stays reactive to `aspectRatio` / `cropPadding` changes, not only\n * to container resizes — previously these inputs were read inside the ResizeObserver closure and\n * never recomputed until the next resize.\n */\n private readonly cropAreaSize = computed(() => {\n const { width, height } = this.containerSize();\n if (width <= 0 || height <= 0) {\n return { width: 0, height: 0 };\n }\n\n const maxPossibleWidth = Math.max(0, width - this.cropPadding() * 2);\n const maxPossibleHeight = Math.max(0, height - this.cropPadding() * 2);\n const aspectRatio = this.aspectRatio();\n\n if (maxPossibleWidth / aspectRatio >= maxPossibleHeight) {\n return { width: maxPossibleHeight * aspectRatio, height: maxPossibleHeight };\n }\n return { width: maxPossibleWidth, height: maxPossibleWidth / aspectRatio };\n });\n private readonly cropAreaWidth = computed(() => this.cropAreaSize().width);\n private readonly cropAreaHeight = computed(() => this.cropAreaSize().height);\n private readonly imageWrapperWidth = signal(0);\n private readonly imageWrapperHeight = signal(0);\n /** Raw (unclamped) pan-offset intent (px) written by gestures; clamping lives in `clampedOffset`. */\n private readonly offset = signal({ x: 0, y: 0 });\n private readonly internalZoom = signal(this.minZoom());\n protected readonly isDragging = signal(false);\n // SSR-stable, deterministic id (the project's CDK-free `_IdGenerator` replacement) so the\n // `aria-describedby` reference matches between server and client renders.\n readonly descriptionId = injectId('rdx-cropper-description-');\n\n private readonly isZoomControlled = computed(() => this.zoom() !== undefined);\n protected readonly effectiveZoom = computed(() => (this.isZoomControlled() ? this.zoom()! : this.internalZoom()));\n\n /**\n * The applied pan offset (px): the raw intent clamped to keep the image covering the crop window\n * at the current geometry/zoom. Derived (not an effect) so it self-corrects when the container\n * resizes or the zoom/aspect-ratio changes — no write-back, no `untracked` re-entrancy. This is the\n * value the view renders and the crop math reads.\n */\n private readonly clampedOffset = computed(\n () => this.restrictOffset(this.offset().x, this.offset().y, this.effectiveZoom()),\n { equal: pointEqual }\n );\n\n /**\n * Crop rectangle derived from the rendered pan/zoom — the single source of truth for emission.\n * `onCropChange` fires from one effect watching this, so interactions/handlers never emit directly\n * (which previously double-emitted). Value equality keeps it from notifying on equal results.\n */\n private readonly cropData = computed<Area | null>(\n () =>\n computeCropData(this.clampedOffset().x, this.clampedOffset().y, this.effectiveZoom(), this.geometry(), {\n width: this.imgWidth(),\n height: this.imgHeight()\n }),\n { equal: areaEqual }\n );\n\n // Refs\n private readonly dragStartPoint = signal({ x: 0, y: 0 });\n private readonly dragStartOffset = signal({ x: 0, y: 0 });\n private readonly latestZoom = signal(this.minZoom());\n private readonly initialPinchDistance = signal(0);\n private readonly initialPinchZoom = signal(1);\n private readonly isPinching = signal(false);\n private readonly hasWarned = signal(false);\n\n constructor() {\n afterNextRender(() => {\n this.initializeContainerDimensions();\n });\n\n this.setupImageLoadEffect();\n this.setupDimensionsEffects();\n this.setupAccessibilityWarningEffect();\n this.setupEventListenersEffect();\n\n effect(() => {\n this.latestZoom.set(this.effectiveZoom());\n });\n\n // Single source of crop emission: emit whenever the derived crop rectangle changes.\n effect(() => {\n const data = this.cropData();\n untracked(() => this.onCropChange.emit(data));\n });\n }\n\n private updateZoom(newZoomValue: number): number {\n const clampedZoom = clamp(newZoomValue, this.minZoom(), this.maxZoom());\n\n this.onZoomChange.emit(clampedZoom);\n\n if (!this.isZoomControlled()) {\n this.internalZoom.set(clampedZoom);\n }\n return clampedZoom;\n }\n\n private initializeContainerDimensions() {\n const element = this.elementRef.nativeElement;\n if (element && element.clientWidth > 0 && element.clientHeight > 0) {\n // Seed the size for the first paint; the ResizeObserver keeps it in sync afterwards.\n this.containerSize.set({ width: element.clientWidth, height: element.clientHeight });\n }\n }\n\n private setupImageLoadEffect() {\n effect(() => {\n const image = this.image();\n this.offset.set({ x: 0, y: 0 });\n\n if (!this.isZoomControlled()) {\n this.internalZoom.set(this.minZoom());\n }\n\n if (!image || !this.isBrowser) {\n this.imgWidth.set(null);\n this.imgHeight.set(null);\n return;\n }\n\n let isMounted = true;\n const img = new Image();\n img.onload = () => {\n if (isMounted) {\n this.imgWidth.set(img.naturalWidth);\n this.imgHeight.set(img.naturalHeight);\n }\n };\n img.onerror = () => {\n if (isMounted) {\n this.imgWidth.set(null);\n this.imgHeight.set(null);\n }\n };\n img.src = image;\n\n return () => {\n isMounted = false;\n };\n });\n }\n\n private setupDimensionsEffects(): void {\n // Track the container's content-box size via the shared resize-observer effect; `cropAreaSize`\n // derives crop dimensions from it reactively (so changing `aspectRatio` / `cropPadding`\n // recomputes without waiting for a resize). `element` is null on the server, so no observer is\n // constructed (SSR-safe).\n resizeEffect({\n injector: this.injector,\n element: computed(() => (this.isBrowser ? this.elementRef.nativeElement : null)),\n onResize: (entries) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect;\n if (width > 0 && height > 0) this.containerSize.set({ width, height });\n }\n }\n });\n\n // Update image wrapper dimensions when crop area or image dimensions change\n effect(() => {\n const cropW = this.cropAreaWidth();\n const cropH = this.cropAreaHeight();\n const imgW = this.imgWidth();\n const imgH = this.imgHeight();\n\n if (cropW <= 0 || cropH <= 0 || !imgW || !imgH) {\n this.imageWrapperWidth.set(0);\n this.imageWrapperHeight.set(0);\n return;\n }\n\n const naturalAspect = imgW / imgH;\n const cropAspect = cropW / cropH;\n let targetWrapperWidth: number, targetWrapperHeight: number;\n\n if (naturalAspect >= cropAspect) {\n targetWrapperHeight = cropH;\n targetWrapperWidth = targetWrapperHeight * naturalAspect;\n } else {\n targetWrapperWidth = cropW;\n targetWrapperHeight = targetWrapperWidth / naturalAspect;\n }\n\n this.imageWrapperWidth.set(targetWrapperWidth);\n this.imageWrapperHeight.set(targetWrapperHeight);\n });\n }\n\n /** Current rendered geometry the crop math operates on, read from the state signals. */\n private geometry(): CropperGeometry {\n return {\n wrapperWidth: this.imageWrapperWidth(),\n wrapperHeight: this.imageWrapperHeight(),\n cropWidth: this.cropAreaWidth(),\n cropHeight: this.cropAreaHeight()\n };\n }\n\n private restrictOffset(dragOffsetX: number, dragOffsetY: number, currentZoom: number): { x: number; y: number } {\n return computeRestrictedOffset(dragOffsetX, dragOffsetY, currentZoom, this.geometry());\n }\n\n private setupAccessibilityWarningEffect(): void {\n if (!this.isBrowser) return;\n\n effect(() => {\n const checkTimeout = setTimeout(() => {\n if (this.elementRef.nativeElement && !this.hasWarned()) {\n const hasDescription = document.getElementById(this.descriptionId);\n if (!hasDescription) {\n console.warn(this.CROPPER_DESC_WARN_MESSAGE);\n this.hasWarned.set(true);\n }\n }\n }, 100);\n\n return () => clearTimeout(checkTimeout);\n });\n }\n\n /**\n * Single attachment point for every interaction listener. Re-runs on `disabled()`, so a disabled\n * cropper has NO interaction listeners bound at all — there is no per-handler `disabled` check to\n * forget, and a new gesture path can't accidentally bypass the gate. Uses `{ passive: false }` so\n * the handlers can `preventDefault()` (wheel/touch scrolling, arrow-key page scroll).\n */\n private setupEventListenersEffect(): void {\n if (!this.isBrowser) return;\n\n effect((onCleanup) => {\n const node = this.elementRef.nativeElement;\n if (!node || this.disabled()) return;\n\n const options: AddEventListenerOptions = { passive: false };\n\n const mouseDownHandler = (e: MouseEvent) => this.onMouseDown(e);\n const keyDownHandler = (e: KeyboardEvent) => this.onKeyDown(e);\n const wheelHandler = (e: WheelEvent) => this.handleWheel(e);\n const touchStartHandler = (e: TouchEvent) => this.handleTouchStart(e);\n const touchMoveHandler = (e: TouchEvent) => this.handleTouchMove(e);\n const touchEndHandler = (e: TouchEvent) => this.handleTouchEnd(e);\n\n node.addEventListener('mousedown', mouseDownHandler, options);\n node.addEventListener('keydown', keyDownHandler, options);\n node.addEventListener('wheel', wheelHandler, options);\n node.addEventListener('touchstart', touchStartHandler, options);\n node.addEventListener('touchmove', touchMoveHandler, options);\n node.addEventListener('touchend', touchEndHandler, options);\n node.addEventListener('touchcancel', touchEndHandler, options);\n\n onCleanup(() => {\n node.removeEventListener('mousedown', mouseDownHandler, options);\n node.removeEventListener('keydown', keyDownHandler, options);\n node.removeEventListener('wheel', wheelHandler, options);\n node.removeEventListener('touchstart', touchStartHandler, options);\n node.removeEventListener('touchmove', touchMoveHandler, options);\n node.removeEventListener('touchend', touchEndHandler, options);\n node.removeEventListener('touchcancel', touchEndHandler, options);\n });\n });\n }\n\n private onMouseDown(e: MouseEvent): void {\n if (e.button !== 0) return;\n e.preventDefault();\n this.isDragging.set(true);\n this.isPinching.set(false);\n this.dragStartPoint.set({ x: e.clientX, y: e.clientY });\n this.dragStartOffset.set(this.clampedOffset());\n\n const handleMouseMove = (ev: MouseEvent) => {\n const deltaX = ev.clientX - this.dragStartPoint().x;\n const deltaY = ev.clientY - this.dragStartPoint().y;\n this.offset.set({ x: this.dragStartOffset().x + deltaX, y: this.dragStartOffset().y + deltaY });\n };\n\n const handleMouseUp = () => {\n this.isDragging.set(false);\n window.removeEventListener('mousemove', handleMouseMove);\n window.removeEventListener('mouseup', handleMouseUp);\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n window.addEventListener('mouseup', handleMouseUp);\n }\n\n /**\n * Zoom toward an anchor point (coordinates relative to the root's center). `fromZoom`/`fromOffset`\n * are the zoom/offset the anchor is measured against — the live state for wheel/keyboard, the\n * gesture-start baseline for pinch. Emits the zoom request via {@link updateZoom}, then re-anchors\n * the pan offset **only when the zoom is uncontrolled**: in controlled mode the rendered zoom does\n * not change until the parent writes `zoom` back, so writing an offset for a not-yet-applied zoom\n * would pan the image without rescaling it (`clampedOffset` re-derives once the new zoom applies).\n */\n private zoomToPoint(\n pointerX: number,\n pointerY: number,\n targetZoom: number,\n fromZoom: number,\n fromOffset: { x: number; y: number }\n ): void {\n const clampedZoom = clamp(targetZoom, this.minZoom(), this.maxZoom());\n if (clampedZoom === this.effectiveZoom()) return;\n\n const imagePointX = (pointerX - fromOffset.x) / fromZoom;\n const imagePointY = (pointerY - fromOffset.y) / fromZoom;\n\n const finalNewZoom = this.updateZoom(clampedZoom);\n if (this.isZoomControlled()) return;\n\n this.offset.set({ x: pointerX - imagePointX * finalNewZoom, y: pointerY - imagePointY * finalNewZoom });\n }\n\n private handleWheel(e: WheelEvent): void {\n e.preventDefault();\n e.stopPropagation();\n if (!this.elementRef.nativeElement || this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n\n const delta = e.deltaY * -this.zoomSensitivity();\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const pointerX = e.clientX - rect.left - rect.width / 2;\n const pointerY = e.clientY - rect.top - rect.height / 2;\n\n this.zoomToPoint(pointerX, pointerY, this.effectiveZoom() + delta, this.effectiveZoom(), this.clampedOffset());\n }\n\n private getPinchDistance(touches: TouchList): number {\n return Math.sqrt(\n Math.pow(touches[1].clientX - touches[0].clientX, 2) + Math.pow(touches[1].clientY - touches[0].clientY, 2)\n );\n }\n\n private getPinchCenter(touches: TouchList): { x: number; y: number } {\n return {\n x: (touches[0].clientX + touches[1].clientX) / 2,\n y: (touches[0].clientY + touches[1].clientY) / 2\n };\n }\n\n private handleTouchStart(e: TouchEvent): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n e.preventDefault();\n const touches = e.touches;\n\n if (touches.length === 1) {\n this.isDragging.set(true);\n this.isPinching.set(false);\n this.dragStartPoint.set({ x: touches[0].clientX, y: touches[0].clientY });\n this.dragStartOffset.set(this.clampedOffset());\n } else if (touches.length === 2) {\n this.isDragging.set(false);\n this.isPinching.set(true);\n this.initialPinchDistance.set(this.getPinchDistance(touches));\n this.initialPinchZoom.set(this.latestZoom());\n this.dragStartOffset.set(this.clampedOffset());\n }\n }\n\n private handleTouchMove(e: TouchEvent): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n e.preventDefault();\n const touches = e.touches;\n\n if (touches.length === 1 && this.isDragging() && !this.isPinching()) {\n const deltaX = touches[0].clientX - this.dragStartPoint().x;\n const deltaY = touches[0].clientY - this.dragStartPoint().y;\n this.offset.set({ x: this.dragStartOffset().x + deltaX, y: this.dragStartOffset().y + deltaY });\n } else if (touches.length === 2 && this.isPinching()) {\n const scale = this.getPinchDistance(touches) / this.initialPinchDistance();\n const pinchCenter = this.getPinchCenter(touches);\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const pinchCenterX = pinchCenter.x - rect.left - rect.width / 2;\n const pinchCenterY = pinchCenter.y - rect.top - rect.height / 2;\n\n // Pinch is baseline-relative: anchor against the zoom/offset captured at gesture start.\n this.zoomToPoint(\n pinchCenterX,\n pinchCenterY,\n this.initialPinchZoom() * scale,\n this.initialPinchZoom(),\n this.dragStartOffset()\n );\n }\n }\n\n private handleTouchEnd(e: TouchEvent): void {\n e.preventDefault();\n const touches = e.touches;\n\n if (this.isPinching() && touches.length < 2) {\n this.isPinching.set(false);\n\n if (touches.length === 1) {\n this.isDragging.set(true);\n this.dragStartPoint.set({ x: touches[0].clientX, y: touches[0].clientY });\n this.dragStartOffset.set(this.clampedOffset());\n } else {\n this.isDragging.set(false);\n }\n } else if (this.isDragging() && touches.length === 0) {\n this.isDragging.set(false);\n }\n }\n\n private onKeyDown(e: KeyboardEvent): void {\n if (this.imageWrapperWidth() <= 0) return;\n\n const base = this.clampedOffset();\n let targetOffsetX = base.x;\n let targetOffsetY = base.y;\n // eslint-disable-next-line no-useless-assignment\n let moved = false;\n\n switch (e.key) {\n case 'ArrowUp':\n targetOffsetY += this.keyboardStep();\n moved = true;\n break;\n case 'ArrowDown':\n targetOffsetY -= this.keyboardStep();\n moved = true;\n break;\n case 'ArrowLeft':\n targetOffsetX += this.keyboardStep();\n moved = true;\n break;\n case 'ArrowRight':\n targetOffsetX -= this.keyboardStep();\n moved = true;\n break;\n case '+':\n case '=':\n case 'PageUp':\n e.preventDefault();\n this.zoomFromCenter(this.zoomKeyboardStep());\n return;\n case '-':\n case '_':\n case 'PageDown':\n e.preventDefault();\n this.zoomFromCenter(-this.zoomKeyboardStep());\n return;\n default:\n return;\n }\n\n if (moved) {\n e.preventDefault();\n // Write the raw target; `clampedOffset` clamps it (and dedups a no-op at the boundary).\n this.offset.set({ x: targetOffsetX, y: targetOffsetY });\n }\n }\n\n /** Zoom by `delta` keeping the crop center fixed (the keyboard counterpart of wheel/pinch zoom). */\n private zoomFromCenter(delta: number): void {\n if (this.imageWrapperWidth() <= 0 || this.imageWrapperHeight() <= 0) return;\n // Anchor at the crop center (pointer 0,0 relative to center) against the live zoom/offset.\n this.zoomToPoint(0, 0, this.effectiveZoom() + delta, this.effectiveZoom(), this.clampedOffset());\n }\n\n /**\n * Inline style for the image wrapper: measured size, centered in the root, then translated and\n * scaled by the current pan offset and zoom. A `computed` (not a method) so the `[style]` binding\n * only re-applies when an input actually changes — a per-change-detection method call would\n * allocate a new object every tick and force a constant re-bind.\n */\n readonly imageWrapperStyle = computed<Record<string, string>>(() => {\n const wrapperW = this.imageWrapperWidth();\n const wrapperH = this.imageWrapperHeight();\n const { x: offsetX, y: offsetY } = this.clampedOffset();\n const zoom = this.effectiveZoom();\n\n return {\n width: `${wrapperW}px`,\n height: `${wrapperH}px`,\n transform: `translate3d(${offsetX}px, ${offsetY}px, 0px) scale(${zoom})`,\n position: 'absolute',\n left: `calc(50% - ${wrapperW / 2}px)`,\n top: `calc(50% - ${wrapperH / 2}px)`,\n willChange: 'transform'\n };\n });\n\n /** Inline style for the crop-area overlay (its measured width/height). */\n readonly cropAreaStyle = computed<Record<string, string>>(() => ({\n width: `${this.cropAreaWidth()}px`,\n height: `${this.cropAreaHeight()}px`\n }));\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCropperCropAreaDirective } from './src/cropper-crop-area.directive';\nimport { RdxCropperDescriptionDirective } from './src/cropper-description.directive';\nimport { RdxCropperImageComponent } from './src/cropper-image.component';\nimport { RdxCropperRootDirective } from './src/cropper-root.directive';\n\nexport * from './src/cropper-context.token';\nexport * from './src/cropper-crop-area.directive';\nexport * from './src/cropper-description.directive';\nexport * from './src/cropper-image.component';\nexport * from './src/cropper-root.directive';\n\nconst _imports = [\n RdxCropperRootDirective,\n RdxCropperImageComponent,\n RdxCropperCropAreaDirective,\n RdxCropperDescriptionDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxCropperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["computeCropData","computeRestrictedOffset"],"mappings":";;;;;AAUO,MAAM,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,GAAG,aAAa,CAC9E,aAAa,EACb,oBAAoB;;MCHX,2BAA2B,CAAA;AANxC,IAAA,WAAA,GAAA;QAOa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,6BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;MCCY,8BAA8B,CAAA;AAN3C,IAAA,WAAA,GAAA;QAOa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGA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