@flogeez/angular-tiptap-editor 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +493 -477
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/index.d.ts +154 -119
- package/package.json +1 -1
- package/src/lib/styles/{bubble-menu.global.css → ate-bubble-menu.global.css} +1 -1
- package/src/lib/styles/index.css +4 -4
|
@@ -27,7 +27,7 @@ import * as i1 from '@angular/forms';
|
|
|
27
27
|
import { FormsModule, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
28
28
|
import { CellSelection } from '@tiptap/pm/tables';
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const AteResizableImage = Node$1.create({
|
|
31
31
|
name: "resizableImage",
|
|
32
32
|
addOptions() {
|
|
33
33
|
return {
|
|
@@ -133,7 +133,7 @@ const ResizableImage = Node$1.create({
|
|
|
133
133
|
img.src = node.attrs["src"];
|
|
134
134
|
img.alt = node.attrs["alt"] || "";
|
|
135
135
|
img.title = node.attrs["title"] || "";
|
|
136
|
-
img.className = "
|
|
136
|
+
img.className = "ate-image";
|
|
137
137
|
if (node.attrs["width"])
|
|
138
138
|
img.width = node.attrs["width"];
|
|
139
139
|
if (node.attrs["height"])
|
|
@@ -288,7 +288,7 @@ const ResizableImage = Node$1.create({
|
|
|
288
288
|
},
|
|
289
289
|
});
|
|
290
290
|
|
|
291
|
-
const
|
|
291
|
+
const AteUploadProgress = Extension.create({
|
|
292
292
|
name: "uploadProgress",
|
|
293
293
|
addOptions() {
|
|
294
294
|
return {
|
|
@@ -480,7 +480,7 @@ const UploadProgress = Extension.create({
|
|
|
480
480
|
},
|
|
481
481
|
});
|
|
482
482
|
|
|
483
|
-
const
|
|
483
|
+
const AteTableExtension = Extension.create({
|
|
484
484
|
name: "tableExtension",
|
|
485
485
|
addExtensions() {
|
|
486
486
|
return [
|
|
@@ -504,7 +504,7 @@ const TableExtension = Extension.create({
|
|
|
504
504
|
},
|
|
505
505
|
});
|
|
506
506
|
|
|
507
|
-
const
|
|
507
|
+
const ATE_INITIAL_EDITOR_STATE = {
|
|
508
508
|
isFocused: false,
|
|
509
509
|
isEditable: true,
|
|
510
510
|
selection: {
|
|
@@ -627,10 +627,10 @@ function fastMerge(target, source) {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
function createFreshSnapshot() {
|
|
630
|
-
return JSON.parse(JSON.stringify(
|
|
630
|
+
return JSON.parse(JSON.stringify(ATE_INITIAL_EDITOR_STATE));
|
|
631
631
|
}
|
|
632
|
-
const
|
|
633
|
-
name: "
|
|
632
|
+
const AteTiptapStateExtension = Extension.create({
|
|
633
|
+
name: "ateTiptapState",
|
|
634
634
|
addOptions() {
|
|
635
635
|
return {
|
|
636
636
|
onUpdate: undefined,
|
|
@@ -673,7 +673,7 @@ const TiptapStateExtension = Extension.create({
|
|
|
673
673
|
},
|
|
674
674
|
});
|
|
675
675
|
|
|
676
|
-
class
|
|
676
|
+
class AteButtonComponent {
|
|
677
677
|
constructor() {
|
|
678
678
|
// Inputs
|
|
679
679
|
this.icon = input("", ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
@@ -691,10 +691,10 @@ class TiptapButtonComponent {
|
|
|
691
691
|
onMouseDown(event) {
|
|
692
692
|
event.preventDefault();
|
|
693
693
|
}
|
|
694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
695
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
695
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteButtonComponent, isStandalone: true, selector: "ate-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: `
|
|
696
696
|
<button
|
|
697
|
-
class="
|
|
697
|
+
class="ate-button"
|
|
698
698
|
[class.is-active]="active()"
|
|
699
699
|
[class.is-disabled]="disabled()"
|
|
700
700
|
[class.text-button]="variant() === 'text'"
|
|
@@ -723,13 +723,13 @@ class TiptapButtonComponent {
|
|
|
723
723
|
}
|
|
724
724
|
<ng-content></ng-content>
|
|
725
725
|
</button>
|
|
726
|
-
`, isInline: true, styles: [".
|
|
726
|
+
`, isInline: true, styles: [".ate-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:var(--ate-sub-border-radius, 8px);cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);color:var(--ate-toolbar-button-color, var(--ate-text-secondary));position:relative;overflow:hidden}.ate-button:before{content:\"\";position:absolute;inset:0;background:var(--ate-primary);opacity:0;transition:opacity .2s ease;border-radius:var(--ate-sub-border-radius, 8px)}.ate-button:hover:not(.has-custom-color){color:var(--ate-toolbar-button-active-color, var(--ate-primary));background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.ate-button.has-custom-color:hover:not(.has-custom-bg){background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.ate-button.has-custom-bg:hover{transform:translateY(-1px);filter:brightness(.9)}.ate-button:hover:before{opacity:.1}.ate-button:active{transform:translateY(0)}.ate-button.is-active:not(.has-custom-color){color:var(--ate-toolbar-button-active-color, var(--ate-primary));background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.ate-button.is-active.has-custom-color{background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.ate-button:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.ate-button .material-symbols-outlined{font-size:20px;position:relative;z-index:1}.ate-button .material-symbols-outlined.icon-small{font-size:16px}.ate-button .material-symbols-outlined.icon-medium{font-size:20px}.ate-button .material-symbols-outlined.icon-large{font-size:24px}.ate-button.text-button{width:auto;padding:0 12px;font-size:14px;font-weight:500;gap:8px}.ate-button.color-button{width:28px;height:28px;border-radius:50%;border:2px solid transparent;transition:all .2s ease}.ate-button.color-button:hover{border-color:var(--ate-border);transform:scale(1.1)}.ate-button.color-button.is-active{border-color:var(--ate-primary);box-shadow:0 0 0 2px var(--ate-primary-light)}.ate-button.danger{color:var(--ate-error-color, #ef4444)}.ate-button.danger:hover{color:var(--ate-error-color, #ef4444);background:var(--ate-error-bg, rgba(239, 68, 68, .1))}.ate-button.danger:before{background:var(--ate-error-color, #ef4444)}.ate-button.small{width:24px;height:24px}.ate-button.medium{width:32px;height:32px}.ate-button.large{width:40px;height:40px}@keyframes pulse{0%,to{box-shadow:0 0 0 0 var(--ate-primary-light-alpha)}50%{box-shadow:0 0 0 4px transparent}}.ate-button.is-active.pulse{animation:pulse 2s infinite}@media (max-width: 768px){.ate-button{width:32px;height:32px}.ate-button .material-symbols-outlined{font-size:18px}.ate-button.text-button{padding:0 8px;font-size:13px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
727
727
|
}
|
|
728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteButtonComponent, decorators: [{
|
|
729
729
|
type: Component,
|
|
730
|
-
args: [{ selector: "
|
|
730
|
+
args: [{ selector: "ate-button", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
731
731
|
<button
|
|
732
|
-
class="
|
|
732
|
+
class="ate-button"
|
|
733
733
|
[class.is-active]="active()"
|
|
734
734
|
[class.is-disabled]="disabled()"
|
|
735
735
|
[class.text-button]="variant() === 'text'"
|
|
@@ -758,36 +758,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
758
758
|
}
|
|
759
759
|
<ng-content></ng-content>
|
|
760
760
|
</button>
|
|
761
|
-
`, styles: [".
|
|
761
|
+
`, styles: [".ate-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:var(--ate-sub-border-radius, 8px);cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);color:var(--ate-toolbar-button-color, var(--ate-text-secondary));position:relative;overflow:hidden}.ate-button:before{content:\"\";position:absolute;inset:0;background:var(--ate-primary);opacity:0;transition:opacity .2s ease;border-radius:var(--ate-sub-border-radius, 8px)}.ate-button:hover:not(.has-custom-color){color:var(--ate-toolbar-button-active-color, var(--ate-primary));background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.ate-button.has-custom-color:hover:not(.has-custom-bg){background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.ate-button.has-custom-bg:hover{transform:translateY(-1px);filter:brightness(.9)}.ate-button:hover:before{opacity:.1}.ate-button:active{transform:translateY(0)}.ate-button.is-active:not(.has-custom-color){color:var(--ate-toolbar-button-active-color, var(--ate-primary));background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.ate-button.is-active.has-custom-color{background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.ate-button:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.ate-button .material-symbols-outlined{font-size:20px;position:relative;z-index:1}.ate-button .material-symbols-outlined.icon-small{font-size:16px}.ate-button .material-symbols-outlined.icon-medium{font-size:20px}.ate-button .material-symbols-outlined.icon-large{font-size:24px}.ate-button.text-button{width:auto;padding:0 12px;font-size:14px;font-weight:500;gap:8px}.ate-button.color-button{width:28px;height:28px;border-radius:50%;border:2px solid transparent;transition:all .2s ease}.ate-button.color-button:hover{border-color:var(--ate-border);transform:scale(1.1)}.ate-button.color-button.is-active{border-color:var(--ate-primary);box-shadow:0 0 0 2px var(--ate-primary-light)}.ate-button.danger{color:var(--ate-error-color, #ef4444)}.ate-button.danger:hover{color:var(--ate-error-color, #ef4444);background:var(--ate-error-bg, rgba(239, 68, 68, .1))}.ate-button.danger:before{background:var(--ate-error-color, #ef4444)}.ate-button.small{width:24px;height:24px}.ate-button.medium{width:32px;height:32px}.ate-button.large{width:40px;height:40px}@keyframes pulse{0%,to{box-shadow:0 0 0 0 var(--ate-primary-light-alpha)}50%{box-shadow:0 0 0 4px transparent}}.ate-button.is-active.pulse{animation:pulse 2s infinite}@media (max-width: 768px){.ate-button{width:32px;height:32px}.ate-button .material-symbols-outlined{font-size:18px}.ate-button.text-button{padding:0 8px;font-size:13px}}\n"] }]
|
|
762
762
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }] } });
|
|
763
763
|
|
|
764
|
-
class
|
|
764
|
+
class AteSeparatorComponent {
|
|
765
765
|
constructor() {
|
|
766
766
|
this.orientation = input("vertical", ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
767
767
|
this.size = input("medium", ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
768
768
|
}
|
|
769
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
770
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type:
|
|
769
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
770
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: AteSeparatorComponent, isStandalone: true, selector: "ate-separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
771
771
|
<div
|
|
772
|
-
class="
|
|
772
|
+
class="ate-separator"
|
|
773
773
|
[class.vertical]="orientation() === 'vertical'"
|
|
774
774
|
[class.horizontal]="orientation() === 'horizontal'"
|
|
775
775
|
[class.small]="size() === 'small'"
|
|
776
776
|
[class.medium]="size() === 'medium'"
|
|
777
777
|
[class.large]="size() === 'large'"></div>
|
|
778
|
-
`, isInline: true, styles: [".
|
|
778
|
+
`, isInline: true, styles: [".ate-separator{background-color:var(--ate-border, #e2e8f0);margin:0}.ate-separator.vertical{width:1px;height:24px;margin:0 8px}.ate-separator.horizontal{height:1px;width:100%;margin:8px 0}.ate-separator.small.vertical{height:16px;margin:0 4px}.ate-separator.small.horizontal{margin:4px 0}.ate-separator.medium.vertical{height:24px;margin:0 8px}.ate-separator.medium.horizontal{margin:8px 0}.ate-separator.large.vertical{height:32px;margin:0 12px}.ate-separator.large.horizontal{margin:12px 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
779
779
|
}
|
|
780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteSeparatorComponent, decorators: [{
|
|
781
781
|
type: Component,
|
|
782
|
-
args: [{ selector: "
|
|
782
|
+
args: [{ selector: "ate-separator", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
783
783
|
<div
|
|
784
|
-
class="
|
|
784
|
+
class="ate-separator"
|
|
785
785
|
[class.vertical]="orientation() === 'vertical'"
|
|
786
786
|
[class.horizontal]="orientation() === 'horizontal'"
|
|
787
787
|
[class.small]="size() === 'small'"
|
|
788
788
|
[class.medium]="size() === 'medium'"
|
|
789
789
|
[class.large]="size() === 'large'"></div>
|
|
790
|
-
`, styles: [".
|
|
790
|
+
`, styles: [".ate-separator{background-color:var(--ate-border, #e2e8f0);margin:0}.ate-separator.vertical{width:1px;height:24px;margin:0 8px}.ate-separator.horizontal{height:1px;width:100%;margin:8px 0}.ate-separator.small.vertical{height:16px;margin:0 4px}.ate-separator.small.horizontal{margin:4px 0}.ate-separator.medium.vertical{height:24px;margin:0 8px}.ate-separator.medium.horizontal{margin:8px 0}.ate-separator.large.vertical{height:32px;margin:0 12px}.ate-separator.large.horizontal{margin:12px 0}\n"] }]
|
|
791
791
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
792
792
|
|
|
793
793
|
const ENGLISH_TRANSLATIONS = {
|
|
@@ -1124,7 +1124,7 @@ const FRENCH_TRANSLATIONS = {
|
|
|
1124
1124
|
success: "Succès",
|
|
1125
1125
|
},
|
|
1126
1126
|
};
|
|
1127
|
-
class
|
|
1127
|
+
class AteI18nService {
|
|
1128
1128
|
constructor() {
|
|
1129
1129
|
this._currentLocale = signal("en", ...(ngDevMode ? [{ debugName: "_currentLocale" }] : []));
|
|
1130
1130
|
this._translations = signal({
|
|
@@ -1188,24 +1188,24 @@ class TiptapI18nService {
|
|
|
1188
1188
|
getSlashCommand(key) {
|
|
1189
1189
|
return this.translations().slashCommands[key];
|
|
1190
1190
|
}
|
|
1191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1192
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteI18nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1192
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteI18nService, providedIn: "root" }); }
|
|
1193
1193
|
}
|
|
1194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteI18nService, decorators: [{
|
|
1195
1195
|
type: Injectable,
|
|
1196
1196
|
args: [{
|
|
1197
1197
|
providedIn: "root",
|
|
1198
1198
|
}]
|
|
1199
1199
|
}], ctorParameters: () => [] });
|
|
1200
1200
|
|
|
1201
|
-
class
|
|
1201
|
+
class AteImageService {
|
|
1202
1202
|
constructor() {
|
|
1203
1203
|
/** Signals for image state */
|
|
1204
1204
|
this.selectedImage = signal(null, ...(ngDevMode ? [{ debugName: "selectedImage" }] : []));
|
|
1205
1205
|
this.isImageSelected = computed(() => this.selectedImage() !== null, ...(ngDevMode ? [{ debugName: "isImageSelected" }] : []));
|
|
1206
1206
|
/** Resizing state */
|
|
1207
1207
|
this.isResizing = signal(false, ...(ngDevMode ? [{ debugName: "isResizing" }] : []));
|
|
1208
|
-
this.i18n = inject(
|
|
1208
|
+
this.i18n = inject(AteI18nService);
|
|
1209
1209
|
this.t = this.i18n.imageUpload;
|
|
1210
1210
|
/** Upload state signals */
|
|
1211
1211
|
this.isUploading = signal(false, ...(ngDevMode ? [{ debugName: "isUploading" }] : []));
|
|
@@ -1539,10 +1539,10 @@ class ImageService {
|
|
|
1539
1539
|
this.selectImage(ed);
|
|
1540
1540
|
}, this.t().replacingImage, options);
|
|
1541
1541
|
}
|
|
1542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1543
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1543
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteImageService }); }
|
|
1544
1544
|
}
|
|
1545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteImageService, decorators: [{
|
|
1546
1546
|
type: Injectable
|
|
1547
1547
|
}] });
|
|
1548
1548
|
|
|
@@ -1599,7 +1599,7 @@ function getContrastColor(color) {
|
|
|
1599
1599
|
return getLuminance(color) > 128 ? "black" : "white";
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
-
class
|
|
1602
|
+
class AteColorPickerService {
|
|
1603
1603
|
constructor() {
|
|
1604
1604
|
this.storedSelection = null;
|
|
1605
1605
|
// ============================================
|
|
@@ -1776,14 +1776,14 @@ class ColorPickerService {
|
|
|
1776
1776
|
getContrastColor(color) {
|
|
1777
1777
|
return getContrastColor(color);
|
|
1778
1778
|
}
|
|
1779
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1780
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1779
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1780
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorPickerService }); }
|
|
1781
1781
|
}
|
|
1782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorPickerService, decorators: [{
|
|
1783
1783
|
type: Injectable
|
|
1784
1784
|
}] });
|
|
1785
1785
|
|
|
1786
|
-
class
|
|
1786
|
+
class AteLinkService {
|
|
1787
1787
|
constructor() {
|
|
1788
1788
|
// ============================================
|
|
1789
1789
|
// State Signals (owned by this service)
|
|
@@ -1867,19 +1867,19 @@ class LinkService {
|
|
|
1867
1867
|
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
1868
1868
|
this.close();
|
|
1869
1869
|
}
|
|
1870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1871
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1870
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteLinkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1871
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteLinkService }); }
|
|
1872
1872
|
}
|
|
1873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
1873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteLinkService, decorators: [{
|
|
1874
1874
|
type: Injectable
|
|
1875
1875
|
}] });
|
|
1876
1876
|
|
|
1877
|
-
class
|
|
1877
|
+
class AteEditorCommandsService {
|
|
1878
1878
|
constructor() {
|
|
1879
|
-
this.imageService = inject(
|
|
1880
|
-
this.colorPickerSvc = inject(
|
|
1881
|
-
this.linkSvc = inject(
|
|
1882
|
-
this._editorState = signal(
|
|
1879
|
+
this.imageService = inject(AteImageService);
|
|
1880
|
+
this.colorPickerSvc = inject(AteColorPickerService);
|
|
1881
|
+
this.linkSvc = inject(AteLinkService);
|
|
1882
|
+
this._editorState = signal(ATE_INITIAL_EDITOR_STATE, ...(ngDevMode ? [{ debugName: "_editorState", equal: (a, b) => {
|
|
1883
1883
|
// 1. Primitive global states
|
|
1884
1884
|
if (a.isFocused !== b.isFocused || a.isEditable !== b.isEditable)
|
|
1885
1885
|
return false;
|
|
@@ -2313,22 +2313,22 @@ class EditorCommandsService {
|
|
|
2313
2313
|
throw error;
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2317
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteEditorCommandsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2317
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteEditorCommandsService }); }
|
|
2318
2318
|
}
|
|
2319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteEditorCommandsService, decorators: [{
|
|
2320
2320
|
type: Injectable
|
|
2321
2321
|
}] });
|
|
2322
2322
|
|
|
2323
|
-
class
|
|
2323
|
+
class AteColorPickerComponent {
|
|
2324
2324
|
constructor() {
|
|
2325
2325
|
this.editor = input.required(...(ngDevMode ? [{ debugName: "editor" }] : []));
|
|
2326
2326
|
this.mode = input("text", ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
2327
2327
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2328
2328
|
this.anchorToText = input(false, ...(ngDevMode ? [{ debugName: "anchorToText" }] : []));
|
|
2329
|
-
this.colorPickerSvc = inject(
|
|
2330
|
-
this.i18nService = inject(
|
|
2331
|
-
this.editorCommands = inject(
|
|
2329
|
+
this.colorPickerSvc = inject(AteColorPickerService);
|
|
2330
|
+
this.i18nService = inject(AteI18nService);
|
|
2331
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
2332
2332
|
this.t = this.i18nService.toolbar;
|
|
2333
2333
|
this.state = this.editorCommands.editorState;
|
|
2334
2334
|
this.currentColor = computed(() => {
|
|
@@ -2381,11 +2381,11 @@ class TiptapColorPickerComponent {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
this.colorPickerSvc.close();
|
|
2383
2383
|
}
|
|
2384
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2385
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteColorPickerComponent, isStandalone: true, selector: "ate-color-picker", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, anchorToText: { classPropertyName: "anchorToText", publicName: "anchorToText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2386
2386
|
<div class="color-picker-wrapper">
|
|
2387
2387
|
<div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
|
|
2388
|
-
<
|
|
2388
|
+
<ate-button
|
|
2389
2389
|
[icon]="buttonIcon()"
|
|
2390
2390
|
[title]="mode() === 'text' ? t().textColor : t().highlight"
|
|
2391
2391
|
[color]="buttonTextColor()"
|
|
@@ -2405,14 +2405,14 @@ class TiptapColorPickerComponent {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
</div>
|
|
2407
2407
|
</div>
|
|
2408
|
-
`, isInline: true, styles: [".color-picker-wrapper{position:relative;display:inline-block}.color-picker-container{position:relative;display:inline-flex;align-items:center}.btn-clear-badge{position:absolute;top:-4px;right:-4px;width:14px;height:14px;padding:0;border:none;border-radius:999px;background:#0f172abf;color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;transition:opacity .12s ease}.color-picker-container:hover .btn-clear-badge{opacity:1;pointer-events:auto}.btn-clear-badge .material-symbols-outlined{font-size:10px;line-height:1}\n"], dependencies: [{ kind: "component", type:
|
|
2408
|
+
`, isInline: true, styles: [".color-picker-wrapper{position:relative;display:inline-block}.color-picker-container{position:relative;display:inline-flex;align-items:center}.btn-clear-badge{position:absolute;top:-4px;right:-4px;width:14px;height:14px;padding:0;border:none;border-radius:999px;background:#0f172abf;color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;transition:opacity .12s ease}.color-picker-container:hover .btn-clear-badge{opacity:1;pointer-events:auto}.btn-clear-badge .material-symbols-outlined{font-size:10px;line-height:1}\n"], dependencies: [{ kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2409
2409
|
}
|
|
2410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorPickerComponent, decorators: [{
|
|
2411
2411
|
type: Component,
|
|
2412
|
-
args: [{ selector: "
|
|
2412
|
+
args: [{ selector: "ate-color-picker", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AteButtonComponent, CommonModule], template: `
|
|
2413
2413
|
<div class="color-picker-wrapper">
|
|
2414
2414
|
<div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
|
|
2415
|
-
<
|
|
2415
|
+
<ate-button
|
|
2416
2416
|
[icon]="buttonIcon()"
|
|
2417
2417
|
[title]="mode() === 'text' ? t().textColor : t().highlight"
|
|
2418
2418
|
[color]="buttonTextColor()"
|
|
@@ -2435,14 +2435,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2435
2435
|
`, styles: [".color-picker-wrapper{position:relative;display:inline-block}.color-picker-container{position:relative;display:inline-flex;align-items:center}.btn-clear-badge{position:absolute;top:-4px;right:-4px;width:14px;height:14px;padding:0;border:none;border-radius:999px;background:#0f172abf;color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;transition:opacity .12s ease}.color-picker-container:hover .btn-clear-badge{opacity:1;pointer-events:auto}.btn-clear-badge .material-symbols-outlined{font-size:10px;line-height:1}\n"] }]
|
|
2436
2436
|
}], propDecorators: { editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], anchorToText: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchorToText", required: false }] }] } });
|
|
2437
2437
|
|
|
2438
|
-
class
|
|
2438
|
+
class AteToolbarComponent {
|
|
2439
2439
|
constructor() {
|
|
2440
2440
|
this.editor = input.required(...(ngDevMode ? [{ debugName: "editor" }] : []));
|
|
2441
2441
|
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
2442
2442
|
this.imageUpload = input({}, ...(ngDevMode ? [{ debugName: "imageUpload" }] : []));
|
|
2443
2443
|
this.floating = input(false, ...(ngDevMode ? [{ debugName: "floating" }] : []));
|
|
2444
|
-
this.i18nService = inject(
|
|
2445
|
-
this.editorCommands = inject(
|
|
2444
|
+
this.i18nService = inject(AteI18nService);
|
|
2445
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
2446
2446
|
this.t = this.i18nService.toolbar;
|
|
2447
2447
|
this.state = this.editorCommands.editorState;
|
|
2448
2448
|
}
|
|
@@ -2452,11 +2452,11 @@ class TiptapToolbarComponent {
|
|
|
2452
2452
|
return;
|
|
2453
2453
|
this.editorCommands.execute(editor, command, ...args);
|
|
2454
2454
|
}
|
|
2455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2456
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
2457
|
-
<div class="
|
|
2455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteToolbarComponent, isStandalone: true, selector: "ate-toolbar", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, imageUpload: { classPropertyName: "imageUpload", publicName: "imageUpload", isSignal: true, isRequired: false, transformFunction: null }, floating: { classPropertyName: "floating", publicName: "floating", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2457
|
+
<div class="ate-toolbar" [class.floating]="floating()">
|
|
2458
2458
|
@if (config().bold) {
|
|
2459
|
-
<
|
|
2459
|
+
<ate-button
|
|
2460
2460
|
icon="format_bold"
|
|
2461
2461
|
[title]="t().bold"
|
|
2462
2462
|
[active]="state().marks.bold"
|
|
@@ -2464,7 +2464,7 @@ class TiptapToolbarComponent {
|
|
|
2464
2464
|
(buttonClick)="onCommand('toggleBold')" />
|
|
2465
2465
|
}
|
|
2466
2466
|
@if (config().italic) {
|
|
2467
|
-
<
|
|
2467
|
+
<ate-button
|
|
2468
2468
|
icon="format_italic"
|
|
2469
2469
|
[title]="t().italic"
|
|
2470
2470
|
[active]="state().marks.italic"
|
|
@@ -2472,7 +2472,7 @@ class TiptapToolbarComponent {
|
|
|
2472
2472
|
(buttonClick)="onCommand('toggleItalic')" />
|
|
2473
2473
|
}
|
|
2474
2474
|
@if (config().underline) {
|
|
2475
|
-
<
|
|
2475
|
+
<ate-button
|
|
2476
2476
|
icon="format_underlined"
|
|
2477
2477
|
[title]="t().underline"
|
|
2478
2478
|
[active]="state().marks.underline"
|
|
@@ -2480,7 +2480,7 @@ class TiptapToolbarComponent {
|
|
|
2480
2480
|
(buttonClick)="onCommand('toggleUnderline')" />
|
|
2481
2481
|
}
|
|
2482
2482
|
@if (config().strike) {
|
|
2483
|
-
<
|
|
2483
|
+
<ate-button
|
|
2484
2484
|
icon="strikethrough_s"
|
|
2485
2485
|
[title]="t().strike"
|
|
2486
2486
|
[active]="state().marks.strike"
|
|
@@ -2488,7 +2488,7 @@ class TiptapToolbarComponent {
|
|
|
2488
2488
|
(buttonClick)="onCommand('toggleStrike')" />
|
|
2489
2489
|
}
|
|
2490
2490
|
@if (config().code) {
|
|
2491
|
-
<
|
|
2491
|
+
<ate-button
|
|
2492
2492
|
icon="code"
|
|
2493
2493
|
[title]="t().code"
|
|
2494
2494
|
[active]="state().marks.code"
|
|
@@ -2496,7 +2496,7 @@ class TiptapToolbarComponent {
|
|
|
2496
2496
|
(buttonClick)="onCommand('toggleCode')" />
|
|
2497
2497
|
}
|
|
2498
2498
|
@if (config().codeBlock) {
|
|
2499
|
-
<
|
|
2499
|
+
<ate-button
|
|
2500
2500
|
icon="terminal"
|
|
2501
2501
|
[title]="t().codeBlock"
|
|
2502
2502
|
[active]="state().nodes.isCodeBlock"
|
|
@@ -2504,7 +2504,7 @@ class TiptapToolbarComponent {
|
|
|
2504
2504
|
(buttonClick)="onCommand('toggleCodeBlock')" />
|
|
2505
2505
|
}
|
|
2506
2506
|
@if (config().superscript) {
|
|
2507
|
-
<
|
|
2507
|
+
<ate-button
|
|
2508
2508
|
icon="superscript"
|
|
2509
2509
|
[title]="t().superscript"
|
|
2510
2510
|
[active]="state().marks.superscript"
|
|
@@ -2512,7 +2512,7 @@ class TiptapToolbarComponent {
|
|
|
2512
2512
|
(buttonClick)="onCommand('toggleSuperscript')" />
|
|
2513
2513
|
}
|
|
2514
2514
|
@if (config().subscript) {
|
|
2515
|
-
<
|
|
2515
|
+
<ate-button
|
|
2516
2516
|
icon="subscript"
|
|
2517
2517
|
[title]="t().subscript"
|
|
2518
2518
|
[active]="state().marks.subscript"
|
|
@@ -2520,7 +2520,7 @@ class TiptapToolbarComponent {
|
|
|
2520
2520
|
(buttonClick)="onCommand('toggleSubscript')" />
|
|
2521
2521
|
}
|
|
2522
2522
|
@if (config().highlight) {
|
|
2523
|
-
<
|
|
2523
|
+
<ate-button
|
|
2524
2524
|
icon="highlight"
|
|
2525
2525
|
[title]="t().highlight"
|
|
2526
2526
|
[active]="state().marks.highlight"
|
|
@@ -2528,17 +2528,17 @@ class TiptapToolbarComponent {
|
|
|
2528
2528
|
(buttonClick)="onCommand('toggleHighlight')" />
|
|
2529
2529
|
}
|
|
2530
2530
|
@if (config().highlightPicker) {
|
|
2531
|
-
<
|
|
2531
|
+
<ate-color-picker mode="highlight" [editor]="editor()" [disabled]="!state().can.setHighlight" />
|
|
2532
2532
|
}
|
|
2533
2533
|
@if (config().textColor) {
|
|
2534
|
-
<
|
|
2534
|
+
<ate-color-picker mode="text" [editor]="editor()" [disabled]="!state().can.setColor" />
|
|
2535
2535
|
}
|
|
2536
2536
|
|
|
2537
2537
|
@if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
|
|
2538
|
-
<
|
|
2538
|
+
<ate-separator />
|
|
2539
2539
|
}
|
|
2540
2540
|
@if (config().heading1) {
|
|
2541
|
-
<
|
|
2541
|
+
<ate-button
|
|
2542
2542
|
icon="format_h1"
|
|
2543
2543
|
[title]="t().heading1"
|
|
2544
2544
|
[active]="state().nodes.h1"
|
|
@@ -2546,7 +2546,7 @@ class TiptapToolbarComponent {
|
|
|
2546
2546
|
(buttonClick)="onCommand('toggleHeading', 1)" />
|
|
2547
2547
|
}
|
|
2548
2548
|
@if (config().heading2) {
|
|
2549
|
-
<
|
|
2549
|
+
<ate-button
|
|
2550
2550
|
icon="format_h2"
|
|
2551
2551
|
[title]="t().heading2"
|
|
2552
2552
|
[active]="state().nodes.h2"
|
|
@@ -2554,7 +2554,7 @@ class TiptapToolbarComponent {
|
|
|
2554
2554
|
(buttonClick)="onCommand('toggleHeading', 2)" />
|
|
2555
2555
|
}
|
|
2556
2556
|
@if (config().heading3) {
|
|
2557
|
-
<
|
|
2557
|
+
<ate-button
|
|
2558
2558
|
icon="format_h3"
|
|
2559
2559
|
[title]="t().heading3"
|
|
2560
2560
|
[active]="state().nodes.h3"
|
|
@@ -2562,10 +2562,10 @@ class TiptapToolbarComponent {
|
|
|
2562
2562
|
(buttonClick)="onCommand('toggleHeading', 3)" />
|
|
2563
2563
|
}
|
|
2564
2564
|
@if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
|
|
2565
|
-
<
|
|
2565
|
+
<ate-separator />
|
|
2566
2566
|
}
|
|
2567
2567
|
@if (config().bulletList) {
|
|
2568
|
-
<
|
|
2568
|
+
<ate-button
|
|
2569
2569
|
icon="format_list_bulleted"
|
|
2570
2570
|
[title]="t().bulletList"
|
|
2571
2571
|
[active]="state().nodes.isBulletList"
|
|
@@ -2573,7 +2573,7 @@ class TiptapToolbarComponent {
|
|
|
2573
2573
|
(buttonClick)="onCommand('toggleBulletList')" />
|
|
2574
2574
|
}
|
|
2575
2575
|
@if (config().orderedList) {
|
|
2576
|
-
<
|
|
2576
|
+
<ate-button
|
|
2577
2577
|
icon="format_list_numbered"
|
|
2578
2578
|
[title]="t().orderedList"
|
|
2579
2579
|
[active]="state().nodes.isOrderedList"
|
|
@@ -2581,7 +2581,7 @@ class TiptapToolbarComponent {
|
|
|
2581
2581
|
(buttonClick)="onCommand('toggleOrderedList')" />
|
|
2582
2582
|
}
|
|
2583
2583
|
@if (config().blockquote) {
|
|
2584
|
-
<
|
|
2584
|
+
<ate-button
|
|
2585
2585
|
icon="format_quote"
|
|
2586
2586
|
[title]="t().blockquote"
|
|
2587
2587
|
[active]="state().nodes.isBlockquote"
|
|
@@ -2592,10 +2592,10 @@ class TiptapToolbarComponent {
|
|
|
2592
2592
|
config().separator &&
|
|
2593
2593
|
(config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)
|
|
2594
2594
|
) {
|
|
2595
|
-
<
|
|
2595
|
+
<ate-separator />
|
|
2596
2596
|
}
|
|
2597
2597
|
@if (config().alignLeft) {
|
|
2598
|
-
<
|
|
2598
|
+
<ate-button
|
|
2599
2599
|
icon="format_align_left"
|
|
2600
2600
|
[title]="t().alignLeft"
|
|
2601
2601
|
[active]="state().nodes.alignLeft"
|
|
@@ -2603,7 +2603,7 @@ class TiptapToolbarComponent {
|
|
|
2603
2603
|
(buttonClick)="onCommand('setTextAlign', 'left')" />
|
|
2604
2604
|
}
|
|
2605
2605
|
@if (config().alignCenter) {
|
|
2606
|
-
<
|
|
2606
|
+
<ate-button
|
|
2607
2607
|
icon="format_align_center"
|
|
2608
2608
|
[title]="t().alignCenter"
|
|
2609
2609
|
[active]="state().nodes.alignCenter"
|
|
@@ -2611,7 +2611,7 @@ class TiptapToolbarComponent {
|
|
|
2611
2611
|
(buttonClick)="onCommand('setTextAlign', 'center')" />
|
|
2612
2612
|
}
|
|
2613
2613
|
@if (config().alignRight) {
|
|
2614
|
-
<
|
|
2614
|
+
<ate-button
|
|
2615
2615
|
icon="format_align_right"
|
|
2616
2616
|
[title]="t().alignRight"
|
|
2617
2617
|
[active]="state().nodes.alignRight"
|
|
@@ -2619,7 +2619,7 @@ class TiptapToolbarComponent {
|
|
|
2619
2619
|
(buttonClick)="onCommand('setTextAlign', 'right')" />
|
|
2620
2620
|
}
|
|
2621
2621
|
@if (config().alignJustify) {
|
|
2622
|
-
<
|
|
2622
|
+
<ate-button
|
|
2623
2623
|
icon="format_align_justify"
|
|
2624
2624
|
[title]="t().alignJustify"
|
|
2625
2625
|
[active]="state().nodes.alignJustify"
|
|
@@ -2627,10 +2627,10 @@ class TiptapToolbarComponent {
|
|
|
2627
2627
|
(buttonClick)="onCommand('setTextAlign', 'justify')" />
|
|
2628
2628
|
}
|
|
2629
2629
|
@if (config().separator && (config().link || config().horizontalRule)) {
|
|
2630
|
-
<
|
|
2630
|
+
<ate-separator />
|
|
2631
2631
|
}
|
|
2632
2632
|
@if (config().link) {
|
|
2633
|
-
<
|
|
2633
|
+
<ate-button
|
|
2634
2634
|
icon="link"
|
|
2635
2635
|
[title]="t().link"
|
|
2636
2636
|
[active]="state().marks.link"
|
|
@@ -2638,65 +2638,57 @@ class TiptapToolbarComponent {
|
|
|
2638
2638
|
(buttonClick)="onCommand('toggleLink', $event)" />
|
|
2639
2639
|
}
|
|
2640
2640
|
@if (config().horizontalRule) {
|
|
2641
|
-
<
|
|
2641
|
+
<ate-button
|
|
2642
2642
|
icon="horizontal_rule"
|
|
2643
2643
|
[title]="t().horizontalRule"
|
|
2644
2644
|
[disabled]="!state().can.insertHorizontalRule"
|
|
2645
2645
|
(buttonClick)="onCommand('insertHorizontalRule')" />
|
|
2646
2646
|
}
|
|
2647
2647
|
@if (config().table) {
|
|
2648
|
-
<
|
|
2648
|
+
<ate-button
|
|
2649
2649
|
icon="table_view"
|
|
2650
2650
|
[title]="t().table"
|
|
2651
2651
|
[disabled]="!state().can.insertTable"
|
|
2652
2652
|
(buttonClick)="onCommand('insertTable')" />
|
|
2653
2653
|
}
|
|
2654
2654
|
@if (config().separator && config().image) {
|
|
2655
|
-
<
|
|
2655
|
+
<ate-separator />
|
|
2656
2656
|
}
|
|
2657
2657
|
@if (config().image) {
|
|
2658
|
-
<
|
|
2658
|
+
<ate-button
|
|
2659
2659
|
icon="image"
|
|
2660
2660
|
[title]="t().image"
|
|
2661
2661
|
[disabled]="!state().can.insertImage"
|
|
2662
2662
|
(buttonClick)="onCommand('insertImage', imageUpload())" />
|
|
2663
2663
|
}
|
|
2664
2664
|
@if (config().separator && (config().undo || config().redo)) {
|
|
2665
|
-
<
|
|
2665
|
+
<ate-separator />
|
|
2666
2666
|
}
|
|
2667
2667
|
@if (config().undo) {
|
|
2668
|
-
<
|
|
2669
|
-
icon="undo"
|
|
2670
|
-
[title]="t().undo"
|
|
2671
|
-
[disabled]="!state().can.undo"
|
|
2672
|
-
(buttonClick)="onCommand('undo')" />
|
|
2668
|
+
<ate-button icon="undo" [title]="t().undo" [disabled]="!state().can.undo" (buttonClick)="onCommand('undo')" />
|
|
2673
2669
|
}
|
|
2674
2670
|
@if (config().redo) {
|
|
2675
|
-
<
|
|
2676
|
-
icon="redo"
|
|
2677
|
-
[title]="t().redo"
|
|
2678
|
-
[disabled]="!state().can.redo"
|
|
2679
|
-
(buttonClick)="onCommand('redo')" />
|
|
2671
|
+
<ate-button icon="redo" [title]="t().redo" [disabled]="!state().can.redo" (buttonClick)="onCommand('redo')" />
|
|
2680
2672
|
}
|
|
2681
2673
|
@if (config().separator && config().clear) {
|
|
2682
|
-
<
|
|
2674
|
+
<ate-separator />
|
|
2683
2675
|
}
|
|
2684
2676
|
@if (config().clear) {
|
|
2685
|
-
<
|
|
2677
|
+
<ate-button
|
|
2686
2678
|
icon="delete"
|
|
2687
2679
|
[title]="t().clear"
|
|
2688
2680
|
[disabled]="!state().isEditable"
|
|
2689
2681
|
(buttonClick)="onCommand('clearContent')" />
|
|
2690
2682
|
}
|
|
2691
2683
|
</div>
|
|
2692
|
-
`, isInline: true, styles: [":host{display:block;transition:opacity .3s ease}:host-context(.floating-toolbar){position:sticky;top:3rem;left:0;right:0;z-index:100;display:flex;height:0;overflow:visible;pointer-events:none;opacity:0}:host-context(.floating-toolbar:focus-within),:host-context(.floating-toolbar:hover){opacity:1}.
|
|
2684
|
+
`, isInline: true, styles: [":host{display:block;transition:opacity .3s ease}:host-context(.floating-toolbar){position:sticky;top:3rem;left:0;right:0;z-index:100;display:flex;height:0;overflow:visible;pointer-events:none;opacity:0}:host-context(.floating-toolbar:focus-within),:host-context(.floating-toolbar:hover){opacity:1}.ate-toolbar{display:flex;align-items:center;gap:4px;padding:var(--ate-toolbar-padding);background:var(--ate-toolbar-background);border-bottom:1px solid var(--ate-toolbar-border-color);flex-wrap:wrap;min-height:32px;position:relative;z-index:50;border-top-left-radius:calc(var(--ate-menu-border-radius, 12px) - var(--ate-border-width, 2px));border-top-right-radius:calc(var(--ate-menu-border-radius, 12px) - var(--ate-border-width, 2px))}.ate-toolbar.floating{pointer-events:auto;border-radius:var(--ate-menu-border-radius, 12px);border:1px solid var(--ate-menu-border)!important;box-shadow:var(--ate-menu-shadow)!important;background:var(--ate-menu-bg)!important;padding:var(--ate-menu-padding)!important;flex-wrap:nowrap;overflow-x:auto;max-width:95vw;scrollbar-width:none;transform:translateY(0);transition:transform .3s cubic-bezier(.4,0,.2,1)}.ate-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .ate-toolbar.floating,:host-context(.floating-toolbar:hover) .ate-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.ate-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.ate-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"], dependencies: [{ kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteSeparatorComponent, selector: "ate-separator", inputs: ["orientation", "size"] }, { kind: "component", type: AteColorPickerComponent, selector: "ate-color-picker", inputs: ["editor", "mode", "disabled", "anchorToText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2693
2685
|
}
|
|
2694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
2686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteToolbarComponent, decorators: [{
|
|
2695
2687
|
type: Component,
|
|
2696
|
-
args: [{ selector: "
|
|
2697
|
-
<div class="
|
|
2688
|
+
args: [{ selector: "ate-toolbar", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AteButtonComponent, AteSeparatorComponent, AteColorPickerComponent], template: `
|
|
2689
|
+
<div class="ate-toolbar" [class.floating]="floating()">
|
|
2698
2690
|
@if (config().bold) {
|
|
2699
|
-
<
|
|
2691
|
+
<ate-button
|
|
2700
2692
|
icon="format_bold"
|
|
2701
2693
|
[title]="t().bold"
|
|
2702
2694
|
[active]="state().marks.bold"
|
|
@@ -2704,7 +2696,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2704
2696
|
(buttonClick)="onCommand('toggleBold')" />
|
|
2705
2697
|
}
|
|
2706
2698
|
@if (config().italic) {
|
|
2707
|
-
<
|
|
2699
|
+
<ate-button
|
|
2708
2700
|
icon="format_italic"
|
|
2709
2701
|
[title]="t().italic"
|
|
2710
2702
|
[active]="state().marks.italic"
|
|
@@ -2712,7 +2704,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2712
2704
|
(buttonClick)="onCommand('toggleItalic')" />
|
|
2713
2705
|
}
|
|
2714
2706
|
@if (config().underline) {
|
|
2715
|
-
<
|
|
2707
|
+
<ate-button
|
|
2716
2708
|
icon="format_underlined"
|
|
2717
2709
|
[title]="t().underline"
|
|
2718
2710
|
[active]="state().marks.underline"
|
|
@@ -2720,7 +2712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2720
2712
|
(buttonClick)="onCommand('toggleUnderline')" />
|
|
2721
2713
|
}
|
|
2722
2714
|
@if (config().strike) {
|
|
2723
|
-
<
|
|
2715
|
+
<ate-button
|
|
2724
2716
|
icon="strikethrough_s"
|
|
2725
2717
|
[title]="t().strike"
|
|
2726
2718
|
[active]="state().marks.strike"
|
|
@@ -2728,7 +2720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2728
2720
|
(buttonClick)="onCommand('toggleStrike')" />
|
|
2729
2721
|
}
|
|
2730
2722
|
@if (config().code) {
|
|
2731
|
-
<
|
|
2723
|
+
<ate-button
|
|
2732
2724
|
icon="code"
|
|
2733
2725
|
[title]="t().code"
|
|
2734
2726
|
[active]="state().marks.code"
|
|
@@ -2736,7 +2728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2736
2728
|
(buttonClick)="onCommand('toggleCode')" />
|
|
2737
2729
|
}
|
|
2738
2730
|
@if (config().codeBlock) {
|
|
2739
|
-
<
|
|
2731
|
+
<ate-button
|
|
2740
2732
|
icon="terminal"
|
|
2741
2733
|
[title]="t().codeBlock"
|
|
2742
2734
|
[active]="state().nodes.isCodeBlock"
|
|
@@ -2744,7 +2736,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2744
2736
|
(buttonClick)="onCommand('toggleCodeBlock')" />
|
|
2745
2737
|
}
|
|
2746
2738
|
@if (config().superscript) {
|
|
2747
|
-
<
|
|
2739
|
+
<ate-button
|
|
2748
2740
|
icon="superscript"
|
|
2749
2741
|
[title]="t().superscript"
|
|
2750
2742
|
[active]="state().marks.superscript"
|
|
@@ -2752,7 +2744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2752
2744
|
(buttonClick)="onCommand('toggleSuperscript')" />
|
|
2753
2745
|
}
|
|
2754
2746
|
@if (config().subscript) {
|
|
2755
|
-
<
|
|
2747
|
+
<ate-button
|
|
2756
2748
|
icon="subscript"
|
|
2757
2749
|
[title]="t().subscript"
|
|
2758
2750
|
[active]="state().marks.subscript"
|
|
@@ -2760,7 +2752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2760
2752
|
(buttonClick)="onCommand('toggleSubscript')" />
|
|
2761
2753
|
}
|
|
2762
2754
|
@if (config().highlight) {
|
|
2763
|
-
<
|
|
2755
|
+
<ate-button
|
|
2764
2756
|
icon="highlight"
|
|
2765
2757
|
[title]="t().highlight"
|
|
2766
2758
|
[active]="state().marks.highlight"
|
|
@@ -2768,17 +2760,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2768
2760
|
(buttonClick)="onCommand('toggleHighlight')" />
|
|
2769
2761
|
}
|
|
2770
2762
|
@if (config().highlightPicker) {
|
|
2771
|
-
<
|
|
2763
|
+
<ate-color-picker mode="highlight" [editor]="editor()" [disabled]="!state().can.setHighlight" />
|
|
2772
2764
|
}
|
|
2773
2765
|
@if (config().textColor) {
|
|
2774
|
-
<
|
|
2766
|
+
<ate-color-picker mode="text" [editor]="editor()" [disabled]="!state().can.setColor" />
|
|
2775
2767
|
}
|
|
2776
2768
|
|
|
2777
2769
|
@if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
|
|
2778
|
-
<
|
|
2770
|
+
<ate-separator />
|
|
2779
2771
|
}
|
|
2780
2772
|
@if (config().heading1) {
|
|
2781
|
-
<
|
|
2773
|
+
<ate-button
|
|
2782
2774
|
icon="format_h1"
|
|
2783
2775
|
[title]="t().heading1"
|
|
2784
2776
|
[active]="state().nodes.h1"
|
|
@@ -2786,7 +2778,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2786
2778
|
(buttonClick)="onCommand('toggleHeading', 1)" />
|
|
2787
2779
|
}
|
|
2788
2780
|
@if (config().heading2) {
|
|
2789
|
-
<
|
|
2781
|
+
<ate-button
|
|
2790
2782
|
icon="format_h2"
|
|
2791
2783
|
[title]="t().heading2"
|
|
2792
2784
|
[active]="state().nodes.h2"
|
|
@@ -2794,7 +2786,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2794
2786
|
(buttonClick)="onCommand('toggleHeading', 2)" />
|
|
2795
2787
|
}
|
|
2796
2788
|
@if (config().heading3) {
|
|
2797
|
-
<
|
|
2789
|
+
<ate-button
|
|
2798
2790
|
icon="format_h3"
|
|
2799
2791
|
[title]="t().heading3"
|
|
2800
2792
|
[active]="state().nodes.h3"
|
|
@@ -2802,10 +2794,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2802
2794
|
(buttonClick)="onCommand('toggleHeading', 3)" />
|
|
2803
2795
|
}
|
|
2804
2796
|
@if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
|
|
2805
|
-
<
|
|
2797
|
+
<ate-separator />
|
|
2806
2798
|
}
|
|
2807
2799
|
@if (config().bulletList) {
|
|
2808
|
-
<
|
|
2800
|
+
<ate-button
|
|
2809
2801
|
icon="format_list_bulleted"
|
|
2810
2802
|
[title]="t().bulletList"
|
|
2811
2803
|
[active]="state().nodes.isBulletList"
|
|
@@ -2813,7 +2805,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2813
2805
|
(buttonClick)="onCommand('toggleBulletList')" />
|
|
2814
2806
|
}
|
|
2815
2807
|
@if (config().orderedList) {
|
|
2816
|
-
<
|
|
2808
|
+
<ate-button
|
|
2817
2809
|
icon="format_list_numbered"
|
|
2818
2810
|
[title]="t().orderedList"
|
|
2819
2811
|
[active]="state().nodes.isOrderedList"
|
|
@@ -2821,7 +2813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2821
2813
|
(buttonClick)="onCommand('toggleOrderedList')" />
|
|
2822
2814
|
}
|
|
2823
2815
|
@if (config().blockquote) {
|
|
2824
|
-
<
|
|
2816
|
+
<ate-button
|
|
2825
2817
|
icon="format_quote"
|
|
2826
2818
|
[title]="t().blockquote"
|
|
2827
2819
|
[active]="state().nodes.isBlockquote"
|
|
@@ -2832,10 +2824,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2832
2824
|
config().separator &&
|
|
2833
2825
|
(config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)
|
|
2834
2826
|
) {
|
|
2835
|
-
<
|
|
2827
|
+
<ate-separator />
|
|
2836
2828
|
}
|
|
2837
2829
|
@if (config().alignLeft) {
|
|
2838
|
-
<
|
|
2830
|
+
<ate-button
|
|
2839
2831
|
icon="format_align_left"
|
|
2840
2832
|
[title]="t().alignLeft"
|
|
2841
2833
|
[active]="state().nodes.alignLeft"
|
|
@@ -2843,7 +2835,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2843
2835
|
(buttonClick)="onCommand('setTextAlign', 'left')" />
|
|
2844
2836
|
}
|
|
2845
2837
|
@if (config().alignCenter) {
|
|
2846
|
-
<
|
|
2838
|
+
<ate-button
|
|
2847
2839
|
icon="format_align_center"
|
|
2848
2840
|
[title]="t().alignCenter"
|
|
2849
2841
|
[active]="state().nodes.alignCenter"
|
|
@@ -2851,7 +2843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2851
2843
|
(buttonClick)="onCommand('setTextAlign', 'center')" />
|
|
2852
2844
|
}
|
|
2853
2845
|
@if (config().alignRight) {
|
|
2854
|
-
<
|
|
2846
|
+
<ate-button
|
|
2855
2847
|
icon="format_align_right"
|
|
2856
2848
|
[title]="t().alignRight"
|
|
2857
2849
|
[active]="state().nodes.alignRight"
|
|
@@ -2859,7 +2851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2859
2851
|
(buttonClick)="onCommand('setTextAlign', 'right')" />
|
|
2860
2852
|
}
|
|
2861
2853
|
@if (config().alignJustify) {
|
|
2862
|
-
<
|
|
2854
|
+
<ate-button
|
|
2863
2855
|
icon="format_align_justify"
|
|
2864
2856
|
[title]="t().alignJustify"
|
|
2865
2857
|
[active]="state().nodes.alignJustify"
|
|
@@ -2867,10 +2859,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2867
2859
|
(buttonClick)="onCommand('setTextAlign', 'justify')" />
|
|
2868
2860
|
}
|
|
2869
2861
|
@if (config().separator && (config().link || config().horizontalRule)) {
|
|
2870
|
-
<
|
|
2862
|
+
<ate-separator />
|
|
2871
2863
|
}
|
|
2872
2864
|
@if (config().link) {
|
|
2873
|
-
<
|
|
2865
|
+
<ate-button
|
|
2874
2866
|
icon="link"
|
|
2875
2867
|
[title]="t().link"
|
|
2876
2868
|
[active]="state().marks.link"
|
|
@@ -2878,68 +2870,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2878
2870
|
(buttonClick)="onCommand('toggleLink', $event)" />
|
|
2879
2871
|
}
|
|
2880
2872
|
@if (config().horizontalRule) {
|
|
2881
|
-
<
|
|
2873
|
+
<ate-button
|
|
2882
2874
|
icon="horizontal_rule"
|
|
2883
2875
|
[title]="t().horizontalRule"
|
|
2884
2876
|
[disabled]="!state().can.insertHorizontalRule"
|
|
2885
2877
|
(buttonClick)="onCommand('insertHorizontalRule')" />
|
|
2886
2878
|
}
|
|
2887
2879
|
@if (config().table) {
|
|
2888
|
-
<
|
|
2880
|
+
<ate-button
|
|
2889
2881
|
icon="table_view"
|
|
2890
2882
|
[title]="t().table"
|
|
2891
2883
|
[disabled]="!state().can.insertTable"
|
|
2892
2884
|
(buttonClick)="onCommand('insertTable')" />
|
|
2893
2885
|
}
|
|
2894
2886
|
@if (config().separator && config().image) {
|
|
2895
|
-
<
|
|
2887
|
+
<ate-separator />
|
|
2896
2888
|
}
|
|
2897
2889
|
@if (config().image) {
|
|
2898
|
-
<
|
|
2890
|
+
<ate-button
|
|
2899
2891
|
icon="image"
|
|
2900
2892
|
[title]="t().image"
|
|
2901
2893
|
[disabled]="!state().can.insertImage"
|
|
2902
2894
|
(buttonClick)="onCommand('insertImage', imageUpload())" />
|
|
2903
2895
|
}
|
|
2904
2896
|
@if (config().separator && (config().undo || config().redo)) {
|
|
2905
|
-
<
|
|
2897
|
+
<ate-separator />
|
|
2906
2898
|
}
|
|
2907
2899
|
@if (config().undo) {
|
|
2908
|
-
<
|
|
2909
|
-
icon="undo"
|
|
2910
|
-
[title]="t().undo"
|
|
2911
|
-
[disabled]="!state().can.undo"
|
|
2912
|
-
(buttonClick)="onCommand('undo')" />
|
|
2900
|
+
<ate-button icon="undo" [title]="t().undo" [disabled]="!state().can.undo" (buttonClick)="onCommand('undo')" />
|
|
2913
2901
|
}
|
|
2914
2902
|
@if (config().redo) {
|
|
2915
|
-
<
|
|
2916
|
-
icon="redo"
|
|
2917
|
-
[title]="t().redo"
|
|
2918
|
-
[disabled]="!state().can.redo"
|
|
2919
|
-
(buttonClick)="onCommand('redo')" />
|
|
2903
|
+
<ate-button icon="redo" [title]="t().redo" [disabled]="!state().can.redo" (buttonClick)="onCommand('redo')" />
|
|
2920
2904
|
}
|
|
2921
2905
|
@if (config().separator && config().clear) {
|
|
2922
|
-
<
|
|
2906
|
+
<ate-separator />
|
|
2923
2907
|
}
|
|
2924
2908
|
@if (config().clear) {
|
|
2925
|
-
<
|
|
2909
|
+
<ate-button
|
|
2926
2910
|
icon="delete"
|
|
2927
2911
|
[title]="t().clear"
|
|
2928
2912
|
[disabled]="!state().isEditable"
|
|
2929
2913
|
(buttonClick)="onCommand('clearContent')" />
|
|
2930
2914
|
}
|
|
2931
2915
|
</div>
|
|
2932
|
-
`, styles: [":host{display:block;transition:opacity .3s ease}:host-context(.floating-toolbar){position:sticky;top:3rem;left:0;right:0;z-index:100;display:flex;height:0;overflow:visible;pointer-events:none;opacity:0}:host-context(.floating-toolbar:focus-within),:host-context(.floating-toolbar:hover){opacity:1}.
|
|
2916
|
+
`, styles: [":host{display:block;transition:opacity .3s ease}:host-context(.floating-toolbar){position:sticky;top:3rem;left:0;right:0;z-index:100;display:flex;height:0;overflow:visible;pointer-events:none;opacity:0}:host-context(.floating-toolbar:focus-within),:host-context(.floating-toolbar:hover){opacity:1}.ate-toolbar{display:flex;align-items:center;gap:4px;padding:var(--ate-toolbar-padding);background:var(--ate-toolbar-background);border-bottom:1px solid var(--ate-toolbar-border-color);flex-wrap:wrap;min-height:32px;position:relative;z-index:50;border-top-left-radius:calc(var(--ate-menu-border-radius, 12px) - var(--ate-border-width, 2px));border-top-right-radius:calc(var(--ate-menu-border-radius, 12px) - var(--ate-border-width, 2px))}.ate-toolbar.floating{pointer-events:auto;border-radius:var(--ate-menu-border-radius, 12px);border:1px solid var(--ate-menu-border)!important;box-shadow:var(--ate-menu-shadow)!important;background:var(--ate-menu-bg)!important;padding:var(--ate-menu-padding)!important;flex-wrap:nowrap;overflow-x:auto;max-width:95vw;scrollbar-width:none;transform:translateY(0);transition:transform .3s cubic-bezier(.4,0,.2,1)}.ate-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .ate-toolbar.floating,:host-context(.floating-toolbar:hover) .ate-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.ate-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.ate-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"] }]
|
|
2933
2917
|
}], propDecorators: { editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], imageUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUpload", required: false }] }], floating: [{ type: i0.Input, args: [{ isSignal: true, alias: "floating", required: false }] }] } });
|
|
2934
2918
|
|
|
2935
2919
|
/**
|
|
2936
2920
|
* Base abstract class for all Bubble Menus (Text, Image, Table, Cell).
|
|
2937
2921
|
* Handles common logic for Tippy.js initialization, positioning, and visibility.
|
|
2938
2922
|
*/
|
|
2939
|
-
class
|
|
2923
|
+
class AteBaseBubbleMenu {
|
|
2940
2924
|
constructor() {
|
|
2941
|
-
this.i18nService = inject(
|
|
2942
|
-
this.editorCommands = inject(
|
|
2925
|
+
this.i18nService = inject(AteI18nService);
|
|
2926
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
2943
2927
|
// Core Inputs
|
|
2944
2928
|
this.editor = input.required(...(ngDevMode ? [{ debugName: "editor" }] : []));
|
|
2945
2929
|
// Internal State
|
|
@@ -3121,17 +3105,17 @@ class TiptapBaseBubbleMenu {
|
|
|
3121
3105
|
onTippyHide(_instance) {
|
|
3122
3106
|
/* empty */
|
|
3123
3107
|
}
|
|
3124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3125
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type:
|
|
3108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteBaseBubbleMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3109
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: AteBaseBubbleMenu, isStandalone: true, inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "menuRef", first: true, predicate: ["menuRef"], descendants: true }], ngImport: i0 }); }
|
|
3126
3110
|
}
|
|
3127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteBaseBubbleMenu, decorators: [{
|
|
3128
3112
|
type: Directive
|
|
3129
3113
|
}], ctorParameters: () => [], propDecorators: { editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: true }] }], menuRef: [{
|
|
3130
3114
|
type: ViewChild,
|
|
3131
3115
|
args: ["menuRef", { static: false }]
|
|
3132
3116
|
}] } });
|
|
3133
3117
|
|
|
3134
|
-
class
|
|
3118
|
+
class AteBubbleMenuComponent extends AteBaseBubbleMenu {
|
|
3135
3119
|
constructor() {
|
|
3136
3120
|
super(...arguments);
|
|
3137
3121
|
this.t = this.i18nService.bubbleMenu;
|
|
@@ -3212,195 +3196,195 @@ class TiptapBubbleMenuComponent extends TiptapBaseBubbleMenu {
|
|
|
3212
3196
|
// Sub-menus now manage their own state. Clearing them here causes
|
|
3213
3197
|
// premature closing when clicking between 'sibling' menu instances.
|
|
3214
3198
|
}
|
|
3215
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3216
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
3199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteBubbleMenuComponent, isStandalone: true, selector: "ate-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
3217
3201
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3218
3202
|
@if (bubbleMenuConfig().bold) {
|
|
3219
|
-
<
|
|
3203
|
+
<ate-button
|
|
3220
3204
|
icon="format_bold"
|
|
3221
3205
|
[title]="t().bold"
|
|
3222
3206
|
[active]="state().marks.bold"
|
|
3223
3207
|
[disabled]="!state().can.toggleBold"
|
|
3224
|
-
(buttonClick)="onCommand('toggleBold', $event)"></
|
|
3208
|
+
(buttonClick)="onCommand('toggleBold', $event)"></ate-button>
|
|
3225
3209
|
}
|
|
3226
3210
|
@if (bubbleMenuConfig().italic) {
|
|
3227
|
-
<
|
|
3211
|
+
<ate-button
|
|
3228
3212
|
icon="format_italic"
|
|
3229
3213
|
[title]="t().italic"
|
|
3230
3214
|
[active]="state().marks.italic"
|
|
3231
3215
|
[disabled]="!state().can.toggleItalic"
|
|
3232
|
-
(buttonClick)="onCommand('toggleItalic', $event)"></
|
|
3216
|
+
(buttonClick)="onCommand('toggleItalic', $event)"></ate-button>
|
|
3233
3217
|
}
|
|
3234
3218
|
@if (bubbleMenuConfig().underline) {
|
|
3235
|
-
<
|
|
3219
|
+
<ate-button
|
|
3236
3220
|
icon="format_underlined"
|
|
3237
3221
|
[title]="t().underline"
|
|
3238
3222
|
[active]="state().marks.underline"
|
|
3239
3223
|
[disabled]="!state().can.toggleUnderline"
|
|
3240
|
-
(buttonClick)="onCommand('toggleUnderline', $event)"></
|
|
3224
|
+
(buttonClick)="onCommand('toggleUnderline', $event)"></ate-button>
|
|
3241
3225
|
}
|
|
3242
3226
|
@if (bubbleMenuConfig().strike) {
|
|
3243
|
-
<
|
|
3227
|
+
<ate-button
|
|
3244
3228
|
icon="strikethrough_s"
|
|
3245
3229
|
[title]="t().strike"
|
|
3246
3230
|
[active]="state().marks.strike"
|
|
3247
3231
|
[disabled]="!state().can.toggleStrike"
|
|
3248
|
-
(buttonClick)="onCommand('toggleStrike', $event)"></
|
|
3232
|
+
(buttonClick)="onCommand('toggleStrike', $event)"></ate-button>
|
|
3249
3233
|
}
|
|
3250
3234
|
@if (bubbleMenuConfig().code) {
|
|
3251
|
-
<
|
|
3235
|
+
<ate-button
|
|
3252
3236
|
icon="code"
|
|
3253
3237
|
[title]="t().code"
|
|
3254
3238
|
[active]="state().marks.code"
|
|
3255
3239
|
[disabled]="!state().can.toggleCode"
|
|
3256
|
-
(buttonClick)="onCommand('toggleCode', $event)"></
|
|
3240
|
+
(buttonClick)="onCommand('toggleCode', $event)"></ate-button>
|
|
3257
3241
|
}
|
|
3258
3242
|
@if (bubbleMenuConfig().superscript) {
|
|
3259
|
-
<
|
|
3243
|
+
<ate-button
|
|
3260
3244
|
icon="superscript"
|
|
3261
3245
|
[title]="t().superscript"
|
|
3262
3246
|
[active]="state().marks.superscript"
|
|
3263
3247
|
[disabled]="!state().can.toggleSuperscript"
|
|
3264
|
-
(buttonClick)="onCommand('toggleSuperscript', $event)"></
|
|
3248
|
+
(buttonClick)="onCommand('toggleSuperscript', $event)"></ate-button>
|
|
3265
3249
|
}
|
|
3266
3250
|
@if (bubbleMenuConfig().subscript) {
|
|
3267
|
-
<
|
|
3251
|
+
<ate-button
|
|
3268
3252
|
icon="subscript"
|
|
3269
3253
|
[title]="t().subscript"
|
|
3270
3254
|
[active]="state().marks.subscript"
|
|
3271
3255
|
[disabled]="!state().can.toggleSubscript"
|
|
3272
|
-
(buttonClick)="onCommand('toggleSubscript', $event)"></
|
|
3256
|
+
(buttonClick)="onCommand('toggleSubscript', $event)"></ate-button>
|
|
3273
3257
|
}
|
|
3274
3258
|
@if (bubbleMenuConfig().highlight) {
|
|
3275
|
-
<
|
|
3259
|
+
<ate-button
|
|
3276
3260
|
icon="highlight"
|
|
3277
3261
|
[title]="t().highlight"
|
|
3278
3262
|
[active]="state().marks.highlight"
|
|
3279
3263
|
[disabled]="!state().can.toggleHighlight"
|
|
3280
|
-
(buttonClick)="onCommand('toggleHighlight', $event)"></
|
|
3264
|
+
(buttonClick)="onCommand('toggleHighlight', $event)"></ate-button>
|
|
3281
3265
|
}
|
|
3282
3266
|
@if (bubbleMenuConfig().highlightPicker) {
|
|
3283
|
-
<
|
|
3267
|
+
<ate-color-picker
|
|
3284
3268
|
mode="highlight"
|
|
3285
3269
|
[editor]="editor()"
|
|
3286
3270
|
[disabled]="!state().can.setHighlight"
|
|
3287
3271
|
[anchorToText]="true" />
|
|
3288
3272
|
}
|
|
3289
3273
|
@if (bubbleMenuConfig().textColor) {
|
|
3290
|
-
<
|
|
3274
|
+
<ate-color-picker mode="text" [editor]="editor()" [disabled]="!state().can.setColor" [anchorToText]="true" />
|
|
3291
3275
|
}
|
|
3292
3276
|
@if (bubbleMenuConfig().link) {
|
|
3293
|
-
<
|
|
3277
|
+
<ate-button
|
|
3294
3278
|
icon="link"
|
|
3295
3279
|
[title]="t().link"
|
|
3296
3280
|
[active]="state().marks.link"
|
|
3297
3281
|
[disabled]="!state().can.toggleLink"
|
|
3298
|
-
(buttonClick)="onCommand('toggleLink', $event)"></
|
|
3282
|
+
(buttonClick)="onCommand('toggleLink', $event)"></ate-button>
|
|
3299
3283
|
}
|
|
3300
3284
|
</div>
|
|
3301
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
3285
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteColorPickerComponent, selector: "ate-color-picker", inputs: ["editor", "mode", "disabled", "anchorToText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3302
3286
|
}
|
|
3303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteBubbleMenuComponent, decorators: [{
|
|
3304
3288
|
type: Component,
|
|
3305
3289
|
args: [{
|
|
3306
|
-
selector: "
|
|
3290
|
+
selector: "ate-bubble-menu",
|
|
3307
3291
|
standalone: true,
|
|
3308
3292
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3309
|
-
imports: [
|
|
3293
|
+
imports: [AteButtonComponent, AteColorPickerComponent],
|
|
3310
3294
|
template: `
|
|
3311
3295
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3312
3296
|
@if (bubbleMenuConfig().bold) {
|
|
3313
|
-
<
|
|
3297
|
+
<ate-button
|
|
3314
3298
|
icon="format_bold"
|
|
3315
3299
|
[title]="t().bold"
|
|
3316
3300
|
[active]="state().marks.bold"
|
|
3317
3301
|
[disabled]="!state().can.toggleBold"
|
|
3318
|
-
(buttonClick)="onCommand('toggleBold', $event)"></
|
|
3302
|
+
(buttonClick)="onCommand('toggleBold', $event)"></ate-button>
|
|
3319
3303
|
}
|
|
3320
3304
|
@if (bubbleMenuConfig().italic) {
|
|
3321
|
-
<
|
|
3305
|
+
<ate-button
|
|
3322
3306
|
icon="format_italic"
|
|
3323
3307
|
[title]="t().italic"
|
|
3324
3308
|
[active]="state().marks.italic"
|
|
3325
3309
|
[disabled]="!state().can.toggleItalic"
|
|
3326
|
-
(buttonClick)="onCommand('toggleItalic', $event)"></
|
|
3310
|
+
(buttonClick)="onCommand('toggleItalic', $event)"></ate-button>
|
|
3327
3311
|
}
|
|
3328
3312
|
@if (bubbleMenuConfig().underline) {
|
|
3329
|
-
<
|
|
3313
|
+
<ate-button
|
|
3330
3314
|
icon="format_underlined"
|
|
3331
3315
|
[title]="t().underline"
|
|
3332
3316
|
[active]="state().marks.underline"
|
|
3333
3317
|
[disabled]="!state().can.toggleUnderline"
|
|
3334
|
-
(buttonClick)="onCommand('toggleUnderline', $event)"></
|
|
3318
|
+
(buttonClick)="onCommand('toggleUnderline', $event)"></ate-button>
|
|
3335
3319
|
}
|
|
3336
3320
|
@if (bubbleMenuConfig().strike) {
|
|
3337
|
-
<
|
|
3321
|
+
<ate-button
|
|
3338
3322
|
icon="strikethrough_s"
|
|
3339
3323
|
[title]="t().strike"
|
|
3340
3324
|
[active]="state().marks.strike"
|
|
3341
3325
|
[disabled]="!state().can.toggleStrike"
|
|
3342
|
-
(buttonClick)="onCommand('toggleStrike', $event)"></
|
|
3326
|
+
(buttonClick)="onCommand('toggleStrike', $event)"></ate-button>
|
|
3343
3327
|
}
|
|
3344
3328
|
@if (bubbleMenuConfig().code) {
|
|
3345
|
-
<
|
|
3329
|
+
<ate-button
|
|
3346
3330
|
icon="code"
|
|
3347
3331
|
[title]="t().code"
|
|
3348
3332
|
[active]="state().marks.code"
|
|
3349
3333
|
[disabled]="!state().can.toggleCode"
|
|
3350
|
-
(buttonClick)="onCommand('toggleCode', $event)"></
|
|
3334
|
+
(buttonClick)="onCommand('toggleCode', $event)"></ate-button>
|
|
3351
3335
|
}
|
|
3352
3336
|
@if (bubbleMenuConfig().superscript) {
|
|
3353
|
-
<
|
|
3337
|
+
<ate-button
|
|
3354
3338
|
icon="superscript"
|
|
3355
3339
|
[title]="t().superscript"
|
|
3356
3340
|
[active]="state().marks.superscript"
|
|
3357
3341
|
[disabled]="!state().can.toggleSuperscript"
|
|
3358
|
-
(buttonClick)="onCommand('toggleSuperscript', $event)"></
|
|
3342
|
+
(buttonClick)="onCommand('toggleSuperscript', $event)"></ate-button>
|
|
3359
3343
|
}
|
|
3360
3344
|
@if (bubbleMenuConfig().subscript) {
|
|
3361
|
-
<
|
|
3345
|
+
<ate-button
|
|
3362
3346
|
icon="subscript"
|
|
3363
3347
|
[title]="t().subscript"
|
|
3364
3348
|
[active]="state().marks.subscript"
|
|
3365
3349
|
[disabled]="!state().can.toggleSubscript"
|
|
3366
|
-
(buttonClick)="onCommand('toggleSubscript', $event)"></
|
|
3350
|
+
(buttonClick)="onCommand('toggleSubscript', $event)"></ate-button>
|
|
3367
3351
|
}
|
|
3368
3352
|
@if (bubbleMenuConfig().highlight) {
|
|
3369
|
-
<
|
|
3353
|
+
<ate-button
|
|
3370
3354
|
icon="highlight"
|
|
3371
3355
|
[title]="t().highlight"
|
|
3372
3356
|
[active]="state().marks.highlight"
|
|
3373
3357
|
[disabled]="!state().can.toggleHighlight"
|
|
3374
|
-
(buttonClick)="onCommand('toggleHighlight', $event)"></
|
|
3358
|
+
(buttonClick)="onCommand('toggleHighlight', $event)"></ate-button>
|
|
3375
3359
|
}
|
|
3376
3360
|
@if (bubbleMenuConfig().highlightPicker) {
|
|
3377
|
-
<
|
|
3361
|
+
<ate-color-picker
|
|
3378
3362
|
mode="highlight"
|
|
3379
3363
|
[editor]="editor()"
|
|
3380
3364
|
[disabled]="!state().can.setHighlight"
|
|
3381
3365
|
[anchorToText]="true" />
|
|
3382
3366
|
}
|
|
3383
3367
|
@if (bubbleMenuConfig().textColor) {
|
|
3384
|
-
<
|
|
3368
|
+
<ate-color-picker mode="text" [editor]="editor()" [disabled]="!state().can.setColor" [anchorToText]="true" />
|
|
3385
3369
|
}
|
|
3386
3370
|
@if (bubbleMenuConfig().link) {
|
|
3387
|
-
<
|
|
3371
|
+
<ate-button
|
|
3388
3372
|
icon="link"
|
|
3389
3373
|
[title]="t().link"
|
|
3390
3374
|
[active]="state().marks.link"
|
|
3391
3375
|
[disabled]="!state().can.toggleLink"
|
|
3392
|
-
(buttonClick)="onCommand('toggleLink', $event)"></
|
|
3376
|
+
(buttonClick)="onCommand('toggleLink', $event)"></ate-button>
|
|
3393
3377
|
}
|
|
3394
3378
|
</div>
|
|
3395
3379
|
`,
|
|
3396
3380
|
}]
|
|
3397
3381
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
|
|
3398
3382
|
|
|
3399
|
-
class
|
|
3383
|
+
class AteImageBubbleMenuComponent extends AteBaseBubbleMenu {
|
|
3400
3384
|
constructor() {
|
|
3401
3385
|
super(...arguments);
|
|
3402
3386
|
this.t = this.i18nService.imageUpload;
|
|
3403
|
-
this.imageService = inject(
|
|
3387
|
+
this.imageService = inject(AteImageService);
|
|
3404
3388
|
this.config = input({
|
|
3405
3389
|
changeImage: true,
|
|
3406
3390
|
resizeSmall: true,
|
|
@@ -3501,119 +3485,119 @@ class TiptapImageBubbleMenuComponent extends TiptapBaseBubbleMenu {
|
|
|
3501
3485
|
ed.chain().focus().deleteSelection().run();
|
|
3502
3486
|
}
|
|
3503
3487
|
}
|
|
3504
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3505
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
3488
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteImageBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3489
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteImageBubbleMenuComponent, isStandalone: true, selector: "ate-image-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, imageUpload: { classPropertyName: "imageUpload", publicName: "imageUpload", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
3506
3490
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3507
3491
|
@if (imageBubbleMenuConfig().changeImage) {
|
|
3508
|
-
<
|
|
3492
|
+
<ate-button
|
|
3509
3493
|
icon="drive_file_rename_outline"
|
|
3510
3494
|
[title]="t().changeImage"
|
|
3511
|
-
(buttonClick)="onCommand('changeImage', $event)"></
|
|
3495
|
+
(buttonClick)="onCommand('changeImage', $event)"></ate-button>
|
|
3512
3496
|
}
|
|
3513
3497
|
@if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
|
|
3514
|
-
<
|
|
3498
|
+
<ate-separator />
|
|
3515
3499
|
}
|
|
3516
3500
|
@if (imageBubbleMenuConfig().resizeSmall) {
|
|
3517
|
-
<
|
|
3501
|
+
<ate-button
|
|
3518
3502
|
icon="crop_square"
|
|
3519
3503
|
iconSize="small"
|
|
3520
3504
|
[title]="t().resizeSmall"
|
|
3521
|
-
(buttonClick)="onCommand('resizeSmall', $event)"></
|
|
3505
|
+
(buttonClick)="onCommand('resizeSmall', $event)"></ate-button>
|
|
3522
3506
|
}
|
|
3523
3507
|
@if (imageBubbleMenuConfig().resizeMedium) {
|
|
3524
|
-
<
|
|
3508
|
+
<ate-button
|
|
3525
3509
|
icon="crop_square"
|
|
3526
3510
|
iconSize="medium"
|
|
3527
3511
|
[title]="t().resizeMedium"
|
|
3528
|
-
(buttonClick)="onCommand('resizeMedium', $event)"></
|
|
3512
|
+
(buttonClick)="onCommand('resizeMedium', $event)"></ate-button>
|
|
3529
3513
|
}
|
|
3530
3514
|
@if (imageBubbleMenuConfig().resizeLarge) {
|
|
3531
|
-
<
|
|
3515
|
+
<ate-button
|
|
3532
3516
|
icon="crop_square"
|
|
3533
3517
|
iconSize="large"
|
|
3534
3518
|
[title]="t().resizeLarge"
|
|
3535
|
-
(buttonClick)="onCommand('resizeLarge', $event)"></
|
|
3519
|
+
(buttonClick)="onCommand('resizeLarge', $event)"></ate-button>
|
|
3536
3520
|
}
|
|
3537
3521
|
@if (imageBubbleMenuConfig().resizeOriginal) {
|
|
3538
|
-
<
|
|
3522
|
+
<ate-button
|
|
3539
3523
|
icon="photo_size_select_actual"
|
|
3540
3524
|
[title]="t().resizeOriginal"
|
|
3541
|
-
(buttonClick)="onCommand('resizeOriginal', $event)"></
|
|
3525
|
+
(buttonClick)="onCommand('resizeOriginal', $event)"></ate-button>
|
|
3542
3526
|
}
|
|
3543
3527
|
@if (imageBubbleMenuConfig().separator && imageBubbleMenuConfig().deleteImage) {
|
|
3544
|
-
<
|
|
3528
|
+
<ate-separator />
|
|
3545
3529
|
}
|
|
3546
3530
|
@if (imageBubbleMenuConfig().deleteImage) {
|
|
3547
|
-
<
|
|
3531
|
+
<ate-button
|
|
3548
3532
|
icon="delete"
|
|
3549
3533
|
[title]="t().deleteImage"
|
|
3550
3534
|
variant="danger"
|
|
3551
|
-
(buttonClick)="onCommand('deleteImage', $event)"></
|
|
3535
|
+
(buttonClick)="onCommand('deleteImage', $event)"></ate-button>
|
|
3552
3536
|
}
|
|
3553
3537
|
</div>
|
|
3554
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
3538
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteSeparatorComponent, selector: "ate-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3555
3539
|
}
|
|
3556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteImageBubbleMenuComponent, decorators: [{
|
|
3557
3541
|
type: Component,
|
|
3558
3542
|
args: [{
|
|
3559
|
-
selector: "
|
|
3543
|
+
selector: "ate-image-bubble-menu",
|
|
3560
3544
|
standalone: true,
|
|
3561
3545
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3562
|
-
imports: [
|
|
3546
|
+
imports: [AteButtonComponent, AteSeparatorComponent],
|
|
3563
3547
|
template: `
|
|
3564
3548
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3565
3549
|
@if (imageBubbleMenuConfig().changeImage) {
|
|
3566
|
-
<
|
|
3550
|
+
<ate-button
|
|
3567
3551
|
icon="drive_file_rename_outline"
|
|
3568
3552
|
[title]="t().changeImage"
|
|
3569
|
-
(buttonClick)="onCommand('changeImage', $event)"></
|
|
3553
|
+
(buttonClick)="onCommand('changeImage', $event)"></ate-button>
|
|
3570
3554
|
}
|
|
3571
3555
|
@if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
|
|
3572
|
-
<
|
|
3556
|
+
<ate-separator />
|
|
3573
3557
|
}
|
|
3574
3558
|
@if (imageBubbleMenuConfig().resizeSmall) {
|
|
3575
|
-
<
|
|
3559
|
+
<ate-button
|
|
3576
3560
|
icon="crop_square"
|
|
3577
3561
|
iconSize="small"
|
|
3578
3562
|
[title]="t().resizeSmall"
|
|
3579
|
-
(buttonClick)="onCommand('resizeSmall', $event)"></
|
|
3563
|
+
(buttonClick)="onCommand('resizeSmall', $event)"></ate-button>
|
|
3580
3564
|
}
|
|
3581
3565
|
@if (imageBubbleMenuConfig().resizeMedium) {
|
|
3582
|
-
<
|
|
3566
|
+
<ate-button
|
|
3583
3567
|
icon="crop_square"
|
|
3584
3568
|
iconSize="medium"
|
|
3585
3569
|
[title]="t().resizeMedium"
|
|
3586
|
-
(buttonClick)="onCommand('resizeMedium', $event)"></
|
|
3570
|
+
(buttonClick)="onCommand('resizeMedium', $event)"></ate-button>
|
|
3587
3571
|
}
|
|
3588
3572
|
@if (imageBubbleMenuConfig().resizeLarge) {
|
|
3589
|
-
<
|
|
3573
|
+
<ate-button
|
|
3590
3574
|
icon="crop_square"
|
|
3591
3575
|
iconSize="large"
|
|
3592
3576
|
[title]="t().resizeLarge"
|
|
3593
|
-
(buttonClick)="onCommand('resizeLarge', $event)"></
|
|
3577
|
+
(buttonClick)="onCommand('resizeLarge', $event)"></ate-button>
|
|
3594
3578
|
}
|
|
3595
3579
|
@if (imageBubbleMenuConfig().resizeOriginal) {
|
|
3596
|
-
<
|
|
3580
|
+
<ate-button
|
|
3597
3581
|
icon="photo_size_select_actual"
|
|
3598
3582
|
[title]="t().resizeOriginal"
|
|
3599
|
-
(buttonClick)="onCommand('resizeOriginal', $event)"></
|
|
3583
|
+
(buttonClick)="onCommand('resizeOriginal', $event)"></ate-button>
|
|
3600
3584
|
}
|
|
3601
3585
|
@if (imageBubbleMenuConfig().separator && imageBubbleMenuConfig().deleteImage) {
|
|
3602
|
-
<
|
|
3586
|
+
<ate-separator />
|
|
3603
3587
|
}
|
|
3604
3588
|
@if (imageBubbleMenuConfig().deleteImage) {
|
|
3605
|
-
<
|
|
3589
|
+
<ate-button
|
|
3606
3590
|
icon="delete"
|
|
3607
3591
|
[title]="t().deleteImage"
|
|
3608
3592
|
variant="danger"
|
|
3609
|
-
(buttonClick)="onCommand('deleteImage', $event)"></
|
|
3593
|
+
(buttonClick)="onCommand('deleteImage', $event)"></ate-button>
|
|
3610
3594
|
}
|
|
3611
3595
|
</div>
|
|
3612
3596
|
`,
|
|
3613
3597
|
}]
|
|
3614
3598
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], imageUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUpload", required: false }] }] } });
|
|
3615
3599
|
|
|
3616
|
-
class
|
|
3600
|
+
class AteTableBubbleMenuComponent extends AteBaseBubbleMenu {
|
|
3617
3601
|
constructor() {
|
|
3618
3602
|
super(...arguments);
|
|
3619
3603
|
// Alias for template
|
|
@@ -3683,195 +3667,195 @@ class TiptapTableBubbleMenuComponent extends TiptapBaseBubbleMenu {
|
|
|
3683
3667
|
executeCommand(editor, command, ...args) {
|
|
3684
3668
|
this.editorCommands.execute(editor, command, ...args);
|
|
3685
3669
|
}
|
|
3686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3687
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
3670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteTableBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3671
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteTableBubbleMenuComponent, isStandalone: true, selector: "ate-table-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
3688
3672
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3689
3673
|
<!-- Row actions -->
|
|
3690
3674
|
@if (config().addRowBefore !== false) {
|
|
3691
|
-
<
|
|
3675
|
+
<ate-button
|
|
3692
3676
|
icon="add_row_above"
|
|
3693
3677
|
[title]="t().addRowBefore"
|
|
3694
3678
|
[disabled]="!state().can.addRowBefore"
|
|
3695
|
-
(buttonClick)="onCommand('addRowBefore', $event)"></
|
|
3679
|
+
(buttonClick)="onCommand('addRowBefore', $event)"></ate-button>
|
|
3696
3680
|
}
|
|
3697
3681
|
@if (config().addRowAfter !== false) {
|
|
3698
|
-
<
|
|
3682
|
+
<ate-button
|
|
3699
3683
|
icon="add_row_below"
|
|
3700
3684
|
[title]="t().addRowAfter"
|
|
3701
3685
|
[disabled]="!state().can.addRowAfter"
|
|
3702
|
-
(buttonClick)="onCommand('addRowAfter', $event)"></
|
|
3686
|
+
(buttonClick)="onCommand('addRowAfter', $event)"></ate-button>
|
|
3703
3687
|
}
|
|
3704
3688
|
@if (config().deleteRow !== false) {
|
|
3705
|
-
<
|
|
3689
|
+
<ate-button
|
|
3706
3690
|
icon="delete"
|
|
3707
3691
|
[title]="t().deleteRow"
|
|
3708
3692
|
variant="danger"
|
|
3709
3693
|
[disabled]="!state().can.deleteRow"
|
|
3710
|
-
(buttonClick)="onCommand('deleteRow', $event)"></
|
|
3694
|
+
(buttonClick)="onCommand('deleteRow', $event)"></ate-button>
|
|
3711
3695
|
}
|
|
3712
3696
|
@if (config().separator !== false) {
|
|
3713
|
-
<
|
|
3697
|
+
<ate-separator />
|
|
3714
3698
|
}
|
|
3715
3699
|
|
|
3716
3700
|
<!-- Column actions -->
|
|
3717
3701
|
@if (config().addColumnBefore !== false) {
|
|
3718
|
-
<
|
|
3702
|
+
<ate-button
|
|
3719
3703
|
icon="add_column_left"
|
|
3720
3704
|
[title]="t().addColumnBefore"
|
|
3721
3705
|
[disabled]="!state().can.addColumnBefore"
|
|
3722
|
-
(buttonClick)="onCommand('addColumnBefore', $event)"></
|
|
3706
|
+
(buttonClick)="onCommand('addColumnBefore', $event)"></ate-button>
|
|
3723
3707
|
}
|
|
3724
3708
|
@if (config().addColumnAfter !== false) {
|
|
3725
|
-
<
|
|
3709
|
+
<ate-button
|
|
3726
3710
|
icon="add_column_right"
|
|
3727
3711
|
[title]="t().addColumnAfter"
|
|
3728
3712
|
[disabled]="!state().can.addColumnAfter"
|
|
3729
|
-
(buttonClick)="onCommand('addColumnAfter', $event)"></
|
|
3713
|
+
(buttonClick)="onCommand('addColumnAfter', $event)"></ate-button>
|
|
3730
3714
|
}
|
|
3731
3715
|
@if (config().deleteColumn !== false) {
|
|
3732
|
-
<
|
|
3716
|
+
<ate-button
|
|
3733
3717
|
icon="delete"
|
|
3734
3718
|
[title]="t().deleteColumn"
|
|
3735
3719
|
variant="danger"
|
|
3736
3720
|
[disabled]="!state().can.deleteColumn"
|
|
3737
|
-
(buttonClick)="onCommand('deleteColumn', $event)"></
|
|
3721
|
+
(buttonClick)="onCommand('deleteColumn', $event)"></ate-button>
|
|
3738
3722
|
}
|
|
3739
3723
|
@if (config().separator !== false) {
|
|
3740
|
-
<
|
|
3724
|
+
<ate-separator />
|
|
3741
3725
|
}
|
|
3742
3726
|
|
|
3743
3727
|
<!-- Cell actions -->
|
|
3744
3728
|
@if (config().toggleHeaderRow !== false) {
|
|
3745
|
-
<
|
|
3729
|
+
<ate-button
|
|
3746
3730
|
icon="toolbar"
|
|
3747
3731
|
[title]="t().toggleHeaderRow"
|
|
3748
3732
|
[active]="state().nodes.isTableHeaderRow"
|
|
3749
3733
|
[disabled]="!state().can.toggleHeaderRow"
|
|
3750
|
-
(buttonClick)="onCommand('toggleHeaderRow', $event)"></
|
|
3734
|
+
(buttonClick)="onCommand('toggleHeaderRow', $event)"></ate-button>
|
|
3751
3735
|
}
|
|
3752
3736
|
@if (config().toggleHeaderColumn !== false) {
|
|
3753
|
-
<
|
|
3737
|
+
<ate-button
|
|
3754
3738
|
icon="dock_to_right"
|
|
3755
3739
|
[title]="t().toggleHeaderColumn"
|
|
3756
3740
|
[active]="state().nodes.isTableHeaderColumn"
|
|
3757
3741
|
[disabled]="!state().can.toggleHeaderColumn"
|
|
3758
|
-
(buttonClick)="onCommand('toggleHeaderColumn', $event)"></
|
|
3742
|
+
(buttonClick)="onCommand('toggleHeaderColumn', $event)"></ate-button>
|
|
3759
3743
|
}
|
|
3760
3744
|
@if (config().separator !== false && config().deleteTable !== false) {
|
|
3761
|
-
<
|
|
3745
|
+
<ate-separator />
|
|
3762
3746
|
}
|
|
3763
3747
|
|
|
3764
3748
|
<!-- Table actions -->
|
|
3765
3749
|
@if (config().deleteTable !== false) {
|
|
3766
|
-
<
|
|
3750
|
+
<ate-button
|
|
3767
3751
|
icon="delete_forever"
|
|
3768
3752
|
[title]="t().deleteTable"
|
|
3769
3753
|
variant="danger"
|
|
3770
3754
|
[disabled]="!state().can.deleteTable"
|
|
3771
|
-
(buttonClick)="onCommand('deleteTable', $event)"></
|
|
3755
|
+
(buttonClick)="onCommand('deleteTable', $event)"></ate-button>
|
|
3772
3756
|
}
|
|
3773
3757
|
</div>
|
|
3774
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type:
|
|
3758
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteSeparatorComponent, selector: "ate-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3775
3759
|
}
|
|
3776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteTableBubbleMenuComponent, decorators: [{
|
|
3777
3761
|
type: Component,
|
|
3778
3762
|
args: [{
|
|
3779
|
-
selector: "
|
|
3763
|
+
selector: "ate-table-bubble-menu",
|
|
3780
3764
|
standalone: true,
|
|
3781
3765
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3782
|
-
imports: [CommonModule,
|
|
3766
|
+
imports: [CommonModule, AteButtonComponent, AteSeparatorComponent],
|
|
3783
3767
|
template: `
|
|
3784
3768
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3785
3769
|
<!-- Row actions -->
|
|
3786
3770
|
@if (config().addRowBefore !== false) {
|
|
3787
|
-
<
|
|
3771
|
+
<ate-button
|
|
3788
3772
|
icon="add_row_above"
|
|
3789
3773
|
[title]="t().addRowBefore"
|
|
3790
3774
|
[disabled]="!state().can.addRowBefore"
|
|
3791
|
-
(buttonClick)="onCommand('addRowBefore', $event)"></
|
|
3775
|
+
(buttonClick)="onCommand('addRowBefore', $event)"></ate-button>
|
|
3792
3776
|
}
|
|
3793
3777
|
@if (config().addRowAfter !== false) {
|
|
3794
|
-
<
|
|
3778
|
+
<ate-button
|
|
3795
3779
|
icon="add_row_below"
|
|
3796
3780
|
[title]="t().addRowAfter"
|
|
3797
3781
|
[disabled]="!state().can.addRowAfter"
|
|
3798
|
-
(buttonClick)="onCommand('addRowAfter', $event)"></
|
|
3782
|
+
(buttonClick)="onCommand('addRowAfter', $event)"></ate-button>
|
|
3799
3783
|
}
|
|
3800
3784
|
@if (config().deleteRow !== false) {
|
|
3801
|
-
<
|
|
3785
|
+
<ate-button
|
|
3802
3786
|
icon="delete"
|
|
3803
3787
|
[title]="t().deleteRow"
|
|
3804
3788
|
variant="danger"
|
|
3805
3789
|
[disabled]="!state().can.deleteRow"
|
|
3806
|
-
(buttonClick)="onCommand('deleteRow', $event)"></
|
|
3790
|
+
(buttonClick)="onCommand('deleteRow', $event)"></ate-button>
|
|
3807
3791
|
}
|
|
3808
3792
|
@if (config().separator !== false) {
|
|
3809
|
-
<
|
|
3793
|
+
<ate-separator />
|
|
3810
3794
|
}
|
|
3811
3795
|
|
|
3812
3796
|
<!-- Column actions -->
|
|
3813
3797
|
@if (config().addColumnBefore !== false) {
|
|
3814
|
-
<
|
|
3798
|
+
<ate-button
|
|
3815
3799
|
icon="add_column_left"
|
|
3816
3800
|
[title]="t().addColumnBefore"
|
|
3817
3801
|
[disabled]="!state().can.addColumnBefore"
|
|
3818
|
-
(buttonClick)="onCommand('addColumnBefore', $event)"></
|
|
3802
|
+
(buttonClick)="onCommand('addColumnBefore', $event)"></ate-button>
|
|
3819
3803
|
}
|
|
3820
3804
|
@if (config().addColumnAfter !== false) {
|
|
3821
|
-
<
|
|
3805
|
+
<ate-button
|
|
3822
3806
|
icon="add_column_right"
|
|
3823
3807
|
[title]="t().addColumnAfter"
|
|
3824
3808
|
[disabled]="!state().can.addColumnAfter"
|
|
3825
|
-
(buttonClick)="onCommand('addColumnAfter', $event)"></
|
|
3809
|
+
(buttonClick)="onCommand('addColumnAfter', $event)"></ate-button>
|
|
3826
3810
|
}
|
|
3827
3811
|
@if (config().deleteColumn !== false) {
|
|
3828
|
-
<
|
|
3812
|
+
<ate-button
|
|
3829
3813
|
icon="delete"
|
|
3830
3814
|
[title]="t().deleteColumn"
|
|
3831
3815
|
variant="danger"
|
|
3832
3816
|
[disabled]="!state().can.deleteColumn"
|
|
3833
|
-
(buttonClick)="onCommand('deleteColumn', $event)"></
|
|
3817
|
+
(buttonClick)="onCommand('deleteColumn', $event)"></ate-button>
|
|
3834
3818
|
}
|
|
3835
3819
|
@if (config().separator !== false) {
|
|
3836
|
-
<
|
|
3820
|
+
<ate-separator />
|
|
3837
3821
|
}
|
|
3838
3822
|
|
|
3839
3823
|
<!-- Cell actions -->
|
|
3840
3824
|
@if (config().toggleHeaderRow !== false) {
|
|
3841
|
-
<
|
|
3825
|
+
<ate-button
|
|
3842
3826
|
icon="toolbar"
|
|
3843
3827
|
[title]="t().toggleHeaderRow"
|
|
3844
3828
|
[active]="state().nodes.isTableHeaderRow"
|
|
3845
3829
|
[disabled]="!state().can.toggleHeaderRow"
|
|
3846
|
-
(buttonClick)="onCommand('toggleHeaderRow', $event)"></
|
|
3830
|
+
(buttonClick)="onCommand('toggleHeaderRow', $event)"></ate-button>
|
|
3847
3831
|
}
|
|
3848
3832
|
@if (config().toggleHeaderColumn !== false) {
|
|
3849
|
-
<
|
|
3833
|
+
<ate-button
|
|
3850
3834
|
icon="dock_to_right"
|
|
3851
3835
|
[title]="t().toggleHeaderColumn"
|
|
3852
3836
|
[active]="state().nodes.isTableHeaderColumn"
|
|
3853
3837
|
[disabled]="!state().can.toggleHeaderColumn"
|
|
3854
|
-
(buttonClick)="onCommand('toggleHeaderColumn', $event)"></
|
|
3838
|
+
(buttonClick)="onCommand('toggleHeaderColumn', $event)"></ate-button>
|
|
3855
3839
|
}
|
|
3856
3840
|
@if (config().separator !== false && config().deleteTable !== false) {
|
|
3857
|
-
<
|
|
3841
|
+
<ate-separator />
|
|
3858
3842
|
}
|
|
3859
3843
|
|
|
3860
3844
|
<!-- Table actions -->
|
|
3861
3845
|
@if (config().deleteTable !== false) {
|
|
3862
|
-
<
|
|
3846
|
+
<ate-button
|
|
3863
3847
|
icon="delete_forever"
|
|
3864
3848
|
[title]="t().deleteTable"
|
|
3865
3849
|
variant="danger"
|
|
3866
3850
|
[disabled]="!state().can.deleteTable"
|
|
3867
|
-
(buttonClick)="onCommand('deleteTable', $event)"></
|
|
3851
|
+
(buttonClick)="onCommand('deleteTable', $event)"></ate-button>
|
|
3868
3852
|
}
|
|
3869
3853
|
</div>
|
|
3870
3854
|
`,
|
|
3871
3855
|
}]
|
|
3872
3856
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
|
|
3873
3857
|
|
|
3874
|
-
class
|
|
3858
|
+
class AteCellBubbleMenuComponent extends AteBaseBubbleMenu {
|
|
3875
3859
|
constructor() {
|
|
3876
3860
|
super(...arguments);
|
|
3877
3861
|
// Inputs
|
|
@@ -3935,61 +3919,61 @@ class TiptapCellBubbleMenuComponent extends TiptapBaseBubbleMenu {
|
|
|
3935
3919
|
executeCommand(editor, command, ...args) {
|
|
3936
3920
|
this.editorCommands.execute(editor, command, ...args);
|
|
3937
3921
|
}
|
|
3938
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3939
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
3922
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteCellBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3923
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteCellBubbleMenuComponent, isStandalone: true, selector: "ate-cell-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
3940
3924
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3941
3925
|
<!-- Cell specific actions -->
|
|
3942
3926
|
@if (config().mergeCells !== false && !state().selection.isSingleCell) {
|
|
3943
|
-
<
|
|
3927
|
+
<ate-button
|
|
3944
3928
|
icon="cell_merge"
|
|
3945
3929
|
[title]="i18n().table().mergeCells"
|
|
3946
3930
|
[disabled]="!state().can.mergeCells"
|
|
3947
|
-
(buttonClick)="onCommand('mergeCells', $event)"></
|
|
3931
|
+
(buttonClick)="onCommand('mergeCells', $event)"></ate-button>
|
|
3948
3932
|
}
|
|
3949
3933
|
@if (config().splitCell !== false && state().selection.isSingleCell) {
|
|
3950
|
-
<
|
|
3934
|
+
<ate-button
|
|
3951
3935
|
icon="split_scene"
|
|
3952
3936
|
[title]="i18n().table().splitCell"
|
|
3953
3937
|
[disabled]="!state().can.splitCell"
|
|
3954
|
-
(buttonClick)="onCommand('splitCell', $event)"></
|
|
3938
|
+
(buttonClick)="onCommand('splitCell', $event)"></ate-button>
|
|
3955
3939
|
}
|
|
3956
3940
|
</div>
|
|
3957
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type:
|
|
3941
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3958
3942
|
}
|
|
3959
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteCellBubbleMenuComponent, decorators: [{
|
|
3960
3944
|
type: Component,
|
|
3961
3945
|
args: [{
|
|
3962
|
-
selector: "
|
|
3946
|
+
selector: "ate-cell-bubble-menu",
|
|
3963
3947
|
standalone: true,
|
|
3964
3948
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3965
|
-
imports: [CommonModule,
|
|
3949
|
+
imports: [CommonModule, AteButtonComponent],
|
|
3966
3950
|
template: `
|
|
3967
3951
|
<div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
|
|
3968
3952
|
<!-- Cell specific actions -->
|
|
3969
3953
|
@if (config().mergeCells !== false && !state().selection.isSingleCell) {
|
|
3970
|
-
<
|
|
3954
|
+
<ate-button
|
|
3971
3955
|
icon="cell_merge"
|
|
3972
3956
|
[title]="i18n().table().mergeCells"
|
|
3973
3957
|
[disabled]="!state().can.mergeCells"
|
|
3974
|
-
(buttonClick)="onCommand('mergeCells', $event)"></
|
|
3958
|
+
(buttonClick)="onCommand('mergeCells', $event)"></ate-button>
|
|
3975
3959
|
}
|
|
3976
3960
|
@if (config().splitCell !== false && state().selection.isSingleCell) {
|
|
3977
|
-
<
|
|
3961
|
+
<ate-button
|
|
3978
3962
|
icon="split_scene"
|
|
3979
3963
|
[title]="i18n().table().splitCell"
|
|
3980
3964
|
[disabled]="!state().can.splitCell"
|
|
3981
|
-
(buttonClick)="onCommand('splitCell', $event)"></
|
|
3965
|
+
(buttonClick)="onCommand('splitCell', $event)"></ate-button>
|
|
3982
3966
|
}
|
|
3983
3967
|
</div>
|
|
3984
3968
|
`,
|
|
3985
3969
|
}]
|
|
3986
3970
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
|
|
3987
3971
|
|
|
3988
|
-
class
|
|
3972
|
+
class AteLinkBubbleMenuComponent {
|
|
3989
3973
|
constructor() {
|
|
3990
|
-
this.i18nService = inject(
|
|
3991
|
-
this.editorCommands = inject(
|
|
3992
|
-
this.linkSvc = inject(
|
|
3974
|
+
this.i18nService = inject(AteI18nService);
|
|
3975
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
3976
|
+
this.linkSvc = inject(AteLinkService);
|
|
3993
3977
|
this.t = this.i18nService.bubbleMenu;
|
|
3994
3978
|
this.common = this.i18nService.common;
|
|
3995
3979
|
this.state = this.editorCommands.editorState;
|
|
@@ -4197,8 +4181,8 @@ class TiptapLinkBubbleMenuComponent {
|
|
|
4197
4181
|
this.linkSvc.close();
|
|
4198
4182
|
this.hideTippy();
|
|
4199
4183
|
}
|
|
4200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type:
|
|
4184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteLinkBubbleMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4185
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: AteLinkBubbleMenuComponent, isStandalone: true, selector: "ate-link-bubble-menu", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "linkInput", first: true, predicate: ["linkInput"], descendants: true }, { propertyName: "menuRef", first: true, predicate: ["menuRef"], descendants: true }], ngImport: i0, template: `
|
|
4202
4186
|
<div
|
|
4203
4187
|
#menuRef
|
|
4204
4188
|
class="bubble-menu"
|
|
@@ -4225,32 +4209,32 @@ class TiptapLinkBubbleMenuComponent {
|
|
|
4225
4209
|
</div>
|
|
4226
4210
|
|
|
4227
4211
|
<div class="action-buttons">
|
|
4228
|
-
<
|
|
4212
|
+
<ate-button
|
|
4229
4213
|
icon="check"
|
|
4230
4214
|
[title]="common().apply"
|
|
4231
4215
|
color="var(--ate-primary)"
|
|
4232
4216
|
[disabled]="!editUrl().trim()"
|
|
4233
|
-
(buttonClick)="onApply($event)"></
|
|
4234
|
-
<
|
|
4217
|
+
(buttonClick)="onApply($event)"></ate-button>
|
|
4218
|
+
<ate-button
|
|
4235
4219
|
icon="open_in_new"
|
|
4236
4220
|
[title]="t().openLink"
|
|
4237
4221
|
[disabled]="!currentUrl()"
|
|
4238
|
-
(buttonClick)="onOpenLink($event)"></
|
|
4239
|
-
<
|
|
4240
|
-
<
|
|
4222
|
+
(buttonClick)="onOpenLink($event)"></ate-button>
|
|
4223
|
+
<ate-separator />
|
|
4224
|
+
<ate-button
|
|
4241
4225
|
icon="link_off"
|
|
4242
4226
|
[title]="t().removeLink"
|
|
4243
4227
|
variant="danger"
|
|
4244
4228
|
[disabled]="!currentUrl()"
|
|
4245
|
-
(buttonClick)="onRemove($event)"></
|
|
4229
|
+
(buttonClick)="onRemove($event)"></ate-button>
|
|
4246
4230
|
</div>
|
|
4247
4231
|
</div>
|
|
4248
4232
|
</div>
|
|
4249
|
-
`, isInline: true, styles: [".link-input-row{display:flex;align-items:center;gap:6px}.url-input-container{flex:1;display:flex;align-items:center;background:var(--ate-surface-secondary, #f8fafc);border:1px solid var(--ate-border, #e2e8f0);border-radius:8px;padding:0 10px;height:32px;transition:all .15s ease}.url-input-container:focus-within{border-color:var(--ate-primary, #3b82f6);background:var(--ate-surface, #ffffff);box-shadow:0 0 0 2px var(--ate-primary-light, rgba(59, 130, 246, .1))}.icon-link{font-size:16px;color:var(--ate-text-muted, #94a3b8);margin-right:6px}.url-field{background:transparent;border:none;outline:none;color:var(--ate-text, #1e293b);font-size:13px;width:100%;font-family:inherit}.action-buttons{display:flex;align-items:center;gap:2px}\n"], dependencies: [{ kind: "component", type:
|
|
4233
|
+
`, isInline: true, styles: [".link-input-row{display:flex;align-items:center;gap:6px}.url-input-container{flex:1;display:flex;align-items:center;background:var(--ate-surface-secondary, #f8fafc);border:1px solid var(--ate-border, #e2e8f0);border-radius:8px;padding:0 10px;height:32px;transition:all .15s ease}.url-input-container:focus-within{border-color:var(--ate-primary, #3b82f6);background:var(--ate-surface, #ffffff);box-shadow:0 0 0 2px var(--ate-primary-light, rgba(59, 130, 246, .1))}.icon-link{font-size:16px;color:var(--ate-text-muted, #94a3b8);margin-right:6px}.url-field{background:transparent;border:none;outline:none;color:var(--ate-text, #1e293b);font-size:13px;width:100%;font-family:inherit}.action-buttons{display:flex;align-items:center;gap:2px}\n"], dependencies: [{ kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteSeparatorComponent, selector: "ate-separator", inputs: ["orientation", "size"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4250
4234
|
}
|
|
4251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteLinkBubbleMenuComponent, decorators: [{
|
|
4252
4236
|
type: Component,
|
|
4253
|
-
args: [{ selector: "
|
|
4237
|
+
args: [{ selector: "ate-link-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AteButtonComponent, AteSeparatorComponent, FormsModule], template: `
|
|
4254
4238
|
<div
|
|
4255
4239
|
#menuRef
|
|
4256
4240
|
class="bubble-menu"
|
|
@@ -4277,24 +4261,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4277
4261
|
</div>
|
|
4278
4262
|
|
|
4279
4263
|
<div class="action-buttons">
|
|
4280
|
-
<
|
|
4264
|
+
<ate-button
|
|
4281
4265
|
icon="check"
|
|
4282
4266
|
[title]="common().apply"
|
|
4283
4267
|
color="var(--ate-primary)"
|
|
4284
4268
|
[disabled]="!editUrl().trim()"
|
|
4285
|
-
(buttonClick)="onApply($event)"></
|
|
4286
|
-
<
|
|
4269
|
+
(buttonClick)="onApply($event)"></ate-button>
|
|
4270
|
+
<ate-button
|
|
4287
4271
|
icon="open_in_new"
|
|
4288
4272
|
[title]="t().openLink"
|
|
4289
4273
|
[disabled]="!currentUrl()"
|
|
4290
|
-
(buttonClick)="onOpenLink($event)"></
|
|
4291
|
-
<
|
|
4292
|
-
<
|
|
4274
|
+
(buttonClick)="onOpenLink($event)"></ate-button>
|
|
4275
|
+
<ate-separator />
|
|
4276
|
+
<ate-button
|
|
4293
4277
|
icon="link_off"
|
|
4294
4278
|
[title]="t().removeLink"
|
|
4295
4279
|
variant="danger"
|
|
4296
4280
|
[disabled]="!currentUrl()"
|
|
4297
|
-
(buttonClick)="onRemove($event)"></
|
|
4281
|
+
(buttonClick)="onRemove($event)"></ate-button>
|
|
4298
4282
|
</div>
|
|
4299
4283
|
</div>
|
|
4300
4284
|
</div>
|
|
@@ -4321,11 +4305,11 @@ const PRESET_COLORS = [
|
|
|
4321
4305
|
"#9C27B0",
|
|
4322
4306
|
"#E91E63",
|
|
4323
4307
|
];
|
|
4324
|
-
class
|
|
4308
|
+
class AteColorBubbleMenuComponent {
|
|
4325
4309
|
constructor() {
|
|
4326
|
-
this.i18nService = inject(
|
|
4327
|
-
this.editorCommands = inject(
|
|
4328
|
-
this.colorPickerSvc = inject(
|
|
4310
|
+
this.i18nService = inject(AteI18nService);
|
|
4311
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
4312
|
+
this.colorPickerSvc = inject(AteColorPickerService);
|
|
4329
4313
|
this.t = this.i18nService.toolbar;
|
|
4330
4314
|
this.common = this.i18nService.common;
|
|
4331
4315
|
this.state = this.editorCommands.editorState;
|
|
@@ -4566,8 +4550,8 @@ class TiptapColorBubbleMenuComponent {
|
|
|
4566
4550
|
this.updateMenu();
|
|
4567
4551
|
}, 150);
|
|
4568
4552
|
}
|
|
4569
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4570
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
4553
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorBubbleMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4554
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteColorBubbleMenuComponent, isStandalone: true, selector: "ate-color-bubble-menu", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "colorInputRef", first: true, predicate: ["colorInput"], descendants: true, isSignal: true }, { propertyName: "menuRef", first: true, predicate: ["menuRef"], descendants: true }], ngImport: i0, template: `
|
|
4571
4555
|
<div
|
|
4572
4556
|
#menuRef
|
|
4573
4557
|
class="bubble-menu color-bubble-menu"
|
|
@@ -4581,13 +4565,13 @@ class TiptapColorBubbleMenuComponent {
|
|
|
4581
4565
|
<div class="dropdown-row presets">
|
|
4582
4566
|
<div class="color-grid">
|
|
4583
4567
|
@for (color of presets; track color) {
|
|
4584
|
-
<
|
|
4568
|
+
<ate-button
|
|
4585
4569
|
class="color-swatch-btn"
|
|
4586
4570
|
size="small"
|
|
4587
4571
|
[title]="color"
|
|
4588
4572
|
[active]="isColorActive(color)"
|
|
4589
4573
|
[backgroundColor]="color"
|
|
4590
|
-
(buttonClick)="applyColor(color, true, $event)"></
|
|
4574
|
+
(buttonClick)="applyColor(color, true, $event)"></ate-button>
|
|
4591
4575
|
}
|
|
4592
4576
|
</div>
|
|
4593
4577
|
</div>
|
|
@@ -4611,12 +4595,12 @@ class TiptapColorBubbleMenuComponent {
|
|
|
4611
4595
|
</div>
|
|
4612
4596
|
|
|
4613
4597
|
<div class="native-trigger-wrapper">
|
|
4614
|
-
<
|
|
4598
|
+
<ate-button
|
|
4615
4599
|
class="btn-native-picker-trigger"
|
|
4616
4600
|
icon="colorize"
|
|
4617
4601
|
[title]="t().customColor"
|
|
4618
4602
|
[backgroundColor]="currentColor()"
|
|
4619
|
-
(buttonClick)="triggerNativePicker($event)"></
|
|
4603
|
+
(buttonClick)="triggerNativePicker($event)"></ate-button>
|
|
4620
4604
|
<input
|
|
4621
4605
|
#colorInput
|
|
4622
4606
|
type="color"
|
|
@@ -4629,27 +4613,27 @@ class TiptapColorBubbleMenuComponent {
|
|
|
4629
4613
|
(blur)="onBlur()" />
|
|
4630
4614
|
</div>
|
|
4631
4615
|
|
|
4632
|
-
<
|
|
4616
|
+
<ate-button
|
|
4633
4617
|
icon="check"
|
|
4634
4618
|
[title]="common().apply"
|
|
4635
4619
|
color="var(--ate-primary)"
|
|
4636
|
-
(buttonClick)="onApply($event)"></
|
|
4620
|
+
(buttonClick)="onApply($event)"></ate-button>
|
|
4637
4621
|
|
|
4638
|
-
<
|
|
4622
|
+
<ate-separator />
|
|
4639
4623
|
|
|
4640
|
-
<
|
|
4624
|
+
<ate-button
|
|
4641
4625
|
icon="format_color_reset"
|
|
4642
4626
|
[title]="t().clear"
|
|
4643
4627
|
variant="danger"
|
|
4644
|
-
(buttonClick)="onClearColor($event)"></
|
|
4628
|
+
(buttonClick)="onClearColor($event)"></ate-button>
|
|
4645
4629
|
</div>
|
|
4646
4630
|
</div>
|
|
4647
4631
|
</div>
|
|
4648
|
-
`, isInline: true, styles: [".color-picker-container{display:flex;flex-direction:column;gap:8px}.dropdown-row{display:flex;align-items:center;width:100%}.dropdown-row.presets{justify-content:center}.dropdown-row.controls{gap:8px;justify-content:space-between;padding-top:4px;border-top:1px solid var(--ate-border, #e2e8f0)}.color-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;width:100%}:host ::ng-deep .color-swatch-btn .
|
|
4632
|
+
`, isInline: true, styles: [".color-picker-container{display:flex;flex-direction:column;gap:8px}.dropdown-row{display:flex;align-items:center;width:100%}.dropdown-row.presets{justify-content:center}.dropdown-row.controls{gap:8px;justify-content:space-between;padding-top:4px;border-top:1px solid var(--ate-border, #e2e8f0)}.color-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;width:100%}:host ::ng-deep .color-swatch-btn .ate-button{width:100%;aspect-ratio:1;height:auto;border-radius:4px;border:1px solid rgba(0,0,0,.1);padding:0}:host ::ng-deep .color-swatch-btn .ate-button.is-active{border-color:var(--ate-primary, #3b82f6);box-shadow:0 0 0 2px #3b82f64d}:host ::ng-deep .btn-native-picker-trigger .ate-button{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.2)}.divider-v{width:1px;height:24px;background:var(--ate-border, #e2e8f0)}.hex-input-wrapper{flex:1;display:flex;align-items:center;background:var(--ate-surface-secondary, #f8fafc);border:1px solid var(--ate-border, #e2e8f0);border-radius:8px;padding:0 10px;height:32px;transition:border-color .15s ease}.hex-input-wrapper:focus-within{border-color:var(--ate-primary, #3b82f6);background:var(--ate-menu-bg, #ffffff)}.hex-hash{color:var(--ate-text-muted, #94a3b8);font-family:monospace;font-size:.875rem}.hex-input{background:transparent;border:none;outline:none;color:var(--ate-text, #1e293b);font-family:monospace;font-size:.875rem;width:100%;padding-left:4px}.native-trigger-wrapper{position:relative;width:32px;height:32px}.hidden-native-input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }, { kind: "component", type: AteSeparatorComponent, selector: "ate-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4649
4633
|
}
|
|
4650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteColorBubbleMenuComponent, decorators: [{
|
|
4651
4635
|
type: Component,
|
|
4652
|
-
args: [{ selector: "
|
|
4636
|
+
args: [{ selector: "ate-color-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AteButtonComponent, AteSeparatorComponent], template: `
|
|
4653
4637
|
<div
|
|
4654
4638
|
#menuRef
|
|
4655
4639
|
class="bubble-menu color-bubble-menu"
|
|
@@ -4663,13 +4647,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4663
4647
|
<div class="dropdown-row presets">
|
|
4664
4648
|
<div class="color-grid">
|
|
4665
4649
|
@for (color of presets; track color) {
|
|
4666
|
-
<
|
|
4650
|
+
<ate-button
|
|
4667
4651
|
class="color-swatch-btn"
|
|
4668
4652
|
size="small"
|
|
4669
4653
|
[title]="color"
|
|
4670
4654
|
[active]="isColorActive(color)"
|
|
4671
4655
|
[backgroundColor]="color"
|
|
4672
|
-
(buttonClick)="applyColor(color, true, $event)"></
|
|
4656
|
+
(buttonClick)="applyColor(color, true, $event)"></ate-button>
|
|
4673
4657
|
}
|
|
4674
4658
|
</div>
|
|
4675
4659
|
</div>
|
|
@@ -4693,12 +4677,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4693
4677
|
</div>
|
|
4694
4678
|
|
|
4695
4679
|
<div class="native-trigger-wrapper">
|
|
4696
|
-
<
|
|
4680
|
+
<ate-button
|
|
4697
4681
|
class="btn-native-picker-trigger"
|
|
4698
4682
|
icon="colorize"
|
|
4699
4683
|
[title]="t().customColor"
|
|
4700
4684
|
[backgroundColor]="currentColor()"
|
|
4701
|
-
(buttonClick)="triggerNativePicker($event)"></
|
|
4685
|
+
(buttonClick)="triggerNativePicker($event)"></ate-button>
|
|
4702
4686
|
<input
|
|
4703
4687
|
#colorInput
|
|
4704
4688
|
type="color"
|
|
@@ -4711,23 +4695,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4711
4695
|
(blur)="onBlur()" />
|
|
4712
4696
|
</div>
|
|
4713
4697
|
|
|
4714
|
-
<
|
|
4698
|
+
<ate-button
|
|
4715
4699
|
icon="check"
|
|
4716
4700
|
[title]="common().apply"
|
|
4717
4701
|
color="var(--ate-primary)"
|
|
4718
|
-
(buttonClick)="onApply($event)"></
|
|
4702
|
+
(buttonClick)="onApply($event)"></ate-button>
|
|
4719
4703
|
|
|
4720
|
-
<
|
|
4704
|
+
<ate-separator />
|
|
4721
4705
|
|
|
4722
|
-
<
|
|
4706
|
+
<ate-button
|
|
4723
4707
|
icon="format_color_reset"
|
|
4724
4708
|
[title]="t().clear"
|
|
4725
4709
|
variant="danger"
|
|
4726
|
-
(buttonClick)="onClearColor($event)"></
|
|
4710
|
+
(buttonClick)="onClearColor($event)"></ate-button>
|
|
4727
4711
|
</div>
|
|
4728
4712
|
</div>
|
|
4729
4713
|
</div>
|
|
4730
|
-
`, styles: [".color-picker-container{display:flex;flex-direction:column;gap:8px}.dropdown-row{display:flex;align-items:center;width:100%}.dropdown-row.presets{justify-content:center}.dropdown-row.controls{gap:8px;justify-content:space-between;padding-top:4px;border-top:1px solid var(--ate-border, #e2e8f0)}.color-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;width:100%}:host ::ng-deep .color-swatch-btn .
|
|
4714
|
+
`, styles: [".color-picker-container{display:flex;flex-direction:column;gap:8px}.dropdown-row{display:flex;align-items:center;width:100%}.dropdown-row.presets{justify-content:center}.dropdown-row.controls{gap:8px;justify-content:space-between;padding-top:4px;border-top:1px solid var(--ate-border, #e2e8f0)}.color-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;width:100%}:host ::ng-deep .color-swatch-btn .ate-button{width:100%;aspect-ratio:1;height:auto;border-radius:4px;border:1px solid rgba(0,0,0,.1);padding:0}:host ::ng-deep .color-swatch-btn .ate-button.is-active{border-color:var(--ate-primary, #3b82f6);box-shadow:0 0 0 2px #3b82f64d}:host ::ng-deep .btn-native-picker-trigger .ate-button{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.2)}.divider-v{width:1px;height:24px;background:var(--ate-border, #e2e8f0)}.hex-input-wrapper{flex:1;display:flex;align-items:center;background:var(--ate-surface-secondary, #f8fafc);border:1px solid var(--ate-border, #e2e8f0);border-radius:8px;padding:0 10px;height:32px;transition:border-color .15s ease}.hex-input-wrapper:focus-within{border-color:var(--ate-primary, #3b82f6);background:var(--ate-menu-bg, #ffffff)}.hex-hash{color:var(--ate-text-muted, #94a3b8);font-family:monospace;font-size:.875rem}.hex-input{background:transparent;border:none;outline:none;color:var(--ate-text, #1e293b);font-family:monospace;font-size:.875rem;width:100%;padding-left:4px}.native-trigger-wrapper{position:relative;width:32px;height:32px}.hidden-native-input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}\n"] }]
|
|
4731
4715
|
}], ctorParameters: () => [], propDecorators: { editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: true }] }], menuRef: [{
|
|
4732
4716
|
type: ViewChild,
|
|
4733
4717
|
args: ["menuRef", { static: false }]
|
|
@@ -4736,7 +4720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4736
4720
|
/**
|
|
4737
4721
|
* Clés des commandes natives dans l'ordre d'affichage
|
|
4738
4722
|
*/
|
|
4739
|
-
const
|
|
4723
|
+
const ATE_SLASH_COMMAND_KEYS = [
|
|
4740
4724
|
"heading1",
|
|
4741
4725
|
"heading2",
|
|
4742
4726
|
"heading3",
|
|
@@ -4751,7 +4735,7 @@ const SLASH_COMMAND_KEYS = [
|
|
|
4751
4735
|
/**
|
|
4752
4736
|
* Configuration par défaut : toutes les commandes natives sont activées
|
|
4753
4737
|
*/
|
|
4754
|
-
const
|
|
4738
|
+
const ATE_DEFAULT_SLASH_COMMANDS_CONFIG = {
|
|
4755
4739
|
heading1: true,
|
|
4756
4740
|
heading2: true,
|
|
4757
4741
|
heading3: true,
|
|
@@ -4852,9 +4836,9 @@ function createDefaultSlashCommands(i18n, commands, imageOptions) {
|
|
|
4852
4836
|
*/
|
|
4853
4837
|
function filterSlashCommands(config, i18n, commands, imageOptions) {
|
|
4854
4838
|
const allNatives = createDefaultSlashCommands(i18n, commands, imageOptions);
|
|
4855
|
-
const activeConfig = { ...
|
|
4839
|
+
const activeConfig = { ...ATE_DEFAULT_SLASH_COMMANDS_CONFIG, ...config };
|
|
4856
4840
|
const filtered = allNatives.filter((_, index) => {
|
|
4857
|
-
const key =
|
|
4841
|
+
const key = ATE_SLASH_COMMAND_KEYS[index];
|
|
4858
4842
|
return key && activeConfig[key] !== false;
|
|
4859
4843
|
});
|
|
4860
4844
|
if (config.custom && Array.isArray(config.custom)) {
|
|
@@ -4864,13 +4848,13 @@ function filterSlashCommands(config, i18n, commands, imageOptions) {
|
|
|
4864
4848
|
}
|
|
4865
4849
|
|
|
4866
4850
|
// Default command definitions are now centralized in src/lib/config/slash-commands.config.ts
|
|
4867
|
-
class
|
|
4851
|
+
class AteSlashCommandsComponent {
|
|
4868
4852
|
constructor() {
|
|
4869
|
-
this.i18nService = inject(
|
|
4853
|
+
this.i18nService = inject(AteI18nService);
|
|
4870
4854
|
this.editor = input.required(...(ngDevMode ? [{ debugName: "editor" }] : []));
|
|
4871
4855
|
this.config = input(undefined, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
4872
4856
|
this.tippyInstance = null;
|
|
4873
|
-
this.editorCommands = inject(
|
|
4857
|
+
this.editorCommands = inject(AteEditorCommandsService);
|
|
4874
4858
|
// Local state
|
|
4875
4859
|
this.isActive = false;
|
|
4876
4860
|
this.currentQuery = signal("", ...(ngDevMode ? [{ debugName: "currentQuery" }] : []));
|
|
@@ -5181,8 +5165,8 @@ class TiptapSlashCommandsComponent {
|
|
|
5181
5165
|
plugins: [keyboardPlugin, ...ed.view.state.plugins],
|
|
5182
5166
|
}));
|
|
5183
5167
|
}
|
|
5184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type:
|
|
5168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteSlashCommandsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AteSlashCommandsComponent, isStandalone: true, selector: "ate-slash-commands", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "menuRef", first: true, predicate: ["menuRef"], descendants: true }], ngImport: i0, template: `
|
|
5186
5170
|
<div #menuRef class="slash-commands-menu">
|
|
5187
5171
|
@for (command of filteredCommands(); track command.title) {
|
|
5188
5172
|
<div
|
|
@@ -5202,9 +5186,9 @@ class TiptapSlashCommandsComponent {
|
|
|
5202
5186
|
</div>
|
|
5203
5187
|
`, isInline: true, styles: [".slash-commands-menu{background:var(--ate-menu-bg);border:1px solid var(--ate-menu-border);border-radius:var(--ate-menu-border-radius, 12px);box-shadow:var(--ate-menu-shadow);padding:var(--ate-menu-padding);max-height:320px;overflow-y:auto;min-width:280px;outline:none;animation:slashMenuFadeIn .2s cubic-bezier(0,0,.2,1);scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}.slash-commands-menu::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.slash-commands-menu::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.slash-commands-menu::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.slash-commands-menu::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}@keyframes slashMenuFadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.slash-command-item{display:flex;align-items:center;gap:12px;padding:var(--ate-menu-padding);border-radius:var(--ate-menu-border-radius, 8px);cursor:pointer;transition:all .15s ease;border:var(--ate-border-width, 1px) solid transparent;outline:none;margin-bottom:2px}.slash-command-item:last-child{margin-bottom:0}.slash-command-item:hover{background:var(--ate-surface-secondary)}.slash-command-item.selected{background:var(--ate-primary-light);border-color:var(--ate-primary-light-alpha)}.slash-command-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:var(--ate-surface-tertiary);border-radius:var(--ate-sub-border-radius, 8px);color:var(--ate-primary);flex-shrink:0;transition:all .15s ease}.slash-command-item.selected .slash-command-icon{background:var(--ate-primary);color:var(--ate-primary-contrast, #ffffff)}.slash-command-icon .material-symbols-outlined{font-size:18px}.slash-command-content{flex:1;min-width:0}.slash-command-title{font-weight:500;color:var(--ate-text);font-size:14px;margin-bottom:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slash-command-description{color:var(--ate-text-secondary);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5204
5188
|
}
|
|
5205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteSlashCommandsComponent, decorators: [{
|
|
5206
5190
|
type: Component,
|
|
5207
|
-
args: [{ selector: "
|
|
5191
|
+
args: [{ selector: "ate-slash-commands", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
5208
5192
|
<div #menuRef class="slash-commands-menu">
|
|
5209
5193
|
@for (command of filteredCommands(); track command.title) {
|
|
5210
5194
|
<div
|
|
@@ -5232,16 +5216,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5232
5216
|
* Edit Toggle Component
|
|
5233
5217
|
* Allows switching between editable and readonly modes
|
|
5234
5218
|
*/
|
|
5235
|
-
class
|
|
5219
|
+
class AteEditToggleComponent {
|
|
5236
5220
|
constructor() {
|
|
5237
5221
|
this.editable = input.required(...(ngDevMode ? [{ debugName: "editable" }] : []));
|
|
5238
5222
|
this.translations = input.required(...(ngDevMode ? [{ debugName: "translations" }] : []));
|
|
5239
5223
|
this.editToggle = output();
|
|
5240
5224
|
}
|
|
5241
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5242
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type:
|
|
5225
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteEditToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5226
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: AteEditToggleComponent, isStandalone: true, selector: "ate-edit-toggle", inputs: { editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: true, transformFunction: null }, translations: { classPropertyName: "translations", publicName: "translations", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { editToggle: "editToggle" }, ngImport: i0, template: `
|
|
5243
5227
|
<div class="ate-edit-toggle-container" [class.is-editable]="editable()">
|
|
5244
|
-
<
|
|
5228
|
+
<ate-button
|
|
5245
5229
|
[icon]="editable() ? 'visibility' : 'edit'"
|
|
5246
5230
|
[title]="editable() ? translations().editor.viewMode : translations().editor.toggleEdit"
|
|
5247
5231
|
(buttonClick)="editToggle.emit($event)"
|
|
@@ -5249,13 +5233,13 @@ class TiptapEditToggleComponent {
|
|
|
5249
5233
|
iconSize="small"
|
|
5250
5234
|
backgroundColor="var(--ate-primary-lighter)" />
|
|
5251
5235
|
</div>
|
|
5252
|
-
`, isInline: true, styles: [".ate-edit-toggle-container{position:absolute;margin-top:16px;right:16px;z-index:50}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type:
|
|
5236
|
+
`, isInline: true, styles: [".ate-edit-toggle-container{position:absolute;margin-top:16px;right:16px;z-index:50}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AteButtonComponent, selector: "ate-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5253
5237
|
}
|
|
5254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteEditToggleComponent, decorators: [{
|
|
5255
5239
|
type: Component,
|
|
5256
|
-
args: [{ selector: "
|
|
5240
|
+
args: [{ selector: "ate-edit-toggle", standalone: true, imports: [CommonModule, AteButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
5257
5241
|
<div class="ate-edit-toggle-container" [class.is-editable]="editable()">
|
|
5258
|
-
<
|
|
5242
|
+
<ate-button
|
|
5259
5243
|
[icon]="editable() ? 'visibility' : 'edit'"
|
|
5260
5244
|
[title]="editable() ? translations().editor.viewMode : translations().editor.toggleEdit"
|
|
5261
5245
|
(buttonClick)="editToggle.emit($event)"
|
|
@@ -5266,7 +5250,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5266
5250
|
`, styles: [".ate-edit-toggle-container{position:absolute;margin-top:16px;right:16px;z-index:50}\n"] }]
|
|
5267
5251
|
}], propDecorators: { editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: true }] }], translations: [{ type: i0.Input, args: [{ isSignal: true, alias: "translations", required: true }] }], editToggle: [{ type: i0.Output, args: ["editToggle"] }] } });
|
|
5268
5252
|
|
|
5269
|
-
|
|
5253
|
+
/**
|
|
5254
|
+
* Noop Value Accessor Directive
|
|
5255
|
+
* @link https://medium.com/netanelbasal/forwarding-form-controls-to-custom-control-components-in-angular-701e8406cc55
|
|
5256
|
+
*/
|
|
5257
|
+
class AteNoopValueAccessorDirective {
|
|
5270
5258
|
writeValue(_obj) {
|
|
5271
5259
|
/* empty */
|
|
5272
5260
|
}
|
|
@@ -5276,16 +5264,16 @@ class NoopValueAccessorDirective {
|
|
|
5276
5264
|
registerOnTouched(_fn) {
|
|
5277
5265
|
/* empty */
|
|
5278
5266
|
}
|
|
5279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5280
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type:
|
|
5267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteNoopValueAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5268
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: AteNoopValueAccessorDirective, isStandalone: true, providers: [
|
|
5281
5269
|
{
|
|
5282
5270
|
provide: NG_VALUE_ACCESSOR,
|
|
5283
5271
|
multi: true,
|
|
5284
|
-
useExisting:
|
|
5272
|
+
useExisting: AteNoopValueAccessorDirective,
|
|
5285
5273
|
},
|
|
5286
5274
|
], ngImport: i0 }); }
|
|
5287
5275
|
}
|
|
5288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AteNoopValueAccessorDirective, decorators: [{
|
|
5289
5277
|
type: Directive,
|
|
5290
5278
|
args: [{
|
|
5291
5279
|
standalone: true,
|
|
@@ -5293,13 +5281,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5293
5281
|
{
|
|
5294
5282
|
provide: NG_VALUE_ACCESSOR,
|
|
5295
5283
|
multi: true,
|
|
5296
|
-
useExisting:
|
|
5284
|
+
useExisting: AteNoopValueAccessorDirective,
|
|
5297
5285
|
},
|
|
5298
5286
|
],
|
|
5299
5287
|
}]
|
|
5300
5288
|
}] });
|
|
5301
5289
|
|
|
5302
|
-
const
|
|
5290
|
+
const AteSelectionCalculator = editor => {
|
|
5303
5291
|
const { selection } = editor.state;
|
|
5304
5292
|
const { from, to } = selection;
|
|
5305
5293
|
let selectionType = "none";
|
|
@@ -5329,7 +5317,7 @@ const SelectionCalculator = editor => {
|
|
|
5329
5317
|
};
|
|
5330
5318
|
};
|
|
5331
5319
|
|
|
5332
|
-
const
|
|
5320
|
+
const AteMarksCalculator = editor => {
|
|
5333
5321
|
const isCodeBlock = editor.isActive("codeBlock");
|
|
5334
5322
|
const isCode = editor.isActive("code"); // Inline code mark
|
|
5335
5323
|
const isImage = editor.isActive("image") || editor.isActive("resizableImage");
|
|
@@ -5398,7 +5386,7 @@ const MarksCalculator = editor => {
|
|
|
5398
5386
|
};
|
|
5399
5387
|
};
|
|
5400
5388
|
|
|
5401
|
-
const
|
|
5389
|
+
const AteTableCalculator = editor => {
|
|
5402
5390
|
const isTable = editor.isActive("table");
|
|
5403
5391
|
if (!isTable) {
|
|
5404
5392
|
return {
|
|
@@ -5435,7 +5423,7 @@ const TableCalculator = editor => {
|
|
|
5435
5423
|
};
|
|
5436
5424
|
};
|
|
5437
5425
|
|
|
5438
|
-
const
|
|
5426
|
+
const AteImageCalculator = editor => {
|
|
5439
5427
|
return {
|
|
5440
5428
|
nodes: {
|
|
5441
5429
|
isImage: editor.isActive("image") || editor.isActive("resizableImage"),
|
|
@@ -5443,7 +5431,7 @@ const ImageCalculator = editor => {
|
|
|
5443
5431
|
};
|
|
5444
5432
|
};
|
|
5445
5433
|
|
|
5446
|
-
const
|
|
5434
|
+
const AteStructureCalculator = editor => {
|
|
5447
5435
|
return {
|
|
5448
5436
|
nodes: {
|
|
5449
5437
|
isBlockquote: editor.isActive("blockquote"),
|
|
@@ -5482,7 +5470,7 @@ const StructureCalculator = editor => {
|
|
|
5482
5470
|
* It provides a "fallback" reactive state for any mark or node not explicitly handled
|
|
5483
5471
|
* by specialized calculators.
|
|
5484
5472
|
*/
|
|
5485
|
-
const
|
|
5473
|
+
const AteDiscoveryCalculator = (editor) => {
|
|
5486
5474
|
const state = {
|
|
5487
5475
|
marks: {},
|
|
5488
5476
|
nodes: {},
|
|
@@ -5530,7 +5518,7 @@ const DiscoveryCalculator = (editor) => {
|
|
|
5530
5518
|
return state;
|
|
5531
5519
|
};
|
|
5532
5520
|
|
|
5533
|
-
const
|
|
5521
|
+
const AteLinkClickBehavior = Extension.create({
|
|
5534
5522
|
name: "linkClickBehavior",
|
|
5535
5523
|
addProseMirrorPlugins() {
|
|
5536
5524
|
return [
|
|
@@ -5558,7 +5546,7 @@ const LinkClickBehavior = Extension.create({
|
|
|
5558
5546
|
});
|
|
5559
5547
|
|
|
5560
5548
|
// Default toolbar configuration
|
|
5561
|
-
const
|
|
5549
|
+
const ATE_DEFAULT_TOOLBAR_CONFIG = {
|
|
5562
5550
|
bold: true,
|
|
5563
5551
|
italic: true,
|
|
5564
5552
|
underline: true,
|
|
@@ -5590,7 +5578,7 @@ const DEFAULT_TOOLBAR_CONFIG = {
|
|
|
5590
5578
|
separator: true,
|
|
5591
5579
|
};
|
|
5592
5580
|
// Default bubble menu configuration
|
|
5593
|
-
const
|
|
5581
|
+
const ATE_DEFAULT_BUBBLE_MENU_CONFIG = {
|
|
5594
5582
|
bold: true,
|
|
5595
5583
|
italic: true,
|
|
5596
5584
|
underline: true,
|
|
@@ -5605,7 +5593,7 @@ const DEFAULT_BUBBLE_MENU_CONFIG = {
|
|
|
5605
5593
|
separator: true,
|
|
5606
5594
|
};
|
|
5607
5595
|
// Default image bubble menu configuration
|
|
5608
|
-
const
|
|
5596
|
+
const ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG = {
|
|
5609
5597
|
changeImage: true,
|
|
5610
5598
|
resizeSmall: true,
|
|
5611
5599
|
resizeMedium: true,
|
|
@@ -5615,7 +5603,7 @@ const DEFAULT_IMAGE_BUBBLE_MENU_CONFIG = {
|
|
|
5615
5603
|
separator: true,
|
|
5616
5604
|
};
|
|
5617
5605
|
// Default table bubble menu configuration
|
|
5618
|
-
const
|
|
5606
|
+
const ATE_DEFAULT_TABLE_MENU_CONFIG = {
|
|
5619
5607
|
addRowBefore: true,
|
|
5620
5608
|
addRowAfter: true,
|
|
5621
5609
|
deleteRow: true,
|
|
@@ -5628,7 +5616,7 @@ const DEFAULT_TABLE_MENU_CONFIG = {
|
|
|
5628
5616
|
separator: true,
|
|
5629
5617
|
};
|
|
5630
5618
|
// Default cell bubble menu configuration
|
|
5631
|
-
const
|
|
5619
|
+
const ATE_DEFAULT_CELL_MENU_CONFIG = {
|
|
5632
5620
|
mergeCells: true,
|
|
5633
5621
|
splitCell: true,
|
|
5634
5622
|
};
|
|
@@ -5674,16 +5662,16 @@ class AngularTiptapEditorComponent {
|
|
|
5674
5662
|
this.tiptapOptions = input({}, ...(ngDevMode ? [{ debugName: "tiptapOptions" }] : []));
|
|
5675
5663
|
// Nouveaux inputs pour les bubble menus
|
|
5676
5664
|
this.showBubbleMenu = input(true, ...(ngDevMode ? [{ debugName: "showBubbleMenu" }] : []));
|
|
5677
|
-
this.bubbleMenu = input(
|
|
5665
|
+
this.bubbleMenu = input(ATE_DEFAULT_BUBBLE_MENU_CONFIG, ...(ngDevMode ? [{ debugName: "bubbleMenu" }] : []));
|
|
5678
5666
|
this.showImageBubbleMenu = input(true, ...(ngDevMode ? [{ debugName: "showImageBubbleMenu" }] : []));
|
|
5679
|
-
this.imageBubbleMenu = input(
|
|
5667
|
+
this.imageBubbleMenu = input(ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, ...(ngDevMode ? [{ debugName: "imageBubbleMenu" }] : []));
|
|
5680
5668
|
// Configuration de la toolbar
|
|
5681
5669
|
this.toolbar = input({}, ...(ngDevMode ? [{ debugName: "toolbar" }] : []));
|
|
5682
5670
|
// Configuration des menus de table
|
|
5683
5671
|
this.showTableBubbleMenu = input(true, ...(ngDevMode ? [{ debugName: "showTableBubbleMenu" }] : []));
|
|
5684
|
-
this.tableBubbleMenu = input(
|
|
5672
|
+
this.tableBubbleMenu = input(ATE_DEFAULT_TABLE_MENU_CONFIG, ...(ngDevMode ? [{ debugName: "tableBubbleMenu" }] : []));
|
|
5685
5673
|
this.showCellBubbleMenu = input(true, ...(ngDevMode ? [{ debugName: "showCellBubbleMenu" }] : []));
|
|
5686
|
-
this.cellBubbleMenu = input(
|
|
5674
|
+
this.cellBubbleMenu = input(ATE_DEFAULT_CELL_MENU_CONFIG, ...(ngDevMode ? [{ debugName: "cellBubbleMenu" }] : []));
|
|
5687
5675
|
/**
|
|
5688
5676
|
* Additionnal state calculators to extend the reactive editor state.
|
|
5689
5677
|
*/
|
|
@@ -5763,7 +5751,7 @@ class AngularTiptapEditorComponent {
|
|
|
5763
5751
|
this.finalShowToolbar = computed(() => this.config().showToolbar ?? this.showToolbar(), ...(ngDevMode ? [{ debugName: "finalShowToolbar" }] : []));
|
|
5764
5752
|
this.finalToolbarConfig = computed(() => {
|
|
5765
5753
|
const fromConfig = this.config().toolbar;
|
|
5766
|
-
const base =
|
|
5754
|
+
const base = ATE_DEFAULT_TOOLBAR_CONFIG;
|
|
5767
5755
|
if (fromConfig)
|
|
5768
5756
|
return { ...base, ...fromConfig };
|
|
5769
5757
|
const fromInput = this.toolbar();
|
|
@@ -5773,7 +5761,7 @@ class AngularTiptapEditorComponent {
|
|
|
5773
5761
|
this.finalShowBubbleMenu = computed(() => this.config().showBubbleMenu ?? this.showBubbleMenu(), ...(ngDevMode ? [{ debugName: "finalShowBubbleMenu" }] : []));
|
|
5774
5762
|
this.finalBubbleMenuConfig = computed(() => {
|
|
5775
5763
|
const fromConfig = this.config().bubbleMenu;
|
|
5776
|
-
const base =
|
|
5764
|
+
const base = ATE_DEFAULT_BUBBLE_MENU_CONFIG;
|
|
5777
5765
|
if (fromConfig)
|
|
5778
5766
|
return { ...base, ...fromConfig };
|
|
5779
5767
|
return Object.keys(this.bubbleMenu()).length === 0 ? base : { ...base, ...this.bubbleMenu() };
|
|
@@ -5781,7 +5769,7 @@ class AngularTiptapEditorComponent {
|
|
|
5781
5769
|
this.finalShowImageBubbleMenu = computed(() => this.config().showImageBubbleMenu ?? this.showImageBubbleMenu(), ...(ngDevMode ? [{ debugName: "finalShowImageBubbleMenu" }] : []));
|
|
5782
5770
|
this.finalImageBubbleMenuConfig = computed(() => {
|
|
5783
5771
|
const fromConfig = this.config().imageBubbleMenu;
|
|
5784
|
-
const base =
|
|
5772
|
+
const base = ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG;
|
|
5785
5773
|
if (fromConfig)
|
|
5786
5774
|
return { ...base, ...fromConfig };
|
|
5787
5775
|
return Object.keys(this.imageBubbleMenu()).length === 0 ? base : { ...base, ...this.imageBubbleMenu() };
|
|
@@ -5789,7 +5777,7 @@ class AngularTiptapEditorComponent {
|
|
|
5789
5777
|
this.finalShowTableBubbleMenu = computed(() => this.config().showTableMenu ?? this.showTableBubbleMenu(), ...(ngDevMode ? [{ debugName: "finalShowTableBubbleMenu" }] : []));
|
|
5790
5778
|
this.finalTableBubbleMenuConfig = computed(() => {
|
|
5791
5779
|
const fromConfig = this.config().tableBubbleMenu;
|
|
5792
|
-
const base =
|
|
5780
|
+
const base = ATE_DEFAULT_TABLE_MENU_CONFIG;
|
|
5793
5781
|
if (fromConfig)
|
|
5794
5782
|
return { ...base, ...fromConfig };
|
|
5795
5783
|
return Object.keys(this.tableBubbleMenu()).length === 0 ? base : { ...base, ...this.tableBubbleMenu() };
|
|
@@ -5797,7 +5785,7 @@ class AngularTiptapEditorComponent {
|
|
|
5797
5785
|
this.finalShowCellBubbleMenu = computed(() => this.config().showCellMenu ?? this.showCellBubbleMenu(), ...(ngDevMode ? [{ debugName: "finalShowCellBubbleMenu" }] : []));
|
|
5798
5786
|
this.finalCellBubbleMenuConfig = computed(() => {
|
|
5799
5787
|
const fromConfig = this.config().cellBubbleMenu;
|
|
5800
|
-
const base =
|
|
5788
|
+
const base = ATE_DEFAULT_CELL_MENU_CONFIG;
|
|
5801
5789
|
if (fromConfig)
|
|
5802
5790
|
return { ...base, ...fromConfig };
|
|
5803
5791
|
return Object.keys(this.cellBubbleMenu()).length === 0 ? base : { ...base, ...this.cellBubbleMenu() };
|
|
@@ -5857,8 +5845,8 @@ class AngularTiptapEditorComponent {
|
|
|
5857
5845
|
this._destroyRef = inject(DestroyRef);
|
|
5858
5846
|
// NgControl for management of FormControls
|
|
5859
5847
|
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
5860
|
-
this.i18nService = inject(
|
|
5861
|
-
this.editorCommandsService = inject(
|
|
5848
|
+
this.i18nService = inject(AteI18nService);
|
|
5849
|
+
this.editorCommandsService = inject(AteEditorCommandsService);
|
|
5862
5850
|
// Access editor state via service
|
|
5863
5851
|
this.editorState = this.editorCommandsService.editorState;
|
|
5864
5852
|
// Effect to update editor content (with anti-echo)
|
|
@@ -5957,38 +5945,38 @@ class AngularTiptapEditorComponent {
|
|
|
5957
5945
|
Link.configure({
|
|
5958
5946
|
openOnClick: false,
|
|
5959
5947
|
HTMLAttributes: {
|
|
5960
|
-
class: "
|
|
5948
|
+
class: "ate-link",
|
|
5961
5949
|
},
|
|
5962
5950
|
}),
|
|
5963
|
-
|
|
5951
|
+
AteLinkClickBehavior,
|
|
5964
5952
|
Highlight.configure({
|
|
5965
5953
|
multicolor: true,
|
|
5966
5954
|
HTMLAttributes: {
|
|
5967
|
-
class: "
|
|
5955
|
+
class: "ate-highlight",
|
|
5968
5956
|
},
|
|
5969
5957
|
}),
|
|
5970
|
-
|
|
5958
|
+
AteResizableImage.configure({
|
|
5971
5959
|
inline: false,
|
|
5972
5960
|
allowBase64: true,
|
|
5973
5961
|
HTMLAttributes: {
|
|
5974
|
-
class: "
|
|
5962
|
+
class: "ate-image",
|
|
5975
5963
|
},
|
|
5976
5964
|
}),
|
|
5977
|
-
|
|
5965
|
+
AteUploadProgress.configure({
|
|
5978
5966
|
isUploading: () => this.editorCommandsService.isUploading(),
|
|
5979
5967
|
uploadProgress: () => this.editorCommandsService.uploadProgress(),
|
|
5980
5968
|
uploadMessage: () => this.editorCommandsService.uploadMessage(),
|
|
5981
5969
|
}),
|
|
5982
|
-
|
|
5983
|
-
|
|
5970
|
+
AteTableExtension,
|
|
5971
|
+
AteTiptapStateExtension.configure({
|
|
5984
5972
|
onUpdate: state => this.editorCommandsService.updateState(state),
|
|
5985
5973
|
calculators: [
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5974
|
+
AteSelectionCalculator,
|
|
5975
|
+
AteMarksCalculator,
|
|
5976
|
+
AteTableCalculator,
|
|
5977
|
+
AteImageCalculator,
|
|
5978
|
+
AteStructureCalculator,
|
|
5979
|
+
AteDiscoveryCalculator,
|
|
5992
5980
|
...this.stateCalculators(),
|
|
5993
5981
|
],
|
|
5994
5982
|
}),
|
|
@@ -6180,7 +6168,7 @@ class AngularTiptapEditorComponent {
|
|
|
6180
6168
|
// Verify if interaction is on the container element and not on the content
|
|
6181
6169
|
const target = event.target;
|
|
6182
6170
|
const editorElement = this.editorElement()?.nativeElement;
|
|
6183
|
-
if (target === editorElement || target.classList.contains("
|
|
6171
|
+
if (target === editorElement || target.classList.contains("ate-content")) {
|
|
6184
6172
|
// Interaction in the empty space, position the cursor at the end
|
|
6185
6173
|
setTimeout(() => {
|
|
6186
6174
|
const { doc } = editor.state;
|
|
@@ -6191,11 +6179,11 @@ class AngularTiptapEditorComponent {
|
|
|
6191
6179
|
}
|
|
6192
6180
|
}
|
|
6193
6181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AngularTiptapEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AngularTiptapEditorComponent, isStandalone: true, selector: "angular-tiptap-editor", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, fillContainer: { classPropertyName: "fillContainer", publicName: "fillContainer", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, showCharacterCount: { classPropertyName: "showCharacterCount", publicName: "showCharacterCount", isSignal: true, isRequired: false, transformFunction: null }, showWordCount: { classPropertyName: "showWordCount", publicName: "showWordCount", isSignal: true, isRequired: false, transformFunction: null }, maxCharacters: { classPropertyName: "maxCharacters", publicName: "maxCharacters", isSignal: true, isRequired: false, transformFunction: null }, enableOfficePaste: { classPropertyName: "enableOfficePaste", publicName: "enableOfficePaste", isSignal: true, isRequired: false, transformFunction: null }, enableSlashCommands: { classPropertyName: "enableSlashCommands", publicName: "enableSlashCommands", isSignal: true, isRequired: false, transformFunction: null }, slashCommands: { classPropertyName: "slashCommands", publicName: "slashCommands", isSignal: true, isRequired: false, transformFunction: null }, customSlashCommands: { classPropertyName: "customSlashCommands", publicName: "customSlashCommands", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, seamless: { classPropertyName: "seamless", publicName: "seamless", isSignal: true, isRequired: false, transformFunction: null }, floatingToolbar: { classPropertyName: "floatingToolbar", publicName: "floatingToolbar", isSignal: true, isRequired: false, transformFunction: null }, showEditToggle: { classPropertyName: "showEditToggle", publicName: "showEditToggle", isSignal: true, isRequired: false, transformFunction: null }, spellcheck: { classPropertyName: "spellcheck", publicName: "spellcheck", isSignal: true, isRequired: false, transformFunction: null }, tiptapExtensions: { classPropertyName: "tiptapExtensions", publicName: "tiptapExtensions", isSignal: true, isRequired: false, transformFunction: null }, tiptapOptions: { classPropertyName: "tiptapOptions", publicName: "tiptapOptions", isSignal: true, isRequired: false, transformFunction: null }, showBubbleMenu: { classPropertyName: "showBubbleMenu", publicName: "showBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, bubbleMenu: { classPropertyName: "bubbleMenu", publicName: "bubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, showImageBubbleMenu: { classPropertyName: "showImageBubbleMenu", publicName: "showImageBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, imageBubbleMenu: { classPropertyName: "imageBubbleMenu", publicName: "imageBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, showTableBubbleMenu: { classPropertyName: "showTableBubbleMenu", publicName: "showTableBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, tableBubbleMenu: { classPropertyName: "tableBubbleMenu", publicName: "tableBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, showCellBubbleMenu: { classPropertyName: "showCellBubbleMenu", publicName: "showCellBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, cellBubbleMenu: { classPropertyName: "cellBubbleMenu", publicName: "cellBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, stateCalculators: { classPropertyName: "stateCalculators", publicName: "stateCalculators", isSignal: true, isRequired: false, transformFunction: null }, imageUpload: { classPropertyName: "imageUpload", publicName: "imageUpload", isSignal: true, isRequired: false, transformFunction: null }, imageUploadHandler: { classPropertyName: "imageUploadHandler", publicName: "imageUploadHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentChange: "contentChange", editorCreated: "editorCreated", editorUpdate: "editorUpdate", editorFocus: "editorFocus", editorBlur: "editorBlur", editableChange: "editableChange" }, host: { properties: { "class.fill-container": "finalFillContainer()", "class.floating-toolbar": "finalFloatingToolbar()", "class.is-readonly": "!finalEditable() && !mergedDisabled()", "class.is-disabled": "mergedDisabled()", "style.--ate-border-width": "finalSeamless() || mergedDisabled() ? '0' : null", "style.--ate-background": "finalSeamless() ? 'transparent' : (mergedDisabled() ? 'var(--ate-surface-tertiary)' : null)", "style.--ate-toolbar-border-color": "finalSeamless() ? 'transparent' : null", "style.--ate-counter-background": "finalSeamless() ? 'transparent' : null", "style.--ate-counter-border-color": "finalSeamless() ? 'transparent' : null", "class.dark": "config().theme === 'dark'", "attr.data-theme": "config().theme" } }, providers: [
|
|
6195
|
-
<div class="
|
|
6182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AngularTiptapEditorComponent, isStandalone: true, selector: "angular-tiptap-editor", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, fillContainer: { classPropertyName: "fillContainer", publicName: "fillContainer", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, showCharacterCount: { classPropertyName: "showCharacterCount", publicName: "showCharacterCount", isSignal: true, isRequired: false, transformFunction: null }, showWordCount: { classPropertyName: "showWordCount", publicName: "showWordCount", isSignal: true, isRequired: false, transformFunction: null }, maxCharacters: { classPropertyName: "maxCharacters", publicName: "maxCharacters", isSignal: true, isRequired: false, transformFunction: null }, enableOfficePaste: { classPropertyName: "enableOfficePaste", publicName: "enableOfficePaste", isSignal: true, isRequired: false, transformFunction: null }, enableSlashCommands: { classPropertyName: "enableSlashCommands", publicName: "enableSlashCommands", isSignal: true, isRequired: false, transformFunction: null }, slashCommands: { classPropertyName: "slashCommands", publicName: "slashCommands", isSignal: true, isRequired: false, transformFunction: null }, customSlashCommands: { classPropertyName: "customSlashCommands", publicName: "customSlashCommands", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, seamless: { classPropertyName: "seamless", publicName: "seamless", isSignal: true, isRequired: false, transformFunction: null }, floatingToolbar: { classPropertyName: "floatingToolbar", publicName: "floatingToolbar", isSignal: true, isRequired: false, transformFunction: null }, showEditToggle: { classPropertyName: "showEditToggle", publicName: "showEditToggle", isSignal: true, isRequired: false, transformFunction: null }, spellcheck: { classPropertyName: "spellcheck", publicName: "spellcheck", isSignal: true, isRequired: false, transformFunction: null }, tiptapExtensions: { classPropertyName: "tiptapExtensions", publicName: "tiptapExtensions", isSignal: true, isRequired: false, transformFunction: null }, tiptapOptions: { classPropertyName: "tiptapOptions", publicName: "tiptapOptions", isSignal: true, isRequired: false, transformFunction: null }, showBubbleMenu: { classPropertyName: "showBubbleMenu", publicName: "showBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, bubbleMenu: { classPropertyName: "bubbleMenu", publicName: "bubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, showImageBubbleMenu: { classPropertyName: "showImageBubbleMenu", publicName: "showImageBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, imageBubbleMenu: { classPropertyName: "imageBubbleMenu", publicName: "imageBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, showTableBubbleMenu: { classPropertyName: "showTableBubbleMenu", publicName: "showTableBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, tableBubbleMenu: { classPropertyName: "tableBubbleMenu", publicName: "tableBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, showCellBubbleMenu: { classPropertyName: "showCellBubbleMenu", publicName: "showCellBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, cellBubbleMenu: { classPropertyName: "cellBubbleMenu", publicName: "cellBubbleMenu", isSignal: true, isRequired: false, transformFunction: null }, stateCalculators: { classPropertyName: "stateCalculators", publicName: "stateCalculators", isSignal: true, isRequired: false, transformFunction: null }, imageUpload: { classPropertyName: "imageUpload", publicName: "imageUpload", isSignal: true, isRequired: false, transformFunction: null }, imageUploadHandler: { classPropertyName: "imageUploadHandler", publicName: "imageUploadHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentChange: "contentChange", editorCreated: "editorCreated", editorUpdate: "editorUpdate", editorFocus: "editorFocus", editorBlur: "editorBlur", editableChange: "editableChange" }, host: { properties: { "class.fill-container": "finalFillContainer()", "class.floating-toolbar": "finalFloatingToolbar()", "class.is-readonly": "!finalEditable() && !mergedDisabled()", "class.is-disabled": "mergedDisabled()", "style.--ate-border-width": "finalSeamless() || mergedDisabled() ? '0' : null", "style.--ate-background": "finalSeamless() ? 'transparent' : (mergedDisabled() ? 'var(--ate-surface-tertiary)' : null)", "style.--ate-toolbar-border-color": "finalSeamless() ? 'transparent' : null", "style.--ate-counter-background": "finalSeamless() ? 'transparent' : null", "style.--ate-counter-border-color": "finalSeamless() ? 'transparent' : null", "class.dark": "config().theme === 'dark'", "attr.data-theme": "config().theme" } }, providers: [AteEditorCommandsService, AteImageService, AteColorPickerService, AteLinkService], viewQueries: [{ propertyName: "editorElement", first: true, predicate: ["editorElement"], descendants: true, isSignal: true }], hostDirectives: [{ directive: AteNoopValueAccessorDirective }], ngImport: i0, template: `
|
|
6183
|
+
<div class="ate-editor">
|
|
6196
6184
|
<!-- Toolbar -->
|
|
6197
6185
|
@if (finalEditable() && !mergedDisabled() && finalShowToolbar() && editor()) {
|
|
6198
|
-
<
|
|
6186
|
+
<ate-toolbar
|
|
6199
6187
|
[editor]="editor()!"
|
|
6200
6188
|
[config]="finalToolbarConfig()"
|
|
6201
6189
|
[imageUpload]="finalImageUploadConfig()"
|
|
@@ -6205,7 +6193,7 @@ class AngularTiptapEditorComponent {
|
|
|
6205
6193
|
}
|
|
6206
6194
|
|
|
6207
6195
|
@if (finalShowEditToggle() && !mergedDisabled()) {
|
|
6208
|
-
<
|
|
6196
|
+
<ate-edit-toggle
|
|
6209
6197
|
[editable]="finalEditable()"
|
|
6210
6198
|
[translations]="currentTranslations()"
|
|
6211
6199
|
(editToggle)="toggleEditMode($event)" />
|
|
@@ -6214,7 +6202,7 @@ class AngularTiptapEditorComponent {
|
|
|
6214
6202
|
<!-- Editor Content -->
|
|
6215
6203
|
<div
|
|
6216
6204
|
#editorElement
|
|
6217
|
-
class="
|
|
6205
|
+
class="ate-content"
|
|
6218
6206
|
[class.drag-over]="isDragOver()"
|
|
6219
6207
|
(dragover)="onDragOver($event)"
|
|
6220
6208
|
(drop)="onDrop($event)"
|
|
@@ -6227,57 +6215,57 @@ class AngularTiptapEditorComponent {
|
|
|
6227
6215
|
|
|
6228
6216
|
<!-- Text Bubble Menu -->
|
|
6229
6217
|
@if (finalEditable() && finalShowBubbleMenu() && editor()) {
|
|
6230
|
-
<
|
|
6218
|
+
<ate-bubble-menu
|
|
6231
6219
|
[editor]="editor()!"
|
|
6232
6220
|
[config]="finalBubbleMenuConfig()"
|
|
6233
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6221
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-bubble-menu>
|
|
6234
6222
|
}
|
|
6235
6223
|
|
|
6236
6224
|
<!-- Image Bubble Menu -->
|
|
6237
6225
|
@if (finalEditable() && finalShowImageBubbleMenu() && editor()) {
|
|
6238
|
-
<
|
|
6226
|
+
<ate-image-bubble-menu
|
|
6239
6227
|
[editor]="editor()!"
|
|
6240
6228
|
[config]="finalImageBubbleMenuConfig()"
|
|
6241
6229
|
[imageUpload]="finalImageUploadConfig()"
|
|
6242
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6230
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-image-bubble-menu>
|
|
6243
6231
|
}
|
|
6244
6232
|
|
|
6245
6233
|
<!-- Link Bubble Menu -->
|
|
6246
6234
|
@if (finalEditable() && editor()) {
|
|
6247
|
-
<
|
|
6235
|
+
<ate-link-bubble-menu
|
|
6248
6236
|
[editor]="editor()!"
|
|
6249
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6237
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-link-bubble-menu>
|
|
6250
6238
|
}
|
|
6251
6239
|
|
|
6252
6240
|
<!-- Color Bubble Menu -->
|
|
6253
6241
|
@if (finalEditable() && editor()) {
|
|
6254
|
-
<
|
|
6242
|
+
<ate-color-bubble-menu
|
|
6255
6243
|
[editor]="editor()!"
|
|
6256
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6244
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-color-bubble-menu>
|
|
6257
6245
|
}
|
|
6258
6246
|
|
|
6259
6247
|
<!-- Slash Commands -->
|
|
6260
6248
|
@if (finalEditable() && finalEnableSlashCommands() && editor()) {
|
|
6261
|
-
<
|
|
6249
|
+
<ate-slash-commands
|
|
6262
6250
|
[editor]="editor()!"
|
|
6263
6251
|
[config]="finalSlashCommandsConfig()"
|
|
6264
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6252
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-slash-commands>
|
|
6265
6253
|
}
|
|
6266
6254
|
|
|
6267
6255
|
<!-- Table Menu -->
|
|
6268
6256
|
@if (finalEditable() && finalShowTableBubbleMenu() && editor()) {
|
|
6269
|
-
<
|
|
6257
|
+
<ate-table-bubble-menu
|
|
6270
6258
|
[editor]="editor()!"
|
|
6271
6259
|
[config]="finalTableBubbleMenuConfig()"
|
|
6272
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6260
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-table-bubble-menu>
|
|
6273
6261
|
}
|
|
6274
6262
|
|
|
6275
6263
|
<!-- Cell Menu -->
|
|
6276
6264
|
@if (finalEditable() && finalShowCellBubbleMenu() && editor()) {
|
|
6277
|
-
<
|
|
6265
|
+
<ate-cell-bubble-menu
|
|
6278
6266
|
[editor]="editor()!"
|
|
6279
6267
|
[config]="finalCellBubbleMenuConfig()"
|
|
6280
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6268
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-cell-bubble-menu>
|
|
6281
6269
|
}
|
|
6282
6270
|
|
|
6283
6271
|
<!-- Counters -->
|
|
@@ -6306,11 +6294,11 @@ class AngularTiptapEditorComponent {
|
|
|
6306
6294
|
</div>
|
|
6307
6295
|
}
|
|
6308
6296
|
</div>
|
|
6309
|
-
`, isInline: true, styles: [":host{--ate-primary: #2563eb;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-surface: #ffffff;--ate-surface-secondary: #f8f9fa;--ate-surface-tertiary: #f1f5f9;--ate-text: #2d3748;--ate-text-secondary: #64748b;--ate-text-muted: #a0aec0;--ate-border: #e2e8f0;--ate-highlight-bg: #fef08a;--ate-highlight-color: #854d0e;--ate-button-hover: #f1f5f9;--ate-button-active: #e2e8f0;--ate-error-color: #c53030;--ate-error-bg: #fed7d7;--ate-error-border: #feb2b2;--ate-border-color: var(--ate-border);--ate-border-width: 2px;--ate-border-radius: 12px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-sub-border-radius: 8px;--ate-text-color: var(--ate-text);--ate-placeholder-color: var(--ate-text-muted);--ate-line-height: 1.6;--ate-content-padding: 16px;--ate-menu-bg: var(--ate-surface);--ate-menu-border-radius: var(--ate-border-radius);--ate-menu-border: var(--ate-border);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 6px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-background: var(--ate-surface-secondary);--ate-toolbar-border-color: var(--ate-border);--ate-toolbar-button-color: var(--ate-text-secondary);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-counter-color: var(--ate-text-secondary);--ate-counter-background: var(--ate-surface-secondary);--ate-counter-border-color: var(--ate-border);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-border);--ate-blockquote-background: var(--ate-surface-secondary);--ate-code-background: var(--ate-surface-secondary);--ate-code-color: var(--ate-code-color);--ate-code-border-color: var(--ate-border);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border);--ate-scrollbar-thumb-hover: var(--ate-text-muted);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border);--ate-table-header-background: var(--ate-surface-secondary);--ate-table-header-color: var(--ate-text);--ate-table-cell-background: var(--ate-surface);--ate-table-cell-selected-background: var(--ate-primary-light);--ate-table-resize-handle-color: var(--ate-primary);--ate-table-row-hover-background: var(--ate-primary-lighter)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.tiptap-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .tiptap-editor{overflow:visible}:host(.fill-container) .tiptap-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .tiptap-content-wrapper{flex:1;min-height:0}:host(.fill-container) .tiptap-content{flex:1;min-height:0;overflow-y:auto}.tiptap-editor:focus-within{border-color:var(--ate-focus-color)}.tiptap-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .tiptap-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .tiptap-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .tiptap-content ::ng-deep .tiptap-link{cursor:pointer;pointer-events:auto}.tiptap-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.tiptap-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.tiptap-content-wrapper .tiptap-content{flex:1}.tiptap-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.tiptap-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.tiptap-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.tiptap-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host ::ng-deep .ProseMirror{padding:var(--ate-content-padding);outline:none;line-height:var(--ate-line-height);color:var(--ate-text-color);min-height:100%;height:100%;word-wrap:break-word;overflow-wrap:break-word}:host ::ng-deep .ProseMirror h1{font-size:2em;font-weight:700;margin-top:0;margin-bottom:.5em}:host ::ng-deep .ProseMirror h2{font-size:1.5em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror h3{font-size:1.25em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror p{margin:.5em 0}:host ::ng-deep .ProseMirror ul,:host ::ng-deep .ProseMirror ol{padding-left:2em;margin:.5em 0}:host ::ng-deep .ProseMirror blockquote{border-left:4px solid var(--ate-blockquote-border-color);margin:1em 0;background:var(--ate-blockquote-background);padding:.5em 1em;border-radius:0 4px 4px 0}:host ::ng-deep .ProseMirror code{background:var(--ate-code-background);color:var(--ate-code-color);border:1px solid var(--ate-code-border-color);padding:.15em .4em;border-radius:4px;font-family:JetBrains Mono,Fira Code,Monaco,Consolas,monospace;font-size:.85em;font-weight:500}:host ::ng-deep .ProseMirror pre{background:var(--ate-code-block-background);color:var(--ate-code-block-color);border:1px solid var(--ate-code-block-border-color);padding:1em;border-radius:var(--ate-border-radius);overflow-x:auto;margin:1em 0}:host ::ng-deep .ProseMirror pre code{background:none;color:inherit;border:none;padding:0}:host ::ng-deep .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--ate-placeholder-color);pointer-events:none;float:left;height:0}:host ::ng-deep .ProseMirror[contenteditable=false]{pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img{cursor:default;pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img:hover{transform:none;box-shadow:0 2px 8px #0000001a}:host ::ng-deep .ProseMirror[contenteditable=false] img.ProseMirror-selectednode{outline:none}:host ::ng-deep .ProseMirror img{position:relative;display:inline-block;max-width:100%;height:auto;cursor:pointer;transition:all .2s ease;border:2px solid transparent;border-radius:var(--ate-image-border-radius)}:host ::ng-deep .ProseMirror img:hover{border-color:var(--ate-border-color);box-shadow:0 2px 4px #0000001a}:host ::ng-deep .ProseMirror img.ProseMirror-selectednode{border-color:var(--ate-image-selected-color);box-shadow:0 0 0 3px var(--ate-primary-light-alpha);transition:all .2s ease}:host ::ng-deep .ProseMirror .tiptap-image{max-width:100%;height:auto;border-radius:var(--ate-image-border-radius);box-shadow:0 4px 20px #00000014;margin:.5em 0;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:block;filter:brightness(1) contrast(1)}:host ::ng-deep .ProseMirror .tiptap-image:hover{box-shadow:0 8px 30px #0000001f;filter:brightness(1.02) contrast(1.02)}:host ::ng-deep .ProseMirror .tiptap-image.ProseMirror-selectednode{outline:2px solid var(--ate-primary);outline-offset:2px;border-radius:var(--ate-image-border-radius);box-shadow:0 0 0 4px var(--ate-primary-light-alpha)}:host ::ng-deep .image-container{margin:.5em 0;text-align:center;border-radius:16px;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .image-container.image-align-left{text-align:left}:host ::ng-deep .image-container.image-align-center{text-align:center}:host ::ng-deep .image-container.image-align-right{text-align:right}:host ::ng-deep .image-container img{display:inline-block;max-width:100%;height:auto;border-radius:16px}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;margin:.5em 0}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000}:host ::ng-deep .resize-handle{position:absolute;width:12px;height:12px;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:50%;pointer-events:all;cursor:pointer;z-index:1001;transition:all .15s ease;box-shadow:0 2px 6px #0003}:host ::ng-deep .resize-handle:hover{background:var(--ate-primary);box-shadow:0 3px 8px #0000004d}:host ::ng-deep .resize-handle:active{background:var(--ate-primary)}:host ::ng-deep .resize-handle-n:hover,:host ::ng-deep .resize-handle-s:hover{transform:translate(-50%) scale(1.2)}:host ::ng-deep .resize-handle-w:hover,:host ::ng-deep .resize-handle-e:hover{transform:translateY(-50%) scale(1.2)}:host ::ng-deep .resize-handle-n:active,:host ::ng-deep .resize-handle-s:active{transform:translate(-50%) scale(.9)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9)}:host ::ng-deep .resize-handle-nw:hover,:host ::ng-deep .resize-handle-ne:hover,:host ::ng-deep .resize-handle-sw:hover,:host ::ng-deep .resize-handle-se:hover{transform:scale(1.2)}:host ::ng-deep .resize-handle-nw:active,:host ::ng-deep .resize-handle-ne:active,:host ::ng-deep .resize-handle-sw:active,:host ::ng-deep .resize-handle-se:active{transform:scale(.9)}:host ::ng-deep .resize-handle-nw{top:0;left:-6px;cursor:nw-resize}:host ::ng-deep .resize-handle-n{top:0;left:50%;transform:translate(-50%);cursor:n-resize}:host ::ng-deep .resize-handle-ne{top:0;right:-6px;cursor:ne-resize}:host ::ng-deep .resize-handle-w{top:50%;left:-6px;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:-6px;transform:translateY(-50%);cursor:e-resize}:host ::ng-deep .resize-handle-sw{bottom:0;left:-6px;cursor:sw-resize}:host ::ng-deep .resize-handle-s{bottom:0;left:50%;transform:translate(-50%);cursor:s-resize}:host ::ng-deep .resize-handle-se{bottom:0;right:-6px;cursor:se-resize}:host ::ng-deep body.resizing{-webkit-user-select:none;user-select:none;cursor:crosshair}:host ::ng-deep body.resizing .ProseMirror{pointer-events:none}:host ::ng-deep body.resizing .ProseMirror .tiptap-image{pointer-events:none}:host ::ng-deep .image-size-info{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);background:#000c;color:#fff;padding:2px 6px;border-radius:3px;font-size:11px;white-space:nowrap;opacity:0;transition:opacity .2s ease}:host ::ng-deep .image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"], dependencies: [{ kind: "component", type: TiptapToolbarComponent, selector: "tiptap-toolbar", inputs: ["editor", "config", "imageUpload", "floating"] }, { kind: "component", type: TiptapBubbleMenuComponent, selector: "tiptap-bubble-menu", inputs: ["config"] }, { kind: "component", type: TiptapImageBubbleMenuComponent, selector: "tiptap-image-bubble-menu", inputs: ["config", "imageUpload"] }, { kind: "component", type: TiptapTableBubbleMenuComponent, selector: "tiptap-table-bubble-menu", inputs: ["config"] }, { kind: "component", type: TiptapCellBubbleMenuComponent, selector: "tiptap-cell-bubble-menu", inputs: ["config"] }, { kind: "component", type: TiptapSlashCommandsComponent, selector: "tiptap-slash-commands", inputs: ["editor", "config"] }, { kind: "component", type: TiptapLinkBubbleMenuComponent, selector: "tiptap-link-bubble-menu", inputs: ["editor"] }, { kind: "component", type: TiptapColorBubbleMenuComponent, selector: "tiptap-color-bubble-menu", inputs: ["editor"] }, { kind: "component", type: TiptapEditToggleComponent, selector: "tiptap-edit-toggle", inputs: ["editable", "translations"], outputs: ["editToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6297
|
+
`, isInline: true, styles: [":host{--ate-primary: #2563eb;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-surface: #ffffff;--ate-surface-secondary: #f8f9fa;--ate-surface-tertiary: #f1f5f9;--ate-text: #2d3748;--ate-text-secondary: #64748b;--ate-text-muted: #a0aec0;--ate-border: #e2e8f0;--ate-highlight-bg: #fef08a;--ate-highlight-color: #854d0e;--ate-button-hover: #f1f5f9;--ate-button-active: #e2e8f0;--ate-error-color: #c53030;--ate-error-bg: #fed7d7;--ate-error-border: #feb2b2;--ate-border-color: var(--ate-border);--ate-border-width: 2px;--ate-border-radius: 12px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-sub-border-radius: 8px;--ate-text-color: var(--ate-text);--ate-placeholder-color: var(--ate-text-muted);--ate-line-height: 1.6;--ate-content-padding: 16px;--ate-menu-bg: var(--ate-surface);--ate-menu-border-radius: var(--ate-border-radius);--ate-menu-border: var(--ate-border);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 6px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-background: var(--ate-surface-secondary);--ate-toolbar-border-color: var(--ate-border);--ate-toolbar-button-color: var(--ate-text-secondary);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-counter-color: var(--ate-text-secondary);--ate-counter-background: var(--ate-surface-secondary);--ate-counter-border-color: var(--ate-border);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-border);--ate-blockquote-background: var(--ate-surface-secondary);--ate-code-background: var(--ate-surface-secondary);--ate-code-color: var(--ate-code-color);--ate-code-border-color: var(--ate-border);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border);--ate-scrollbar-thumb-hover: var(--ate-text-muted);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border);--ate-table-header-background: var(--ate-surface-secondary);--ate-table-header-color: var(--ate-text);--ate-table-cell-background: var(--ate-surface);--ate-table-cell-selected-background: var(--ate-primary-light);--ate-table-resize-handle-color: var(--ate-primary);--ate-table-row-hover-background: var(--ate-primary-lighter)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host ::ng-deep .ProseMirror{padding:var(--ate-content-padding);outline:none;line-height:var(--ate-line-height);color:var(--ate-text-color);min-height:100%;height:100%;word-wrap:break-word;overflow-wrap:break-word}:host ::ng-deep .ProseMirror h1{font-size:2em;font-weight:700;margin-top:0;margin-bottom:.5em}:host ::ng-deep .ProseMirror h2{font-size:1.5em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror h3{font-size:1.25em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror p{margin:.5em 0}:host ::ng-deep .ProseMirror ul,:host ::ng-deep .ProseMirror ol{padding-left:2em;margin:.5em 0}:host ::ng-deep .ProseMirror blockquote{border-left:4px solid var(--ate-blockquote-border-color);margin:1em 0;background:var(--ate-blockquote-background);padding:.5em 1em;border-radius:0 4px 4px 0}:host ::ng-deep .ProseMirror code{background:var(--ate-code-background);color:var(--ate-code-color);border:1px solid var(--ate-code-border-color);padding:.15em .4em;border-radius:4px;font-family:JetBrains Mono,Fira Code,Monaco,Consolas,monospace;font-size:.85em;font-weight:500}:host ::ng-deep .ProseMirror pre{background:var(--ate-code-block-background);color:var(--ate-code-block-color);border:1px solid var(--ate-code-block-border-color);padding:1em;border-radius:var(--ate-border-radius);overflow-x:auto;margin:1em 0}:host ::ng-deep .ProseMirror pre code{background:none;color:inherit;border:none;padding:0}:host ::ng-deep .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--ate-placeholder-color);pointer-events:none;float:left;height:0}:host ::ng-deep .ProseMirror[contenteditable=false]{pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img{cursor:default;pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img:hover{transform:none;box-shadow:0 2px 8px #0000001a}:host ::ng-deep .ProseMirror[contenteditable=false] img.ProseMirror-selectednode{outline:none}:host ::ng-deep .ProseMirror img{position:relative;display:inline-block;max-width:100%;height:auto;cursor:pointer;transition:all .2s ease;border:2px solid transparent;border-radius:var(--ate-image-border-radius)}:host ::ng-deep .ProseMirror img:hover{border-color:var(--ate-border-color);box-shadow:0 2px 4px #0000001a}:host ::ng-deep .ProseMirror img.ProseMirror-selectednode{border-color:var(--ate-image-selected-color);box-shadow:0 0 0 3px var(--ate-primary-light-alpha);transition:all .2s ease}:host ::ng-deep .ProseMirror .tiptap-image{max-width:100%;height:auto;border-radius:var(--ate-image-border-radius);box-shadow:0 4px 20px #00000014;margin:.5em 0;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:block;filter:brightness(1) contrast(1)}:host ::ng-deep .ProseMirror .tiptap-image:hover{box-shadow:0 8px 30px #0000001f;filter:brightness(1.02) contrast(1.02)}:host ::ng-deep .ProseMirror .tiptap-image.ProseMirror-selectednode{outline:2px solid var(--ate-primary);outline-offset:2px;border-radius:var(--ate-image-border-radius);box-shadow:0 0 0 4px var(--ate-primary-light-alpha)}:host ::ng-deep .image-container{margin:.5em 0;text-align:center;border-radius:16px;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .image-container.image-align-left{text-align:left}:host ::ng-deep .image-container.image-align-center{text-align:center}:host ::ng-deep .image-container.image-align-right{text-align:right}:host ::ng-deep .image-container img{display:inline-block;max-width:100%;height:auto;border-radius:16px}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;margin:.5em 0}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000}:host ::ng-deep .resize-handle{position:absolute;width:12px;height:12px;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:50%;pointer-events:all;cursor:pointer;z-index:1001;transition:all .15s ease;box-shadow:0 2px 6px #0003}:host ::ng-deep .resize-handle:hover{background:var(--ate-primary);box-shadow:0 3px 8px #0000004d}:host ::ng-deep .resize-handle:active{background:var(--ate-primary)}:host ::ng-deep .resize-handle-n:hover,:host ::ng-deep .resize-handle-s:hover{transform:translate(-50%) scale(1.2)}:host ::ng-deep .resize-handle-w:hover,:host ::ng-deep .resize-handle-e:hover{transform:translateY(-50%) scale(1.2)}:host ::ng-deep .resize-handle-n:active,:host ::ng-deep .resize-handle-s:active{transform:translate(-50%) scale(.9)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9)}:host ::ng-deep .resize-handle-nw:hover,:host ::ng-deep .resize-handle-ne:hover,:host ::ng-deep .resize-handle-sw:hover,:host ::ng-deep .resize-handle-se:hover{transform:scale(1.2)}:host ::ng-deep .resize-handle-nw:active,:host ::ng-deep .resize-handle-ne:active,:host ::ng-deep .resize-handle-sw:active,:host ::ng-deep .resize-handle-se:active{transform:scale(.9)}:host ::ng-deep .resize-handle-nw{top:0;left:-6px;cursor:nw-resize}:host ::ng-deep .resize-handle-n{top:0;left:50%;transform:translate(-50%);cursor:n-resize}:host ::ng-deep .resize-handle-ne{top:0;right:-6px;cursor:ne-resize}:host ::ng-deep .resize-handle-w{top:50%;left:-6px;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:-6px;transform:translateY(-50%);cursor:e-resize}:host ::ng-deep .resize-handle-sw{bottom:0;left:-6px;cursor:sw-resize}:host ::ng-deep .resize-handle-s{bottom:0;left:50%;transform:translate(-50%);cursor:s-resize}:host ::ng-deep .resize-handle-se{bottom:0;right:-6px;cursor:se-resize}:host ::ng-deep body.resizing{-webkit-user-select:none;user-select:none;cursor:crosshair}:host ::ng-deep body.resizing .ProseMirror{pointer-events:none}:host ::ng-deep body.resizing .ProseMirror .tiptap-image{pointer-events:none}:host ::ng-deep .image-size-info{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);background:#000c;color:#fff;padding:2px 6px;border-radius:3px;font-size:11px;white-space:nowrap;opacity:0;transition:opacity .2s ease}:host ::ng-deep .image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"], dependencies: [{ kind: "component", type: AteToolbarComponent, selector: "ate-toolbar", inputs: ["editor", "config", "imageUpload", "floating"] }, { kind: "component", type: AteBubbleMenuComponent, selector: "ate-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteImageBubbleMenuComponent, selector: "ate-image-bubble-menu", inputs: ["config", "imageUpload"] }, { kind: "component", type: AteTableBubbleMenuComponent, selector: "ate-table-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteCellBubbleMenuComponent, selector: "ate-cell-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteSlashCommandsComponent, selector: "ate-slash-commands", inputs: ["editor", "config"] }, { kind: "component", type: AteLinkBubbleMenuComponent, selector: "ate-link-bubble-menu", inputs: ["editor"] }, { kind: "component", type: AteColorBubbleMenuComponent, selector: "ate-color-bubble-menu", inputs: ["editor"] }, { kind: "component", type: AteEditToggleComponent, selector: "ate-edit-toggle", inputs: ["editable", "translations"], outputs: ["editToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6310
6298
|
}
|
|
6311
6299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AngularTiptapEditorComponent, decorators: [{
|
|
6312
6300
|
type: Component,
|
|
6313
|
-
args: [{ selector: "angular-tiptap-editor", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
6301
|
+
args: [{ selector: "angular-tiptap-editor", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [AteNoopValueAccessorDirective], host: {
|
|
6314
6302
|
"[class.fill-container]": "finalFillContainer()",
|
|
6315
6303
|
"[class.floating-toolbar]": "finalFloatingToolbar()",
|
|
6316
6304
|
"[class.is-readonly]": "!finalEditable() && !mergedDisabled()",
|
|
@@ -6323,20 +6311,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6323
6311
|
"[class.dark]": "config().theme === 'dark'",
|
|
6324
6312
|
"[attr.data-theme]": "config().theme",
|
|
6325
6313
|
}, imports: [
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
], providers: [
|
|
6336
|
-
<div class="
|
|
6314
|
+
AteToolbarComponent,
|
|
6315
|
+
AteBubbleMenuComponent,
|
|
6316
|
+
AteImageBubbleMenuComponent,
|
|
6317
|
+
AteTableBubbleMenuComponent,
|
|
6318
|
+
AteCellBubbleMenuComponent,
|
|
6319
|
+
AteSlashCommandsComponent,
|
|
6320
|
+
AteLinkBubbleMenuComponent,
|
|
6321
|
+
AteColorBubbleMenuComponent,
|
|
6322
|
+
AteEditToggleComponent,
|
|
6323
|
+
], providers: [AteEditorCommandsService, AteImageService, AteColorPickerService, AteLinkService], template: `
|
|
6324
|
+
<div class="ate-editor">
|
|
6337
6325
|
<!-- Toolbar -->
|
|
6338
6326
|
@if (finalEditable() && !mergedDisabled() && finalShowToolbar() && editor()) {
|
|
6339
|
-
<
|
|
6327
|
+
<ate-toolbar
|
|
6340
6328
|
[editor]="editor()!"
|
|
6341
6329
|
[config]="finalToolbarConfig()"
|
|
6342
6330
|
[imageUpload]="finalImageUploadConfig()"
|
|
@@ -6346,7 +6334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6346
6334
|
}
|
|
6347
6335
|
|
|
6348
6336
|
@if (finalShowEditToggle() && !mergedDisabled()) {
|
|
6349
|
-
<
|
|
6337
|
+
<ate-edit-toggle
|
|
6350
6338
|
[editable]="finalEditable()"
|
|
6351
6339
|
[translations]="currentTranslations()"
|
|
6352
6340
|
(editToggle)="toggleEditMode($event)" />
|
|
@@ -6355,7 +6343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6355
6343
|
<!-- Editor Content -->
|
|
6356
6344
|
<div
|
|
6357
6345
|
#editorElement
|
|
6358
|
-
class="
|
|
6346
|
+
class="ate-content"
|
|
6359
6347
|
[class.drag-over]="isDragOver()"
|
|
6360
6348
|
(dragover)="onDragOver($event)"
|
|
6361
6349
|
(drop)="onDrop($event)"
|
|
@@ -6368,57 +6356,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6368
6356
|
|
|
6369
6357
|
<!-- Text Bubble Menu -->
|
|
6370
6358
|
@if (finalEditable() && finalShowBubbleMenu() && editor()) {
|
|
6371
|
-
<
|
|
6359
|
+
<ate-bubble-menu
|
|
6372
6360
|
[editor]="editor()!"
|
|
6373
6361
|
[config]="finalBubbleMenuConfig()"
|
|
6374
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6362
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-bubble-menu>
|
|
6375
6363
|
}
|
|
6376
6364
|
|
|
6377
6365
|
<!-- Image Bubble Menu -->
|
|
6378
6366
|
@if (finalEditable() && finalShowImageBubbleMenu() && editor()) {
|
|
6379
|
-
<
|
|
6367
|
+
<ate-image-bubble-menu
|
|
6380
6368
|
[editor]="editor()!"
|
|
6381
6369
|
[config]="finalImageBubbleMenuConfig()"
|
|
6382
6370
|
[imageUpload]="finalImageUploadConfig()"
|
|
6383
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6371
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-image-bubble-menu>
|
|
6384
6372
|
}
|
|
6385
6373
|
|
|
6386
6374
|
<!-- Link Bubble Menu -->
|
|
6387
6375
|
@if (finalEditable() && editor()) {
|
|
6388
|
-
<
|
|
6376
|
+
<ate-link-bubble-menu
|
|
6389
6377
|
[editor]="editor()!"
|
|
6390
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6378
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-link-bubble-menu>
|
|
6391
6379
|
}
|
|
6392
6380
|
|
|
6393
6381
|
<!-- Color Bubble Menu -->
|
|
6394
6382
|
@if (finalEditable() && editor()) {
|
|
6395
|
-
<
|
|
6383
|
+
<ate-color-bubble-menu
|
|
6396
6384
|
[editor]="editor()!"
|
|
6397
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6385
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-color-bubble-menu>
|
|
6398
6386
|
}
|
|
6399
6387
|
|
|
6400
6388
|
<!-- Slash Commands -->
|
|
6401
6389
|
@if (finalEditable() && finalEnableSlashCommands() && editor()) {
|
|
6402
|
-
<
|
|
6390
|
+
<ate-slash-commands
|
|
6403
6391
|
[editor]="editor()!"
|
|
6404
6392
|
[config]="finalSlashCommandsConfig()"
|
|
6405
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6393
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-slash-commands>
|
|
6406
6394
|
}
|
|
6407
6395
|
|
|
6408
6396
|
<!-- Table Menu -->
|
|
6409
6397
|
@if (finalEditable() && finalShowTableBubbleMenu() && editor()) {
|
|
6410
|
-
<
|
|
6398
|
+
<ate-table-bubble-menu
|
|
6411
6399
|
[editor]="editor()!"
|
|
6412
6400
|
[config]="finalTableBubbleMenuConfig()"
|
|
6413
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6401
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-table-bubble-menu>
|
|
6414
6402
|
}
|
|
6415
6403
|
|
|
6416
6404
|
<!-- Cell Menu -->
|
|
6417
6405
|
@if (finalEditable() && finalShowCellBubbleMenu() && editor()) {
|
|
6418
|
-
<
|
|
6406
|
+
<ate-cell-bubble-menu
|
|
6419
6407
|
[editor]="editor()!"
|
|
6420
6408
|
[config]="finalCellBubbleMenuConfig()"
|
|
6421
|
-
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></
|
|
6409
|
+
[style.display]="editorFullyInitialized() ? 'block' : 'none'"></ate-cell-bubble-menu>
|
|
6422
6410
|
}
|
|
6423
6411
|
|
|
6424
6412
|
<!-- Counters -->
|
|
@@ -6447,17 +6435,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6447
6435
|
</div>
|
|
6448
6436
|
}
|
|
6449
6437
|
</div>
|
|
6450
|
-
`, styles: [":host{--ate-primary: #2563eb;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-surface: #ffffff;--ate-surface-secondary: #f8f9fa;--ate-surface-tertiary: #f1f5f9;--ate-text: #2d3748;--ate-text-secondary: #64748b;--ate-text-muted: #a0aec0;--ate-border: #e2e8f0;--ate-highlight-bg: #fef08a;--ate-highlight-color: #854d0e;--ate-button-hover: #f1f5f9;--ate-button-active: #e2e8f0;--ate-error-color: #c53030;--ate-error-bg: #fed7d7;--ate-error-border: #feb2b2;--ate-border-color: var(--ate-border);--ate-border-width: 2px;--ate-border-radius: 12px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-sub-border-radius: 8px;--ate-text-color: var(--ate-text);--ate-placeholder-color: var(--ate-text-muted);--ate-line-height: 1.6;--ate-content-padding: 16px;--ate-menu-bg: var(--ate-surface);--ate-menu-border-radius: var(--ate-border-radius);--ate-menu-border: var(--ate-border);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 6px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-background: var(--ate-surface-secondary);--ate-toolbar-border-color: var(--ate-border);--ate-toolbar-button-color: var(--ate-text-secondary);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-counter-color: var(--ate-text-secondary);--ate-counter-background: var(--ate-surface-secondary);--ate-counter-border-color: var(--ate-border);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-border);--ate-blockquote-background: var(--ate-surface-secondary);--ate-code-background: var(--ate-surface-secondary);--ate-code-color: var(--ate-code-color);--ate-code-border-color: var(--ate-border);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border);--ate-scrollbar-thumb-hover: var(--ate-text-muted);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border);--ate-table-header-background: var(--ate-surface-secondary);--ate-table-header-color: var(--ate-text);--ate-table-cell-background: var(--ate-surface);--ate-table-cell-selected-background: var(--ate-primary-light);--ate-table-resize-handle-color: var(--ate-primary);--ate-table-row-hover-background: var(--ate-primary-lighter)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.tiptap-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .tiptap-editor{overflow:visible}:host(.fill-container) .tiptap-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .tiptap-content-wrapper{flex:1;min-height:0}:host(.fill-container) .tiptap-content{flex:1;min-height:0;overflow-y:auto}.tiptap-editor:focus-within{border-color:var(--ate-focus-color)}.tiptap-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .tiptap-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .tiptap-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .tiptap-content ::ng-deep .tiptap-link{cursor:pointer;pointer-events:auto}.tiptap-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.tiptap-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.tiptap-content-wrapper .tiptap-content{flex:1}.tiptap-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.tiptap-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.tiptap-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.tiptap-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host ::ng-deep .ProseMirror{padding:var(--ate-content-padding);outline:none;line-height:var(--ate-line-height);color:var(--ate-text-color);min-height:100%;height:100%;word-wrap:break-word;overflow-wrap:break-word}:host ::ng-deep .ProseMirror h1{font-size:2em;font-weight:700;margin-top:0;margin-bottom:.5em}:host ::ng-deep .ProseMirror h2{font-size:1.5em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror h3{font-size:1.25em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror p{margin:.5em 0}:host ::ng-deep .ProseMirror ul,:host ::ng-deep .ProseMirror ol{padding-left:2em;margin:.5em 0}:host ::ng-deep .ProseMirror blockquote{border-left:4px solid var(--ate-blockquote-border-color);margin:1em 0;background:var(--ate-blockquote-background);padding:.5em 1em;border-radius:0 4px 4px 0}:host ::ng-deep .ProseMirror code{background:var(--ate-code-background);color:var(--ate-code-color);border:1px solid var(--ate-code-border-color);padding:.15em .4em;border-radius:4px;font-family:JetBrains Mono,Fira Code,Monaco,Consolas,monospace;font-size:.85em;font-weight:500}:host ::ng-deep .ProseMirror pre{background:var(--ate-code-block-background);color:var(--ate-code-block-color);border:1px solid var(--ate-code-block-border-color);padding:1em;border-radius:var(--ate-border-radius);overflow-x:auto;margin:1em 0}:host ::ng-deep .ProseMirror pre code{background:none;color:inherit;border:none;padding:0}:host ::ng-deep .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--ate-placeholder-color);pointer-events:none;float:left;height:0}:host ::ng-deep .ProseMirror[contenteditable=false]{pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img{cursor:default;pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img:hover{transform:none;box-shadow:0 2px 8px #0000001a}:host ::ng-deep .ProseMirror[contenteditable=false] img.ProseMirror-selectednode{outline:none}:host ::ng-deep .ProseMirror img{position:relative;display:inline-block;max-width:100%;height:auto;cursor:pointer;transition:all .2s ease;border:2px solid transparent;border-radius:var(--ate-image-border-radius)}:host ::ng-deep .ProseMirror img:hover{border-color:var(--ate-border-color);box-shadow:0 2px 4px #0000001a}:host ::ng-deep .ProseMirror img.ProseMirror-selectednode{border-color:var(--ate-image-selected-color);box-shadow:0 0 0 3px var(--ate-primary-light-alpha);transition:all .2s ease}:host ::ng-deep .ProseMirror .tiptap-image{max-width:100%;height:auto;border-radius:var(--ate-image-border-radius);box-shadow:0 4px 20px #00000014;margin:.5em 0;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:block;filter:brightness(1) contrast(1)}:host ::ng-deep .ProseMirror .tiptap-image:hover{box-shadow:0 8px 30px #0000001f;filter:brightness(1.02) contrast(1.02)}:host ::ng-deep .ProseMirror .tiptap-image.ProseMirror-selectednode{outline:2px solid var(--ate-primary);outline-offset:2px;border-radius:var(--ate-image-border-radius);box-shadow:0 0 0 4px var(--ate-primary-light-alpha)}:host ::ng-deep .image-container{margin:.5em 0;text-align:center;border-radius:16px;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .image-container.image-align-left{text-align:left}:host ::ng-deep .image-container.image-align-center{text-align:center}:host ::ng-deep .image-container.image-align-right{text-align:right}:host ::ng-deep .image-container img{display:inline-block;max-width:100%;height:auto;border-radius:16px}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;margin:.5em 0}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000}:host ::ng-deep .resize-handle{position:absolute;width:12px;height:12px;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:50%;pointer-events:all;cursor:pointer;z-index:1001;transition:all .15s ease;box-shadow:0 2px 6px #0003}:host ::ng-deep .resize-handle:hover{background:var(--ate-primary);box-shadow:0 3px 8px #0000004d}:host ::ng-deep .resize-handle:active{background:var(--ate-primary)}:host ::ng-deep .resize-handle-n:hover,:host ::ng-deep .resize-handle-s:hover{transform:translate(-50%) scale(1.2)}:host ::ng-deep .resize-handle-w:hover,:host ::ng-deep .resize-handle-e:hover{transform:translateY(-50%) scale(1.2)}:host ::ng-deep .resize-handle-n:active,:host ::ng-deep .resize-handle-s:active{transform:translate(-50%) scale(.9)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9)}:host ::ng-deep .resize-handle-nw:hover,:host ::ng-deep .resize-handle-ne:hover,:host ::ng-deep .resize-handle-sw:hover,:host ::ng-deep .resize-handle-se:hover{transform:scale(1.2)}:host ::ng-deep .resize-handle-nw:active,:host ::ng-deep .resize-handle-ne:active,:host ::ng-deep .resize-handle-sw:active,:host ::ng-deep .resize-handle-se:active{transform:scale(.9)}:host ::ng-deep .resize-handle-nw{top:0;left:-6px;cursor:nw-resize}:host ::ng-deep .resize-handle-n{top:0;left:50%;transform:translate(-50%);cursor:n-resize}:host ::ng-deep .resize-handle-ne{top:0;right:-6px;cursor:ne-resize}:host ::ng-deep .resize-handle-w{top:50%;left:-6px;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:-6px;transform:translateY(-50%);cursor:e-resize}:host ::ng-deep .resize-handle-sw{bottom:0;left:-6px;cursor:sw-resize}:host ::ng-deep .resize-handle-s{bottom:0;left:50%;transform:translate(-50%);cursor:s-resize}:host ::ng-deep .resize-handle-se{bottom:0;right:-6px;cursor:se-resize}:host ::ng-deep body.resizing{-webkit-user-select:none;user-select:none;cursor:crosshair}:host ::ng-deep body.resizing .ProseMirror{pointer-events:none}:host ::ng-deep body.resizing .ProseMirror .tiptap-image{pointer-events:none}:host ::ng-deep .image-size-info{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);background:#000c;color:#fff;padding:2px 6px;border-radius:3px;font-size:11px;white-space:nowrap;opacity:0;transition:opacity .2s ease}:host ::ng-deep .image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"] }]
|
|
6438
|
+
`, styles: [":host{--ate-primary: #2563eb;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-surface: #ffffff;--ate-surface-secondary: #f8f9fa;--ate-surface-tertiary: #f1f5f9;--ate-text: #2d3748;--ate-text-secondary: #64748b;--ate-text-muted: #a0aec0;--ate-border: #e2e8f0;--ate-highlight-bg: #fef08a;--ate-highlight-color: #854d0e;--ate-button-hover: #f1f5f9;--ate-button-active: #e2e8f0;--ate-error-color: #c53030;--ate-error-bg: #fed7d7;--ate-error-border: #feb2b2;--ate-border-color: var(--ate-border);--ate-border-width: 2px;--ate-border-radius: 12px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-sub-border-radius: 8px;--ate-text-color: var(--ate-text);--ate-placeholder-color: var(--ate-text-muted);--ate-line-height: 1.6;--ate-content-padding: 16px;--ate-menu-bg: var(--ate-surface);--ate-menu-border-radius: var(--ate-border-radius);--ate-menu-border: var(--ate-border);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 6px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-background: var(--ate-surface-secondary);--ate-toolbar-border-color: var(--ate-border);--ate-toolbar-button-color: var(--ate-text-secondary);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-counter-color: var(--ate-text-secondary);--ate-counter-background: var(--ate-surface-secondary);--ate-counter-border-color: var(--ate-border);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-border);--ate-blockquote-background: var(--ate-surface-secondary);--ate-code-background: var(--ate-surface-secondary);--ate-code-color: var(--ate-code-color);--ate-code-border-color: var(--ate-border);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border);--ate-scrollbar-thumb-hover: var(--ate-text-muted);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border);--ate-table-header-background: var(--ate-surface-secondary);--ate-table-header-color: var(--ate-text);--ate-table-cell-background: var(--ate-surface);--ate-table-cell-selected-background: var(--ate-primary-light);--ate-table-resize-handle-color: var(--ate-primary);--ate-table-row-hover-background: var(--ate-primary-lighter)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host ::ng-deep .ProseMirror{padding:var(--ate-content-padding);outline:none;line-height:var(--ate-line-height);color:var(--ate-text-color);min-height:100%;height:100%;word-wrap:break-word;overflow-wrap:break-word}:host ::ng-deep .ProseMirror h1{font-size:2em;font-weight:700;margin-top:0;margin-bottom:.5em}:host ::ng-deep .ProseMirror h2{font-size:1.5em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror h3{font-size:1.25em;font-weight:700;margin-top:1em;margin-bottom:.5em}:host ::ng-deep .ProseMirror p{margin:.5em 0}:host ::ng-deep .ProseMirror ul,:host ::ng-deep .ProseMirror ol{padding-left:2em;margin:.5em 0}:host ::ng-deep .ProseMirror blockquote{border-left:4px solid var(--ate-blockquote-border-color);margin:1em 0;background:var(--ate-blockquote-background);padding:.5em 1em;border-radius:0 4px 4px 0}:host ::ng-deep .ProseMirror code{background:var(--ate-code-background);color:var(--ate-code-color);border:1px solid var(--ate-code-border-color);padding:.15em .4em;border-radius:4px;font-family:JetBrains Mono,Fira Code,Monaco,Consolas,monospace;font-size:.85em;font-weight:500}:host ::ng-deep .ProseMirror pre{background:var(--ate-code-block-background);color:var(--ate-code-block-color);border:1px solid var(--ate-code-block-border-color);padding:1em;border-radius:var(--ate-border-radius);overflow-x:auto;margin:1em 0}:host ::ng-deep .ProseMirror pre code{background:none;color:inherit;border:none;padding:0}:host ::ng-deep .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--ate-placeholder-color);pointer-events:none;float:left;height:0}:host ::ng-deep .ProseMirror[contenteditable=false]{pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img{cursor:default;pointer-events:none}:host ::ng-deep .ProseMirror[contenteditable=false] img:hover{transform:none;box-shadow:0 2px 8px #0000001a}:host ::ng-deep .ProseMirror[contenteditable=false] img.ProseMirror-selectednode{outline:none}:host ::ng-deep .ProseMirror img{position:relative;display:inline-block;max-width:100%;height:auto;cursor:pointer;transition:all .2s ease;border:2px solid transparent;border-radius:var(--ate-image-border-radius)}:host ::ng-deep .ProseMirror img:hover{border-color:var(--ate-border-color);box-shadow:0 2px 4px #0000001a}:host ::ng-deep .ProseMirror img.ProseMirror-selectednode{border-color:var(--ate-image-selected-color);box-shadow:0 0 0 3px var(--ate-primary-light-alpha);transition:all .2s ease}:host ::ng-deep .ProseMirror .tiptap-image{max-width:100%;height:auto;border-radius:var(--ate-image-border-radius);box-shadow:0 4px 20px #00000014;margin:.5em 0;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:block;filter:brightness(1) contrast(1)}:host ::ng-deep .ProseMirror .tiptap-image:hover{box-shadow:0 8px 30px #0000001f;filter:brightness(1.02) contrast(1.02)}:host ::ng-deep .ProseMirror .tiptap-image.ProseMirror-selectednode{outline:2px solid var(--ate-primary);outline-offset:2px;border-radius:var(--ate-image-border-radius);box-shadow:0 0 0 4px var(--ate-primary-light-alpha)}:host ::ng-deep .image-container{margin:.5em 0;text-align:center;border-radius:16px;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}:host ::ng-deep .image-container.image-align-left{text-align:left}:host ::ng-deep .image-container.image-align-center{text-align:center}:host ::ng-deep .image-container.image-align-right{text-align:right}:host ::ng-deep .image-container img{display:inline-block;max-width:100%;height:auto;border-radius:16px}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;margin:.5em 0}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000}:host ::ng-deep .resize-handle{position:absolute;width:12px;height:12px;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:50%;pointer-events:all;cursor:pointer;z-index:1001;transition:all .15s ease;box-shadow:0 2px 6px #0003}:host ::ng-deep .resize-handle:hover{background:var(--ate-primary);box-shadow:0 3px 8px #0000004d}:host ::ng-deep .resize-handle:active{background:var(--ate-primary)}:host ::ng-deep .resize-handle-n:hover,:host ::ng-deep .resize-handle-s:hover{transform:translate(-50%) scale(1.2)}:host ::ng-deep .resize-handle-w:hover,:host ::ng-deep .resize-handle-e:hover{transform:translateY(-50%) scale(1.2)}:host ::ng-deep .resize-handle-n:active,:host ::ng-deep .resize-handle-s:active{transform:translate(-50%) scale(.9)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9)}:host ::ng-deep .resize-handle-nw:hover,:host ::ng-deep .resize-handle-ne:hover,:host ::ng-deep .resize-handle-sw:hover,:host ::ng-deep .resize-handle-se:hover{transform:scale(1.2)}:host ::ng-deep .resize-handle-nw:active,:host ::ng-deep .resize-handle-ne:active,:host ::ng-deep .resize-handle-sw:active,:host ::ng-deep .resize-handle-se:active{transform:scale(.9)}:host ::ng-deep .resize-handle-nw{top:0;left:-6px;cursor:nw-resize}:host ::ng-deep .resize-handle-n{top:0;left:50%;transform:translate(-50%);cursor:n-resize}:host ::ng-deep .resize-handle-ne{top:0;right:-6px;cursor:ne-resize}:host ::ng-deep .resize-handle-w{top:50%;left:-6px;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:-6px;transform:translateY(-50%);cursor:e-resize}:host ::ng-deep .resize-handle-sw{bottom:0;left:-6px;cursor:sw-resize}:host ::ng-deep .resize-handle-s{bottom:0;left:50%;transform:translate(-50%);cursor:s-resize}:host ::ng-deep .resize-handle-se{bottom:0;right:-6px;cursor:se-resize}:host ::ng-deep body.resizing{-webkit-user-select:none;user-select:none;cursor:crosshair}:host ::ng-deep body.resizing .ProseMirror{pointer-events:none}:host ::ng-deep body.resizing .ProseMirror .tiptap-image{pointer-events:none}:host ::ng-deep .image-size-info{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);background:#000c;color:#fff;padding:2px 6px;border-radius:3px;font-size:11px;white-space:nowrap;opacity:0;transition:opacity .2s ease}:host ::ng-deep .image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"] }]
|
|
6451
6439
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], fillContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "fillContainer", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], showCharacterCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCharacterCount", required: false }] }], showWordCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWordCount", required: false }] }], maxCharacters: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCharacters", required: false }] }], enableOfficePaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableOfficePaste", required: false }] }], enableSlashCommands: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSlashCommands", required: false }] }], slashCommands: [{ type: i0.Input, args: [{ isSignal: true, alias: "slashCommands", required: false }] }], customSlashCommands: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSlashCommands", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], seamless: [{ type: i0.Input, args: [{ isSignal: true, alias: "seamless", required: false }] }], floatingToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingToolbar", required: false }] }], showEditToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditToggle", required: false }] }], spellcheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "spellcheck", required: false }] }], tiptapExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tiptapExtensions", required: false }] }], tiptapOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tiptapOptions", required: false }] }], showBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBubbleMenu", required: false }] }], bubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "bubbleMenu", required: false }] }], showImageBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showImageBubbleMenu", required: false }] }], imageBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageBubbleMenu", required: false }] }], toolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbar", required: false }] }], showTableBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTableBubbleMenu", required: false }] }], tableBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableBubbleMenu", required: false }] }], showCellBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCellBubbleMenu", required: false }] }], cellBubbleMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellBubbleMenu", required: false }] }], stateCalculators: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateCalculators", required: false }] }], imageUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUpload", required: false }] }], imageUploadHandler: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUploadHandler", required: false }] }], contentChange: [{ type: i0.Output, args: ["contentChange"] }], editorCreated: [{ type: i0.Output, args: ["editorCreated"] }], editorUpdate: [{ type: i0.Output, args: ["editorUpdate"] }], editorFocus: [{ type: i0.Output, args: ["editorFocus"] }], editorBlur: [{ type: i0.Output, args: ["editorBlur"] }], editableChange: [{ type: i0.Output, args: ["editableChange"] }], editorElement: [{ type: i0.ViewChild, args: ["editorElement", { isSignal: true }] }] } });
|
|
6452
6440
|
|
|
6453
6441
|
/*
|
|
6454
6442
|
* Public API Surface of tiptap-editor
|
|
6455
6443
|
*/
|
|
6456
6444
|
// Main component
|
|
6445
|
+
/** @deprecated Renamed to `ATE_INITIAL_EDITOR_STATE`. This alias will be removed in v3.0.0. */
|
|
6446
|
+
const INITIAL_EDITOR_STATE = ATE_INITIAL_EDITOR_STATE;
|
|
6447
|
+
/** @deprecated Renamed to `ATE_SLASH_COMMAND_KEYS`. This alias will be removed in v3.0.0. */
|
|
6448
|
+
const SLASH_COMMAND_KEYS = ATE_SLASH_COMMAND_KEYS;
|
|
6449
|
+
/** @deprecated Renamed to `ATE_DEFAULT_SLASH_COMMANDS_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6450
|
+
const DEFAULT_SLASH_COMMANDS_CONFIG = ATE_DEFAULT_SLASH_COMMANDS_CONFIG;
|
|
6451
|
+
/** @deprecated Renamed to `AteDiscoveryCalculator`. This alias will be removed in v3.0.0. */
|
|
6452
|
+
const DiscoveryCalculator = AteDiscoveryCalculator;
|
|
6453
|
+
/** @deprecated Renamed to `AteImageCalculator`. This alias will be removed in v3.0.0. */
|
|
6454
|
+
const ImageCalculator = AteImageCalculator;
|
|
6455
|
+
/** @deprecated Renamed to `AteMarksCalculator`. This alias will be removed in v3.0.0. */
|
|
6456
|
+
const MarksCalculator = AteMarksCalculator;
|
|
6457
|
+
/** @deprecated Renamed to `AteSelectionCalculator`. This alias will be removed in v3.0.0. */
|
|
6458
|
+
const SelectionCalculator = AteSelectionCalculator;
|
|
6459
|
+
/** @deprecated Renamed to `AteStructureCalculator`. This alias will be removed in v3.0.0. */
|
|
6460
|
+
const StructureCalculator = AteStructureCalculator;
|
|
6461
|
+
/** @deprecated Renamed to `AteTableCalculator`. This alias will be removed in v3.0.0. */
|
|
6462
|
+
const TableCalculator = AteTableCalculator;
|
|
6463
|
+
/** @deprecated Renamed to `ATE_DEFAULT_TOOLBAR_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6464
|
+
const DEFAULT_TOOLBAR_CONFIG = ATE_DEFAULT_TOOLBAR_CONFIG;
|
|
6465
|
+
/** @deprecated Renamed to `ATE_DEFAULT_BUBBLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6466
|
+
const DEFAULT_BUBBLE_MENU_CONFIG = ATE_DEFAULT_BUBBLE_MENU_CONFIG;
|
|
6467
|
+
/** @deprecated Renamed to `ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6468
|
+
const DEFAULT_IMAGE_BUBBLE_MENU_CONFIG = ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG;
|
|
6469
|
+
/** @deprecated Renamed to `ATE_DEFAULT_TABLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6470
|
+
const DEFAULT_TABLE_MENU_CONFIG = ATE_DEFAULT_TABLE_MENU_CONFIG;
|
|
6471
|
+
/** @deprecated Renamed to `ATE_DEFAULT_CELL_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
6472
|
+
const DEFAULT_CELL_MENU_CONFIG = ATE_DEFAULT_CELL_MENU_CONFIG;
|
|
6457
6473
|
|
|
6458
6474
|
/**
|
|
6459
6475
|
* Generated bundle index. Do not edit.
|
|
6460
6476
|
*/
|
|
6461
6477
|
|
|
6462
|
-
export { AngularTiptapEditorComponent, ColorPickerService, DEFAULT_BUBBLE_MENU_CONFIG, DEFAULT_CELL_MENU_CONFIG, DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, DEFAULT_SLASH_COMMANDS_CONFIG, DEFAULT_TABLE_MENU_CONFIG, DEFAULT_TOOLBAR_CONFIG, DiscoveryCalculator, EditorCommandsService, INITIAL_EDITOR_STATE, ImageCalculator, ImageService, LinkService, MarksCalculator,
|
|
6478
|
+
export { ATE_DEFAULT_BUBBLE_MENU_CONFIG, ATE_DEFAULT_CELL_MENU_CONFIG, ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, ATE_DEFAULT_SLASH_COMMANDS_CONFIG, ATE_DEFAULT_TABLE_MENU_CONFIG, ATE_DEFAULT_TOOLBAR_CONFIG, ATE_INITIAL_EDITOR_STATE, ATE_SLASH_COMMAND_KEYS, AngularTiptapEditorComponent, AteColorPickerService, AteDiscoveryCalculator, AteEditorCommandsService, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, AteColorPickerService as ColorPickerService, DEFAULT_BUBBLE_MENU_CONFIG, DEFAULT_CELL_MENU_CONFIG, DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, DEFAULT_SLASH_COMMANDS_CONFIG, DEFAULT_TABLE_MENU_CONFIG, DEFAULT_TOOLBAR_CONFIG, DiscoveryCalculator, AteEditorCommandsService as EditorCommandsService, INITIAL_EDITOR_STATE, ImageCalculator, AteImageService as ImageService, AteLinkService as LinkService, MarksCalculator, SLASH_COMMAND_KEYS, SelectionCalculator, StructureCalculator, TableCalculator, AteI18nService as TiptapI18nService, createDefaultSlashCommands, filterSlashCommands };
|
|
6463
6479
|
//# sourceMappingURL=flogeez-angular-tiptap-editor.mjs.map
|