@acorex/components 21.0.3-next.3 → 21.0.3-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/fesm2022/acorex-components-accordion.mjs +4 -4
  2. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  3. package/fesm2022/acorex-components-action-sheet.mjs +2 -2
  4. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  5. package/fesm2022/acorex-components-alert.mjs +2 -2
  6. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  7. package/fesm2022/acorex-components-audio-wave.mjs +2 -2
  8. package/fesm2022/acorex-components-avatar.mjs +2 -2
  9. package/fesm2022/acorex-components-avatar.mjs.map +1 -1
  10. package/fesm2022/acorex-components-badge.mjs +2 -2
  11. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  12. package/fesm2022/acorex-components-bottom-navigation.mjs +2 -2
  13. package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
  14. package/fesm2022/acorex-components-breadcrumbs.mjs +2 -2
  15. package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
  16. package/fesm2022/acorex-components-button-group.mjs +2 -2
  17. package/fesm2022/acorex-components-button.mjs +6 -6
  18. package/fesm2022/acorex-components-button.mjs.map +1 -1
  19. package/fesm2022/acorex-components-calendar.mjs +6 -6
  20. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  21. package/fesm2022/acorex-components-check-box.mjs +2 -2
  22. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  23. package/fesm2022/acorex-components-chips.mjs +2 -2
  24. package/fesm2022/acorex-components-chips.mjs.map +1 -1
  25. package/fesm2022/acorex-components-circular-progress.mjs +2 -2
  26. package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
  27. package/fesm2022/acorex-components-color-box.mjs +2 -2
  28. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  29. package/fesm2022/acorex-components-color-palette.mjs +2 -2
  30. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  31. package/fesm2022/acorex-components-command.mjs +2 -2
  32. package/fesm2022/acorex-components-command.mjs.map +1 -1
  33. package/fesm2022/acorex-components-comment.mjs +6 -6
  34. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  35. package/fesm2022/acorex-components-conversation2.mjs +3021 -2868
  36. package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
  37. package/fesm2022/acorex-components-data-pager.mjs +2 -2
  38. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  39. package/fesm2022/acorex-components-data-table.mjs +2 -2
  40. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  41. package/fesm2022/acorex-components-datetime-box.mjs +2 -2
  42. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  43. package/fesm2022/acorex-components-datetime-input.mjs +2 -2
  44. package/fesm2022/acorex-components-datetime-picker.mjs +2 -2
  45. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  46. package/fesm2022/acorex-components-decorators.mjs +11 -18
  47. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  48. package/fesm2022/acorex-components-dialog.mjs +2 -2
  49. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  50. package/fesm2022/acorex-components-drawer.mjs +4 -4
  51. package/fesm2022/acorex-components-dropdown-button.mjs +2 -2
  52. package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
  53. package/fesm2022/acorex-components-dropdown.mjs +2 -2
  54. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  55. package/fesm2022/acorex-components-editor.mjs +2 -2
  56. package/fesm2022/acorex-components-form.mjs +2 -2
  57. package/fesm2022/acorex-components-form.mjs.map +1 -1
  58. package/fesm2022/acorex-components-image-editor.mjs +387 -188
  59. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  60. package/fesm2022/acorex-components-image.mjs +2 -2
  61. package/fesm2022/acorex-components-json-viewer.mjs +2 -2
  62. package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
  63. package/fesm2022/acorex-components-kanban.mjs +2 -2
  64. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  65. package/fesm2022/acorex-components-kbd.mjs +4 -6
  66. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  67. package/fesm2022/acorex-components-label.mjs +2 -2
  68. package/fesm2022/acorex-components-label.mjs.map +1 -1
  69. package/fesm2022/acorex-components-list.mjs +2 -2
  70. package/fesm2022/acorex-components-list.mjs.map +1 -1
  71. package/fesm2022/acorex-components-loading-dialog.mjs +2 -2
  72. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  73. package/fesm2022/acorex-components-loading.mjs +4 -4
  74. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  75. package/fesm2022/acorex-components-map.mjs +2 -2
  76. package/fesm2022/acorex-components-media-viewer.mjs +10 -10
  77. package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
  78. package/fesm2022/{acorex-components-modal-acorex-components-modal-lJw2DGSj.mjs → acorex-components-modal-acorex-components-modal-B6-H9xfe.mjs} +4 -4
  79. package/fesm2022/{acorex-components-modal-acorex-components-modal-lJw2DGSj.mjs.map → acorex-components-modal-acorex-components-modal-B6-H9xfe.mjs.map} +1 -1
  80. package/fesm2022/{acorex-components-modal-modal-content.component-t9kRuhc_.mjs → acorex-components-modal-modal-content.component-OKCXGuv_.mjs} +4 -4
  81. package/fesm2022/{acorex-components-modal-modal-content.component-t9kRuhc_.mjs.map → acorex-components-modal-modal-content.component-OKCXGuv_.mjs.map} +1 -1
  82. package/fesm2022/acorex-components-modal.mjs +1 -1
  83. package/fesm2022/acorex-components-navbar.mjs +2 -2
  84. package/fesm2022/acorex-components-navbar.mjs.map +1 -1
  85. package/fesm2022/acorex-components-notification.mjs +2 -2
  86. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  87. package/fesm2022/acorex-components-number-box.mjs +2 -2
  88. package/fesm2022/acorex-components-paint.mjs +4 -4
  89. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  90. package/fesm2022/acorex-components-password-box.mjs +2 -2
  91. package/fesm2022/acorex-components-pdf-reader.mjs +2 -2
  92. package/fesm2022/acorex-components-phone-box.mjs +2 -2
  93. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  94. package/fesm2022/acorex-components-picker.mjs +6 -6
  95. package/fesm2022/acorex-components-picker.mjs.map +1 -1
  96. package/fesm2022/acorex-components-popup.mjs +1 -0
  97. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  98. package/fesm2022/acorex-components-progress-bar.mjs +2 -2
  99. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  100. package/fesm2022/acorex-components-qrcode.mjs +2 -2
  101. package/fesm2022/acorex-components-query-builder.mjs +2 -2
  102. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  103. package/fesm2022/acorex-components-radio.mjs +2 -2
  104. package/fesm2022/acorex-components-rail-navigation.mjs +2 -2
  105. package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
  106. package/fesm2022/acorex-components-range-slider.mjs +2 -2
  107. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  108. package/fesm2022/acorex-components-rate-picker.mjs +2 -2
  109. package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
  110. package/fesm2022/acorex-components-result.mjs +2 -2
  111. package/fesm2022/acorex-components-result.mjs.map +1 -1
  112. package/fesm2022/acorex-components-routing-progress.mjs +2 -2
  113. package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
  114. package/fesm2022/acorex-components-scheduler.mjs +18 -18
  115. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  116. package/fesm2022/acorex-components-select-box.mjs +23 -13
  117. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  118. package/fesm2022/acorex-components-selection-list-2.mjs +2 -2
  119. package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
  120. package/fesm2022/acorex-components-selection-list.mjs +2 -2
  121. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  122. package/fesm2022/acorex-components-skeleton.mjs +2 -2
  123. package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
  124. package/fesm2022/acorex-components-sliding-item.mjs +2 -2
  125. package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
  126. package/fesm2022/acorex-components-switch.mjs +2 -2
  127. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  128. package/fesm2022/acorex-components-tabs.mjs +2 -2
  129. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  130. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  131. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  132. package/fesm2022/acorex-components-tag.mjs +2 -2
  133. package/fesm2022/acorex-components-tag.mjs.map +1 -1
  134. package/fesm2022/acorex-components-text-area.mjs +2 -2
  135. package/fesm2022/acorex-components-text-area.mjs.map +1 -1
  136. package/fesm2022/acorex-components-text-box.mjs +2 -2
  137. package/fesm2022/acorex-components-time-line.mjs +4 -4
  138. package/fesm2022/acorex-components-time-line.mjs.map +1 -1
  139. package/fesm2022/acorex-components-toast.mjs +2 -2
  140. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  141. package/fesm2022/acorex-components-toolbar.mjs +2 -2
  142. package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
  143. package/fesm2022/acorex-components-tooltip.mjs +2 -2
  144. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  145. package/fesm2022/acorex-components-uploader.mjs +6 -6
  146. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  147. package/fesm2022/acorex-components-wysiwyg.mjs +6 -6
  148. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  149. package/package.json +4 -3
  150. package/types/acorex-components-conversation2.d.ts +75 -30
  151. package/types/acorex-components-image-editor.d.ts +74 -47
@@ -1,21 +1,21 @@
1
1
  import { AXComponent, MXBaseComponent, MXInputBaseValueComponent, MXLookComponent, AXFocusableComponent, AXValuableComponent } from '@acorex/cdk/common';
2
- import { AXButtonComponent, AXButtonModule } from '@acorex/components/button';
3
- import * as i1$1 from '@acorex/components/decorators';
4
- import { AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
2
+ import * as i1 from '@acorex/components/decorators';
3
+ import { AXDecoratorModule, AXDecoratorIconComponent } from '@acorex/components/decorators';
5
4
  import { AXLoadingSpinnerComponent, AXLoadingModule } from '@acorex/components/loading';
6
- import * as i2$1 from '@acorex/components/toolbar';
7
- import { AXToolBarModule } from '@acorex/components/toolbar';
8
5
  import * as i0 from '@angular/core';
9
- import { signal, Injectable, inject, output, input, ViewEncapsulation, Component, ChangeDetectionStrategy, NgZone, ElementRef, viewChild, Renderer2, PLATFORM_ID, effect, afterNextRender, linkedSignal, contentChild, forwardRef, HostBinding, NgModule } from '@angular/core';
10
- import * as i1 from '@angular/forms';
11
- import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
6
+ import { signal, Injectable, input, inject, NgZone, ElementRef, viewChild, Renderer2, PLATFORM_ID, effect, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component, linkedSignal, contentChild, forwardRef, HostBinding, output, computed, NgModule } from '@angular/core';
7
+ import * as i1$1 from '@angular/forms';
8
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
12
9
  import { classes } from 'polytype';
10
+ import { isPlatformBrowser, AsyncPipe } from '@angular/common';
11
+ import { AXButtonComponent, AXButtonModule } from '@acorex/components/button';
12
+ import * as i2 from '@acorex/components/tooltip';
13
+ import { AXTooltipModule, AXTooltipDirective } from '@acorex/components/tooltip';
13
14
  import { AXTranslatorPipe } from '@acorex/core/translation';
14
- import { AsyncPipe, isPlatformBrowser } from '@angular/common';
15
+ import * as i2$1 from '@acorex/components/toolbar';
16
+ import { AXToolBarModule } from '@acorex/components/toolbar';
15
17
  import { AXColorBoxComponent, AXColorBoxModule } from '@acorex/components/color-box';
16
18
  import { AXRangeSliderComponent, AXRangeSliderModule } from '@acorex/components/range-slider';
17
- import * as i2 from '@acorex/components/tooltip';
18
- import { AXTooltipModule, AXTooltipDirective } from '@acorex/components/tooltip';
19
19
  import { AXDialogModule } from '@acorex/components/dialog';
20
20
  import { AXPopoverModule } from '@acorex/components/popover';
21
21
  import { AXSelectBoxModule } from '@acorex/components/select-box';
@@ -36,155 +36,26 @@ class AXImageEditorService {
36
36
  this.undoPressed = signal(false, ...(ngDevMode ? [{ debugName: "undoPressed" }] : /* istanbul ignore next */ []));
37
37
  this.redoPressed = signal(false, ...(ngDevMode ? [{ debugName: "redoPressed" }] : /* istanbul ignore next */ []));
38
38
  this.cropperRatio = signal(null, ...(ngDevMode ? [{ debugName: "cropperRatio" }] : /* istanbul ignore next */ []));
39
+ this.cropperSize = signal(150, ...(ngDevMode ? [{ debugName: "cropperSize" }] : /* istanbul ignore next */ []));
39
40
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
41
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService }); }
42
- }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService, decorators: [{
44
- type: Injectable
45
- }] });
46
-
47
- /**
48
- * paint mode.
49
- * @category Components
50
- */
51
- class AXImageEditorCropComponent {
52
- constructor() {
53
- this.service = inject(AXImageEditorService);
54
- this.cropPressed = output();
55
- this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
56
- }
57
- cropButtonHandler() {
58
- this.cropPressed.emit();
59
- }
60
- ratioHandler(r) {
61
- if (this.service.cropperRatio() === r) {
62
- this.service.cropperRatio.set(null);
63
- }
64
- else {
65
- this.service.cropperRatio.set(r);
66
- }
67
- }
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
69
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorCropComponent, isStandalone: true, selector: "ax-image-editor-crop", inputs: { aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cropPressed: "cropPressed" }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], ngImport: i0, template: "<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n\n<div class=\"flex gap-2\">\n <ax-button\n [selected]=\"this.service.cropperRatio() === '1:1' ? true : false\"\n [color]=\"this.service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"this.service.cropperRatio() === '16:9' ? true : false\"\n [color]=\"this.service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n\n @if (aspectRatio().length) {\n @for (item of aspectRatio(); track $index) {\n <ax-button\n [selected]=\"this.service.cropperRatio() === item ? true : false\"\n [color]=\"this.service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-crop{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));width:100%;padding:calc(var(--spacing,.25rem) * 2);justify-content:space-around;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
70
- }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropComponent, decorators: [{
72
- type: Component,
73
- args: [{ selector: 'ax-image-editor-crop', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AsyncPipe, AXTranslatorPipe], providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], template: "<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n\n<div class=\"flex gap-2\">\n <ax-button\n [selected]=\"this.service.cropperRatio() === '1:1' ? true : false\"\n [color]=\"this.service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"this.service.cropperRatio() === '16:9' ? true : false\"\n [color]=\"this.service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n\n @if (aspectRatio().length) {\n @for (item of aspectRatio(); track $index) {\n <ax-button\n [selected]=\"this.service.cropperRatio() === item ? true : false\"\n [color]=\"this.service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-crop{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));width:100%;padding:calc(var(--spacing,.25rem) * 2);justify-content:space-around;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
74
- }], propDecorators: { cropPressed: [{ type: i0.Output, args: ["cropPressed"] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
75
-
76
- /**
77
- * paint mode.
78
- * @category Components
79
- */
80
- class AXImageEditorHighlightComponent {
81
- constructor() {
82
- this.service = inject(AXImageEditorService);
83
- /** @ignore */
84
- this.selectedColor = signal(this.service.highlightColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
85
- /** @ignore */
86
- this.value = this.service.highlightWidth();
87
- }
88
- changeColorHandler(e) {
89
- this.service.highlightColor.set(e);
90
- this.selectedColor.set(e);
91
- }
92
- /** @ignore */
93
- valueHandler(e) {
94
- this.service.highlightWidth.set(e);
95
- }
96
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorHighlightComponent, isStandalone: true, selector: "ax-image-editor-highlight", providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-highlight{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}ax-image-editor-highlight ax-color-box{flex:0}ax-image-editor-highlight ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}ax-image-editor-highlight ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
98
- }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightComponent, decorators: [{
100
- type: Component,
101
- args: [{ selector: 'ax-image-editor-highlight', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-highlight{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}ax-image-editor-highlight ax-color-box{flex:0}ax-image-editor-highlight ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}ax-image-editor-highlight ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
102
- }] });
103
-
104
- /**
105
- * paint mode.
106
- * @category Components
107
- */
108
- class AXImageEditorPenComponent {
109
- constructor() {
110
- this.service = inject(AXImageEditorService);
111
- /** @ignore */
112
- this.value = this.service.penWidth();
113
- /** @ignore */
114
- this.selectedColor = signal(this.service.penColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
115
- }
116
- changeColorHandler(e) {
117
- this.service.penColor.set(e);
118
- this.selectedColor.set(e);
119
- }
120
- /** @ignore */
121
- valueHandler(e) {
122
- this.service.penWidth.set(e);
123
- }
124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
125
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorPenComponent, isStandalone: true, selector: "ax-image-editor-pen", providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-pen{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}ax-image-editor-pen ax-color-box{flex:0}ax-image-editor-pen ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}ax-image-editor-pen ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
126
- }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenComponent, decorators: [{
128
- type: Component,
129
- args: [{ selector: 'ax-image-editor-pen', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-pen{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}ax-image-editor-pen ax-color-box{flex:0}ax-image-editor-pen ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}ax-image-editor-pen ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
130
- }] });
131
-
132
- /**
133
- * paint mode.
134
- * @category Components
135
- */
136
- class AXImageEditorRotateComponent {
137
- constructor() {
138
- /** @ignore */
139
- this.service = inject(AXImageEditorService);
140
- }
141
- /** @ignore */
142
- rotateRightHandler() {
143
- this.service.rotate.set({ state: 90, userInteract: true });
144
- }
145
- /** @ignore */
146
- rotateLeftHandler() {
147
- this.service.rotate.set({ state: -90, userInteract: true });
148
- }
149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
150
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorRotateComponent, isStandalone: true, selector: "ax-image-editor-rotate", providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], ngImport: i0, template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-rotate{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
151
- }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateComponent, decorators: [{
153
- type: Component,
154
- args: [{ selector: 'ax-image-editor-rotate', encapsulation: ViewEncapsulation.None, imports: [
155
- AXButtonComponent,
156
- AXTooltipDirective,
157
- AXDecoratorIconComponent,
158
- AsyncPipe,
159
- AXTranslatorPipe,
160
- AXTooltipModule,
161
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-rotate{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));justify-content:center;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
162
- }] });
163
-
164
- /**
165
- * paint mode.
166
- * @category Components
167
- */
168
- class AXImageEditorToolSelectorComponent {
169
- constructor() {
170
- this.service = inject(AXImageEditorService);
171
- }
172
- changeToolHandler(tool) {
173
- if (this.service.activeToolState() === tool) {
174
- this.service.activeToolState.set(null);
41
+ toggleTool(tool) {
42
+ if (this.activeToolState() === tool) {
43
+ this.activeToolState.set(null);
175
44
  return;
176
45
  }
177
- this.service.activeToolState.set(tool);
46
+ this.activateTool(tool);
47
+ }
48
+ activateTool(tool) {
49
+ this.activeToolState.set(tool);
178
50
  if (tool === 'pen' || tool === 'highlight') {
179
- this.service.penType.set(tool);
51
+ this.penType.set(tool);
180
52
  }
181
53
  }
182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorToolSelectorComponent, isStandalone: true, selector: "ax-image-editor-tool-selector", providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], ngImport: i0, template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('crop')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'crop' ? true : false\"\n [color]=\"this.service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('rotate')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'rotate' ? true : false\"\n [color]=\"this.service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n >\n <i class=\"fa-solid fa-rotate\"></i>\n </ax-button>\n</div>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
55
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService }); }
184
56
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolSelectorComponent, decorators: [{
186
- type: Component,
187
- args: [{ selector: 'ax-image-editor-tool-selector', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('crop')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'crop' ? true : false\"\n [color]=\"this.service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('rotate')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'rotate' ? true : false\"\n [color]=\"this.service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n >\n <i class=\"fa-solid fa-rotate\"></i>\n </ax-button>\n</div>\n" }]
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorService, decorators: [{
58
+ type: Injectable
188
59
  }] });
189
60
 
190
61
  /**
@@ -194,6 +65,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
194
65
  class AXImageEditorCropperWindowComponent {
195
66
  constructor() {
196
67
  this.showGrid = input(true, ...(ngDevMode ? [{ debugName: "showGrid" }] : /* istanbul ignore next */ []));
68
+ /** Base size in pixels used to calculate the initial cropper window dimensions. */
69
+ this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
197
70
  this.service = inject(AXImageEditorService);
198
71
  this.ngZone = inject(NgZone);
199
72
  this.selectedHandle = signal(null, ...(ngDevMode ? [{ debugName: "selectedHandle" }] : /* istanbul ignore next */ []));
@@ -213,7 +86,7 @@ class AXImageEditorCropperWindowComponent {
213
86
  const host = this.elementRef.nativeElement;
214
87
  let width;
215
88
  let height;
216
- const scale = 150;
89
+ const scale = this.size() ?? this.service.cropperSize();
217
90
  switch (this.service.cropperRatio()) {
218
91
  case '1:1':
219
92
  width = 1;
@@ -453,12 +326,12 @@ class AXImageEditorCropperWindowComponent {
453
326
  this.selectedHandle.set(null);
454
327
  }
455
328
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropperWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
456
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorCropperWindowComponent, isStandalone: true, selector: "ax-image-editor-cropper-window", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], viewQueries: [{ propertyName: "cropperWindow", first: true, predicate: ["r"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000) 70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff) 50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--spacing,.25rem) * -2);right:calc(var(--spacing,.25rem) * -2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--spacing,.25rem) * -2);bottom:calc(var(--spacing,.25rem) * -2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--spacing,.25rem) * -2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--spacing,.25rem) * -2);left:calc(var(--spacing,.25rem) * -2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--spacing,.25rem) * -2);left:calc(var(--spacing,.25rem) * -2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--spacing,.25rem) * -2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--spacing,.25rem) * -2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--spacing,.25rem) * -2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
329
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorCropperWindowComponent, isStandalone: true, selector: "ax-image-editor-cropper-window", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], viewQueries: [{ propertyName: "cropperWindow", first: true, predicate: ["r"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000) 70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff) 50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--ax-sys-spacing-base) * 4);width:calc(var(--ax-sys-spacing-base) * 4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);right:calc(var(--ax-sys-spacing-base) * -2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--ax-sys-spacing-base) * -2);bottom:calc(var(--ax-sys-spacing-base) * -2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--ax-sys-spacing-base) * -2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--ax-sys-spacing-base) * -2);left:calc(var(--ax-sys-spacing-base) * -2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);left:calc(var(--ax-sys-spacing-base) * -2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--ax-sys-spacing-base) * -2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--ax-sys-spacing-base) * -2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
457
330
  }
458
331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropperWindowComponent, decorators: [{
459
332
  type: Component,
460
- args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000) 70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff) 50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--spacing,.25rem) * -2);right:calc(var(--spacing,.25rem) * -2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--spacing,.25rem) * -2);bottom:calc(var(--spacing,.25rem) * -2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--spacing,.25rem) * -2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--spacing,.25rem) * -2);left:calc(var(--spacing,.25rem) * -2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--spacing,.25rem) * -2);left:calc(var(--spacing,.25rem) * -2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--spacing,.25rem) * -2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--spacing,.25rem) * -2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--spacing,.25rem) * -2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
461
- }], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], cropperWindow: [{ type: i0.ViewChild, args: ['r', { isSignal: true }] }] } });
333
+ args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000) 70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff) 50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--ax-sys-spacing-base) * 4);width:calc(var(--ax-sys-spacing-base) * 4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);right:calc(var(--ax-sys-spacing-base) * -2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--ax-sys-spacing-base) * -2);bottom:calc(var(--ax-sys-spacing-base) * -2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--ax-sys-spacing-base) * -2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--ax-sys-spacing-base) * -2);left:calc(var(--ax-sys-spacing-base) * -2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);left:calc(var(--ax-sys-spacing-base) * -2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--ax-sys-spacing-base) * -2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--ax-sys-spacing-base) * -2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--ax-sys-spacing-base) * -2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
334
+ }], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], cropperWindow: [{ type: i0.ViewChild, args: ['r', { isSignal: true }] }] } });
462
335
 
463
336
  class AXImageEditorViewComponent extends MXBaseComponent {
464
337
  /** @ignore */
@@ -507,6 +380,10 @@ class AXImageEditorViewComponent extends MXBaseComponent {
507
380
  * its change grid display state.
508
381
  */
509
382
  this.showGrid = input(true, ...(ngDevMode ? [{ debugName: "showGrid" }] : /* istanbul ignore next */ []));
383
+ /**
384
+ * Base size in pixels for the initial cropper window dimensions.
385
+ */
386
+ this.cropperSize = input(...(ngDevMode ? [undefined, { debugName: "cropperSize" }] : /* istanbul ignore next */ []));
510
387
  /**
511
388
  * its change grid display state.
512
389
  */
@@ -563,6 +440,12 @@ class AXImageEditorViewComponent extends MXBaseComponent {
563
440
  return;
564
441
  this.rotateImage();
565
442
  });
443
+ effect(() => {
444
+ const size = this.cropperSize();
445
+ if (size != null) {
446
+ this.service.cropperSize.set(size);
447
+ }
448
+ });
566
449
  }
567
450
  /** @ignore */
568
451
  ngOnDestroy() {
@@ -646,19 +529,28 @@ class AXImageEditorViewComponent extends MXBaseComponent {
646
529
  this.saveImageChange();
647
530
  }
648
531
  /** @ignore */
649
- cropButtonHandler() {
650
- const cropRect = this.cropperWindow().getCropperArea();
651
- const canvasRect = this.canvasElem().nativeElement.getClientRects()[0];
652
- const dx = cropRect.x - canvasRect.x;
653
- const dy = cropRect.y - canvasRect.y;
654
- const imageData = this.ctx().getImageData(dx, dy, cropRect.width, cropRect.height);
655
- this.canvasElem().nativeElement.width = cropRect.width;
656
- this.canvasElem().nativeElement.height = cropRect.height;
532
+ async crop() {
533
+ const cropper = this.cropperWindow();
534
+ if (this.service.activeToolState() !== 'crop' || !cropper) {
535
+ return;
536
+ }
537
+ const cropRect = cropper.getCropperArea();
538
+ const canvas = this.canvasElem().nativeElement;
539
+ const canvasRect = canvas.getBoundingClientRect();
540
+ const scaleX = canvas.width / canvasRect.width;
541
+ const scaleY = canvas.height / canvasRect.height;
542
+ const dx = (cropRect.x - canvasRect.x) * scaleX;
543
+ const dy = (cropRect.y - canvasRect.y) * scaleY;
544
+ const cropWidth = cropRect.width * scaleX;
545
+ const cropHeight = cropRect.height * scaleY;
546
+ const imageData = this.ctx().getImageData(Math.round(dx), Math.round(dy), Math.round(cropWidth), Math.round(cropHeight));
547
+ canvas.width = Math.round(cropWidth);
548
+ canvas.height = Math.round(cropHeight);
657
549
  this.ctx().putImageData(imageData, 0, 0);
658
550
  const cropImage = this.canvasElem().nativeElement.toDataURL('image/jpeg', 1);
551
+ await this.saveImageChange();
659
552
  this.setInitialImage(cropImage, false);
660
553
  this.service.activeToolState.set(null);
661
- this.saveImageChange();
662
554
  }
663
555
  /** @ignore */
664
556
  rotateImage() {
@@ -712,12 +604,12 @@ class AXImageEditorViewComponent extends MXBaseComponent {
712
604
  this.service.imageBlob.set(blobs);
713
605
  }
714
606
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
715
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorViewComponent, isStandalone: true, selector: "ax-image-editor-view", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], viewQueries: [{ propertyName: "canvasElem", first: true, predicate: ["canvasElem"], descendants: true, isSignal: true }, { propertyName: "cropperWindow", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{margin:calc(var(--spacing,.25rem) * 4);position:absolute;top:0;right:0}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXImageEditorCropperWindowComponent, selector: "ax-image-editor-cropper-window", inputs: ["showGrid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
607
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorViewComponent, isStandalone: true, selector: "ax-image-editor-view", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, cropperSize: { classPropertyName: "cropperSize", publicName: "cropperSize", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], viewQueries: [{ propertyName: "canvasElem", first: true, predicate: ["canvasElem"], descendants: true, isSignal: true }, { propertyName: "cropperWindow", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{margin:calc(var(--ax-sys-spacing-base) * 4);position:absolute;top:0;right:0}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXImageEditorCropperWindowComponent, selector: "ax-image-editor-cropper-window", inputs: ["showGrid", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
716
608
  }
717
609
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorViewComponent, decorators: [{
718
610
  type: Component,
719
- args: [{ selector: 'ax-image-editor-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXImageEditorCropperWindowComponent], providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{margin:calc(var(--spacing,.25rem) * 4);position:absolute;top:0;right:0}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
720
- }], ctorParameters: () => [], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], canvasElem: [{ type: i0.ViewChild, args: ['canvasElem', { isSignal: true }] }], cropperWindow: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }] } });
611
+ args: [{ selector: 'ax-image-editor-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXImageEditorCropperWindowComponent], providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{margin:calc(var(--ax-sys-spacing-base) * 4);position:absolute;top:0;right:0}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
612
+ }], ctorParameters: () => [], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], cropperSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "cropperSize", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], canvasElem: [{ type: i0.ViewChild, args: ['canvasElem', { isSignal: true }] }], cropperWindow: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }] } });
721
613
 
722
614
  /**
723
615
  * paint container.
@@ -730,7 +622,6 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
730
622
  this.service = inject(AXImageEditorService);
731
623
  this.imageEditorContainer = viewChild('f', ...(ngDevMode ? [{ debugName: "imageEditorContainer" }] : /* istanbul ignore next */ []));
732
624
  this.view = contentChild(AXImageEditorViewComponent, ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
733
- this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
734
625
  this.#eff = effect(() => {
735
626
  void this.service.imageBlob();
736
627
  if (this.service.imageBlob().length) {
@@ -742,8 +633,14 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
742
633
  }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
743
634
  }
744
635
  #eff;
745
- cropButtonHandler() {
746
- this.view().cropButtonHandler();
636
+ /** Applies the current cropper selection. */
637
+ async crop() {
638
+ const oldValue = this.value;
639
+ await this.view()?.crop();
640
+ const blobs = this.service.imageBlob();
641
+ if (blobs.length && this.value === oldValue) {
642
+ this.commitValue(blobs, true);
643
+ }
747
644
  }
748
645
  get __hostClass() {
749
646
  if (this.disabled)
@@ -754,7 +651,7 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
754
651
  return this.name;
755
652
  }
756
653
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
757
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorContainerComponent, isStandalone: true, selector: "ax-image-editor-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged" }, host: { properties: { "class": "this.__hostClass", "attr.name": "this.__hostName" } }, providers: [
654
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorContainerComponent, isStandalone: true, selector: "ax-image-editor-container", inputs: { look: "look", disabled: "disabled" }, outputs: { onValueChanged: "onValueChanged" }, host: { properties: { "class": "this.__hostClass", "attr.name": "this.__hostName" } }, providers: [
758
655
  AXImageEditorService,
759
656
  { provide: AXComponent, useExisting: AXImageEditorContainerComponent },
760
657
  { provide: AXFocusableComponent, useExisting: AXImageEditorContainerComponent },
@@ -764,7 +661,7 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
764
661
  useExisting: forwardRef(() => AXImageEditorContainerComponent),
765
662
  multi: true,
766
663
  },
767
- ], queries: [{ propertyName: "view", first: true, predicate: AXImageEditorViewComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "imageEditorContainer", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n @if (service.activeToolState()) {\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-image-editor-pen></ax-image-editor-pen>\n }\n @case ('crop') {\n <ax-image-editor-crop\n [aspectRatio]=\"aspectRatio()\"\n (cropPressed)=\"cropButtonHandler()\"\n ></ax-image-editor-crop>\n }\n @case ('highlight') {\n <ax-image-editor-highlight></ax-image-editor-highlight>\n }\n @case ('rotate') {\n <ax-image-editor-rotate></ax-image-editor-rotate>\n }\n }\n }\n\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-image-editor-tool-selector></ax-image-editor-tool-selector>\n </ax-content>\n </ax-toolbar>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-image-editor-container>.ax-editor-container{padding:0;display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container .ax-main-toolbar{padding:var(--spacing,.25rem);justify-content:center}ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "component", type: i2$1.AXToolBarComponent, selector: "ax-toolbar" }, { kind: "component", type: AXImageEditorCropComponent, selector: "ax-image-editor-crop", inputs: ["aspectRatio"], outputs: ["cropPressed"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXImageEditorToolSelectorComponent, selector: "ax-image-editor-tool-selector" }, { kind: "component", type: AXImageEditorPenComponent, selector: "ax-image-editor-pen" }, { kind: "component", type: AXImageEditorHighlightComponent, selector: "ax-image-editor-highlight" }, { kind: "component", type: AXImageEditorRotateComponent, selector: "ax-image-editor-rotate" }], encapsulation: i0.ViewEncapsulation.None }); }
664
+ ], queries: [{ propertyName: "view", first: true, predicate: AXImageEditorViewComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "imageEditorContainer", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-image-editor-container>.ax-editor-container{padding:0;display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container ax-footer,ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }], encapsulation: i0.ViewEncapsulation.None }); }
768
665
  }
769
666
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorContainerComponent, decorators: [{
770
667
  type: Component,
@@ -778,18 +675,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
778
675
  useExisting: forwardRef(() => AXImageEditorContainerComponent),
779
676
  multi: true,
780
677
  },
781
- ], imports: [
782
- AXDecoratorModule,
783
- AXLoadingSpinnerComponent,
784
- AXToolBarModule,
785
- AXImageEditorCropComponent,
786
- AXButtonModule,
787
- AXImageEditorToolSelectorComponent,
788
- AXImageEditorPenComponent,
789
- AXImageEditorHighlightComponent,
790
- AXImageEditorRotateComponent,
791
- ], template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n @if (service.activeToolState()) {\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-image-editor-pen></ax-image-editor-pen>\n }\n @case ('crop') {\n <ax-image-editor-crop\n [aspectRatio]=\"aspectRatio()\"\n (cropPressed)=\"cropButtonHandler()\"\n ></ax-image-editor-crop>\n }\n @case ('highlight') {\n <ax-image-editor-highlight></ax-image-editor-highlight>\n }\n @case ('rotate') {\n <ax-image-editor-rotate></ax-image-editor-rotate>\n }\n }\n }\n\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-image-editor-tool-selector></ax-image-editor-tool-selector>\n </ax-content>\n </ax-toolbar>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-image-editor-container>.ax-editor-container{padding:0;display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container .ax-main-toolbar{padding:var(--spacing,.25rem);justify-content:center}ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
792
- }], propDecorators: { imageEditorContainer: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }], view: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorViewComponent), { isSignal: true }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], __hostClass: [{
678
+ ], imports: [AXDecoratorModule, AXLoadingSpinnerComponent], template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-image-editor-container>.ax-editor-container{padding:0;display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container ax-footer,ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
679
+ }], propDecorators: { imageEditorContainer: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }], view: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorViewComponent), { isSignal: true }] }], __hostClass: [{
793
680
  type: HostBinding,
794
681
  args: ['class']
795
682
  }], __hostName: [{
@@ -797,6 +684,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
797
684
  args: ['attr.name']
798
685
  }] } });
799
686
 
687
+ const IMAGE_EDITOR_ASPECT_RATIO_ACTIVE_SUFFIX = ':active';
688
+ function parseAspectRatioItem(item) {
689
+ if (item.endsWith(IMAGE_EDITOR_ASPECT_RATIO_ACTIVE_SUFFIX)) {
690
+ return {
691
+ ratio: item.slice(0, -IMAGE_EDITOR_ASPECT_RATIO_ACTIVE_SUFFIX.length),
692
+ active: true,
693
+ };
694
+ }
695
+ return { ratio: item, active: false };
696
+ }
697
+ function parseAspectRatios(items) {
698
+ const ratios = [];
699
+ let activeRatio = null;
700
+ for (const item of items) {
701
+ const { ratio, active } = parseAspectRatioItem(item);
702
+ ratios.push(ratio);
703
+ if (active && activeRatio === null) {
704
+ activeRatio = ratio;
705
+ }
706
+ }
707
+ return { ratios, activeRatio };
708
+ }
709
+
710
+ /**
711
+ * Base class for image editor tool trigger components.
712
+ * @category Components
713
+ */
714
+ class AXImageEditorToolComponent {
715
+ constructor() {
716
+ this.service = inject(AXImageEditorService);
717
+ }
718
+ setActive() {
719
+ this.service.activateTool(this.tool);
720
+ }
721
+ }
722
+
723
+ /**
724
+ * Crop tool trigger for the image editor toolbar.
725
+ * @category Components
726
+ */
727
+ class AXImageEditorCropComponent extends AXImageEditorToolComponent {
728
+ constructor() {
729
+ super(...arguments);
730
+ this.tool = 'crop';
731
+ this.container = inject(AXImageEditorContainerComponent);
732
+ /** Aspect ratio presets. Append `:active` to mark the default ratio, e.g. `'2:1:active'`. */
733
+ this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
734
+ /** Base size in pixels for the initial cropper window dimensions. */
735
+ this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
736
+ this.#syncSize = effect(() => {
737
+ const size = this.size();
738
+ if (size != null) {
739
+ this.service.cropperSize.set(size);
740
+ }
741
+ }, ...(ngDevMode ? [{ debugName: "#syncSize" }] : /* istanbul ignore next */ []));
742
+ this.#syncAspectRatio = effect(() => {
743
+ const { activeRatio } = parseAspectRatios(this.aspectRatio());
744
+ if (activeRatio) {
745
+ this.service.cropperRatio.set(activeRatio);
746
+ }
747
+ }, ...(ngDevMode ? [{ debugName: "#syncAspectRatio" }] : /* istanbul ignore next */ []));
748
+ }
749
+ #syncSize;
750
+ #syncAspectRatio;
751
+ /** Applies the current cropper selection. */
752
+ crop() {
753
+ this.container.crop();
754
+ }
755
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
756
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXImageEditorCropComponent, isStandalone: true, selector: "ax-image-editor-crop", inputs: { aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], usesInheritance: true, ngImport: i0, template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('crop')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'crop'\"\n [color]=\"service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
757
+ }
758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropComponent, decorators: [{
759
+ type: Component,
760
+ args: [{ selector: 'ax-image-editor-crop', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AsyncPipe, AXTranslatorPipe, AXTooltipModule], providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('crop')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'crop'\"\n [color]=\"service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n</ax-button>\n" }]
761
+ }], propDecorators: { aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
762
+
763
+ /**
764
+ * Highlight tool trigger for the image editor toolbar.
765
+ * @category Components
766
+ */
767
+ class AXImageEditorHighlightComponent extends AXImageEditorToolComponent {
768
+ constructor() {
769
+ super(...arguments);
770
+ this.tool = 'highlight';
771
+ }
772
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
773
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorHighlightComponent, isStandalone: true, selector: "ax-image-editor-highlight", providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], usesInheritance: true, ngImport: i0, template: "<ax-button\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('highlight')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'highlight'\"\n [color]=\"service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
774
+ }
775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightComponent, decorators: [{
776
+ type: Component,
777
+ args: [{ selector: 'ax-image-editor-highlight', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('highlight')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'highlight'\"\n [color]=\"service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n</ax-button>\n" }]
778
+ }] });
779
+
800
780
  /**
801
781
  * paint mode.
802
782
  * @category Components
@@ -812,19 +792,235 @@ class AXImageEditorHistoryComponent {
812
792
  this.service.redoPressed.set(true);
813
793
  }
814
794
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
815
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorHistoryComponent, isStandalone: true, selector: "ax-image-editor-history", providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], ngImport: i0, template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.undo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"UndoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.redo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"RedoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n</div>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
795
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorHistoryComponent, isStandalone: true, selector: "ax-image-editor-history", providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], ngImport: i0, template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.undo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"UndoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.redo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"RedoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n</div>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
816
796
  }
817
797
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHistoryComponent, decorators: [{
818
798
  type: Component,
819
799
  args: [{ selector: 'ax-image-editor-history', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.undo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"UndoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.redo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"RedoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n</div>\n" }]
820
800
  }] });
821
801
 
802
+ /**
803
+ * Pen tool trigger for the image editor toolbar.
804
+ * @category Components
805
+ */
806
+ class AXImageEditorPenComponent extends AXImageEditorToolComponent {
807
+ constructor() {
808
+ super(...arguments);
809
+ this.tool = 'pen';
810
+ }
811
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
812
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorPenComponent, isStandalone: true, selector: "ax-image-editor-pen", providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], usesInheritance: true, ngImport: i0, template: "<ax-button\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('pen')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'pen'\"\n [color]=\"service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
813
+ }
814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenComponent, decorators: [{
815
+ type: Component,
816
+ args: [{ selector: 'ax-image-editor-pen', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('pen')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'pen'\"\n [color]=\"service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n</ax-button>\n" }]
817
+ }] });
818
+
819
+ /**
820
+ * Rotate tool trigger for the image editor toolbar.
821
+ * @category Components
822
+ */
823
+ class AXImageEditorRotateComponent extends AXImageEditorToolComponent {
824
+ constructor() {
825
+ super(...arguments);
826
+ this.tool = 'rotate';
827
+ }
828
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
829
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorRotateComponent, isStandalone: true, selector: "ax-image-editor-rotate", providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], usesInheritance: true, ngImport: i0, template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('rotate')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'rotate'\"\n [color]=\"service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <i class=\"fa-solid fa-rotate\"></i>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
830
+ }
831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateComponent, decorators: [{
832
+ type: Component,
833
+ args: [{ selector: 'ax-image-editor-rotate', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"service.toggleTool('rotate')\"\n look=\"blank\"\n [selected]=\"service.activeToolState() === 'rotate'\"\n [color]=\"service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n class=\"ax-sm\"\n>\n <i class=\"fa-solid fa-rotate\"></i>\n</ax-button>\n" }]
834
+ }] });
835
+
836
+ /** @ignore */
837
+ class AXImageEditorCropOptionsComponent {
838
+ constructor() {
839
+ this.service = inject(AXImageEditorService);
840
+ this.container = inject(AXImageEditorContainerComponent);
841
+ this.cropPressed = output();
842
+ this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
843
+ this.aspectRatios = computed(() => parseAspectRatios(this.aspectRatio()).ratios, ...(ngDevMode ? [{ debugName: "aspectRatios" }] : /* istanbul ignore next */ []));
844
+ }
845
+ cropButtonHandler() {
846
+ this.cropPressed.emit();
847
+ this.container.crop();
848
+ }
849
+ ratioHandler(r) {
850
+ if (this.service.cropperRatio() === r) {
851
+ this.service.cropperRatio.set(null);
852
+ }
853
+ else {
854
+ this.service.cropperRatio.set(r);
855
+ }
856
+ }
857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorCropOptionsComponent, isStandalone: true, selector: "ax-image-editor-crop-options", inputs: { aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cropPressed: "cropPressed" }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropOptionsComponent }], ngImport: i0, template: "<div class=\"ax-image-editor-crop-ratios\">\n @for (item of aspectRatios(); track item) {\n <ax-button\n [selected]=\"service.cropperRatio() === item\"\n [color]=\"service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n } @empty {\n <ax-button\n [selected]=\"service.cropperRatio() === '1:1'\"\n [color]=\"service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"service.cropperRatio() === '16:9'\"\n [color]=\"service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n }\n</div>\n\n<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
859
+ }
860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorCropOptionsComponent, decorators: [{
861
+ type: Component,
862
+ args: [{ selector: 'ax-image-editor-crop-options', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AsyncPipe, AXTranslatorPipe], providers: [{ provide: AXComponent, useExisting: AXImageEditorCropOptionsComponent }], template: "<div class=\"ax-image-editor-crop-ratios\">\n @for (item of aspectRatios(); track item) {\n <ax-button\n [selected]=\"service.cropperRatio() === item\"\n [color]=\"service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n } @empty {\n <ax-button\n [selected]=\"service.cropperRatio() === '1:1'\"\n [color]=\"service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"service.cropperRatio() === '16:9'\"\n [color]=\"service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n }\n</div>\n\n<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n" }]
863
+ }], propDecorators: { cropPressed: [{ type: i0.Output, args: ["cropPressed"] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
864
+
865
+ /** @ignore */
866
+ class AXImageEditorHighlightOptionsComponent {
867
+ constructor() {
868
+ this.service = inject(AXImageEditorService);
869
+ /** @ignore */
870
+ this.selectedColor = signal(this.service.highlightColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
871
+ /** @ignore */
872
+ this.value = this.service.highlightWidth();
873
+ }
874
+ changeColorHandler(e) {
875
+ this.service.highlightColor.set(e);
876
+ this.selectedColor.set(e);
877
+ }
878
+ /** @ignore */
879
+ valueHandler(e) {
880
+ this.service.highlightWidth.set(e);
881
+ }
882
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
883
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorHighlightOptionsComponent, isStandalone: true, selector: "ax-image-editor-highlight-options", providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightOptionsComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
884
+ }
885
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorHighlightOptionsComponent, decorators: [{
886
+ type: Component,
887
+ args: [{ selector: 'ax-image-editor-highlight-options', encapsulation: ViewEncapsulation.None, imports: [
888
+ AXColorBoxComponent,
889
+ FormsModule,
890
+ AXRangeSliderComponent,
891
+ AsyncPipe,
892
+ AXTranslatorPipe,
893
+ AXTooltipModule,
894
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightOptionsComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n" }]
895
+ }] });
896
+
897
+ /** @ignore */
898
+ class AXImageEditorPenOptionsComponent {
899
+ constructor() {
900
+ this.service = inject(AXImageEditorService);
901
+ /** @ignore */
902
+ this.value = this.service.penWidth();
903
+ /** @ignore */
904
+ this.selectedColor = signal(this.service.penColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
905
+ }
906
+ changeColorHandler(e) {
907
+ this.service.penColor.set(e);
908
+ this.selectedColor.set(e);
909
+ }
910
+ /** @ignore */
911
+ valueHandler(e) {
912
+ this.service.penWidth.set(e);
913
+ }
914
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
915
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorPenOptionsComponent, isStandalone: true, selector: "ax-image-editor-pen-options", providers: [{ provide: AXComponent, useExisting: AXImageEditorPenOptionsComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
916
+ }
917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorPenOptionsComponent, decorators: [{
918
+ type: Component,
919
+ args: [{ selector: 'ax-image-editor-pen-options', encapsulation: ViewEncapsulation.None, imports: [
920
+ AXColorBoxComponent,
921
+ FormsModule,
922
+ AXRangeSliderComponent,
923
+ AsyncPipe,
924
+ AXTranslatorPipe,
925
+ AXTooltipModule,
926
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorPenOptionsComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n" }]
927
+ }] });
928
+
929
+ /** @ignore */
930
+ class AXImageEditorRotateOptionsComponent {
931
+ constructor() {
932
+ this.service = inject(AXImageEditorService);
933
+ }
934
+ rotateRightHandler() {
935
+ this.service.rotate.set({ state: 90, userInteract: true });
936
+ }
937
+ rotateLeftHandler() {
938
+ this.service.rotate.set({ state: -90, userInteract: true });
939
+ }
940
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
941
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXImageEditorRotateOptionsComponent, isStandalone: true, selector: "ax-image-editor-rotate-options", providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateOptionsComponent }], ngImport: i0, template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
942
+ }
943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorRotateOptionsComponent, decorators: [{
944
+ type: Component,
945
+ args: [{ selector: 'ax-image-editor-rotate-options', encapsulation: ViewEncapsulation.None, imports: [
946
+ AXButtonComponent,
947
+ AXTooltipDirective,
948
+ AXDecoratorIconComponent,
949
+ AsyncPipe,
950
+ AXTranslatorPipe,
951
+ AXTooltipModule,
952
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateOptionsComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n" }]
953
+ }] });
954
+
955
+ /**
956
+ * Toolbar layout for configurable image editor tools.
957
+ * @category Components
958
+ */
959
+ class AXImageEditorToolsBarComponent {
960
+ constructor() {
961
+ this.service = inject(AXImageEditorService);
962
+ /**
963
+ * Tool component reference to activate on load.
964
+ */
965
+ this.active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : /* istanbul ignore next */ []));
966
+ /** Hides the tools bar UI while keeping projected tools configurable. */
967
+ this.hidden = input(false, ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
968
+ this.penTool = contentChild(AXImageEditorPenComponent, ...(ngDevMode ? [{ debugName: "penTool" }] : /* istanbul ignore next */ []));
969
+ this.highlightTool = contentChild(AXImageEditorHighlightComponent, ...(ngDevMode ? [{ debugName: "highlightTool" }] : /* istanbul ignore next */ []));
970
+ this.cropTool = contentChild(AXImageEditorCropComponent, ...(ngDevMode ? [{ debugName: "cropTool" }] : /* istanbul ignore next */ []));
971
+ this.rotateTool = contentChild(AXImageEditorRotateComponent, ...(ngDevMode ? [{ debugName: "rotateTool" }] : /* istanbul ignore next */ []));
972
+ this.cropAspectRatio = computed(() => this.cropTool()?.aspectRatio() ?? [], ...(ngDevMode ? [{ debugName: "cropAspectRatio" }] : /* istanbul ignore next */ []));
973
+ this.#activeEffect = effect(() => {
974
+ this.active()?.setActive();
975
+ }, ...(ngDevMode ? [{ debugName: "#activeEffect" }] : /* istanbul ignore next */ []));
976
+ }
977
+ #activeEffect;
978
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolsBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
979
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXImageEditorToolsBarComponent, isStandalone: true, selector: "ax-image-editor-tools-bar", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ax-image-editor-tools-bar-hidden": "hidden()" } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorToolsBarComponent }], queries: [{ propertyName: "penTool", first: true, predicate: AXImageEditorPenComponent, descendants: true, isSignal: true }, { propertyName: "highlightTool", first: true, predicate: AXImageEditorHighlightComponent, descendants: true, isSignal: true }, { propertyName: "cropTool", first: true, predicate: AXImageEditorCropComponent, descendants: true, isSignal: true }, { propertyName: "rotateTool", first: true, predicate: AXImageEditorRotateComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-toolbar class=\"ax-main-toolbar\">\n <ax-prefix class=\"ax-image-editor-tool-triggers\">\n <ng-content\n select=\"ax-image-editor-pen, ax-image-editor-highlight, ax-image-editor-crop, ax-image-editor-rotate\"\n ></ng-content>\n </ax-prefix>\n\n @if (service.activeToolState()) {\n <ax-suffix class=\"ax-image-editor-tool-options\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n @if (penTool()) {\n <ax-image-editor-pen-options></ax-image-editor-pen-options>\n }\n }\n @case ('highlight') {\n @if (highlightTool()) {\n <ax-image-editor-highlight-options></ax-image-editor-highlight-options>\n }\n }\n @case ('crop') {\n @if (cropTool()) {\n <ax-image-editor-crop-options [aspectRatio]=\"cropAspectRatio()\"></ax-image-editor-crop-options>\n }\n }\n @case ('rotate') {\n @if (rotateTool()) {\n <ax-image-editor-rotate-options></ax-image-editor-rotate-options>\n }\n }\n }\n </ax-suffix>\n }\n</ax-toolbar>\n", styles: ["@layer components{ax-image-editor-tools-bar{width:100%;display:block}ax-image-editor-tools-bar.ax-image-editor-tools-bar-hidden{display:none}ax-image-editor-tools-bar .ax-main-toolbar{padding:calc(var(--ax-sys-spacing-base) * 2);justify-content:space-between}ax-image-editor-tools-bar .ax-main-toolbar ax-divider{display:none}ax-image-editor-tools-bar .ax-main-toolbar>ax-suffix{flex:1;margin-left:auto}ax-image-editor-tools-bar .ax-image-editor-tool-triggers{justify-content:flex-start;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);display:flex}ax-image-editor-tools-bar .ax-image-editor-tool-options{justify-content:flex-end;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);flex:1;min-width:0;display:flex}ax-image-editor-tools-bar .ax-image-editor-crop-ratios{justify-content:flex-end;align-items:center;gap:var(--ax-sys-spacing-base);flex-wrap:wrap;display:flex}ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options{align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);display:flex}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-color-box{flex-shrink:0}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-range-slider{width:calc(var(--ax-sys-spacing-base) * 40);padding-inline:calc(var(--ax-sys-spacing-base) * 3);padding-block:calc(var(--ax-sys-spacing-base) * 2)}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--ax-sys-spacing-base) * 4)!important;width:calc(var(--ax-sys-spacing-base) * 4)!important}ax-image-editor-tools-bar ax-image-editor-crop-options{justify-content:flex-end;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);flex-wrap:wrap;display:flex}ax-image-editor-tools-bar ax-image-editor-rotate-options{align-items:center;gap:var(--ax-sys-spacing-base);display:flex}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "component", type: i2$1.AXToolBarComponent, selector: "ax-toolbar" }, { kind: "component", type: AXImageEditorPenOptionsComponent, selector: "ax-image-editor-pen-options" }, { kind: "component", type: AXImageEditorHighlightOptionsComponent, selector: "ax-image-editor-highlight-options" }, { kind: "component", type: AXImageEditorCropOptionsComponent, selector: "ax-image-editor-crop-options", inputs: ["aspectRatio"], outputs: ["cropPressed"] }, { kind: "component", type: AXImageEditorRotateOptionsComponent, selector: "ax-image-editor-rotate-options" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
980
+ }
981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolsBarComponent, decorators: [{
982
+ type: Component,
983
+ args: [{ selector: 'ax-image-editor-tools-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
984
+ '[class.ax-image-editor-tools-bar-hidden]': 'hidden()',
985
+ }, imports: [
986
+ AXDecoratorModule,
987
+ AXToolBarModule,
988
+ AXImageEditorPenOptionsComponent,
989
+ AXImageEditorHighlightOptionsComponent,
990
+ AXImageEditorCropOptionsComponent,
991
+ AXImageEditorRotateOptionsComponent,
992
+ ], providers: [{ provide: AXComponent, useExisting: AXImageEditorToolsBarComponent }], template: "<ax-toolbar class=\"ax-main-toolbar\">\n <ax-prefix class=\"ax-image-editor-tool-triggers\">\n <ng-content\n select=\"ax-image-editor-pen, ax-image-editor-highlight, ax-image-editor-crop, ax-image-editor-rotate\"\n ></ng-content>\n </ax-prefix>\n\n @if (service.activeToolState()) {\n <ax-suffix class=\"ax-image-editor-tool-options\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n @if (penTool()) {\n <ax-image-editor-pen-options></ax-image-editor-pen-options>\n }\n }\n @case ('highlight') {\n @if (highlightTool()) {\n <ax-image-editor-highlight-options></ax-image-editor-highlight-options>\n }\n }\n @case ('crop') {\n @if (cropTool()) {\n <ax-image-editor-crop-options [aspectRatio]=\"cropAspectRatio()\"></ax-image-editor-crop-options>\n }\n }\n @case ('rotate') {\n @if (rotateTool()) {\n <ax-image-editor-rotate-options></ax-image-editor-rotate-options>\n }\n }\n }\n </ax-suffix>\n }\n</ax-toolbar>\n", styles: ["@layer components{ax-image-editor-tools-bar{width:100%;display:block}ax-image-editor-tools-bar.ax-image-editor-tools-bar-hidden{display:none}ax-image-editor-tools-bar .ax-main-toolbar{padding:calc(var(--ax-sys-spacing-base) * 2);justify-content:space-between}ax-image-editor-tools-bar .ax-main-toolbar ax-divider{display:none}ax-image-editor-tools-bar .ax-main-toolbar>ax-suffix{flex:1;margin-left:auto}ax-image-editor-tools-bar .ax-image-editor-tool-triggers{justify-content:flex-start;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);display:flex}ax-image-editor-tools-bar .ax-image-editor-tool-options{justify-content:flex-end;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);flex:1;min-width:0;display:flex}ax-image-editor-tools-bar .ax-image-editor-crop-ratios{justify-content:flex-end;align-items:center;gap:var(--ax-sys-spacing-base);flex-wrap:wrap;display:flex}ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options{align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);display:flex}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-color-box{flex-shrink:0}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-range-slider{width:calc(var(--ax-sys-spacing-base) * 40);padding-inline:calc(var(--ax-sys-spacing-base) * 3);padding-block:calc(var(--ax-sys-spacing-base) * 2)}:is(ax-image-editor-tools-bar ax-image-editor-pen-options,ax-image-editor-tools-bar ax-image-editor-highlight-options) ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--ax-sys-spacing-base) * 4)!important;width:calc(var(--ax-sys-spacing-base) * 4)!important}ax-image-editor-tools-bar ax-image-editor-crop-options{justify-content:flex-end;align-items:center;gap:calc(var(--ax-sys-spacing-base) * 2);flex-wrap:wrap;display:flex}ax-image-editor-tools-bar ax-image-editor-rotate-options{align-items:center;gap:var(--ax-sys-spacing-base);display:flex}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
993
+ }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], penTool: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorPenComponent), { isSignal: true }] }], highlightTool: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorHighlightComponent), { isSignal: true }] }], cropTool: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorCropComponent), { isSignal: true }] }], rotateTool: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorRotateComponent), { isSignal: true }] }] } });
994
+
995
+ /**
996
+ * Convenience wrapper that includes all image editor tools.
997
+ * @category Components
998
+ */
999
+ class AXImageEditorToolSelectorComponent {
1000
+ constructor() {
1001
+ this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
1002
+ }
1003
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1004
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXImageEditorToolSelectorComponent, isStandalone: true, selector: "ax-image-editor-tool-selector", inputs: { aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], ngImport: i0, template: "<ax-image-editor-tools-bar>\n <ax-image-editor-pen></ax-image-editor-pen>\n <ax-image-editor-highlight></ax-image-editor-highlight>\n <ax-image-editor-crop [aspectRatio]=\"aspectRatio()\"></ax-image-editor-crop>\n <ax-image-editor-rotate></ax-image-editor-rotate>\n</ax-image-editor-tools-bar>\n", dependencies: [{ kind: "component", type: AXImageEditorToolsBarComponent, selector: "ax-image-editor-tools-bar", inputs: ["active", "hidden"] }, { kind: "component", type: AXImageEditorPenComponent, selector: "ax-image-editor-pen" }, { kind: "component", type: AXImageEditorHighlightComponent, selector: "ax-image-editor-highlight" }, { kind: "component", type: AXImageEditorCropComponent, selector: "ax-image-editor-crop", inputs: ["aspectRatio", "size"] }, { kind: "component", type: AXImageEditorRotateComponent, selector: "ax-image-editor-rotate" }], encapsulation: i0.ViewEncapsulation.None }); }
1005
+ }
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageEditorToolSelectorComponent, decorators: [{
1007
+ type: Component,
1008
+ args: [{ selector: 'ax-image-editor-tool-selector', encapsulation: ViewEncapsulation.None, imports: [
1009
+ AXImageEditorToolsBarComponent,
1010
+ AXImageEditorPenComponent,
1011
+ AXImageEditorHighlightComponent,
1012
+ AXImageEditorCropComponent,
1013
+ AXImageEditorRotateComponent,
1014
+ ], providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], template: "<ax-image-editor-tools-bar>\n <ax-image-editor-pen></ax-image-editor-pen>\n <ax-image-editor-highlight></ax-image-editor-highlight>\n <ax-image-editor-crop [aspectRatio]=\"aspectRatio()\"></ax-image-editor-crop>\n <ax-image-editor-rotate></ax-image-editor-rotate>\n</ax-image-editor-tools-bar>\n" }]
1015
+ }], propDecorators: { aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
1016
+
822
1017
  const COMPONENT = [
823
1018
  AXImageEditorViewComponent,
824
1019
  AXImageEditorContainerComponent,
825
1020
  AXImageEditorCropComponent,
826
1021
  AXImageEditorHistoryComponent,
827
1022
  AXImageEditorToolSelectorComponent,
1023
+ AXImageEditorToolsBarComponent,
828
1024
  AXImageEditorPenComponent,
829
1025
  AXImageEditorHighlightComponent,
830
1026
  AXImageEditorRotateComponent,
@@ -856,6 +1052,7 @@ class AXImageEditorModule {
856
1052
  AXImageEditorCropComponent,
857
1053
  AXImageEditorHistoryComponent,
858
1054
  AXImageEditorToolSelectorComponent,
1055
+ AXImageEditorToolsBarComponent,
859
1056
  AXImageEditorPenComponent,
860
1057
  AXImageEditorHighlightComponent,
861
1058
  AXImageEditorRotateComponent,
@@ -864,6 +1061,7 @@ class AXImageEditorModule {
864
1061
  AXImageEditorCropComponent,
865
1062
  AXImageEditorHistoryComponent,
866
1063
  AXImageEditorToolSelectorComponent,
1064
+ AXImageEditorToolsBarComponent,
867
1065
  AXImageEditorPenComponent,
868
1066
  AXImageEditorHighlightComponent,
869
1067
  AXImageEditorRotateComponent,
@@ -872,6 +1070,7 @@ class AXImageEditorModule {
872
1070
  AXImageEditorCropComponent,
873
1071
  AXImageEditorHistoryComponent,
874
1072
  AXImageEditorToolSelectorComponent,
1073
+ AXImageEditorToolsBarComponent,
875
1074
  AXImageEditorPenComponent,
876
1075
  AXImageEditorHighlightComponent,
877
1076
  AXImageEditorRotateComponent] }); }
@@ -889,5 +1088,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
889
1088
  * Generated bundle index. Do not edit.
890
1089
  */
891
1090
 
892
- export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolSelectorComponent, AXImageEditorViewComponent };
1091
+ export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolComponent, AXImageEditorToolSelectorComponent, AXImageEditorToolsBarComponent, AXImageEditorViewComponent };
893
1092
  //# sourceMappingURL=acorex-components-image-editor.mjs.map