@flogeez/angular-tiptap-editor 2.0.1 → 2.0.3

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.
@@ -25,7 +25,6 @@ import { CommonModule } from '@angular/common';
25
25
  import tippy, { sticky } from 'tippy.js';
26
26
  import * as i1 from '@angular/forms';
27
27
  import { FormsModule, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
28
- import { Plugin as Plugin$1, PluginKey as PluginKey$1 } from 'prosemirror-state';
29
28
  import { CellSelection } from '@tiptap/pm/tables';
30
29
 
31
30
  const ResizableImage = Node$1.create({
@@ -330,104 +329,104 @@ const UploadProgress = Extension.create({
330
329
  // Créer un élément de progression
331
330
  const uploadElement = document.createElement("div");
332
331
  uploadElement.className = "upload-progress-widget";
333
- uploadElement.innerHTML = `
334
- <div class="upload-skeleton">
335
- <div class="upload-content">
336
- <div class="upload-icon">
337
- <span class="material-symbols-outlined spinning">image</span>
338
- </div>
339
- <div class="upload-info">
340
- <div class="upload-message">${uploadMessage}</div>
341
- <div class="progress-bar">
342
- <div class="progress-fill" style="width: ${uploadProgress}%"></div>
343
- </div>
344
- <div class="progress-text">${uploadProgress}%</div>
345
- </div>
346
- </div>
347
- </div>
332
+ uploadElement.innerHTML = `
333
+ <div class="upload-skeleton">
334
+ <div class="upload-content">
335
+ <div class="upload-icon">
336
+ <span class="material-symbols-outlined spinning">image</span>
337
+ </div>
338
+ <div class="upload-info">
339
+ <div class="upload-message">${uploadMessage}</div>
340
+ <div class="progress-bar">
341
+ <div class="progress-fill" style="width: ${uploadProgress}%"></div>
342
+ </div>
343
+ <div class="progress-text">${uploadProgress}%</div>
344
+ </div>
345
+ </div>
346
+ </div>
348
347
  `;
349
348
  // Ajouter les styles si pas déjà fait
350
349
  if (!document.querySelector("#upload-progress-styles")) {
351
350
  const style = document.createElement("style");
352
351
  style.id = "upload-progress-styles";
353
- style.textContent = `
354
- .upload-progress-widget {
355
- display: block;
356
- margin: 8px 0;
357
- max-width: 400px;
358
- }
359
- .upload-skeleton {
360
- background: var(--ate-surface-secondary);
361
- border: 2px dashed var(--ate-border-color);
362
- border-radius: var(--ate-border-radius);
363
- padding: 16px;
364
- display: flex;
365
- align-items: center;
366
- justify-content: center;
367
- min-height: 120px;
368
- animation: pulse 2s infinite;
369
- }
370
- @keyframes pulse {
371
- 0%, 100% { background-color: var(--ate-surface-secondary); }
372
- 50% { background-color: var(--ate-surface-tertiary); }
373
- }
374
- .upload-content {
375
- display: flex;
376
- flex-direction: column;
377
- align-items: center;
378
- gap: 12px;
379
- text-align: center;
380
- }
381
- .upload-icon {
382
- display: flex;
383
- align-items: center;
384
- justify-content: center;
385
- width: 48px;
386
- height: 48px;
387
- background: var(--ate-primary-light);
388
- border-radius: 50%;
389
- color: var(--ate-primary);
390
- }
391
- .upload-icon .material-symbols-outlined {
392
- font-size: 24px;
393
- }
394
- .spinning {
395
- animation: spin 1s linear infinite;
396
- }
397
- @keyframes spin {
398
- from { transform: rotate(0deg); }
399
- to { transform: rotate(360deg); }
400
- }
401
- .upload-info {
402
- display: flex;
403
- flex-direction: column;
404
- gap: 8px;
405
- width: 100%;
406
- max-width: 200px;
407
- }
408
- .upload-message {
409
- font-size: 14px;
410
- color: var(--ate-text);
411
- font-weight: 500;
412
- }
413
- .progress-bar {
414
- width: 100%;
415
- height: 6px;
416
- background: var(--ate-border-color);
417
- border-radius: 3px;
418
- overflow: hidden;
419
- }
420
- .progress-fill {
421
- height: 100%;
422
- background: var(--ate-primary);
423
- border-radius: 3px;
424
- transition: width 0.3s ease;
425
- }
426
- .progress-text {
427
- font-size: 12px;
428
- color: var(--ate-text-secondary);
429
- font-weight: 500;
430
- }
352
+ style.textContent = `
353
+ .upload-progress-widget {
354
+ display: block;
355
+ margin: 8px 0;
356
+ max-width: 400px;
357
+ }
358
+ .upload-skeleton {
359
+ background: var(--ate-surface-secondary);
360
+ border: 2px dashed var(--ate-border-color);
361
+ border-radius: var(--ate-border-radius);
362
+ padding: 16px;
363
+ display: flex;
364
+ align-items: center;
365
+ justify-content: center;
366
+ min-height: 120px;
367
+ animation: pulse 2s infinite;
368
+ }
369
+ @keyframes pulse {
370
+ 0%, 100% { background-color: var(--ate-surface-secondary); }
371
+ 50% { background-color: var(--ate-surface-tertiary); }
372
+ }
373
+ .upload-content {
374
+ display: flex;
375
+ flex-direction: column;
376
+ align-items: center;
377
+ gap: 12px;
378
+ text-align: center;
379
+ }
380
+ .upload-icon {
381
+ display: flex;
382
+ align-items: center;
383
+ justify-content: center;
384
+ width: 48px;
385
+ height: 48px;
386
+ background: var(--ate-primary-light);
387
+ border-radius: 50%;
388
+ color: var(--ate-primary);
389
+ }
390
+ .upload-icon .material-symbols-outlined {
391
+ font-size: 24px;
392
+ }
393
+ .spinning {
394
+ animation: spin 1s linear infinite;
395
+ }
396
+ @keyframes spin {
397
+ from { transform: rotate(0deg); }
398
+ to { transform: rotate(360deg); }
399
+ }
400
+ .upload-info {
401
+ display: flex;
402
+ flex-direction: column;
403
+ gap: 8px;
404
+ width: 100%;
405
+ max-width: 200px;
406
+ }
407
+ .upload-message {
408
+ font-size: 14px;
409
+ color: var(--ate-text);
410
+ font-weight: 500;
411
+ }
412
+ .progress-bar {
413
+ width: 100%;
414
+ height: 6px;
415
+ background: var(--ate-border-color);
416
+ border-radius: 3px;
417
+ overflow: hidden;
418
+ }
419
+ .progress-fill {
420
+ height: 100%;
421
+ background: var(--ate-primary);
422
+ border-radius: 3px;
423
+ transition: width 0.3s ease;
424
+ }
425
+ .progress-text {
426
+ font-size: 12px;
427
+ color: var(--ate-text-secondary);
428
+ font-weight: 500;
429
+ }
431
430
  `;
432
431
  document.head.appendChild(style);
433
432
  }
@@ -451,21 +450,21 @@ const UploadProgress = Extension.create({
451
450
  // Mettre à jour le contenu de l'élément existant
452
451
  const existingElement = document.querySelector(".upload-progress-widget");
453
452
  if (existingElement) {
454
- existingElement.innerHTML = `
455
- <div class="upload-skeleton">
456
- <div class="upload-content">
457
- <div class="upload-icon">
458
- <span class="material-symbols-outlined spinning">image</span>
459
- </div>
460
- <div class="upload-info">
461
- <div class="upload-message">${uploadMessage}</div>
462
- <div class="progress-bar">
463
- <div class="progress-fill" style="width: ${uploadProgress}%"></div>
464
- </div>
465
- <div class="progress-text">${uploadProgress}%</div>
466
- </div>
467
- </div>
468
- </div>
453
+ existingElement.innerHTML = `
454
+ <div class="upload-skeleton">
455
+ <div class="upload-content">
456
+ <div class="upload-icon">
457
+ <span class="material-symbols-outlined spinning">image</span>
458
+ </div>
459
+ <div class="upload-info">
460
+ <div class="upload-message">${uploadMessage}</div>
461
+ <div class="progress-bar">
462
+ <div class="progress-fill" style="width: ${uploadProgress}%"></div>
463
+ </div>
464
+ <div class="progress-text">${uploadProgress}%</div>
465
+ </div>
466
+ </div>
467
+ </div>
469
468
  `;
470
469
  }
471
470
  return state; // Garder les décorations existantes
@@ -704,72 +703,72 @@ class TiptapButtonComponent {
704
703
  event.preventDefault();
705
704
  }
706
705
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
707
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapButtonComponent, isStandalone: true, selector: "tiptap-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: { onClick: "onClick" }, ngImport: i0, template: `
708
- <button
709
- class="tiptap-button"
710
- [class.is-active]="active()"
711
- [class.is-disabled]="disabled()"
712
- [class.text-button]="variant() === 'text'"
713
- [class.danger]="variant() === 'danger'"
714
- [class.small]="size() === 'small'"
715
- [class.medium]="size() === 'medium'"
716
- [class.large]="size() === 'large'"
717
- [class.has-custom-color]="!!color()"
718
- [class.has-custom-bg]="!!backgroundColor()"
719
- [disabled]="disabled()"
720
- [style.color]="color()"
721
- [style.background-color]="backgroundColor()"
722
- [attr.title]="title()"
723
- [attr.aria-label]="title()"
724
- (mousedown)="onMouseDown($event)"
725
- (click)="onClick.emit($event)"
726
- type="button"
727
- >
728
- @if (icon()) {
729
- <span
730
- class="material-symbols-outlined"
731
- [class.icon-small]="iconSize() === 'small'"
732
- [class.icon-medium]="iconSize() === 'medium'"
733
- [class.icon-large]="iconSize() === 'large'"
734
- >{{ icon() }}</span>
735
- }
736
- <ng-content></ng-content>
737
- </button>
706
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapButtonComponent, isStandalone: true, selector: "tiptap-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: { onClick: "onClick" }, ngImport: i0, template: `
707
+ <button
708
+ class="tiptap-button"
709
+ [class.is-active]="active()"
710
+ [class.is-disabled]="disabled()"
711
+ [class.text-button]="variant() === 'text'"
712
+ [class.danger]="variant() === 'danger'"
713
+ [class.small]="size() === 'small'"
714
+ [class.medium]="size() === 'medium'"
715
+ [class.large]="size() === 'large'"
716
+ [class.has-custom-color]="!!color()"
717
+ [class.has-custom-bg]="!!backgroundColor()"
718
+ [disabled]="disabled()"
719
+ [style.color]="color()"
720
+ [style.background-color]="backgroundColor()"
721
+ [attr.title]="title()"
722
+ [attr.aria-label]="title()"
723
+ (mousedown)="onMouseDown($event)"
724
+ (click)="onClick.emit($event)"
725
+ type="button"
726
+ >
727
+ @if (icon()) {
728
+ <span
729
+ class="material-symbols-outlined"
730
+ [class.icon-small]="iconSize() === 'small'"
731
+ [class.icon-medium]="iconSize() === 'medium'"
732
+ [class.icon-large]="iconSize() === 'large'"
733
+ >{{ icon() }}</span>
734
+ }
735
+ <ng-content></ng-content>
736
+ </button>
738
737
  `, isInline: true, styles: [".tiptap-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}.tiptap-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)}.tiptap-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)}.tiptap-button.has-custom-color:hover:not(.has-custom-bg){background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.tiptap-button.has-custom-bg:hover{transform:translateY(-1px);filter:brightness(.9)}.tiptap-button:hover:before{opacity:.1}.tiptap-button:active{transform:translateY(0)}.tiptap-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))}.tiptap-button.is-active.has-custom-color{background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.tiptap-button:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tiptap-button .material-symbols-outlined{font-size:20px;position:relative;z-index:1}.tiptap-button .material-symbols-outlined.icon-small{font-size:16px}.tiptap-button .material-symbols-outlined.icon-medium{font-size:20px}.tiptap-button .material-symbols-outlined.icon-large{font-size:24px}.tiptap-button.text-button{width:auto;padding:0 12px;font-size:14px;font-weight:500;gap:8px}.tiptap-button.color-button{width:28px;height:28px;border-radius:50%;border:2px solid transparent;transition:all .2s ease}.tiptap-button.color-button:hover{border-color:var(--ate-border);transform:scale(1.1)}.tiptap-button.color-button.is-active{border-color:var(--ate-primary);box-shadow:0 0 0 2px var(--ate-primary-light)}.tiptap-button.danger{color:var(--ate-error-color, #ef4444)}.tiptap-button.danger:hover{color:var(--ate-error-color, #ef4444);background:var(--ate-error-bg, rgba(239, 68, 68, .1))}.tiptap-button.danger:before{background:var(--ate-error-color, #ef4444)}.tiptap-button.small{width:24px;height:24px}.tiptap-button.medium{width:32px;height:32px}.tiptap-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}}.tiptap-button.is-active.pulse{animation:pulse 2s infinite}@media (max-width: 768px){.tiptap-button{width:32px;height:32px}.tiptap-button .material-symbols-outlined{font-size:18px}.tiptap-button.text-button{padding:0 8px;font-size:13px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
739
738
  }
740
739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapButtonComponent, decorators: [{
741
740
  type: Component,
742
- args: [{ selector: "tiptap-button", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
743
- <button
744
- class="tiptap-button"
745
- [class.is-active]="active()"
746
- [class.is-disabled]="disabled()"
747
- [class.text-button]="variant() === 'text'"
748
- [class.danger]="variant() === 'danger'"
749
- [class.small]="size() === 'small'"
750
- [class.medium]="size() === 'medium'"
751
- [class.large]="size() === 'large'"
752
- [class.has-custom-color]="!!color()"
753
- [class.has-custom-bg]="!!backgroundColor()"
754
- [disabled]="disabled()"
755
- [style.color]="color()"
756
- [style.background-color]="backgroundColor()"
757
- [attr.title]="title()"
758
- [attr.aria-label]="title()"
759
- (mousedown)="onMouseDown($event)"
760
- (click)="onClick.emit($event)"
761
- type="button"
762
- >
763
- @if (icon()) {
764
- <span
765
- class="material-symbols-outlined"
766
- [class.icon-small]="iconSize() === 'small'"
767
- [class.icon-medium]="iconSize() === 'medium'"
768
- [class.icon-large]="iconSize() === 'large'"
769
- >{{ icon() }}</span>
770
- }
771
- <ng-content></ng-content>
772
- </button>
741
+ args: [{ selector: "tiptap-button", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
742
+ <button
743
+ class="tiptap-button"
744
+ [class.is-active]="active()"
745
+ [class.is-disabled]="disabled()"
746
+ [class.text-button]="variant() === 'text'"
747
+ [class.danger]="variant() === 'danger'"
748
+ [class.small]="size() === 'small'"
749
+ [class.medium]="size() === 'medium'"
750
+ [class.large]="size() === 'large'"
751
+ [class.has-custom-color]="!!color()"
752
+ [class.has-custom-bg]="!!backgroundColor()"
753
+ [disabled]="disabled()"
754
+ [style.color]="color()"
755
+ [style.background-color]="backgroundColor()"
756
+ [attr.title]="title()"
757
+ [attr.aria-label]="title()"
758
+ (mousedown)="onMouseDown($event)"
759
+ (click)="onClick.emit($event)"
760
+ type="button"
761
+ >
762
+ @if (icon()) {
763
+ <span
764
+ class="material-symbols-outlined"
765
+ [class.icon-small]="iconSize() === 'small'"
766
+ [class.icon-medium]="iconSize() === 'medium'"
767
+ [class.icon-large]="iconSize() === 'large'"
768
+ >{{ icon() }}</span>
769
+ }
770
+ <ng-content></ng-content>
771
+ </button>
773
772
  `, styles: [".tiptap-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}.tiptap-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)}.tiptap-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)}.tiptap-button.has-custom-color:hover:not(.has-custom-bg){background:var(--ate-toolbar-button-hover-background, transparent);transform:translateY(-1px)}.tiptap-button.has-custom-bg:hover{transform:translateY(-1px);filter:brightness(.9)}.tiptap-button:hover:before{opacity:.1}.tiptap-button:active{transform:translateY(0)}.tiptap-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))}.tiptap-button.is-active.has-custom-color{background:var(--ate-toolbar-button-active-background, var(--ate-primary-light))}.tiptap-button:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tiptap-button .material-symbols-outlined{font-size:20px;position:relative;z-index:1}.tiptap-button .material-symbols-outlined.icon-small{font-size:16px}.tiptap-button .material-symbols-outlined.icon-medium{font-size:20px}.tiptap-button .material-symbols-outlined.icon-large{font-size:24px}.tiptap-button.text-button{width:auto;padding:0 12px;font-size:14px;font-weight:500;gap:8px}.tiptap-button.color-button{width:28px;height:28px;border-radius:50%;border:2px solid transparent;transition:all .2s ease}.tiptap-button.color-button:hover{border-color:var(--ate-border);transform:scale(1.1)}.tiptap-button.color-button.is-active{border-color:var(--ate-primary);box-shadow:0 0 0 2px var(--ate-primary-light)}.tiptap-button.danger{color:var(--ate-error-color, #ef4444)}.tiptap-button.danger:hover{color:var(--ate-error-color, #ef4444);background:var(--ate-error-bg, rgba(239, 68, 68, .1))}.tiptap-button.danger:before{background:var(--ate-error-color, #ef4444)}.tiptap-button.small{width:24px;height:24px}.tiptap-button.medium{width:32px;height:32px}.tiptap-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}}.tiptap-button.is-active.pulse{animation:pulse 2s infinite}@media (max-width: 768px){.tiptap-button{width:32px;height:32px}.tiptap-button .material-symbols-outlined{font-size:18px}.tiptap-button.text-button{padding:0 8px;font-size:13px}}\n"] }]
774
773
  }] });
775
774
 
@@ -779,28 +778,28 @@ class TiptapSeparatorComponent {
779
778
  this.size = input("medium");
780
779
  }
781
780
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
782
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: TiptapSeparatorComponent, isStandalone: true, selector: "tiptap-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: `
783
- <div
784
- class="tiptap-separator"
785
- [class.vertical]="orientation() === 'vertical'"
786
- [class.horizontal]="orientation() === 'horizontal'"
787
- [class.small]="size() === 'small'"
788
- [class.medium]="size() === 'medium'"
789
- [class.large]="size() === 'large'"
790
- ></div>
781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: TiptapSeparatorComponent, isStandalone: true, selector: "tiptap-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: `
782
+ <div
783
+ class="tiptap-separator"
784
+ [class.vertical]="orientation() === 'vertical'"
785
+ [class.horizontal]="orientation() === 'horizontal'"
786
+ [class.small]="size() === 'small'"
787
+ [class.medium]="size() === 'medium'"
788
+ [class.large]="size() === 'large'"
789
+ ></div>
791
790
  `, isInline: true, styles: [".tiptap-separator{background-color:var(--ate-border, #e2e8f0);margin:0}.tiptap-separator.vertical{width:1px;height:24px;margin:0 8px}.tiptap-separator.horizontal{height:1px;width:100%;margin:8px 0}.tiptap-separator.small.vertical{height:16px;margin:0 4px}.tiptap-separator.small.horizontal{margin:4px 0}.tiptap-separator.medium.vertical{height:24px;margin:0 8px}.tiptap-separator.medium.horizontal{margin:8px 0}.tiptap-separator.large.vertical{height:32px;margin:0 12px}.tiptap-separator.large.horizontal{margin:12px 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
792
791
  }
793
792
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapSeparatorComponent, decorators: [{
794
793
  type: Component,
795
- args: [{ selector: "tiptap-separator", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
796
- <div
797
- class="tiptap-separator"
798
- [class.vertical]="orientation() === 'vertical'"
799
- [class.horizontal]="orientation() === 'horizontal'"
800
- [class.small]="size() === 'small'"
801
- [class.medium]="size() === 'medium'"
802
- [class.large]="size() === 'large'"
803
- ></div>
794
+ args: [{ selector: "tiptap-separator", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
795
+ <div
796
+ class="tiptap-separator"
797
+ [class.vertical]="orientation() === 'vertical'"
798
+ [class.horizontal]="orientation() === 'horizontal'"
799
+ [class.small]="size() === 'small'"
800
+ [class.medium]="size() === 'medium'"
801
+ [class.large]="size() === 'large'"
802
+ ></div>
804
803
  `, styles: [".tiptap-separator{background-color:var(--ate-border, #e2e8f0);margin:0}.tiptap-separator.vertical{width:1px;height:24px;margin:0 8px}.tiptap-separator.horizontal{height:1px;width:100%;margin:8px 0}.tiptap-separator.small.vertical{height:16px;margin:0 4px}.tiptap-separator.small.horizontal{margin:4px 0}.tiptap-separator.medium.vertical{height:24px;margin:0 8px}.tiptap-separator.medium.horizontal{margin:8px 0}.tiptap-separator.large.vertical{height:32px;margin:0 12px}.tiptap-separator.large.horizontal{margin:12px 0}\n"] }]
805
804
  }] });
806
805
 
@@ -956,6 +955,8 @@ const ENGLISH_TRANSLATIONS = {
956
955
  linkPrompt: "Enter link URL",
957
956
  linkUrlPrompt: "Enter URL",
958
957
  confirmDelete: "Are you sure you want to delete this?",
958
+ toggleEdit: "Switch to Edit Mode",
959
+ viewMode: "Switch to View Mode",
959
960
  },
960
961
  common: {
961
962
  cancel: "Cancel",
@@ -1130,6 +1131,8 @@ const FRENCH_TRANSLATIONS = {
1130
1131
  linkPrompt: "Entrez l'URL du lien",
1131
1132
  linkUrlPrompt: "Entrez l'URL",
1132
1133
  confirmDelete: "Êtes-vous sûr de vouloir supprimer ceci ?",
1134
+ toggleEdit: "Passer en mode édition",
1135
+ viewMode: "Passer en mode affichage",
1133
1136
  },
1134
1137
  common: {
1135
1138
  cancel: "Annuler",
@@ -2369,60 +2372,60 @@ class TiptapColorPickerComponent {
2369
2372
  this.colorPickerSvc.close();
2370
2373
  }
2371
2374
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2372
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapColorPickerComponent, isStandalone: true, selector: "tiptap-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: `
2373
- <div class="color-picker-wrapper">
2374
- <div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
2375
- <tiptap-button
2376
- [icon]="buttonIcon()"
2377
- [title]="mode() === 'text' ? t().textColor : t().highlight"
2378
- [color]="buttonTextColor()"
2379
- [backgroundColor]="buttonBgColor()"
2380
- [disabled]="disabled() || !state().isEditable"
2381
- (onClick)="onToggle($event)"
2382
- />
2383
-
2384
- @if (hasColorApplied()) {
2385
- <button
2386
- class="btn-clear-badge"
2387
- type="button"
2388
- [title]="t().clear"
2389
- [attr.aria-label]="t().clear"
2390
- (click)="onClear($event)"
2391
- >
2392
- <span class="material-symbols-outlined">close</span>
2393
- </button>
2394
- }
2395
- </div>
2396
- </div>
2375
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapColorPickerComponent, isStandalone: true, selector: "tiptap-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: `
2376
+ <div class="color-picker-wrapper">
2377
+ <div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
2378
+ <tiptap-button
2379
+ [icon]="buttonIcon()"
2380
+ [title]="mode() === 'text' ? t().textColor : t().highlight"
2381
+ [color]="buttonTextColor()"
2382
+ [backgroundColor]="buttonBgColor()"
2383
+ [disabled]="disabled() || !state().isEditable"
2384
+ (onClick)="onToggle($event)"
2385
+ />
2386
+
2387
+ @if (hasColorApplied()) {
2388
+ <button
2389
+ class="btn-clear-badge"
2390
+ type="button"
2391
+ [title]="t().clear"
2392
+ [attr.aria-label]="t().clear"
2393
+ (click)="onClear($event)"
2394
+ >
2395
+ <span class="material-symbols-outlined">close</span>
2396
+ </button>
2397
+ }
2398
+ </div>
2399
+ </div>
2397
2400
  `, 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: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2398
2401
  }
2399
2402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapColorPickerComponent, decorators: [{
2400
2403
  type: Component,
2401
- args: [{ selector: "tiptap-color-picker", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TiptapButtonComponent, CommonModule], template: `
2402
- <div class="color-picker-wrapper">
2403
- <div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
2404
- <tiptap-button
2405
- [icon]="buttonIcon()"
2406
- [title]="mode() === 'text' ? t().textColor : t().highlight"
2407
- [color]="buttonTextColor()"
2408
- [backgroundColor]="buttonBgColor()"
2409
- [disabled]="disabled() || !state().isEditable"
2410
- (onClick)="onToggle($event)"
2411
- />
2412
-
2413
- @if (hasColorApplied()) {
2414
- <button
2415
- class="btn-clear-badge"
2416
- type="button"
2417
- [title]="t().clear"
2418
- [attr.aria-label]="t().clear"
2419
- (click)="onClear($event)"
2420
- >
2421
- <span class="material-symbols-outlined">close</span>
2422
- </button>
2423
- }
2424
- </div>
2425
- </div>
2404
+ args: [{ selector: "tiptap-color-picker", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TiptapButtonComponent, CommonModule], template: `
2405
+ <div class="color-picker-wrapper">
2406
+ <div class="color-picker-container" [class.is-highlight]="mode() === 'highlight'">
2407
+ <tiptap-button
2408
+ [icon]="buttonIcon()"
2409
+ [title]="mode() === 'text' ? t().textColor : t().highlight"
2410
+ [color]="buttonTextColor()"
2411
+ [backgroundColor]="buttonBgColor()"
2412
+ [disabled]="disabled() || !state().isEditable"
2413
+ (onClick)="onToggle($event)"
2414
+ />
2415
+
2416
+ @if (hasColorApplied()) {
2417
+ <button
2418
+ class="btn-clear-badge"
2419
+ type="button"
2420
+ [title]="t().clear"
2421
+ [attr.aria-label]="t().clear"
2422
+ (click)="onClear($event)"
2423
+ >
2424
+ <span class="material-symbols-outlined">close</span>
2425
+ </button>
2426
+ }
2427
+ </div>
2428
+ </div>
2426
2429
  `, 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"] }]
2427
2430
  }] });
2428
2431
 
@@ -2444,241 +2447,241 @@ class TiptapToolbarComponent {
2444
2447
  this.editorCommands.execute(editor, command, ...args);
2445
2448
  }
2446
2449
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2447
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapToolbarComponent, isStandalone: true, selector: "tiptap-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: `
2448
- <div class="tiptap-toolbar" [class.floating]="floating()">
2449
- @if (config().bold) {
2450
- <tiptap-button
2451
- icon="format_bold"
2452
- [title]="t().bold"
2453
- [active]="state().marks.bold"
2454
- [disabled]="!state().can.toggleBold"
2455
- (onClick)="onCommand('toggleBold')"
2456
- />
2457
- } @if (config().italic) {
2458
- <tiptap-button
2459
- icon="format_italic"
2460
- [title]="t().italic"
2461
- [active]="state().marks.italic"
2462
- [disabled]="!state().can.toggleItalic"
2463
- (onClick)="onCommand('toggleItalic')"
2464
- />
2465
- } @if (config().underline) {
2466
- <tiptap-button
2467
- icon="format_underlined"
2468
- [title]="t().underline"
2469
- [active]="state().marks.underline"
2470
- [disabled]="!state().can.toggleUnderline"
2471
- (onClick)="onCommand('toggleUnderline')"
2472
- />
2473
- } @if (config().strike) {
2474
- <tiptap-button
2475
- icon="strikethrough_s"
2476
- [title]="t().strike"
2477
- [active]="state().marks.strike"
2478
- [disabled]="!state().can.toggleStrike"
2479
- (onClick)="onCommand('toggleStrike')"
2480
- />
2481
- } @if (config().code) {
2482
- <tiptap-button
2483
- icon="code"
2484
- [title]="t().code"
2485
- [active]="state().marks.code"
2486
- [disabled]="!state().can.toggleCode"
2487
- (onClick)="onCommand('toggleCode')"
2488
- />
2489
- } @if (config().codeBlock) {
2490
- <tiptap-button
2491
- icon="terminal"
2492
- [title]="t().codeBlock"
2493
- [active]="state().nodes.isCodeBlock"
2494
- [disabled]="!state().can.toggleCodeBlock"
2495
- (onClick)="onCommand('toggleCodeBlock')"
2496
- />
2497
- } @if (config().superscript) {
2498
- <tiptap-button
2499
- icon="superscript"
2500
- [title]="t().superscript"
2501
- [active]="state().marks.superscript"
2502
- [disabled]="!state().can.toggleSuperscript"
2503
- (onClick)="onCommand('toggleSuperscript')"
2504
- />
2505
- } @if (config().subscript) {
2506
- <tiptap-button
2507
- icon="subscript"
2508
- [title]="t().subscript"
2509
- [active]="state().marks.subscript"
2510
- [disabled]="!state().can.toggleSubscript"
2511
- (onClick)="onCommand('toggleSubscript')"
2512
- />
2513
- } @if (config().highlight) {
2514
- <tiptap-button
2515
- icon="highlight"
2516
- [title]="t().highlight"
2517
- [active]="state().marks.highlight"
2518
- [disabled]="!state().can.toggleHighlight"
2519
- (onClick)="onCommand('toggleHighlight')"
2520
- />
2521
- } @if (config().highlightPicker) {
2522
- <tiptap-color-picker
2523
- mode="highlight"
2524
- [editor]="editor()"
2525
- [disabled]="!state().can.setHighlight"
2526
- />
2527
- } @if (config().textColor) {
2528
- <tiptap-color-picker
2529
- mode="text"
2530
- [editor]="editor()"
2531
- [disabled]="!state().can.setColor"
2532
- />
2533
- }
2534
-
2535
- @if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
2536
- <tiptap-separator />
2537
- } @if (config().heading1) {
2538
- <tiptap-button
2539
- icon="format_h1"
2540
- [title]="t().heading1"
2541
- [active]="state().nodes.h1"
2542
- [disabled]="!state().can.toggleHeading1"
2543
- (onClick)="onCommand('toggleHeading', 1)"
2544
- />
2545
- } @if (config().heading2) {
2546
- <tiptap-button
2547
- icon="format_h2"
2548
- [title]="t().heading2"
2549
- [active]="state().nodes.h2"
2550
- [disabled]="!state().can.toggleHeading2"
2551
- (onClick)="onCommand('toggleHeading', 2)"
2552
- />
2553
- } @if (config().heading3) {
2554
- <tiptap-button
2555
- icon="format_h3"
2556
- [title]="t().heading3"
2557
- [active]="state().nodes.h3"
2558
- [disabled]="!state().can.toggleHeading3"
2559
- (onClick)="onCommand('toggleHeading', 3)"
2560
- />
2561
- } @if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
2562
- <tiptap-separator />
2563
- } @if (config().bulletList) {
2564
- <tiptap-button
2565
- icon="format_list_bulleted"
2566
- [title]="t().bulletList"
2567
- [active]="state().nodes.isBulletList"
2568
- [disabled]="!state().can.toggleBulletList"
2569
- (onClick)="onCommand('toggleBulletList')"
2570
- />
2571
- } @if (config().orderedList) {
2572
- <tiptap-button
2573
- icon="format_list_numbered"
2574
- [title]="t().orderedList"
2575
- [active]="state().nodes.isOrderedList"
2576
- [disabled]="!state().can.toggleOrderedList"
2577
- (onClick)="onCommand('toggleOrderedList')"
2578
- />
2579
- } @if (config().blockquote) {
2580
- <tiptap-button
2581
- icon="format_quote"
2582
- [title]="t().blockquote"
2583
- [active]="state().nodes.isBlockquote"
2584
- [disabled]="!state().can.toggleBlockquote"
2585
- (onClick)="onCommand('toggleBlockquote')"
2586
- />
2587
- } @if (config().separator && (config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)) {
2588
- <tiptap-separator />
2589
- } @if (config().alignLeft) {
2590
- <tiptap-button
2591
- icon="format_align_left"
2592
- [title]="t().alignLeft"
2593
- [active]="state().nodes.alignLeft"
2594
- [disabled]="!state().can.setTextAlignLeft"
2595
- (onClick)="onCommand('setTextAlign', 'left')"
2596
- />
2597
- } @if (config().alignCenter) {
2598
- <tiptap-button
2599
- icon="format_align_center"
2600
- [title]="t().alignCenter"
2601
- [active]="state().nodes.alignCenter"
2602
- [disabled]="!state().can.setTextAlignCenter"
2603
- (onClick)="onCommand('setTextAlign', 'center')"
2604
- />
2605
- } @if (config().alignRight) {
2606
- <tiptap-button
2607
- icon="format_align_right"
2608
- [title]="t().alignRight"
2609
- [active]="state().nodes.alignRight"
2610
- [disabled]="!state().can.setTextAlignRight"
2611
- (onClick)="onCommand('setTextAlign', 'right')"
2612
- />
2613
- } @if (config().alignJustify) {
2614
- <tiptap-button
2615
- icon="format_align_justify"
2616
- [title]="t().alignJustify"
2617
- [active]="state().nodes.alignJustify"
2618
- [disabled]="!state().can.setTextAlignJustify"
2619
- (onClick)="onCommand('setTextAlign', 'justify')"
2620
- />
2621
- } @if (config().separator && (config().link || config().horizontalRule)) {
2622
- <tiptap-separator />
2623
- } @if (config().link) {
2624
- <tiptap-button
2625
- icon="link"
2626
- [title]="t().link"
2627
- [active]="state().marks.link"
2628
- [disabled]="!state().can.toggleLink"
2629
- (onClick)="onCommand('toggleLink', $event)"
2630
- />
2631
- } @if (config().horizontalRule) {
2632
- <tiptap-button
2633
- icon="horizontal_rule"
2634
- [title]="t().horizontalRule"
2635
- [disabled]="!state().can.insertHorizontalRule"
2636
- (onClick)="onCommand('insertHorizontalRule')"
2637
- />
2638
- } @if (config().table) {
2639
- <tiptap-button
2640
- icon="table_view"
2641
- [title]="t().table"
2642
- [disabled]="!state().can.insertTable"
2643
- (onClick)="onCommand('insertTable')"
2644
- />
2645
- } @if (config().separator && config().image) {
2646
- <tiptap-separator />
2647
- } @if (config().image) {
2648
- <tiptap-button
2649
- icon="image"
2650
- [title]="t().image"
2651
- [disabled]="!state().can.insertImage"
2652
- (onClick)="onCommand('insertImage', imageUpload())"
2653
- />
2654
- } @if (config().separator && (config().undo || config().redo)) {
2655
- <tiptap-separator />
2656
- } @if (config().undo) {
2657
- <tiptap-button
2658
- icon="undo"
2659
- [title]="t().undo"
2660
- [disabled]="!state().can.undo"
2661
- (onClick)="onCommand('undo')"
2662
- />
2663
- } @if (config().redo) {
2664
- <tiptap-button
2665
- icon="redo"
2666
- [title]="t().redo"
2667
- [disabled]="!state().can.redo"
2668
- (onClick)="onCommand('redo')"
2669
- />
2670
- } @if (config().separator && config().clear) {
2671
- <tiptap-separator />
2672
- } @if (config().clear) {
2673
- <tiptap-button
2674
- icon="delete"
2675
- [title]="t().clear"
2676
- [disabled]="!state().isEditable"
2677
- (onClick)="onCommand('clearContent')"
2678
- />
2679
- }
2680
- </div>
2681
- `, 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}.tiptap-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, 8px) - var(--ate-border-width, 2px));border-top-right-radius:calc(var(--ate-menu-border-radius, 8px) - var(--ate-border-width, 2px))}.tiptap-toolbar.floating{pointer-events:auto;border-radius:var(--ate-menu-border-radius, 8px);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)}.tiptap-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .tiptap-toolbar.floating,:host-context(.floating-toolbar:hover) .tiptap-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.tiptap-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.tiptap-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"], dependencies: [{ kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-separator", inputs: ["orientation", "size"] }, { kind: "component", type: TiptapColorPickerComponent, selector: "tiptap-color-picker", inputs: ["editor", "mode", "disabled", "anchorToText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2450
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapToolbarComponent, isStandalone: true, selector: "tiptap-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: `
2451
+ <div class="tiptap-toolbar" [class.floating]="floating()">
2452
+ @if (config().bold) {
2453
+ <tiptap-button
2454
+ icon="format_bold"
2455
+ [title]="t().bold"
2456
+ [active]="state().marks.bold"
2457
+ [disabled]="!state().can.toggleBold"
2458
+ (onClick)="onCommand('toggleBold')"
2459
+ />
2460
+ } @if (config().italic) {
2461
+ <tiptap-button
2462
+ icon="format_italic"
2463
+ [title]="t().italic"
2464
+ [active]="state().marks.italic"
2465
+ [disabled]="!state().can.toggleItalic"
2466
+ (onClick)="onCommand('toggleItalic')"
2467
+ />
2468
+ } @if (config().underline) {
2469
+ <tiptap-button
2470
+ icon="format_underlined"
2471
+ [title]="t().underline"
2472
+ [active]="state().marks.underline"
2473
+ [disabled]="!state().can.toggleUnderline"
2474
+ (onClick)="onCommand('toggleUnderline')"
2475
+ />
2476
+ } @if (config().strike) {
2477
+ <tiptap-button
2478
+ icon="strikethrough_s"
2479
+ [title]="t().strike"
2480
+ [active]="state().marks.strike"
2481
+ [disabled]="!state().can.toggleStrike"
2482
+ (onClick)="onCommand('toggleStrike')"
2483
+ />
2484
+ } @if (config().code) {
2485
+ <tiptap-button
2486
+ icon="code"
2487
+ [title]="t().code"
2488
+ [active]="state().marks.code"
2489
+ [disabled]="!state().can.toggleCode"
2490
+ (onClick)="onCommand('toggleCode')"
2491
+ />
2492
+ } @if (config().codeBlock) {
2493
+ <tiptap-button
2494
+ icon="terminal"
2495
+ [title]="t().codeBlock"
2496
+ [active]="state().nodes.isCodeBlock"
2497
+ [disabled]="!state().can.toggleCodeBlock"
2498
+ (onClick)="onCommand('toggleCodeBlock')"
2499
+ />
2500
+ } @if (config().superscript) {
2501
+ <tiptap-button
2502
+ icon="superscript"
2503
+ [title]="t().superscript"
2504
+ [active]="state().marks.superscript"
2505
+ [disabled]="!state().can.toggleSuperscript"
2506
+ (onClick)="onCommand('toggleSuperscript')"
2507
+ />
2508
+ } @if (config().subscript) {
2509
+ <tiptap-button
2510
+ icon="subscript"
2511
+ [title]="t().subscript"
2512
+ [active]="state().marks.subscript"
2513
+ [disabled]="!state().can.toggleSubscript"
2514
+ (onClick)="onCommand('toggleSubscript')"
2515
+ />
2516
+ } @if (config().highlight) {
2517
+ <tiptap-button
2518
+ icon="highlight"
2519
+ [title]="t().highlight"
2520
+ [active]="state().marks.highlight"
2521
+ [disabled]="!state().can.toggleHighlight"
2522
+ (onClick)="onCommand('toggleHighlight')"
2523
+ />
2524
+ } @if (config().highlightPicker) {
2525
+ <tiptap-color-picker
2526
+ mode="highlight"
2527
+ [editor]="editor()"
2528
+ [disabled]="!state().can.setHighlight"
2529
+ />
2530
+ } @if (config().textColor) {
2531
+ <tiptap-color-picker
2532
+ mode="text"
2533
+ [editor]="editor()"
2534
+ [disabled]="!state().can.setColor"
2535
+ />
2536
+ }
2537
+
2538
+ @if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
2539
+ <tiptap-separator />
2540
+ } @if (config().heading1) {
2541
+ <tiptap-button
2542
+ icon="format_h1"
2543
+ [title]="t().heading1"
2544
+ [active]="state().nodes.h1"
2545
+ [disabled]="!state().can.toggleHeading1"
2546
+ (onClick)="onCommand('toggleHeading', 1)"
2547
+ />
2548
+ } @if (config().heading2) {
2549
+ <tiptap-button
2550
+ icon="format_h2"
2551
+ [title]="t().heading2"
2552
+ [active]="state().nodes.h2"
2553
+ [disabled]="!state().can.toggleHeading2"
2554
+ (onClick)="onCommand('toggleHeading', 2)"
2555
+ />
2556
+ } @if (config().heading3) {
2557
+ <tiptap-button
2558
+ icon="format_h3"
2559
+ [title]="t().heading3"
2560
+ [active]="state().nodes.h3"
2561
+ [disabled]="!state().can.toggleHeading3"
2562
+ (onClick)="onCommand('toggleHeading', 3)"
2563
+ />
2564
+ } @if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
2565
+ <tiptap-separator />
2566
+ } @if (config().bulletList) {
2567
+ <tiptap-button
2568
+ icon="format_list_bulleted"
2569
+ [title]="t().bulletList"
2570
+ [active]="state().nodes.isBulletList"
2571
+ [disabled]="!state().can.toggleBulletList"
2572
+ (onClick)="onCommand('toggleBulletList')"
2573
+ />
2574
+ } @if (config().orderedList) {
2575
+ <tiptap-button
2576
+ icon="format_list_numbered"
2577
+ [title]="t().orderedList"
2578
+ [active]="state().nodes.isOrderedList"
2579
+ [disabled]="!state().can.toggleOrderedList"
2580
+ (onClick)="onCommand('toggleOrderedList')"
2581
+ />
2582
+ } @if (config().blockquote) {
2583
+ <tiptap-button
2584
+ icon="format_quote"
2585
+ [title]="t().blockquote"
2586
+ [active]="state().nodes.isBlockquote"
2587
+ [disabled]="!state().can.toggleBlockquote"
2588
+ (onClick)="onCommand('toggleBlockquote')"
2589
+ />
2590
+ } @if (config().separator && (config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)) {
2591
+ <tiptap-separator />
2592
+ } @if (config().alignLeft) {
2593
+ <tiptap-button
2594
+ icon="format_align_left"
2595
+ [title]="t().alignLeft"
2596
+ [active]="state().nodes.alignLeft"
2597
+ [disabled]="!state().can.setTextAlignLeft"
2598
+ (onClick)="onCommand('setTextAlign', 'left')"
2599
+ />
2600
+ } @if (config().alignCenter) {
2601
+ <tiptap-button
2602
+ icon="format_align_center"
2603
+ [title]="t().alignCenter"
2604
+ [active]="state().nodes.alignCenter"
2605
+ [disabled]="!state().can.setTextAlignCenter"
2606
+ (onClick)="onCommand('setTextAlign', 'center')"
2607
+ />
2608
+ } @if (config().alignRight) {
2609
+ <tiptap-button
2610
+ icon="format_align_right"
2611
+ [title]="t().alignRight"
2612
+ [active]="state().nodes.alignRight"
2613
+ [disabled]="!state().can.setTextAlignRight"
2614
+ (onClick)="onCommand('setTextAlign', 'right')"
2615
+ />
2616
+ } @if (config().alignJustify) {
2617
+ <tiptap-button
2618
+ icon="format_align_justify"
2619
+ [title]="t().alignJustify"
2620
+ [active]="state().nodes.alignJustify"
2621
+ [disabled]="!state().can.setTextAlignJustify"
2622
+ (onClick)="onCommand('setTextAlign', 'justify')"
2623
+ />
2624
+ } @if (config().separator && (config().link || config().horizontalRule)) {
2625
+ <tiptap-separator />
2626
+ } @if (config().link) {
2627
+ <tiptap-button
2628
+ icon="link"
2629
+ [title]="t().link"
2630
+ [active]="state().marks.link"
2631
+ [disabled]="!state().can.toggleLink"
2632
+ (onClick)="onCommand('toggleLink', $event)"
2633
+ />
2634
+ } @if (config().horizontalRule) {
2635
+ <tiptap-button
2636
+ icon="horizontal_rule"
2637
+ [title]="t().horizontalRule"
2638
+ [disabled]="!state().can.insertHorizontalRule"
2639
+ (onClick)="onCommand('insertHorizontalRule')"
2640
+ />
2641
+ } @if (config().table) {
2642
+ <tiptap-button
2643
+ icon="table_view"
2644
+ [title]="t().table"
2645
+ [disabled]="!state().can.insertTable"
2646
+ (onClick)="onCommand('insertTable')"
2647
+ />
2648
+ } @if (config().separator && config().image) {
2649
+ <tiptap-separator />
2650
+ } @if (config().image) {
2651
+ <tiptap-button
2652
+ icon="image"
2653
+ [title]="t().image"
2654
+ [disabled]="!state().can.insertImage"
2655
+ (onClick)="onCommand('insertImage', imageUpload())"
2656
+ />
2657
+ } @if (config().separator && (config().undo || config().redo)) {
2658
+ <tiptap-separator />
2659
+ } @if (config().undo) {
2660
+ <tiptap-button
2661
+ icon="undo"
2662
+ [title]="t().undo"
2663
+ [disabled]="!state().can.undo"
2664
+ (onClick)="onCommand('undo')"
2665
+ />
2666
+ } @if (config().redo) {
2667
+ <tiptap-button
2668
+ icon="redo"
2669
+ [title]="t().redo"
2670
+ [disabled]="!state().can.redo"
2671
+ (onClick)="onCommand('redo')"
2672
+ />
2673
+ } @if (config().separator && config().clear) {
2674
+ <tiptap-separator />
2675
+ } @if (config().clear) {
2676
+ <tiptap-button
2677
+ icon="delete"
2678
+ [title]="t().clear"
2679
+ [disabled]="!state().isEditable"
2680
+ (onClick)="onCommand('clearContent')"
2681
+ />
2682
+ }
2683
+ </div>
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}.tiptap-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))}.tiptap-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)}.tiptap-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .tiptap-toolbar.floating,:host-context(.floating-toolbar:hover) .tiptap-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.tiptap-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.tiptap-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"], dependencies: [{ kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-separator", inputs: ["orientation", "size"] }, { kind: "component", type: TiptapColorPickerComponent, selector: "tiptap-color-picker", inputs: ["editor", "mode", "disabled", "anchorToText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2682
2685
  }
2683
2686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapToolbarComponent, decorators: [{
2684
2687
  type: Component,
@@ -2686,241 +2689,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
2686
2689
  TiptapButtonComponent,
2687
2690
  TiptapSeparatorComponent,
2688
2691
  TiptapColorPickerComponent,
2689
- ], template: `
2690
- <div class="tiptap-toolbar" [class.floating]="floating()">
2691
- @if (config().bold) {
2692
- <tiptap-button
2693
- icon="format_bold"
2694
- [title]="t().bold"
2695
- [active]="state().marks.bold"
2696
- [disabled]="!state().can.toggleBold"
2697
- (onClick)="onCommand('toggleBold')"
2698
- />
2699
- } @if (config().italic) {
2700
- <tiptap-button
2701
- icon="format_italic"
2702
- [title]="t().italic"
2703
- [active]="state().marks.italic"
2704
- [disabled]="!state().can.toggleItalic"
2705
- (onClick)="onCommand('toggleItalic')"
2706
- />
2707
- } @if (config().underline) {
2708
- <tiptap-button
2709
- icon="format_underlined"
2710
- [title]="t().underline"
2711
- [active]="state().marks.underline"
2712
- [disabled]="!state().can.toggleUnderline"
2713
- (onClick)="onCommand('toggleUnderline')"
2714
- />
2715
- } @if (config().strike) {
2716
- <tiptap-button
2717
- icon="strikethrough_s"
2718
- [title]="t().strike"
2719
- [active]="state().marks.strike"
2720
- [disabled]="!state().can.toggleStrike"
2721
- (onClick)="onCommand('toggleStrike')"
2722
- />
2723
- } @if (config().code) {
2724
- <tiptap-button
2725
- icon="code"
2726
- [title]="t().code"
2727
- [active]="state().marks.code"
2728
- [disabled]="!state().can.toggleCode"
2729
- (onClick)="onCommand('toggleCode')"
2730
- />
2731
- } @if (config().codeBlock) {
2732
- <tiptap-button
2733
- icon="terminal"
2734
- [title]="t().codeBlock"
2735
- [active]="state().nodes.isCodeBlock"
2736
- [disabled]="!state().can.toggleCodeBlock"
2737
- (onClick)="onCommand('toggleCodeBlock')"
2738
- />
2739
- } @if (config().superscript) {
2740
- <tiptap-button
2741
- icon="superscript"
2742
- [title]="t().superscript"
2743
- [active]="state().marks.superscript"
2744
- [disabled]="!state().can.toggleSuperscript"
2745
- (onClick)="onCommand('toggleSuperscript')"
2746
- />
2747
- } @if (config().subscript) {
2748
- <tiptap-button
2749
- icon="subscript"
2750
- [title]="t().subscript"
2751
- [active]="state().marks.subscript"
2752
- [disabled]="!state().can.toggleSubscript"
2753
- (onClick)="onCommand('toggleSubscript')"
2754
- />
2755
- } @if (config().highlight) {
2756
- <tiptap-button
2757
- icon="highlight"
2758
- [title]="t().highlight"
2759
- [active]="state().marks.highlight"
2760
- [disabled]="!state().can.toggleHighlight"
2761
- (onClick)="onCommand('toggleHighlight')"
2762
- />
2763
- } @if (config().highlightPicker) {
2764
- <tiptap-color-picker
2765
- mode="highlight"
2766
- [editor]="editor()"
2767
- [disabled]="!state().can.setHighlight"
2768
- />
2769
- } @if (config().textColor) {
2770
- <tiptap-color-picker
2771
- mode="text"
2772
- [editor]="editor()"
2773
- [disabled]="!state().can.setColor"
2774
- />
2775
- }
2776
-
2777
- @if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
2778
- <tiptap-separator />
2779
- } @if (config().heading1) {
2780
- <tiptap-button
2781
- icon="format_h1"
2782
- [title]="t().heading1"
2783
- [active]="state().nodes.h1"
2784
- [disabled]="!state().can.toggleHeading1"
2785
- (onClick)="onCommand('toggleHeading', 1)"
2786
- />
2787
- } @if (config().heading2) {
2788
- <tiptap-button
2789
- icon="format_h2"
2790
- [title]="t().heading2"
2791
- [active]="state().nodes.h2"
2792
- [disabled]="!state().can.toggleHeading2"
2793
- (onClick)="onCommand('toggleHeading', 2)"
2794
- />
2795
- } @if (config().heading3) {
2796
- <tiptap-button
2797
- icon="format_h3"
2798
- [title]="t().heading3"
2799
- [active]="state().nodes.h3"
2800
- [disabled]="!state().can.toggleHeading3"
2801
- (onClick)="onCommand('toggleHeading', 3)"
2802
- />
2803
- } @if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
2804
- <tiptap-separator />
2805
- } @if (config().bulletList) {
2806
- <tiptap-button
2807
- icon="format_list_bulleted"
2808
- [title]="t().bulletList"
2809
- [active]="state().nodes.isBulletList"
2810
- [disabled]="!state().can.toggleBulletList"
2811
- (onClick)="onCommand('toggleBulletList')"
2812
- />
2813
- } @if (config().orderedList) {
2814
- <tiptap-button
2815
- icon="format_list_numbered"
2816
- [title]="t().orderedList"
2817
- [active]="state().nodes.isOrderedList"
2818
- [disabled]="!state().can.toggleOrderedList"
2819
- (onClick)="onCommand('toggleOrderedList')"
2820
- />
2821
- } @if (config().blockquote) {
2822
- <tiptap-button
2823
- icon="format_quote"
2824
- [title]="t().blockquote"
2825
- [active]="state().nodes.isBlockquote"
2826
- [disabled]="!state().can.toggleBlockquote"
2827
- (onClick)="onCommand('toggleBlockquote')"
2828
- />
2829
- } @if (config().separator && (config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)) {
2830
- <tiptap-separator />
2831
- } @if (config().alignLeft) {
2832
- <tiptap-button
2833
- icon="format_align_left"
2834
- [title]="t().alignLeft"
2835
- [active]="state().nodes.alignLeft"
2836
- [disabled]="!state().can.setTextAlignLeft"
2837
- (onClick)="onCommand('setTextAlign', 'left')"
2838
- />
2839
- } @if (config().alignCenter) {
2840
- <tiptap-button
2841
- icon="format_align_center"
2842
- [title]="t().alignCenter"
2843
- [active]="state().nodes.alignCenter"
2844
- [disabled]="!state().can.setTextAlignCenter"
2845
- (onClick)="onCommand('setTextAlign', 'center')"
2846
- />
2847
- } @if (config().alignRight) {
2848
- <tiptap-button
2849
- icon="format_align_right"
2850
- [title]="t().alignRight"
2851
- [active]="state().nodes.alignRight"
2852
- [disabled]="!state().can.setTextAlignRight"
2853
- (onClick)="onCommand('setTextAlign', 'right')"
2854
- />
2855
- } @if (config().alignJustify) {
2856
- <tiptap-button
2857
- icon="format_align_justify"
2858
- [title]="t().alignJustify"
2859
- [active]="state().nodes.alignJustify"
2860
- [disabled]="!state().can.setTextAlignJustify"
2861
- (onClick)="onCommand('setTextAlign', 'justify')"
2862
- />
2863
- } @if (config().separator && (config().link || config().horizontalRule)) {
2864
- <tiptap-separator />
2865
- } @if (config().link) {
2866
- <tiptap-button
2867
- icon="link"
2868
- [title]="t().link"
2869
- [active]="state().marks.link"
2870
- [disabled]="!state().can.toggleLink"
2871
- (onClick)="onCommand('toggleLink', $event)"
2872
- />
2873
- } @if (config().horizontalRule) {
2874
- <tiptap-button
2875
- icon="horizontal_rule"
2876
- [title]="t().horizontalRule"
2877
- [disabled]="!state().can.insertHorizontalRule"
2878
- (onClick)="onCommand('insertHorizontalRule')"
2879
- />
2880
- } @if (config().table) {
2881
- <tiptap-button
2882
- icon="table_view"
2883
- [title]="t().table"
2884
- [disabled]="!state().can.insertTable"
2885
- (onClick)="onCommand('insertTable')"
2886
- />
2887
- } @if (config().separator && config().image) {
2888
- <tiptap-separator />
2889
- } @if (config().image) {
2890
- <tiptap-button
2891
- icon="image"
2892
- [title]="t().image"
2893
- [disabled]="!state().can.insertImage"
2894
- (onClick)="onCommand('insertImage', imageUpload())"
2895
- />
2896
- } @if (config().separator && (config().undo || config().redo)) {
2897
- <tiptap-separator />
2898
- } @if (config().undo) {
2899
- <tiptap-button
2900
- icon="undo"
2901
- [title]="t().undo"
2902
- [disabled]="!state().can.undo"
2903
- (onClick)="onCommand('undo')"
2904
- />
2905
- } @if (config().redo) {
2906
- <tiptap-button
2907
- icon="redo"
2908
- [title]="t().redo"
2909
- [disabled]="!state().can.redo"
2910
- (onClick)="onCommand('redo')"
2911
- />
2912
- } @if (config().separator && config().clear) {
2913
- <tiptap-separator />
2914
- } @if (config().clear) {
2915
- <tiptap-button
2916
- icon="delete"
2917
- [title]="t().clear"
2918
- [disabled]="!state().isEditable"
2919
- (onClick)="onCommand('clearContent')"
2920
- />
2921
- }
2922
- </div>
2923
- `, 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}.tiptap-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, 8px) - var(--ate-border-width, 2px));border-top-right-radius:calc(var(--ate-menu-border-radius, 8px) - var(--ate-border-width, 2px))}.tiptap-toolbar.floating{pointer-events:auto;border-radius:var(--ate-menu-border-radius, 8px);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)}.tiptap-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .tiptap-toolbar.floating,:host-context(.floating-toolbar:hover) .tiptap-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.tiptap-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.tiptap-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"] }]
2692
+ ], template: `
2693
+ <div class="tiptap-toolbar" [class.floating]="floating()">
2694
+ @if (config().bold) {
2695
+ <tiptap-button
2696
+ icon="format_bold"
2697
+ [title]="t().bold"
2698
+ [active]="state().marks.bold"
2699
+ [disabled]="!state().can.toggleBold"
2700
+ (onClick)="onCommand('toggleBold')"
2701
+ />
2702
+ } @if (config().italic) {
2703
+ <tiptap-button
2704
+ icon="format_italic"
2705
+ [title]="t().italic"
2706
+ [active]="state().marks.italic"
2707
+ [disabled]="!state().can.toggleItalic"
2708
+ (onClick)="onCommand('toggleItalic')"
2709
+ />
2710
+ } @if (config().underline) {
2711
+ <tiptap-button
2712
+ icon="format_underlined"
2713
+ [title]="t().underline"
2714
+ [active]="state().marks.underline"
2715
+ [disabled]="!state().can.toggleUnderline"
2716
+ (onClick)="onCommand('toggleUnderline')"
2717
+ />
2718
+ } @if (config().strike) {
2719
+ <tiptap-button
2720
+ icon="strikethrough_s"
2721
+ [title]="t().strike"
2722
+ [active]="state().marks.strike"
2723
+ [disabled]="!state().can.toggleStrike"
2724
+ (onClick)="onCommand('toggleStrike')"
2725
+ />
2726
+ } @if (config().code) {
2727
+ <tiptap-button
2728
+ icon="code"
2729
+ [title]="t().code"
2730
+ [active]="state().marks.code"
2731
+ [disabled]="!state().can.toggleCode"
2732
+ (onClick)="onCommand('toggleCode')"
2733
+ />
2734
+ } @if (config().codeBlock) {
2735
+ <tiptap-button
2736
+ icon="terminal"
2737
+ [title]="t().codeBlock"
2738
+ [active]="state().nodes.isCodeBlock"
2739
+ [disabled]="!state().can.toggleCodeBlock"
2740
+ (onClick)="onCommand('toggleCodeBlock')"
2741
+ />
2742
+ } @if (config().superscript) {
2743
+ <tiptap-button
2744
+ icon="superscript"
2745
+ [title]="t().superscript"
2746
+ [active]="state().marks.superscript"
2747
+ [disabled]="!state().can.toggleSuperscript"
2748
+ (onClick)="onCommand('toggleSuperscript')"
2749
+ />
2750
+ } @if (config().subscript) {
2751
+ <tiptap-button
2752
+ icon="subscript"
2753
+ [title]="t().subscript"
2754
+ [active]="state().marks.subscript"
2755
+ [disabled]="!state().can.toggleSubscript"
2756
+ (onClick)="onCommand('toggleSubscript')"
2757
+ />
2758
+ } @if (config().highlight) {
2759
+ <tiptap-button
2760
+ icon="highlight"
2761
+ [title]="t().highlight"
2762
+ [active]="state().marks.highlight"
2763
+ [disabled]="!state().can.toggleHighlight"
2764
+ (onClick)="onCommand('toggleHighlight')"
2765
+ />
2766
+ } @if (config().highlightPicker) {
2767
+ <tiptap-color-picker
2768
+ mode="highlight"
2769
+ [editor]="editor()"
2770
+ [disabled]="!state().can.setHighlight"
2771
+ />
2772
+ } @if (config().textColor) {
2773
+ <tiptap-color-picker
2774
+ mode="text"
2775
+ [editor]="editor()"
2776
+ [disabled]="!state().can.setColor"
2777
+ />
2778
+ }
2779
+
2780
+ @if (config().separator && (config().heading1 || config().heading2 || config().heading3)) {
2781
+ <tiptap-separator />
2782
+ } @if (config().heading1) {
2783
+ <tiptap-button
2784
+ icon="format_h1"
2785
+ [title]="t().heading1"
2786
+ [active]="state().nodes.h1"
2787
+ [disabled]="!state().can.toggleHeading1"
2788
+ (onClick)="onCommand('toggleHeading', 1)"
2789
+ />
2790
+ } @if (config().heading2) {
2791
+ <tiptap-button
2792
+ icon="format_h2"
2793
+ [title]="t().heading2"
2794
+ [active]="state().nodes.h2"
2795
+ [disabled]="!state().can.toggleHeading2"
2796
+ (onClick)="onCommand('toggleHeading', 2)"
2797
+ />
2798
+ } @if (config().heading3) {
2799
+ <tiptap-button
2800
+ icon="format_h3"
2801
+ [title]="t().heading3"
2802
+ [active]="state().nodes.h3"
2803
+ [disabled]="!state().can.toggleHeading3"
2804
+ (onClick)="onCommand('toggleHeading', 3)"
2805
+ />
2806
+ } @if (config().separator && (config().bulletList || config().orderedList || config().blockquote)) {
2807
+ <tiptap-separator />
2808
+ } @if (config().bulletList) {
2809
+ <tiptap-button
2810
+ icon="format_list_bulleted"
2811
+ [title]="t().bulletList"
2812
+ [active]="state().nodes.isBulletList"
2813
+ [disabled]="!state().can.toggleBulletList"
2814
+ (onClick)="onCommand('toggleBulletList')"
2815
+ />
2816
+ } @if (config().orderedList) {
2817
+ <tiptap-button
2818
+ icon="format_list_numbered"
2819
+ [title]="t().orderedList"
2820
+ [active]="state().nodes.isOrderedList"
2821
+ [disabled]="!state().can.toggleOrderedList"
2822
+ (onClick)="onCommand('toggleOrderedList')"
2823
+ />
2824
+ } @if (config().blockquote) {
2825
+ <tiptap-button
2826
+ icon="format_quote"
2827
+ [title]="t().blockquote"
2828
+ [active]="state().nodes.isBlockquote"
2829
+ [disabled]="!state().can.toggleBlockquote"
2830
+ (onClick)="onCommand('toggleBlockquote')"
2831
+ />
2832
+ } @if (config().separator && (config().alignLeft || config().alignCenter || config().alignRight || config().alignJustify)) {
2833
+ <tiptap-separator />
2834
+ } @if (config().alignLeft) {
2835
+ <tiptap-button
2836
+ icon="format_align_left"
2837
+ [title]="t().alignLeft"
2838
+ [active]="state().nodes.alignLeft"
2839
+ [disabled]="!state().can.setTextAlignLeft"
2840
+ (onClick)="onCommand('setTextAlign', 'left')"
2841
+ />
2842
+ } @if (config().alignCenter) {
2843
+ <tiptap-button
2844
+ icon="format_align_center"
2845
+ [title]="t().alignCenter"
2846
+ [active]="state().nodes.alignCenter"
2847
+ [disabled]="!state().can.setTextAlignCenter"
2848
+ (onClick)="onCommand('setTextAlign', 'center')"
2849
+ />
2850
+ } @if (config().alignRight) {
2851
+ <tiptap-button
2852
+ icon="format_align_right"
2853
+ [title]="t().alignRight"
2854
+ [active]="state().nodes.alignRight"
2855
+ [disabled]="!state().can.setTextAlignRight"
2856
+ (onClick)="onCommand('setTextAlign', 'right')"
2857
+ />
2858
+ } @if (config().alignJustify) {
2859
+ <tiptap-button
2860
+ icon="format_align_justify"
2861
+ [title]="t().alignJustify"
2862
+ [active]="state().nodes.alignJustify"
2863
+ [disabled]="!state().can.setTextAlignJustify"
2864
+ (onClick)="onCommand('setTextAlign', 'justify')"
2865
+ />
2866
+ } @if (config().separator && (config().link || config().horizontalRule)) {
2867
+ <tiptap-separator />
2868
+ } @if (config().link) {
2869
+ <tiptap-button
2870
+ icon="link"
2871
+ [title]="t().link"
2872
+ [active]="state().marks.link"
2873
+ [disabled]="!state().can.toggleLink"
2874
+ (onClick)="onCommand('toggleLink', $event)"
2875
+ />
2876
+ } @if (config().horizontalRule) {
2877
+ <tiptap-button
2878
+ icon="horizontal_rule"
2879
+ [title]="t().horizontalRule"
2880
+ [disabled]="!state().can.insertHorizontalRule"
2881
+ (onClick)="onCommand('insertHorizontalRule')"
2882
+ />
2883
+ } @if (config().table) {
2884
+ <tiptap-button
2885
+ icon="table_view"
2886
+ [title]="t().table"
2887
+ [disabled]="!state().can.insertTable"
2888
+ (onClick)="onCommand('insertTable')"
2889
+ />
2890
+ } @if (config().separator && config().image) {
2891
+ <tiptap-separator />
2892
+ } @if (config().image) {
2893
+ <tiptap-button
2894
+ icon="image"
2895
+ [title]="t().image"
2896
+ [disabled]="!state().can.insertImage"
2897
+ (onClick)="onCommand('insertImage', imageUpload())"
2898
+ />
2899
+ } @if (config().separator && (config().undo || config().redo)) {
2900
+ <tiptap-separator />
2901
+ } @if (config().undo) {
2902
+ <tiptap-button
2903
+ icon="undo"
2904
+ [title]="t().undo"
2905
+ [disabled]="!state().can.undo"
2906
+ (onClick)="onCommand('undo')"
2907
+ />
2908
+ } @if (config().redo) {
2909
+ <tiptap-button
2910
+ icon="redo"
2911
+ [title]="t().redo"
2912
+ [disabled]="!state().can.redo"
2913
+ (onClick)="onCommand('redo')"
2914
+ />
2915
+ } @if (config().separator && config().clear) {
2916
+ <tiptap-separator />
2917
+ } @if (config().clear) {
2918
+ <tiptap-button
2919
+ icon="delete"
2920
+ [title]="t().clear"
2921
+ [disabled]="!state().isEditable"
2922
+ (onClick)="onCommand('clearContent')"
2923
+ />
2924
+ }
2925
+ </div>
2926
+ `, 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}.tiptap-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))}.tiptap-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)}.tiptap-toolbar.floating::-webkit-scrollbar{display:none}:host-context(.floating-toolbar:focus-within) .tiptap-toolbar.floating,:host-context(.floating-toolbar:hover) .tiptap-toolbar.floating{transform:translateY(-2rem)}@media (max-width: 768px){.tiptap-toolbar{padding:6px 8px;gap:2px}}@keyframes toolbarSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.tiptap-toolbar{animation:toolbarSlideIn .3s cubic-bezier(.4,0,.2,1)}\n"] }]
2924
2927
  }] });
2925
2928
 
2926
2929
  /**
@@ -3203,96 +3206,96 @@ class TiptapBubbleMenuComponent extends TiptapBaseBubbleMenu {
3203
3206
  // premature closing when clicking between 'sibling' menu instances.
3204
3207
  }
3205
3208
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapBubbleMenuComponent, isStandalone: true, selector: "tiptap-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3207
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3208
- @if (bubbleMenuConfig().bold) {
3209
- <tiptap-button
3210
- icon="format_bold"
3211
- [title]="t().bold"
3212
- [active]="state().marks.bold"
3213
- [disabled]="!state().can.toggleBold"
3214
- (onClick)="onCommand('toggleBold', $event)"
3215
- ></tiptap-button>
3216
- } @if (bubbleMenuConfig().italic) {
3217
- <tiptap-button
3218
- icon="format_italic"
3219
- [title]="t().italic"
3220
- [active]="state().marks.italic"
3221
- [disabled]="!state().can.toggleItalic"
3222
- (onClick)="onCommand('toggleItalic', $event)"
3223
- ></tiptap-button>
3224
- } @if (bubbleMenuConfig().underline) {
3225
- <tiptap-button
3226
- icon="format_underlined"
3227
- [title]="t().underline"
3228
- [active]="state().marks.underline"
3229
- [disabled]="!state().can.toggleUnderline"
3230
- (onClick)="onCommand('toggleUnderline', $event)"
3231
- ></tiptap-button>
3232
- } @if (bubbleMenuConfig().strike) {
3233
- <tiptap-button
3234
- icon="strikethrough_s"
3235
- [title]="t().strike"
3236
- [active]="state().marks.strike"
3237
- [disabled]="!state().can.toggleStrike"
3238
- (onClick)="onCommand('toggleStrike', $event)"
3239
- ></tiptap-button>
3240
- } @if (bubbleMenuConfig().code) {
3241
- <tiptap-button
3242
- icon="code"
3243
- [title]="t().code"
3244
- [active]="state().marks.code"
3245
- [disabled]="!state().can.toggleCode"
3246
- (onClick)="onCommand('toggleCode', $event)"
3247
- ></tiptap-button>
3248
- } @if (bubbleMenuConfig().superscript) {
3249
- <tiptap-button
3250
- icon="superscript"
3251
- [title]="t().superscript"
3252
- [active]="state().marks.superscript"
3253
- [disabled]="!state().can.toggleSuperscript"
3254
- (onClick)="onCommand('toggleSuperscript', $event)"
3255
- ></tiptap-button>
3256
- } @if (bubbleMenuConfig().subscript) {
3257
- <tiptap-button
3258
- icon="subscript"
3259
- [title]="t().subscript"
3260
- [active]="state().marks.subscript"
3261
- [disabled]="!state().can.toggleSubscript"
3262
- (onClick)="onCommand('toggleSubscript', $event)"
3263
- ></tiptap-button>
3264
- } @if (bubbleMenuConfig().highlight) {
3265
- <tiptap-button
3266
- icon="highlight"
3267
- [title]="t().highlight"
3268
- [active]="state().marks.highlight"
3269
- [disabled]="!state().can.toggleHighlight"
3270
- (onClick)="onCommand('toggleHighlight', $event)"
3271
- ></tiptap-button>
3272
- } @if (bubbleMenuConfig().highlightPicker) {
3273
- <tiptap-color-picker
3274
- mode="highlight"
3275
- [editor]="editor()"
3276
- [disabled]="!state().can.setHighlight"
3277
- [anchorToText]="true"
3278
- />
3279
- } @if (bubbleMenuConfig().textColor) {
3280
- <tiptap-color-picker
3281
- mode="text"
3282
- [editor]="editor()"
3283
- [disabled]="!state().can.setColor"
3284
- [anchorToText]="true"
3285
- />
3286
- } @if (bubbleMenuConfig().link) {
3287
- <tiptap-button
3288
- icon="link"
3289
- [title]="t().link"
3290
- [active]="state().marks.link"
3291
- [disabled]="!state().can.toggleLink"
3292
- (onClick)="onCommand('toggleLink', $event)"
3293
- ></tiptap-button>
3294
- }
3295
- </div>
3209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapBubbleMenuComponent, isStandalone: true, selector: "tiptap-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3210
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3211
+ @if (bubbleMenuConfig().bold) {
3212
+ <tiptap-button
3213
+ icon="format_bold"
3214
+ [title]="t().bold"
3215
+ [active]="state().marks.bold"
3216
+ [disabled]="!state().can.toggleBold"
3217
+ (onClick)="onCommand('toggleBold', $event)"
3218
+ ></tiptap-button>
3219
+ } @if (bubbleMenuConfig().italic) {
3220
+ <tiptap-button
3221
+ icon="format_italic"
3222
+ [title]="t().italic"
3223
+ [active]="state().marks.italic"
3224
+ [disabled]="!state().can.toggleItalic"
3225
+ (onClick)="onCommand('toggleItalic', $event)"
3226
+ ></tiptap-button>
3227
+ } @if (bubbleMenuConfig().underline) {
3228
+ <tiptap-button
3229
+ icon="format_underlined"
3230
+ [title]="t().underline"
3231
+ [active]="state().marks.underline"
3232
+ [disabled]="!state().can.toggleUnderline"
3233
+ (onClick)="onCommand('toggleUnderline', $event)"
3234
+ ></tiptap-button>
3235
+ } @if (bubbleMenuConfig().strike) {
3236
+ <tiptap-button
3237
+ icon="strikethrough_s"
3238
+ [title]="t().strike"
3239
+ [active]="state().marks.strike"
3240
+ [disabled]="!state().can.toggleStrike"
3241
+ (onClick)="onCommand('toggleStrike', $event)"
3242
+ ></tiptap-button>
3243
+ } @if (bubbleMenuConfig().code) {
3244
+ <tiptap-button
3245
+ icon="code"
3246
+ [title]="t().code"
3247
+ [active]="state().marks.code"
3248
+ [disabled]="!state().can.toggleCode"
3249
+ (onClick)="onCommand('toggleCode', $event)"
3250
+ ></tiptap-button>
3251
+ } @if (bubbleMenuConfig().superscript) {
3252
+ <tiptap-button
3253
+ icon="superscript"
3254
+ [title]="t().superscript"
3255
+ [active]="state().marks.superscript"
3256
+ [disabled]="!state().can.toggleSuperscript"
3257
+ (onClick)="onCommand('toggleSuperscript', $event)"
3258
+ ></tiptap-button>
3259
+ } @if (bubbleMenuConfig().subscript) {
3260
+ <tiptap-button
3261
+ icon="subscript"
3262
+ [title]="t().subscript"
3263
+ [active]="state().marks.subscript"
3264
+ [disabled]="!state().can.toggleSubscript"
3265
+ (onClick)="onCommand('toggleSubscript', $event)"
3266
+ ></tiptap-button>
3267
+ } @if (bubbleMenuConfig().highlight) {
3268
+ <tiptap-button
3269
+ icon="highlight"
3270
+ [title]="t().highlight"
3271
+ [active]="state().marks.highlight"
3272
+ [disabled]="!state().can.toggleHighlight"
3273
+ (onClick)="onCommand('toggleHighlight', $event)"
3274
+ ></tiptap-button>
3275
+ } @if (bubbleMenuConfig().highlightPicker) {
3276
+ <tiptap-color-picker
3277
+ mode="highlight"
3278
+ [editor]="editor()"
3279
+ [disabled]="!state().can.setHighlight"
3280
+ [anchorToText]="true"
3281
+ />
3282
+ } @if (bubbleMenuConfig().textColor) {
3283
+ <tiptap-color-picker
3284
+ mode="text"
3285
+ [editor]="editor()"
3286
+ [disabled]="!state().can.setColor"
3287
+ [anchorToText]="true"
3288
+ />
3289
+ } @if (bubbleMenuConfig().link) {
3290
+ <tiptap-button
3291
+ icon="link"
3292
+ [title]="t().link"
3293
+ [active]="state().marks.link"
3294
+ [disabled]="!state().can.toggleLink"
3295
+ (onClick)="onCommand('toggleLink', $event)"
3296
+ ></tiptap-button>
3297
+ }
3298
+ </div>
3296
3299
  `, isInline: true, dependencies: [{ kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapColorPickerComponent, selector: "tiptap-color-picker", inputs: ["editor", "mode", "disabled", "anchorToText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3297
3300
  }
3298
3301
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapBubbleMenuComponent, decorators: [{
@@ -3305,96 +3308,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3305
3308
  TiptapButtonComponent,
3306
3309
  TiptapColorPickerComponent,
3307
3310
  ],
3308
- template: `
3309
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3310
- @if (bubbleMenuConfig().bold) {
3311
- <tiptap-button
3312
- icon="format_bold"
3313
- [title]="t().bold"
3314
- [active]="state().marks.bold"
3315
- [disabled]="!state().can.toggleBold"
3316
- (onClick)="onCommand('toggleBold', $event)"
3317
- ></tiptap-button>
3318
- } @if (bubbleMenuConfig().italic) {
3319
- <tiptap-button
3320
- icon="format_italic"
3321
- [title]="t().italic"
3322
- [active]="state().marks.italic"
3323
- [disabled]="!state().can.toggleItalic"
3324
- (onClick)="onCommand('toggleItalic', $event)"
3325
- ></tiptap-button>
3326
- } @if (bubbleMenuConfig().underline) {
3327
- <tiptap-button
3328
- icon="format_underlined"
3329
- [title]="t().underline"
3330
- [active]="state().marks.underline"
3331
- [disabled]="!state().can.toggleUnderline"
3332
- (onClick)="onCommand('toggleUnderline', $event)"
3333
- ></tiptap-button>
3334
- } @if (bubbleMenuConfig().strike) {
3335
- <tiptap-button
3336
- icon="strikethrough_s"
3337
- [title]="t().strike"
3338
- [active]="state().marks.strike"
3339
- [disabled]="!state().can.toggleStrike"
3340
- (onClick)="onCommand('toggleStrike', $event)"
3341
- ></tiptap-button>
3342
- } @if (bubbleMenuConfig().code) {
3343
- <tiptap-button
3344
- icon="code"
3345
- [title]="t().code"
3346
- [active]="state().marks.code"
3347
- [disabled]="!state().can.toggleCode"
3348
- (onClick)="onCommand('toggleCode', $event)"
3349
- ></tiptap-button>
3350
- } @if (bubbleMenuConfig().superscript) {
3351
- <tiptap-button
3352
- icon="superscript"
3353
- [title]="t().superscript"
3354
- [active]="state().marks.superscript"
3355
- [disabled]="!state().can.toggleSuperscript"
3356
- (onClick)="onCommand('toggleSuperscript', $event)"
3357
- ></tiptap-button>
3358
- } @if (bubbleMenuConfig().subscript) {
3359
- <tiptap-button
3360
- icon="subscript"
3361
- [title]="t().subscript"
3362
- [active]="state().marks.subscript"
3363
- [disabled]="!state().can.toggleSubscript"
3364
- (onClick)="onCommand('toggleSubscript', $event)"
3365
- ></tiptap-button>
3366
- } @if (bubbleMenuConfig().highlight) {
3367
- <tiptap-button
3368
- icon="highlight"
3369
- [title]="t().highlight"
3370
- [active]="state().marks.highlight"
3371
- [disabled]="!state().can.toggleHighlight"
3372
- (onClick)="onCommand('toggleHighlight', $event)"
3373
- ></tiptap-button>
3374
- } @if (bubbleMenuConfig().highlightPicker) {
3375
- <tiptap-color-picker
3376
- mode="highlight"
3377
- [editor]="editor()"
3378
- [disabled]="!state().can.setHighlight"
3379
- [anchorToText]="true"
3380
- />
3381
- } @if (bubbleMenuConfig().textColor) {
3382
- <tiptap-color-picker
3383
- mode="text"
3384
- [editor]="editor()"
3385
- [disabled]="!state().can.setColor"
3386
- [anchorToText]="true"
3387
- />
3388
- } @if (bubbleMenuConfig().link) {
3389
- <tiptap-button
3390
- icon="link"
3391
- [title]="t().link"
3392
- [active]="state().marks.link"
3393
- [disabled]="!state().can.toggleLink"
3394
- (onClick)="onCommand('toggleLink', $event)"
3395
- ></tiptap-button>
3396
- }
3397
- </div>
3311
+ template: `
3312
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3313
+ @if (bubbleMenuConfig().bold) {
3314
+ <tiptap-button
3315
+ icon="format_bold"
3316
+ [title]="t().bold"
3317
+ [active]="state().marks.bold"
3318
+ [disabled]="!state().can.toggleBold"
3319
+ (onClick)="onCommand('toggleBold', $event)"
3320
+ ></tiptap-button>
3321
+ } @if (bubbleMenuConfig().italic) {
3322
+ <tiptap-button
3323
+ icon="format_italic"
3324
+ [title]="t().italic"
3325
+ [active]="state().marks.italic"
3326
+ [disabled]="!state().can.toggleItalic"
3327
+ (onClick)="onCommand('toggleItalic', $event)"
3328
+ ></tiptap-button>
3329
+ } @if (bubbleMenuConfig().underline) {
3330
+ <tiptap-button
3331
+ icon="format_underlined"
3332
+ [title]="t().underline"
3333
+ [active]="state().marks.underline"
3334
+ [disabled]="!state().can.toggleUnderline"
3335
+ (onClick)="onCommand('toggleUnderline', $event)"
3336
+ ></tiptap-button>
3337
+ } @if (bubbleMenuConfig().strike) {
3338
+ <tiptap-button
3339
+ icon="strikethrough_s"
3340
+ [title]="t().strike"
3341
+ [active]="state().marks.strike"
3342
+ [disabled]="!state().can.toggleStrike"
3343
+ (onClick)="onCommand('toggleStrike', $event)"
3344
+ ></tiptap-button>
3345
+ } @if (bubbleMenuConfig().code) {
3346
+ <tiptap-button
3347
+ icon="code"
3348
+ [title]="t().code"
3349
+ [active]="state().marks.code"
3350
+ [disabled]="!state().can.toggleCode"
3351
+ (onClick)="onCommand('toggleCode', $event)"
3352
+ ></tiptap-button>
3353
+ } @if (bubbleMenuConfig().superscript) {
3354
+ <tiptap-button
3355
+ icon="superscript"
3356
+ [title]="t().superscript"
3357
+ [active]="state().marks.superscript"
3358
+ [disabled]="!state().can.toggleSuperscript"
3359
+ (onClick)="onCommand('toggleSuperscript', $event)"
3360
+ ></tiptap-button>
3361
+ } @if (bubbleMenuConfig().subscript) {
3362
+ <tiptap-button
3363
+ icon="subscript"
3364
+ [title]="t().subscript"
3365
+ [active]="state().marks.subscript"
3366
+ [disabled]="!state().can.toggleSubscript"
3367
+ (onClick)="onCommand('toggleSubscript', $event)"
3368
+ ></tiptap-button>
3369
+ } @if (bubbleMenuConfig().highlight) {
3370
+ <tiptap-button
3371
+ icon="highlight"
3372
+ [title]="t().highlight"
3373
+ [active]="state().marks.highlight"
3374
+ [disabled]="!state().can.toggleHighlight"
3375
+ (onClick)="onCommand('toggleHighlight', $event)"
3376
+ ></tiptap-button>
3377
+ } @if (bubbleMenuConfig().highlightPicker) {
3378
+ <tiptap-color-picker
3379
+ mode="highlight"
3380
+ [editor]="editor()"
3381
+ [disabled]="!state().can.setHighlight"
3382
+ [anchorToText]="true"
3383
+ />
3384
+ } @if (bubbleMenuConfig().textColor) {
3385
+ <tiptap-color-picker
3386
+ mode="text"
3387
+ [editor]="editor()"
3388
+ [disabled]="!state().can.setColor"
3389
+ [anchorToText]="true"
3390
+ />
3391
+ } @if (bubbleMenuConfig().link) {
3392
+ <tiptap-button
3393
+ icon="link"
3394
+ [title]="t().link"
3395
+ [active]="state().marks.link"
3396
+ [disabled]="!state().can.toggleLink"
3397
+ (onClick)="onCommand('toggleLink', $event)"
3398
+ ></tiptap-button>
3399
+ }
3400
+ </div>
3398
3401
  `,
3399
3402
  }]
3400
3403
  }] });
@@ -3512,55 +3515,55 @@ class TiptapImageBubbleMenuComponent extends TiptapBaseBubbleMenu {
3512
3515
  }
3513
3516
  }
3514
3517
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapImageBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapImageBubbleMenuComponent, isStandalone: true, selector: "tiptap-image-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3516
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3517
- @if (imageBubbleMenuConfig().changeImage) {
3518
- <tiptap-button
3519
- icon="drive_file_rename_outline"
3520
- [title]="t().changeImage"
3521
- (onClick)="onCommand('changeImage', $event)"
3522
- ></tiptap-button>
3523
- } @if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
3524
- <tiptap-separator />
3525
- } @if (imageBubbleMenuConfig().resizeSmall) {
3526
- <tiptap-button
3527
- icon="crop_square"
3528
- iconSize="small"
3529
- [title]="t().resizeSmall"
3530
- (onClick)="onCommand('resizeSmall', $event)"
3531
- ></tiptap-button>
3532
- } @if (imageBubbleMenuConfig().resizeMedium) {
3533
- <tiptap-button
3534
- icon="crop_square"
3535
- iconSize="medium"
3536
- [title]="t().resizeMedium"
3537
- (onClick)="onCommand('resizeMedium', $event)"
3538
- ></tiptap-button>
3539
- } @if (imageBubbleMenuConfig().resizeLarge) {
3540
- <tiptap-button
3541
- icon="crop_square"
3542
- iconSize="large"
3543
- [title]="t().resizeLarge"
3544
- (onClick)="onCommand('resizeLarge', $event)"
3545
- ></tiptap-button>
3546
- } @if (imageBubbleMenuConfig().resizeOriginal) {
3547
- <tiptap-button
3548
- icon="photo_size_select_actual"
3549
- [title]="t().resizeOriginal"
3550
- (onClick)="onCommand('resizeOriginal', $event)"
3551
- ></tiptap-button>
3552
- } @if (imageBubbleMenuConfig().separator &&
3553
- imageBubbleMenuConfig().deleteImage) {
3554
- <tiptap-separator />
3555
- } @if (imageBubbleMenuConfig().deleteImage) {
3556
- <tiptap-button
3557
- icon="delete"
3558
- [title]="t().deleteImage"
3559
- variant="danger"
3560
- (onClick)="onCommand('deleteImage', $event)"
3561
- ></tiptap-button>
3562
- }
3563
- </div>
3518
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapImageBubbleMenuComponent, isStandalone: true, selector: "tiptap-image-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3519
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3520
+ @if (imageBubbleMenuConfig().changeImage) {
3521
+ <tiptap-button
3522
+ icon="drive_file_rename_outline"
3523
+ [title]="t().changeImage"
3524
+ (onClick)="onCommand('changeImage', $event)"
3525
+ ></tiptap-button>
3526
+ } @if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
3527
+ <tiptap-separator />
3528
+ } @if (imageBubbleMenuConfig().resizeSmall) {
3529
+ <tiptap-button
3530
+ icon="crop_square"
3531
+ iconSize="small"
3532
+ [title]="t().resizeSmall"
3533
+ (onClick)="onCommand('resizeSmall', $event)"
3534
+ ></tiptap-button>
3535
+ } @if (imageBubbleMenuConfig().resizeMedium) {
3536
+ <tiptap-button
3537
+ icon="crop_square"
3538
+ iconSize="medium"
3539
+ [title]="t().resizeMedium"
3540
+ (onClick)="onCommand('resizeMedium', $event)"
3541
+ ></tiptap-button>
3542
+ } @if (imageBubbleMenuConfig().resizeLarge) {
3543
+ <tiptap-button
3544
+ icon="crop_square"
3545
+ iconSize="large"
3546
+ [title]="t().resizeLarge"
3547
+ (onClick)="onCommand('resizeLarge', $event)"
3548
+ ></tiptap-button>
3549
+ } @if (imageBubbleMenuConfig().resizeOriginal) {
3550
+ <tiptap-button
3551
+ icon="photo_size_select_actual"
3552
+ [title]="t().resizeOriginal"
3553
+ (onClick)="onCommand('resizeOriginal', $event)"
3554
+ ></tiptap-button>
3555
+ } @if (imageBubbleMenuConfig().separator &&
3556
+ imageBubbleMenuConfig().deleteImage) {
3557
+ <tiptap-separator />
3558
+ } @if (imageBubbleMenuConfig().deleteImage) {
3559
+ <tiptap-button
3560
+ icon="delete"
3561
+ [title]="t().deleteImage"
3562
+ variant="danger"
3563
+ (onClick)="onCommand('deleteImage', $event)"
3564
+ ></tiptap-button>
3565
+ }
3566
+ </div>
3564
3567
  `, isInline: true, dependencies: [{ kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3565
3568
  }
3566
3569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapImageBubbleMenuComponent, decorators: [{
@@ -3570,55 +3573,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3570
3573
  standalone: true,
3571
3574
  changeDetection: ChangeDetectionStrategy.OnPush,
3572
3575
  imports: [TiptapButtonComponent, TiptapSeparatorComponent],
3573
- template: `
3574
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3575
- @if (imageBubbleMenuConfig().changeImage) {
3576
- <tiptap-button
3577
- icon="drive_file_rename_outline"
3578
- [title]="t().changeImage"
3579
- (onClick)="onCommand('changeImage', $event)"
3580
- ></tiptap-button>
3581
- } @if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
3582
- <tiptap-separator />
3583
- } @if (imageBubbleMenuConfig().resizeSmall) {
3584
- <tiptap-button
3585
- icon="crop_square"
3586
- iconSize="small"
3587
- [title]="t().resizeSmall"
3588
- (onClick)="onCommand('resizeSmall', $event)"
3589
- ></tiptap-button>
3590
- } @if (imageBubbleMenuConfig().resizeMedium) {
3591
- <tiptap-button
3592
- icon="crop_square"
3593
- iconSize="medium"
3594
- [title]="t().resizeMedium"
3595
- (onClick)="onCommand('resizeMedium', $event)"
3596
- ></tiptap-button>
3597
- } @if (imageBubbleMenuConfig().resizeLarge) {
3598
- <tiptap-button
3599
- icon="crop_square"
3600
- iconSize="large"
3601
- [title]="t().resizeLarge"
3602
- (onClick)="onCommand('resizeLarge', $event)"
3603
- ></tiptap-button>
3604
- } @if (imageBubbleMenuConfig().resizeOriginal) {
3605
- <tiptap-button
3606
- icon="photo_size_select_actual"
3607
- [title]="t().resizeOriginal"
3608
- (onClick)="onCommand('resizeOriginal', $event)"
3609
- ></tiptap-button>
3610
- } @if (imageBubbleMenuConfig().separator &&
3611
- imageBubbleMenuConfig().deleteImage) {
3612
- <tiptap-separator />
3613
- } @if (imageBubbleMenuConfig().deleteImage) {
3614
- <tiptap-button
3615
- icon="delete"
3616
- [title]="t().deleteImage"
3617
- variant="danger"
3618
- (onClick)="onCommand('deleteImage', $event)"
3619
- ></tiptap-button>
3620
- }
3621
- </div>
3576
+ template: `
3577
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3578
+ @if (imageBubbleMenuConfig().changeImage) {
3579
+ <tiptap-button
3580
+ icon="drive_file_rename_outline"
3581
+ [title]="t().changeImage"
3582
+ (onClick)="onCommand('changeImage', $event)"
3583
+ ></tiptap-button>
3584
+ } @if (imageBubbleMenuConfig().separator && hasResizeButtons()) {
3585
+ <tiptap-separator />
3586
+ } @if (imageBubbleMenuConfig().resizeSmall) {
3587
+ <tiptap-button
3588
+ icon="crop_square"
3589
+ iconSize="small"
3590
+ [title]="t().resizeSmall"
3591
+ (onClick)="onCommand('resizeSmall', $event)"
3592
+ ></tiptap-button>
3593
+ } @if (imageBubbleMenuConfig().resizeMedium) {
3594
+ <tiptap-button
3595
+ icon="crop_square"
3596
+ iconSize="medium"
3597
+ [title]="t().resizeMedium"
3598
+ (onClick)="onCommand('resizeMedium', $event)"
3599
+ ></tiptap-button>
3600
+ } @if (imageBubbleMenuConfig().resizeLarge) {
3601
+ <tiptap-button
3602
+ icon="crop_square"
3603
+ iconSize="large"
3604
+ [title]="t().resizeLarge"
3605
+ (onClick)="onCommand('resizeLarge', $event)"
3606
+ ></tiptap-button>
3607
+ } @if (imageBubbleMenuConfig().resizeOriginal) {
3608
+ <tiptap-button
3609
+ icon="photo_size_select_actual"
3610
+ [title]="t().resizeOriginal"
3611
+ (onClick)="onCommand('resizeOriginal', $event)"
3612
+ ></tiptap-button>
3613
+ } @if (imageBubbleMenuConfig().separator &&
3614
+ imageBubbleMenuConfig().deleteImage) {
3615
+ <tiptap-separator />
3616
+ } @if (imageBubbleMenuConfig().deleteImage) {
3617
+ <tiptap-button
3618
+ icon="delete"
3619
+ [title]="t().deleteImage"
3620
+ variant="danger"
3621
+ (onClick)="onCommand('deleteImage', $event)"
3622
+ ></tiptap-button>
3623
+ }
3624
+ </div>
3622
3625
  `,
3623
3626
  }]
3624
3627
  }] });
@@ -3696,94 +3699,94 @@ class TiptapTableBubbleMenuComponent extends TiptapBaseBubbleMenu {
3696
3699
  this.editorCommands.execute(editor, command);
3697
3700
  }
3698
3701
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapTableBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3699
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapTableBubbleMenuComponent, isStandalone: true, selector: "tiptap-table-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3700
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3701
- <!-- Row actions -->
3702
- @if (config().addRowBefore !== false) {
3703
- <tiptap-button
3704
- icon="add_row_above"
3705
- [title]="t().addRowBefore"
3706
- [disabled]="!state().can.addRowBefore"
3707
- (onClick)="onCommand('addRowBefore', $event)"
3708
- ></tiptap-button>
3709
- } @if (config().addRowAfter !== false) {
3710
- <tiptap-button
3711
- icon="add_row_below"
3712
- [title]="t().addRowAfter"
3713
- [disabled]="!state().can.addRowAfter"
3714
- (onClick)="onCommand('addRowAfter', $event)"
3715
- ></tiptap-button>
3716
- } @if (config().deleteRow !== false) {
3717
- <tiptap-button
3718
- icon="delete"
3719
- [title]="t().deleteRow"
3720
- variant="danger"
3721
- [disabled]="!state().can.deleteRow"
3722
- (onClick)="onCommand('deleteRow', $event)"
3723
- ></tiptap-button>
3724
- } @if (config().separator !== false) {
3725
- <tiptap-separator />
3726
- }
3727
-
3728
- <!-- Column actions -->
3729
- @if (config().addColumnBefore !== false) {
3730
- <tiptap-button
3731
- icon="add_column_left"
3732
- [title]="t().addColumnBefore"
3733
- [disabled]="!state().can.addColumnBefore"
3734
- (onClick)="onCommand('addColumnBefore', $event)"
3735
- ></tiptap-button>
3736
- } @if (config().addColumnAfter !== false) {
3737
- <tiptap-button
3738
- icon="add_column_right"
3739
- [title]="t().addColumnAfter"
3740
- [disabled]="!state().can.addColumnAfter"
3741
- (onClick)="onCommand('addColumnAfter', $event)"
3742
- ></tiptap-button>
3743
- } @if (config().deleteColumn !== false) {
3744
- <tiptap-button
3745
- icon="delete"
3746
- [title]="t().deleteColumn"
3747
- variant="danger"
3748
- [disabled]="!state().can.deleteColumn"
3749
- (onClick)="onCommand('deleteColumn', $event)"
3750
- ></tiptap-button>
3751
- } @if (config().separator !== false) {
3752
- <tiptap-separator />
3753
- }
3754
-
3755
- <!-- Cell actions -->
3756
- @if (config().toggleHeaderRow !== false) {
3757
- <tiptap-button
3758
- icon="toolbar"
3759
- [title]="t().toggleHeaderRow"
3760
- [active]="state().nodes.isTableHeaderRow"
3761
- [disabled]="!state().can.toggleHeaderRow"
3762
- (onClick)="onCommand('toggleHeaderRow', $event)"
3763
- ></tiptap-button>
3764
- } @if (config().toggleHeaderColumn !== false) {
3765
- <tiptap-button
3766
- icon="dock_to_right"
3767
- [title]="t().toggleHeaderColumn"
3768
- [active]="state().nodes.isTableHeaderColumn"
3769
- [disabled]="!state().can.toggleHeaderColumn"
3770
- (onClick)="onCommand('toggleHeaderColumn', $event)"
3771
- ></tiptap-button>
3772
- } @if (config().separator !== false && config().deleteTable !== false) {
3773
- <tiptap-separator />
3774
- }
3775
-
3776
- <!-- Table actions -->
3777
- @if (config().deleteTable !== false) {
3778
- <tiptap-button
3779
- icon="delete_forever"
3780
- [title]="t().deleteTable"
3781
- variant="danger"
3782
- [disabled]="!state().can.deleteTable"
3783
- (onClick)="onCommand('deleteTable', $event)"
3784
- ></tiptap-button>
3785
- }
3786
- </div>
3702
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapTableBubbleMenuComponent, isStandalone: true, selector: "tiptap-table-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3703
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3704
+ <!-- Row actions -->
3705
+ @if (config().addRowBefore !== false) {
3706
+ <tiptap-button
3707
+ icon="add_row_above"
3708
+ [title]="t().addRowBefore"
3709
+ [disabled]="!state().can.addRowBefore"
3710
+ (onClick)="onCommand('addRowBefore', $event)"
3711
+ ></tiptap-button>
3712
+ } @if (config().addRowAfter !== false) {
3713
+ <tiptap-button
3714
+ icon="add_row_below"
3715
+ [title]="t().addRowAfter"
3716
+ [disabled]="!state().can.addRowAfter"
3717
+ (onClick)="onCommand('addRowAfter', $event)"
3718
+ ></tiptap-button>
3719
+ } @if (config().deleteRow !== false) {
3720
+ <tiptap-button
3721
+ icon="delete"
3722
+ [title]="t().deleteRow"
3723
+ variant="danger"
3724
+ [disabled]="!state().can.deleteRow"
3725
+ (onClick)="onCommand('deleteRow', $event)"
3726
+ ></tiptap-button>
3727
+ } @if (config().separator !== false) {
3728
+ <tiptap-separator />
3729
+ }
3730
+
3731
+ <!-- Column actions -->
3732
+ @if (config().addColumnBefore !== false) {
3733
+ <tiptap-button
3734
+ icon="add_column_left"
3735
+ [title]="t().addColumnBefore"
3736
+ [disabled]="!state().can.addColumnBefore"
3737
+ (onClick)="onCommand('addColumnBefore', $event)"
3738
+ ></tiptap-button>
3739
+ } @if (config().addColumnAfter !== false) {
3740
+ <tiptap-button
3741
+ icon="add_column_right"
3742
+ [title]="t().addColumnAfter"
3743
+ [disabled]="!state().can.addColumnAfter"
3744
+ (onClick)="onCommand('addColumnAfter', $event)"
3745
+ ></tiptap-button>
3746
+ } @if (config().deleteColumn !== false) {
3747
+ <tiptap-button
3748
+ icon="delete"
3749
+ [title]="t().deleteColumn"
3750
+ variant="danger"
3751
+ [disabled]="!state().can.deleteColumn"
3752
+ (onClick)="onCommand('deleteColumn', $event)"
3753
+ ></tiptap-button>
3754
+ } @if (config().separator !== false) {
3755
+ <tiptap-separator />
3756
+ }
3757
+
3758
+ <!-- Cell actions -->
3759
+ @if (config().toggleHeaderRow !== false) {
3760
+ <tiptap-button
3761
+ icon="toolbar"
3762
+ [title]="t().toggleHeaderRow"
3763
+ [active]="state().nodes.isTableHeaderRow"
3764
+ [disabled]="!state().can.toggleHeaderRow"
3765
+ (onClick)="onCommand('toggleHeaderRow', $event)"
3766
+ ></tiptap-button>
3767
+ } @if (config().toggleHeaderColumn !== false) {
3768
+ <tiptap-button
3769
+ icon="dock_to_right"
3770
+ [title]="t().toggleHeaderColumn"
3771
+ [active]="state().nodes.isTableHeaderColumn"
3772
+ [disabled]="!state().can.toggleHeaderColumn"
3773
+ (onClick)="onCommand('toggleHeaderColumn', $event)"
3774
+ ></tiptap-button>
3775
+ } @if (config().separator !== false && config().deleteTable !== false) {
3776
+ <tiptap-separator />
3777
+ }
3778
+
3779
+ <!-- Table actions -->
3780
+ @if (config().deleteTable !== false) {
3781
+ <tiptap-button
3782
+ icon="delete_forever"
3783
+ [title]="t().deleteTable"
3784
+ variant="danger"
3785
+ [disabled]="!state().can.deleteTable"
3786
+ (onClick)="onCommand('deleteTable', $event)"
3787
+ ></tiptap-button>
3788
+ }
3789
+ </div>
3787
3790
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3788
3791
  }
3789
3792
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapTableBubbleMenuComponent, decorators: [{
@@ -3793,94 +3796,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3793
3796
  standalone: true,
3794
3797
  changeDetection: ChangeDetectionStrategy.OnPush,
3795
3798
  imports: [CommonModule, TiptapButtonComponent, TiptapSeparatorComponent],
3796
- template: `
3797
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3798
- <!-- Row actions -->
3799
- @if (config().addRowBefore !== false) {
3800
- <tiptap-button
3801
- icon="add_row_above"
3802
- [title]="t().addRowBefore"
3803
- [disabled]="!state().can.addRowBefore"
3804
- (onClick)="onCommand('addRowBefore', $event)"
3805
- ></tiptap-button>
3806
- } @if (config().addRowAfter !== false) {
3807
- <tiptap-button
3808
- icon="add_row_below"
3809
- [title]="t().addRowAfter"
3810
- [disabled]="!state().can.addRowAfter"
3811
- (onClick)="onCommand('addRowAfter', $event)"
3812
- ></tiptap-button>
3813
- } @if (config().deleteRow !== false) {
3814
- <tiptap-button
3815
- icon="delete"
3816
- [title]="t().deleteRow"
3817
- variant="danger"
3818
- [disabled]="!state().can.deleteRow"
3819
- (onClick)="onCommand('deleteRow', $event)"
3820
- ></tiptap-button>
3821
- } @if (config().separator !== false) {
3822
- <tiptap-separator />
3823
- }
3824
-
3825
- <!-- Column actions -->
3826
- @if (config().addColumnBefore !== false) {
3827
- <tiptap-button
3828
- icon="add_column_left"
3829
- [title]="t().addColumnBefore"
3830
- [disabled]="!state().can.addColumnBefore"
3831
- (onClick)="onCommand('addColumnBefore', $event)"
3832
- ></tiptap-button>
3833
- } @if (config().addColumnAfter !== false) {
3834
- <tiptap-button
3835
- icon="add_column_right"
3836
- [title]="t().addColumnAfter"
3837
- [disabled]="!state().can.addColumnAfter"
3838
- (onClick)="onCommand('addColumnAfter', $event)"
3839
- ></tiptap-button>
3840
- } @if (config().deleteColumn !== false) {
3841
- <tiptap-button
3842
- icon="delete"
3843
- [title]="t().deleteColumn"
3844
- variant="danger"
3845
- [disabled]="!state().can.deleteColumn"
3846
- (onClick)="onCommand('deleteColumn', $event)"
3847
- ></tiptap-button>
3848
- } @if (config().separator !== false) {
3849
- <tiptap-separator />
3850
- }
3851
-
3852
- <!-- Cell actions -->
3853
- @if (config().toggleHeaderRow !== false) {
3854
- <tiptap-button
3855
- icon="toolbar"
3856
- [title]="t().toggleHeaderRow"
3857
- [active]="state().nodes.isTableHeaderRow"
3858
- [disabled]="!state().can.toggleHeaderRow"
3859
- (onClick)="onCommand('toggleHeaderRow', $event)"
3860
- ></tiptap-button>
3861
- } @if (config().toggleHeaderColumn !== false) {
3862
- <tiptap-button
3863
- icon="dock_to_right"
3864
- [title]="t().toggleHeaderColumn"
3865
- [active]="state().nodes.isTableHeaderColumn"
3866
- [disabled]="!state().can.toggleHeaderColumn"
3867
- (onClick)="onCommand('toggleHeaderColumn', $event)"
3868
- ></tiptap-button>
3869
- } @if (config().separator !== false && config().deleteTable !== false) {
3870
- <tiptap-separator />
3871
- }
3872
-
3873
- <!-- Table actions -->
3874
- @if (config().deleteTable !== false) {
3875
- <tiptap-button
3876
- icon="delete_forever"
3877
- [title]="t().deleteTable"
3878
- variant="danger"
3879
- [disabled]="!state().can.deleteTable"
3880
- (onClick)="onCommand('deleteTable', $event)"
3881
- ></tiptap-button>
3882
- }
3883
- </div>
3799
+ template: `
3800
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3801
+ <!-- Row actions -->
3802
+ @if (config().addRowBefore !== false) {
3803
+ <tiptap-button
3804
+ icon="add_row_above"
3805
+ [title]="t().addRowBefore"
3806
+ [disabled]="!state().can.addRowBefore"
3807
+ (onClick)="onCommand('addRowBefore', $event)"
3808
+ ></tiptap-button>
3809
+ } @if (config().addRowAfter !== false) {
3810
+ <tiptap-button
3811
+ icon="add_row_below"
3812
+ [title]="t().addRowAfter"
3813
+ [disabled]="!state().can.addRowAfter"
3814
+ (onClick)="onCommand('addRowAfter', $event)"
3815
+ ></tiptap-button>
3816
+ } @if (config().deleteRow !== false) {
3817
+ <tiptap-button
3818
+ icon="delete"
3819
+ [title]="t().deleteRow"
3820
+ variant="danger"
3821
+ [disabled]="!state().can.deleteRow"
3822
+ (onClick)="onCommand('deleteRow', $event)"
3823
+ ></tiptap-button>
3824
+ } @if (config().separator !== false) {
3825
+ <tiptap-separator />
3826
+ }
3827
+
3828
+ <!-- Column actions -->
3829
+ @if (config().addColumnBefore !== false) {
3830
+ <tiptap-button
3831
+ icon="add_column_left"
3832
+ [title]="t().addColumnBefore"
3833
+ [disabled]="!state().can.addColumnBefore"
3834
+ (onClick)="onCommand('addColumnBefore', $event)"
3835
+ ></tiptap-button>
3836
+ } @if (config().addColumnAfter !== false) {
3837
+ <tiptap-button
3838
+ icon="add_column_right"
3839
+ [title]="t().addColumnAfter"
3840
+ [disabled]="!state().can.addColumnAfter"
3841
+ (onClick)="onCommand('addColumnAfter', $event)"
3842
+ ></tiptap-button>
3843
+ } @if (config().deleteColumn !== false) {
3844
+ <tiptap-button
3845
+ icon="delete"
3846
+ [title]="t().deleteColumn"
3847
+ variant="danger"
3848
+ [disabled]="!state().can.deleteColumn"
3849
+ (onClick)="onCommand('deleteColumn', $event)"
3850
+ ></tiptap-button>
3851
+ } @if (config().separator !== false) {
3852
+ <tiptap-separator />
3853
+ }
3854
+
3855
+ <!-- Cell actions -->
3856
+ @if (config().toggleHeaderRow !== false) {
3857
+ <tiptap-button
3858
+ icon="toolbar"
3859
+ [title]="t().toggleHeaderRow"
3860
+ [active]="state().nodes.isTableHeaderRow"
3861
+ [disabled]="!state().can.toggleHeaderRow"
3862
+ (onClick)="onCommand('toggleHeaderRow', $event)"
3863
+ ></tiptap-button>
3864
+ } @if (config().toggleHeaderColumn !== false) {
3865
+ <tiptap-button
3866
+ icon="dock_to_right"
3867
+ [title]="t().toggleHeaderColumn"
3868
+ [active]="state().nodes.isTableHeaderColumn"
3869
+ [disabled]="!state().can.toggleHeaderColumn"
3870
+ (onClick)="onCommand('toggleHeaderColumn', $event)"
3871
+ ></tiptap-button>
3872
+ } @if (config().separator !== false && config().deleteTable !== false) {
3873
+ <tiptap-separator />
3874
+ }
3875
+
3876
+ <!-- Table actions -->
3877
+ @if (config().deleteTable !== false) {
3878
+ <tiptap-button
3879
+ icon="delete_forever"
3880
+ [title]="t().deleteTable"
3881
+ variant="danger"
3882
+ [disabled]="!state().can.deleteTable"
3883
+ (onClick)="onCommand('deleteTable', $event)"
3884
+ ></tiptap-button>
3885
+ }
3886
+ </div>
3884
3887
  `,
3885
3888
  }]
3886
3889
  }] });
@@ -3953,25 +3956,25 @@ class TiptapCellBubbleMenuComponent extends TiptapBaseBubbleMenu {
3953
3956
  this.editorCommands.execute(editor, command);
3954
3957
  }
3955
3958
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapCellBubbleMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3956
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapCellBubbleMenuComponent, isStandalone: true, selector: "tiptap-cell-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3957
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3958
- <!-- Cell specific actions -->
3959
- @if (config().mergeCells !== false && !state().selection.isSingleCell) {
3960
- <tiptap-button
3961
- icon="cell_merge"
3962
- [title]="i18n().table().mergeCells"
3963
- [disabled]="!state().can.mergeCells"
3964
- (onClick)="onCommand('mergeCells', $event)"
3965
- ></tiptap-button>
3966
- } @if (config().splitCell !== false && state().selection.isSingleCell) {
3967
- <tiptap-button
3968
- icon="split_scene"
3969
- [title]="i18n().table().splitCell"
3970
- [disabled]="!state().can.splitCell"
3971
- (onClick)="onCommand('splitCell', $event)"
3972
- ></tiptap-button>
3973
- }
3974
- </div>
3959
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapCellBubbleMenuComponent, isStandalone: true, selector: "tiptap-cell-bubble-menu", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
3960
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3961
+ <!-- Cell specific actions -->
3962
+ @if (config().mergeCells !== false && !state().selection.isSingleCell) {
3963
+ <tiptap-button
3964
+ icon="cell_merge"
3965
+ [title]="i18n().table().mergeCells"
3966
+ [disabled]="!state().can.mergeCells"
3967
+ (onClick)="onCommand('mergeCells', $event)"
3968
+ ></tiptap-button>
3969
+ } @if (config().splitCell !== false && state().selection.isSingleCell) {
3970
+ <tiptap-button
3971
+ icon="split_scene"
3972
+ [title]="i18n().table().splitCell"
3973
+ [disabled]="!state().can.splitCell"
3974
+ (onClick)="onCommand('splitCell', $event)"
3975
+ ></tiptap-button>
3976
+ }
3977
+ </div>
3975
3978
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3976
3979
  }
3977
3980
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapCellBubbleMenuComponent, decorators: [{
@@ -3981,25 +3984,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
3981
3984
  standalone: true,
3982
3985
  changeDetection: ChangeDetectionStrategy.OnPush,
3983
3986
  imports: [CommonModule, TiptapButtonComponent],
3984
- template: `
3985
- <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3986
- <!-- Cell specific actions -->
3987
- @if (config().mergeCells !== false && !state().selection.isSingleCell) {
3988
- <tiptap-button
3989
- icon="cell_merge"
3990
- [title]="i18n().table().mergeCells"
3991
- [disabled]="!state().can.mergeCells"
3992
- (onClick)="onCommand('mergeCells', $event)"
3993
- ></tiptap-button>
3994
- } @if (config().splitCell !== false && state().selection.isSingleCell) {
3995
- <tiptap-button
3996
- icon="split_scene"
3997
- [title]="i18n().table().splitCell"
3998
- [disabled]="!state().can.splitCell"
3999
- (onClick)="onCommand('splitCell', $event)"
4000
- ></tiptap-button>
4001
- }
4002
- </div>
3987
+ template: `
3988
+ <div #menuRef class="bubble-menu" (mousedown)="$event.preventDefault()">
3989
+ <!-- Cell specific actions -->
3990
+ @if (config().mergeCells !== false && !state().selection.isSingleCell) {
3991
+ <tiptap-button
3992
+ icon="cell_merge"
3993
+ [title]="i18n().table().mergeCells"
3994
+ [disabled]="!state().can.mergeCells"
3995
+ (onClick)="onCommand('mergeCells', $event)"
3996
+ ></tiptap-button>
3997
+ } @if (config().splitCell !== false && state().selection.isSingleCell) {
3998
+ <tiptap-button
3999
+ icon="split_scene"
4000
+ [title]="i18n().table().splitCell"
4001
+ [disabled]="!state().can.splitCell"
4002
+ (onClick)="onCommand('splitCell', $event)"
4003
+ ></tiptap-button>
4004
+ }
4005
+ </div>
4003
4006
  `,
4004
4007
  }]
4005
4008
  }] });
@@ -4215,108 +4218,108 @@ class TiptapLinkBubbleMenuComponent {
4215
4218
  this.hideTippy();
4216
4219
  }
4217
4220
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapLinkBubbleMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4218
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: TiptapLinkBubbleMenuComponent, isStandalone: true, selector: "tiptap-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: `
4219
- <div
4220
- #menuRef
4221
- class="bubble-menu"
4222
- (mousedown)="onMouseDown($event)"
4223
- (click)="$event.stopPropagation()"
4224
- >
4225
- <div class="link-input-row">
4226
- <div class="url-input-container">
4227
- <span class="material-symbols-outlined icon-link">link</span>
4228
- <input
4229
- #linkInput
4230
- type="text"
4231
- class="url-field"
4232
- [placeholder]="t().linkUrl"
4233
- [ngModel]="editUrl()"
4234
- (ngModelChange)="editUrl.set($event)"
4235
- (focus)="onFocus()"
4236
- (blur)="onBlur()"
4237
- (keydown.enter)="onApply($event)"
4238
- (keydown.escape)="onCancel($event)"
4239
- />
4240
- </div>
4241
-
4242
- <div class="action-buttons">
4243
- <tiptap-button
4244
- icon="check"
4245
- [title]="common().apply"
4246
- color="var(--ate-primary)"
4247
- [disabled]="!editUrl().trim()"
4248
- (onClick)="onApply($event)"
4249
- ></tiptap-button>
4250
- <tiptap-button
4251
- icon="open_in_new"
4252
- [title]="t().openLink"
4253
- [disabled]="!currentUrl()"
4254
- (onClick)="onOpenLink($event)"
4255
- ></tiptap-button>
4256
- <tiptap-separator />
4257
- <tiptap-button
4258
- icon="link_off"
4259
- [title]="t().removeLink"
4260
- variant="danger"
4261
- [disabled]="!currentUrl()"
4262
- (onClick)="onRemove($event)"
4263
- ></tiptap-button>
4264
- </div>
4265
- </div>
4266
- </div>
4221
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: TiptapLinkBubbleMenuComponent, isStandalone: true, selector: "tiptap-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: `
4222
+ <div
4223
+ #menuRef
4224
+ class="bubble-menu"
4225
+ (mousedown)="onMouseDown($event)"
4226
+ (click)="$event.stopPropagation()"
4227
+ >
4228
+ <div class="link-input-row">
4229
+ <div class="url-input-container">
4230
+ <span class="material-symbols-outlined icon-link">link</span>
4231
+ <input
4232
+ #linkInput
4233
+ type="text"
4234
+ class="url-field"
4235
+ [placeholder]="t().linkUrl"
4236
+ [ngModel]="editUrl()"
4237
+ (ngModelChange)="editUrl.set($event)"
4238
+ (focus)="onFocus()"
4239
+ (blur)="onBlur()"
4240
+ (keydown.enter)="onApply($event)"
4241
+ (keydown.escape)="onCancel($event)"
4242
+ />
4243
+ </div>
4244
+
4245
+ <div class="action-buttons">
4246
+ <tiptap-button
4247
+ icon="check"
4248
+ [title]="common().apply"
4249
+ color="var(--ate-primary)"
4250
+ [disabled]="!editUrl().trim()"
4251
+ (onClick)="onApply($event)"
4252
+ ></tiptap-button>
4253
+ <tiptap-button
4254
+ icon="open_in_new"
4255
+ [title]="t().openLink"
4256
+ [disabled]="!currentUrl()"
4257
+ (onClick)="onOpenLink($event)"
4258
+ ></tiptap-button>
4259
+ <tiptap-separator />
4260
+ <tiptap-button
4261
+ icon="link_off"
4262
+ [title]="t().removeLink"
4263
+ variant="danger"
4264
+ [disabled]="!currentUrl()"
4265
+ (onClick)="onRemove($event)"
4266
+ ></tiptap-button>
4267
+ </div>
4268
+ </div>
4269
+ </div>
4267
4270
  `, 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: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-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 }); }
4268
4271
  }
4269
4272
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapLinkBubbleMenuComponent, decorators: [{
4270
4273
  type: Component,
4271
- args: [{ selector: "tiptap-link-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TiptapButtonComponent, TiptapSeparatorComponent, FormsModule], template: `
4272
- <div
4273
- #menuRef
4274
- class="bubble-menu"
4275
- (mousedown)="onMouseDown($event)"
4276
- (click)="$event.stopPropagation()"
4277
- >
4278
- <div class="link-input-row">
4279
- <div class="url-input-container">
4280
- <span class="material-symbols-outlined icon-link">link</span>
4281
- <input
4282
- #linkInput
4283
- type="text"
4284
- class="url-field"
4285
- [placeholder]="t().linkUrl"
4286
- [ngModel]="editUrl()"
4287
- (ngModelChange)="editUrl.set($event)"
4288
- (focus)="onFocus()"
4289
- (blur)="onBlur()"
4290
- (keydown.enter)="onApply($event)"
4291
- (keydown.escape)="onCancel($event)"
4292
- />
4293
- </div>
4294
-
4295
- <div class="action-buttons">
4296
- <tiptap-button
4297
- icon="check"
4298
- [title]="common().apply"
4299
- color="var(--ate-primary)"
4300
- [disabled]="!editUrl().trim()"
4301
- (onClick)="onApply($event)"
4302
- ></tiptap-button>
4303
- <tiptap-button
4304
- icon="open_in_new"
4305
- [title]="t().openLink"
4306
- [disabled]="!currentUrl()"
4307
- (onClick)="onOpenLink($event)"
4308
- ></tiptap-button>
4309
- <tiptap-separator />
4310
- <tiptap-button
4311
- icon="link_off"
4312
- [title]="t().removeLink"
4313
- variant="danger"
4314
- [disabled]="!currentUrl()"
4315
- (onClick)="onRemove($event)"
4316
- ></tiptap-button>
4317
- </div>
4318
- </div>
4319
- </div>
4274
+ args: [{ selector: "tiptap-link-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TiptapButtonComponent, TiptapSeparatorComponent, FormsModule], template: `
4275
+ <div
4276
+ #menuRef
4277
+ class="bubble-menu"
4278
+ (mousedown)="onMouseDown($event)"
4279
+ (click)="$event.stopPropagation()"
4280
+ >
4281
+ <div class="link-input-row">
4282
+ <div class="url-input-container">
4283
+ <span class="material-symbols-outlined icon-link">link</span>
4284
+ <input
4285
+ #linkInput
4286
+ type="text"
4287
+ class="url-field"
4288
+ [placeholder]="t().linkUrl"
4289
+ [ngModel]="editUrl()"
4290
+ (ngModelChange)="editUrl.set($event)"
4291
+ (focus)="onFocus()"
4292
+ (blur)="onBlur()"
4293
+ (keydown.enter)="onApply($event)"
4294
+ (keydown.escape)="onCancel($event)"
4295
+ />
4296
+ </div>
4297
+
4298
+ <div class="action-buttons">
4299
+ <tiptap-button
4300
+ icon="check"
4301
+ [title]="common().apply"
4302
+ color="var(--ate-primary)"
4303
+ [disabled]="!editUrl().trim()"
4304
+ (onClick)="onApply($event)"
4305
+ ></tiptap-button>
4306
+ <tiptap-button
4307
+ icon="open_in_new"
4308
+ [title]="t().openLink"
4309
+ [disabled]="!currentUrl()"
4310
+ (onClick)="onOpenLink($event)"
4311
+ ></tiptap-button>
4312
+ <tiptap-separator />
4313
+ <tiptap-button
4314
+ icon="link_off"
4315
+ [title]="t().removeLink"
4316
+ variant="danger"
4317
+ [disabled]="!currentUrl()"
4318
+ (onClick)="onRemove($event)"
4319
+ ></tiptap-button>
4320
+ </div>
4321
+ </div>
4322
+ </div>
4320
4323
  `, 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"] }]
4321
4324
  }], ctorParameters: () => [], propDecorators: { linkInput: [{
4322
4325
  type: ViewChild,
@@ -4577,174 +4580,174 @@ class TiptapColorBubbleMenuComponent {
4577
4580
  }, 150);
4578
4581
  }
4579
4582
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapColorBubbleMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4580
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapColorBubbleMenuComponent, isStandalone: true, selector: "tiptap-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: `
4581
- <div
4582
- #menuRef
4583
- class="bubble-menu color-bubble-menu"
4584
- (mousedown)="onMouseDown($event)"
4585
- (click)="$event.stopPropagation()"
4586
- >
4587
- <div class="color-picker-container">
4588
- <div class="dropdown-row presets">
4589
- <div class="color-grid">
4590
- @for (color of presets; track color) {
4591
- <tiptap-button
4592
- class="color-swatch-btn"
4593
- size="small"
4594
- [title]="color"
4595
- [active]="isColorActive(color)"
4596
- [backgroundColor]="color"
4597
- (onClick)="applyColor(color, true, $event)"
4598
- ></tiptap-button>
4599
- }
4600
- </div>
4601
- </div>
4602
-
4603
- <div class="dropdown-row controls">
4604
- <div class="hex-input-wrapper">
4605
- <span class="hex-hash">#</span>
4606
- <input
4607
- #hexInput
4608
- type="text"
4609
- class="hex-input"
4610
- [value]="hexValue()"
4611
- [attr.aria-label]="t().customColor"
4612
- (input)="onHexInput($event)"
4613
- (change)="onHexChange($event)"
4614
- (keydown.enter)="onApply($event)"
4615
- (focus)="onFocus()"
4616
- (blur)="onBlur()"
4617
- maxlength="6"
4618
- placeholder="000000"
4619
- />
4620
- </div>
4621
-
4622
- <div class="native-trigger-wrapper">
4623
- <tiptap-button
4624
- class="btn-native-picker-trigger"
4625
- icon="colorize"
4626
- [title]="t().customColor"
4627
- [backgroundColor]="currentColor()"
4628
- (onClick)="triggerNativePicker($event)"
4629
- ></tiptap-button>
4630
- <input
4631
- #colorInput
4632
- type="color"
4633
- class="hidden-native-input"
4634
- [value]="currentColor()"
4635
- [attr.aria-label]="t().customColor"
4636
- (input)="onNativeInput($event)"
4637
- (change)="onNativeChange($event)"
4638
- (focus)="onFocus()"
4639
- (blur)="onBlur()"
4640
- />
4641
- </div>
4642
-
4643
- <tiptap-button
4644
- icon="check"
4645
- [title]="common().apply"
4646
- color="var(--ate-primary)"
4647
- (onClick)="onApply($event)"
4648
- ></tiptap-button>
4649
-
4650
- <tiptap-separator />
4651
-
4652
- <tiptap-button
4653
- icon="format_color_reset"
4654
- [title]="t().clear"
4655
- variant="danger"
4656
- (onClick)="onClearColor($event)"
4657
- ></tiptap-button>
4658
- </div>
4659
-
4660
- </div>
4661
- </div>
4583
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapColorBubbleMenuComponent, isStandalone: true, selector: "tiptap-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: `
4584
+ <div
4585
+ #menuRef
4586
+ class="bubble-menu color-bubble-menu"
4587
+ (mousedown)="onMouseDown($event)"
4588
+ (click)="$event.stopPropagation()"
4589
+ >
4590
+ <div class="color-picker-container">
4591
+ <div class="dropdown-row presets">
4592
+ <div class="color-grid">
4593
+ @for (color of presets; track color) {
4594
+ <tiptap-button
4595
+ class="color-swatch-btn"
4596
+ size="small"
4597
+ [title]="color"
4598
+ [active]="isColorActive(color)"
4599
+ [backgroundColor]="color"
4600
+ (onClick)="applyColor(color, true, $event)"
4601
+ ></tiptap-button>
4602
+ }
4603
+ </div>
4604
+ </div>
4605
+
4606
+ <div class="dropdown-row controls">
4607
+ <div class="hex-input-wrapper">
4608
+ <span class="hex-hash">#</span>
4609
+ <input
4610
+ #hexInput
4611
+ type="text"
4612
+ class="hex-input"
4613
+ [value]="hexValue()"
4614
+ [attr.aria-label]="t().customColor"
4615
+ (input)="onHexInput($event)"
4616
+ (change)="onHexChange($event)"
4617
+ (keydown.enter)="onApply($event)"
4618
+ (focus)="onFocus()"
4619
+ (blur)="onBlur()"
4620
+ maxlength="6"
4621
+ placeholder="000000"
4622
+ />
4623
+ </div>
4624
+
4625
+ <div class="native-trigger-wrapper">
4626
+ <tiptap-button
4627
+ class="btn-native-picker-trigger"
4628
+ icon="colorize"
4629
+ [title]="t().customColor"
4630
+ [backgroundColor]="currentColor()"
4631
+ (onClick)="triggerNativePicker($event)"
4632
+ ></tiptap-button>
4633
+ <input
4634
+ #colorInput
4635
+ type="color"
4636
+ class="hidden-native-input"
4637
+ [value]="currentColor()"
4638
+ [attr.aria-label]="t().customColor"
4639
+ (input)="onNativeInput($event)"
4640
+ (change)="onNativeChange($event)"
4641
+ (focus)="onFocus()"
4642
+ (blur)="onBlur()"
4643
+ />
4644
+ </div>
4645
+
4646
+ <tiptap-button
4647
+ icon="check"
4648
+ [title]="common().apply"
4649
+ color="var(--ate-primary)"
4650
+ (onClick)="onApply($event)"
4651
+ ></tiptap-button>
4652
+
4653
+ <tiptap-separator />
4654
+
4655
+ <tiptap-button
4656
+ icon="format_color_reset"
4657
+ [title]="t().clear"
4658
+ variant="danger"
4659
+ (onClick)="onClearColor($event)"
4660
+ ></tiptap-button>
4661
+ </div>
4662
+
4663
+ </div>
4664
+ </div>
4662
4665
  `, 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 .tiptap-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 .tiptap-button.is-active{border-color:var(--ate-primary, #3b82f6);box-shadow:0 0 0 2px #3b82f64d}:host ::ng-deep .btn-native-picker-trigger .tiptap-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: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }, { kind: "component", type: TiptapSeparatorComponent, selector: "tiptap-separator", inputs: ["orientation", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4663
4666
  }
4664
4667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapColorBubbleMenuComponent, decorators: [{
4665
4668
  type: Component,
4666
- args: [{ selector: "tiptap-color-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, TiptapButtonComponent, TiptapSeparatorComponent], template: `
4667
- <div
4668
- #menuRef
4669
- class="bubble-menu color-bubble-menu"
4670
- (mousedown)="onMouseDown($event)"
4671
- (click)="$event.stopPropagation()"
4672
- >
4673
- <div class="color-picker-container">
4674
- <div class="dropdown-row presets">
4675
- <div class="color-grid">
4676
- @for (color of presets; track color) {
4677
- <tiptap-button
4678
- class="color-swatch-btn"
4679
- size="small"
4680
- [title]="color"
4681
- [active]="isColorActive(color)"
4682
- [backgroundColor]="color"
4683
- (onClick)="applyColor(color, true, $event)"
4684
- ></tiptap-button>
4685
- }
4686
- </div>
4687
- </div>
4688
-
4689
- <div class="dropdown-row controls">
4690
- <div class="hex-input-wrapper">
4691
- <span class="hex-hash">#</span>
4692
- <input
4693
- #hexInput
4694
- type="text"
4695
- class="hex-input"
4696
- [value]="hexValue()"
4697
- [attr.aria-label]="t().customColor"
4698
- (input)="onHexInput($event)"
4699
- (change)="onHexChange($event)"
4700
- (keydown.enter)="onApply($event)"
4701
- (focus)="onFocus()"
4702
- (blur)="onBlur()"
4703
- maxlength="6"
4704
- placeholder="000000"
4705
- />
4706
- </div>
4707
-
4708
- <div class="native-trigger-wrapper">
4709
- <tiptap-button
4710
- class="btn-native-picker-trigger"
4711
- icon="colorize"
4712
- [title]="t().customColor"
4713
- [backgroundColor]="currentColor()"
4714
- (onClick)="triggerNativePicker($event)"
4715
- ></tiptap-button>
4716
- <input
4717
- #colorInput
4718
- type="color"
4719
- class="hidden-native-input"
4720
- [value]="currentColor()"
4721
- [attr.aria-label]="t().customColor"
4722
- (input)="onNativeInput($event)"
4723
- (change)="onNativeChange($event)"
4724
- (focus)="onFocus()"
4725
- (blur)="onBlur()"
4726
- />
4727
- </div>
4728
-
4729
- <tiptap-button
4730
- icon="check"
4731
- [title]="common().apply"
4732
- color="var(--ate-primary)"
4733
- (onClick)="onApply($event)"
4734
- ></tiptap-button>
4735
-
4736
- <tiptap-separator />
4737
-
4738
- <tiptap-button
4739
- icon="format_color_reset"
4740
- [title]="t().clear"
4741
- variant="danger"
4742
- (onClick)="onClearColor($event)"
4743
- ></tiptap-button>
4744
- </div>
4745
-
4746
- </div>
4747
- </div>
4669
+ args: [{ selector: "tiptap-color-bubble-menu", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, TiptapButtonComponent, TiptapSeparatorComponent], template: `
4670
+ <div
4671
+ #menuRef
4672
+ class="bubble-menu color-bubble-menu"
4673
+ (mousedown)="onMouseDown($event)"
4674
+ (click)="$event.stopPropagation()"
4675
+ >
4676
+ <div class="color-picker-container">
4677
+ <div class="dropdown-row presets">
4678
+ <div class="color-grid">
4679
+ @for (color of presets; track color) {
4680
+ <tiptap-button
4681
+ class="color-swatch-btn"
4682
+ size="small"
4683
+ [title]="color"
4684
+ [active]="isColorActive(color)"
4685
+ [backgroundColor]="color"
4686
+ (onClick)="applyColor(color, true, $event)"
4687
+ ></tiptap-button>
4688
+ }
4689
+ </div>
4690
+ </div>
4691
+
4692
+ <div class="dropdown-row controls">
4693
+ <div class="hex-input-wrapper">
4694
+ <span class="hex-hash">#</span>
4695
+ <input
4696
+ #hexInput
4697
+ type="text"
4698
+ class="hex-input"
4699
+ [value]="hexValue()"
4700
+ [attr.aria-label]="t().customColor"
4701
+ (input)="onHexInput($event)"
4702
+ (change)="onHexChange($event)"
4703
+ (keydown.enter)="onApply($event)"
4704
+ (focus)="onFocus()"
4705
+ (blur)="onBlur()"
4706
+ maxlength="6"
4707
+ placeholder="000000"
4708
+ />
4709
+ </div>
4710
+
4711
+ <div class="native-trigger-wrapper">
4712
+ <tiptap-button
4713
+ class="btn-native-picker-trigger"
4714
+ icon="colorize"
4715
+ [title]="t().customColor"
4716
+ [backgroundColor]="currentColor()"
4717
+ (onClick)="triggerNativePicker($event)"
4718
+ ></tiptap-button>
4719
+ <input
4720
+ #colorInput
4721
+ type="color"
4722
+ class="hidden-native-input"
4723
+ [value]="currentColor()"
4724
+ [attr.aria-label]="t().customColor"
4725
+ (input)="onNativeInput($event)"
4726
+ (change)="onNativeChange($event)"
4727
+ (focus)="onFocus()"
4728
+ (blur)="onBlur()"
4729
+ />
4730
+ </div>
4731
+
4732
+ <tiptap-button
4733
+ icon="check"
4734
+ [title]="common().apply"
4735
+ color="var(--ate-primary)"
4736
+ (onClick)="onApply($event)"
4737
+ ></tiptap-button>
4738
+
4739
+ <tiptap-separator />
4740
+
4741
+ <tiptap-button
4742
+ icon="format_color_reset"
4743
+ [title]="t().clear"
4744
+ variant="danger"
4745
+ (onClick)="onClearColor($event)"
4746
+ ></tiptap-button>
4747
+ </div>
4748
+
4749
+ </div>
4750
+ </div>
4748
4751
  `, 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 .tiptap-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 .tiptap-button.is-active{border-color:var(--ate-primary, #3b82f6);box-shadow:0 0 0 2px #3b82f64d}:host ::ng-deep .btn-native-picker-trigger .tiptap-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"] }]
4749
4752
  }], ctorParameters: () => [], propDecorators: { menuRef: [{
4750
4753
  type: ViewChild,
@@ -5144,8 +5147,8 @@ class TiptapSlashCommandsComponent {
5144
5147
  }
5145
5148
  addKeyboardPlugin(ed) {
5146
5149
  // Add a ProseMirror plugin to intercept keyboard events
5147
- const keyboardPlugin = new Plugin$1({
5148
- key: new PluginKey$1("slash-commands-keyboard"),
5150
+ const keyboardPlugin = new Plugin({
5151
+ key: new PluginKey("slash-commands-keyboard"),
5149
5152
  props: {
5150
5153
  handleKeyDown: (view, event) => {
5151
5154
  // Only handle if menu is active
@@ -5196,54 +5199,94 @@ class TiptapSlashCommandsComponent {
5196
5199
  }));
5197
5200
  }
5198
5201
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapSlashCommandsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5199
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapSlashCommandsComponent, isStandalone: true, selector: "tiptap-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: `
5200
- <div #menuRef class="slash-commands-menu">
5201
- @for (command of filteredCommands(); track command.title) {
5202
- <div
5203
- class="slash-command-item"
5204
- [class.selected]="$index === selectedIndex()"
5205
- (mousedown)="executeCommand(command); $event.preventDefault(); $event.stopPropagation()"
5206
- (mouseenter)="selectedIndex.set($index)"
5207
- >
5208
- <div class="slash-command-icon">
5209
- <span class="material-symbols-outlined">{{ command.icon }}</span>
5210
- </div>
5211
- <div class="slash-command-content">
5212
- <div class="slash-command-title">{{ command.title }}</div>
5213
- <div class="slash-command-description">{{ command.description }}</div>
5214
- </div>
5215
- </div>
5216
- }
5217
- </div>
5218
- `, isInline: true, styles: [".slash-commands-menu{background:var(--ate-menu-bg);border:1px solid var(--ate-menu-border);border-radius:var(--ate-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-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 }); }
5202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiptapSlashCommandsComponent, isStandalone: true, selector: "tiptap-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: `
5203
+ <div #menuRef class="slash-commands-menu">
5204
+ @for (command of filteredCommands(); track command.title) {
5205
+ <div
5206
+ class="slash-command-item"
5207
+ [class.selected]="$index === selectedIndex()"
5208
+ (mousedown)="executeCommand(command); $event.preventDefault(); $event.stopPropagation()"
5209
+ (mouseenter)="selectedIndex.set($index)"
5210
+ >
5211
+ <div class="slash-command-icon">
5212
+ <span class="material-symbols-outlined">{{ command.icon }}</span>
5213
+ </div>
5214
+ <div class="slash-command-content">
5215
+ <div class="slash-command-title">{{ command.title }}</div>
5216
+ <div class="slash-command-description">{{ command.description }}</div>
5217
+ </div>
5218
+ </div>
5219
+ }
5220
+ </div>
5221
+ `, 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 }); }
5219
5222
  }
5220
5223
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapSlashCommandsComponent, decorators: [{
5221
5224
  type: Component,
5222
- args: [{ selector: "tiptap-slash-commands", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
5223
- <div #menuRef class="slash-commands-menu">
5224
- @for (command of filteredCommands(); track command.title) {
5225
- <div
5226
- class="slash-command-item"
5227
- [class.selected]="$index === selectedIndex()"
5228
- (mousedown)="executeCommand(command); $event.preventDefault(); $event.stopPropagation()"
5229
- (mouseenter)="selectedIndex.set($index)"
5230
- >
5231
- <div class="slash-command-icon">
5232
- <span class="material-symbols-outlined">{{ command.icon }}</span>
5233
- </div>
5234
- <div class="slash-command-content">
5235
- <div class="slash-command-title">{{ command.title }}</div>
5236
- <div class="slash-command-description">{{ command.description }}</div>
5237
- </div>
5238
- </div>
5239
- }
5240
- </div>
5241
- `, styles: [".slash-commands-menu{background:var(--ate-menu-bg);border:1px solid var(--ate-menu-border);border-radius:var(--ate-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-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"] }]
5225
+ args: [{ selector: "tiptap-slash-commands", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
5226
+ <div #menuRef class="slash-commands-menu">
5227
+ @for (command of filteredCommands(); track command.title) {
5228
+ <div
5229
+ class="slash-command-item"
5230
+ [class.selected]="$index === selectedIndex()"
5231
+ (mousedown)="executeCommand(command); $event.preventDefault(); $event.stopPropagation()"
5232
+ (mouseenter)="selectedIndex.set($index)"
5233
+ >
5234
+ <div class="slash-command-icon">
5235
+ <span class="material-symbols-outlined">{{ command.icon }}</span>
5236
+ </div>
5237
+ <div class="slash-command-content">
5238
+ <div class="slash-command-title">{{ command.title }}</div>
5239
+ <div class="slash-command-description">{{ command.description }}</div>
5240
+ </div>
5241
+ </div>
5242
+ }
5243
+ </div>
5244
+ `, 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"] }]
5242
5245
  }], ctorParameters: () => [], propDecorators: { menuRef: [{
5243
5246
  type: ViewChild,
5244
5247
  args: ["menuRef", { static: false }]
5245
5248
  }] } });
5246
5249
 
5250
+ /**
5251
+ * Edit Toggle Component
5252
+ * Allows switching between editable and readonly modes
5253
+ */
5254
+ class TiptapEditToggleComponent {
5255
+ constructor() {
5256
+ this.editable = input.required();
5257
+ this.translations = input.required();
5258
+ this.toggle = output();
5259
+ }
5260
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapEditToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5261
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: TiptapEditToggleComponent, isStandalone: true, selector: "tiptap-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: { toggle: "toggle" }, ngImport: i0, template: `
5262
+ <div class="ate-edit-toggle-container" [class.is-editable]="editable()">
5263
+ <tiptap-button
5264
+ [icon]="editable() ? 'visibility' : 'edit'"
5265
+ [title]="editable() ? translations().editor.viewMode : translations().editor.toggleEdit"
5266
+ (onClick)="toggle.emit($event)"
5267
+ size="medium"
5268
+ iconSize="small"
5269
+ backgroundColor="var(--ate-primary-lighter)"
5270
+ />
5271
+ </div>
5272
+ `, 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: TiptapButtonComponent, selector: "tiptap-button", inputs: ["icon", "title", "active", "disabled", "color", "backgroundColor", "variant", "size", "iconSize"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5273
+ }
5274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiptapEditToggleComponent, decorators: [{
5275
+ type: Component,
5276
+ args: [{ selector: "tiptap-edit-toggle", standalone: true, imports: [CommonModule, TiptapButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
5277
+ <div class="ate-edit-toggle-container" [class.is-editable]="editable()">
5278
+ <tiptap-button
5279
+ [icon]="editable() ? 'visibility' : 'edit'"
5280
+ [title]="editable() ? translations().editor.viewMode : translations().editor.toggleEdit"
5281
+ (onClick)="toggle.emit($event)"
5282
+ size="medium"
5283
+ iconSize="small"
5284
+ backgroundColor="var(--ate-primary-lighter)"
5285
+ />
5286
+ </div>
5287
+ `, styles: [".ate-edit-toggle-container{position:absolute;margin-top:16px;right:16px;z-index:50}\n"] }]
5288
+ }] });
5289
+
5247
5290
  class NoopValueAccessorDirective {
5248
5291
  writeValue(obj) { }
5249
5292
  registerOnChange(fn) { }
@@ -5622,6 +5665,7 @@ class AngularTiptapEditorComponent {
5622
5665
  this.autofocus = input(false);
5623
5666
  this.seamless = input(false);
5624
5667
  this.floatingToolbar = input(false);
5668
+ this.showEditToggle = input(false);
5625
5669
  this.tiptapExtensions = input([]);
5626
5670
  this.tiptapOptions = input({});
5627
5671
  // Nouveaux inputs pour les bubble menus
@@ -5668,6 +5712,7 @@ class AngularTiptapEditorComponent {
5668
5712
  this.editorUpdate = output();
5669
5713
  this.editorFocus = output();
5670
5714
  this.editorBlur = output();
5715
+ this.editableChange = output();
5671
5716
  // ViewChild with signal
5672
5717
  this.editorElement = viewChild.required("editorElement");
5673
5718
  // Private signals for internal state
@@ -5959,6 +6004,12 @@ class AngularTiptapEditorComponent {
5959
6004
  // Stocker la référence de l'éditeur immédiatement
5960
6005
  this._editor.set(newEditor);
5961
6006
  }
6007
+ toggleEditMode(event) {
6008
+ event.preventDefault();
6009
+ event.stopPropagation();
6010
+ const newEditable = !this.editable();
6011
+ this.editableChange.emit(newEditable);
6012
+ }
5962
6013
  updateCharacterCount(editor) {
5963
6014
  if ((this.showCharacterCount() || this.showWordCount()) && editor.storage["characterCount"]) {
5964
6015
  const storage = editor.storage["characterCount"];
@@ -6078,119 +6129,127 @@ class AngularTiptapEditorComponent {
6078
6129
  }
6079
6130
  }
6080
6131
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularTiptapEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6081
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: AngularTiptapEditorComponent, isStandalone: true, selector: "angular-tiptap-editor", inputs: { 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 }, 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" }, host: { properties: { "class.fill-container": "fillContainer()", "class.floating-toolbar": "floatingToolbar()", "class.is-readonly": "!editable() && !mergedDisabled()", "class.is-disabled": "mergedDisabled()", "style.--ate-border-width": "seamless() || mergedDisabled() ? '0' : null", "style.--ate-background": "seamless() ? 'transparent' : (mergedDisabled() ? 'var(--ate-surface-tertiary)' : null)", "style.--ate-toolbar-border-color": "seamless() ? 'transparent' : null", "style.--ate-counter-background": "seamless() ? 'transparent' : null", "style.--ate-counter-border-color": "seamless() ? 'transparent' : null" } }, providers: [
6132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: AngularTiptapEditorComponent, isStandalone: true, selector: "angular-tiptap-editor", inputs: { 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 }, 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": "fillContainer()", "class.floating-toolbar": "floatingToolbar()", "class.is-readonly": "!editable() && !mergedDisabled()", "class.is-disabled": "mergedDisabled()", "style.--ate-border-width": "seamless() || mergedDisabled() ? '0' : null", "style.--ate-background": "seamless() ? 'transparent' : (mergedDisabled() ? 'var(--ate-surface-tertiary)' : null)", "style.--ate-toolbar-border-color": "seamless() ? 'transparent' : null", "style.--ate-counter-background": "seamless() ? 'transparent' : null", "style.--ate-counter-border-color": "seamless() ? 'transparent' : null" } }, providers: [
6082
6133
  EditorCommandsService,
6083
6134
  ImageService,
6084
6135
  ColorPickerService,
6085
6136
  LinkService,
6086
- ], viewQueries: [{ propertyName: "editorElement", first: true, predicate: ["editorElement"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NoopValueAccessorDirective }], ngImport: i0, template: `
6087
- <div class="tiptap-editor">
6088
- <!-- Toolbar -->
6089
- @if (editable() && !mergedDisabled() && showToolbar() && editor()) {
6090
- <tiptap-toolbar
6091
- [editor]="editor()!"
6092
- [config]="toolbarConfig()"
6093
- [imageUpload]="imageUploadConfig()"
6094
- [floating]="floatingToolbar()"
6095
- (mouseenter)="hideBubbleMenus()"
6096
- (mouseleave)="showBubbleMenus()"
6097
- />
6098
- }
6099
-
6100
- <!-- Editor Content -->
6101
- <div
6102
- #editorElement
6103
- class="tiptap-content"
6104
- [class.drag-over]="isDragOver()"
6105
- (dragover)="onDragOver($event)"
6106
- (drop)="onDrop($event)"
6107
- (click)="onEditorClick($event)"
6108
- ></div>
6109
-
6110
- <!-- Text Bubble Menu -->
6111
- @if (editable() && showBubbleMenu() && editor()) {
6112
- <tiptap-bubble-menu
6113
- [editor]="editor()!"
6114
- [config]="bubbleMenuConfig()"
6115
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6116
- ></tiptap-bubble-menu>
6117
- }
6118
-
6119
- <!-- Image Bubble Menu -->
6120
- @if (editable() && showImageBubbleMenu() && editor()) {
6121
- <tiptap-image-bubble-menu
6122
- [editor]="editor()!"
6123
- [config]="imageBubbleMenuConfig()"
6124
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6125
- ></tiptap-image-bubble-menu>
6126
- }
6127
-
6128
- <!-- Link Bubble Menu -->
6129
- @if (editable() && editor()) {
6130
- <tiptap-link-bubble-menu
6131
- [editor]="editor()!"
6132
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6133
- ></tiptap-link-bubble-menu>
6134
- }
6135
-
6136
- <!-- Color Bubble Menu -->
6137
- @if (editable() && editor()) {
6138
- <tiptap-color-bubble-menu
6139
- [editor]="editor()!"
6140
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6141
- ></tiptap-color-bubble-menu>
6142
- }
6143
-
6144
- <!-- Slash Commands -->
6145
- @if (editable() && enableSlashCommands() && editor()) {
6146
- <tiptap-slash-commands
6147
- [editor]="editor()!"
6148
- [config]="slashCommandsConfigComputed()"
6149
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6150
- ></tiptap-slash-commands>
6151
- }
6152
-
6153
- <!-- Table Menu -->
6154
- @if (editable() && editor()) {
6155
- <tiptap-table-bubble-menu
6156
- [editor]="editor()!"
6157
- [config]="tableBubbleMenuConfig()"
6158
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6159
- ></tiptap-table-bubble-menu>
6160
- }
6161
-
6162
- <!-- Cell Menu -->
6163
- @if (editable() && editor()) {
6164
- <tiptap-cell-bubble-menu
6165
- [editor]="editor()!"
6166
- [config]="cellBubbleMenuConfig()"
6167
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6168
- ></tiptap-cell-bubble-menu>
6169
- }
6170
-
6171
- <!-- Counters -->
6172
- @if (editable() && !mergedDisabled() && showFooter() && (showCharacterCount() || showWordCount())) {
6173
- <div class="character-count" [class.limit-reached]="maxCharacters() && characterCount() >= maxCharacters()!">
6174
- @if (showCharacterCount()) {
6175
- {{ characterCount() }}
6176
- {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
6177
- @if (maxCharacters()) {
6178
- / {{ maxCharacters() }}
6179
- }
6180
- }
6181
-
6182
- @if (showCharacterCount() && showWordCount()) {
6183
- ,
6184
- }
6185
-
6186
- @if (showWordCount()) {
6187
- {{ wordCount() }}
6188
- {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
6189
- }
6190
- </div>
6191
- }
6192
- </div>
6193
- `, 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-secondary);--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-text-secondary);--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: var(--ate-sub-border-radius);--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:hidden;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{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);height:var(--ate-scrollbar-width)}.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:8px var(--ate-content-padding);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:16px;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:16px;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"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6137
+ ], viewQueries: [{ propertyName: "editorElement", first: true, predicate: ["editorElement"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NoopValueAccessorDirective }], ngImport: i0, template: `
6138
+ <div class="tiptap-editor">
6139
+ <!-- Toolbar -->
6140
+ @if (editable() && !mergedDisabled() && showToolbar() && editor()) {
6141
+ <tiptap-toolbar
6142
+ [editor]="editor()!"
6143
+ [config]="toolbarConfig()"
6144
+ [imageUpload]="imageUploadConfig()"
6145
+ [floating]="floatingToolbar()"
6146
+ (mouseenter)="hideBubbleMenus()"
6147
+ (mouseleave)="showBubbleMenus()"
6148
+ />
6149
+ }
6150
+
6151
+ @if (showEditToggle() && !mergedDisabled()) {
6152
+ <tiptap-edit-toggle
6153
+ [editable]="editable()"
6154
+ [translations]="currentTranslations()"
6155
+ (toggle)="toggleEditMode($event)"
6156
+ />
6157
+ }
6158
+
6159
+ <!-- Editor Content -->
6160
+ <div
6161
+ #editorElement
6162
+ class="tiptap-content"
6163
+ [class.drag-over]="isDragOver()"
6164
+ (dragover)="onDragOver($event)"
6165
+ (drop)="onDrop($event)"
6166
+ (click)="onEditorClick($event)"
6167
+ ></div>
6168
+
6169
+ <!-- Text Bubble Menu -->
6170
+ @if (editable() && showBubbleMenu() && editor()) {
6171
+ <tiptap-bubble-menu
6172
+ [editor]="editor()!"
6173
+ [config]="bubbleMenuConfig()"
6174
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6175
+ ></tiptap-bubble-menu>
6176
+ }
6177
+
6178
+ <!-- Image Bubble Menu -->
6179
+ @if (editable() && showImageBubbleMenu() && editor()) {
6180
+ <tiptap-image-bubble-menu
6181
+ [editor]="editor()!"
6182
+ [config]="imageBubbleMenuConfig()"
6183
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6184
+ ></tiptap-image-bubble-menu>
6185
+ }
6186
+
6187
+ <!-- Link Bubble Menu -->
6188
+ @if (editable() && editor()) {
6189
+ <tiptap-link-bubble-menu
6190
+ [editor]="editor()!"
6191
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6192
+ ></tiptap-link-bubble-menu>
6193
+ }
6194
+
6195
+ <!-- Color Bubble Menu -->
6196
+ @if (editable() && editor()) {
6197
+ <tiptap-color-bubble-menu
6198
+ [editor]="editor()!"
6199
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6200
+ ></tiptap-color-bubble-menu>
6201
+ }
6202
+
6203
+ <!-- Slash Commands -->
6204
+ @if (editable() && enableSlashCommands() && editor()) {
6205
+ <tiptap-slash-commands
6206
+ [editor]="editor()!"
6207
+ [config]="slashCommandsConfigComputed()"
6208
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6209
+ ></tiptap-slash-commands>
6210
+ }
6211
+
6212
+ <!-- Table Menu -->
6213
+ @if (editable() && editor()) {
6214
+ <tiptap-table-bubble-menu
6215
+ [editor]="editor()!"
6216
+ [config]="tableBubbleMenuConfig()"
6217
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6218
+ ></tiptap-table-bubble-menu>
6219
+ }
6220
+
6221
+ <!-- Cell Menu -->
6222
+ @if (editable() && editor()) {
6223
+ <tiptap-cell-bubble-menu
6224
+ [editor]="editor()!"
6225
+ [config]="cellBubbleMenuConfig()"
6226
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6227
+ ></tiptap-cell-bubble-menu>
6228
+ }
6229
+
6230
+ <!-- Counters -->
6231
+ @if (editable() && !mergedDisabled() && showFooter() && (showCharacterCount() || showWordCount())) {
6232
+ <div class="character-count" [class.limit-reached]="maxCharacters() && characterCount() >= maxCharacters()!">
6233
+ @if (showCharacterCount()) {
6234
+ {{ characterCount() }}
6235
+ {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
6236
+ @if (maxCharacters()) {
6237
+ / {{ maxCharacters() }}
6238
+ }
6239
+ }
6240
+
6241
+ @if (showCharacterCount() && showWordCount()) {
6242
+ ,
6243
+ }
6244
+
6245
+ @if (showWordCount()) {
6246
+ {{ wordCount() }}
6247
+ {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
6248
+ }
6249
+ </div>
6250
+ }
6251
+ </div>
6252
+ `, 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-text-secondary);--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:hidden;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:8px var(--ate-content-padding);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"] }, { 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: ["toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6194
6253
  }
6195
6254
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AngularTiptapEditorComponent, decorators: [{
6196
6255
  type: Component,
@@ -6213,119 +6272,128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
6213
6272
  TiptapSlashCommandsComponent,
6214
6273
  TiptapLinkBubbleMenuComponent,
6215
6274
  TiptapColorBubbleMenuComponent,
6275
+ TiptapEditToggleComponent,
6216
6276
  ], providers: [
6217
6277
  EditorCommandsService,
6218
6278
  ImageService,
6219
6279
  ColorPickerService,
6220
6280
  LinkService,
6221
- ], template: `
6222
- <div class="tiptap-editor">
6223
- <!-- Toolbar -->
6224
- @if (editable() && !mergedDisabled() && showToolbar() && editor()) {
6225
- <tiptap-toolbar
6226
- [editor]="editor()!"
6227
- [config]="toolbarConfig()"
6228
- [imageUpload]="imageUploadConfig()"
6229
- [floating]="floatingToolbar()"
6230
- (mouseenter)="hideBubbleMenus()"
6231
- (mouseleave)="showBubbleMenus()"
6232
- />
6233
- }
6234
-
6235
- <!-- Editor Content -->
6236
- <div
6237
- #editorElement
6238
- class="tiptap-content"
6239
- [class.drag-over]="isDragOver()"
6240
- (dragover)="onDragOver($event)"
6241
- (drop)="onDrop($event)"
6242
- (click)="onEditorClick($event)"
6243
- ></div>
6244
-
6245
- <!-- Text Bubble Menu -->
6246
- @if (editable() && showBubbleMenu() && editor()) {
6247
- <tiptap-bubble-menu
6248
- [editor]="editor()!"
6249
- [config]="bubbleMenuConfig()"
6250
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6251
- ></tiptap-bubble-menu>
6252
- }
6253
-
6254
- <!-- Image Bubble Menu -->
6255
- @if (editable() && showImageBubbleMenu() && editor()) {
6256
- <tiptap-image-bubble-menu
6257
- [editor]="editor()!"
6258
- [config]="imageBubbleMenuConfig()"
6259
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6260
- ></tiptap-image-bubble-menu>
6261
- }
6262
-
6263
- <!-- Link Bubble Menu -->
6264
- @if (editable() && editor()) {
6265
- <tiptap-link-bubble-menu
6266
- [editor]="editor()!"
6267
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6268
- ></tiptap-link-bubble-menu>
6269
- }
6270
-
6271
- <!-- Color Bubble Menu -->
6272
- @if (editable() && editor()) {
6273
- <tiptap-color-bubble-menu
6274
- [editor]="editor()!"
6275
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6276
- ></tiptap-color-bubble-menu>
6277
- }
6278
-
6279
- <!-- Slash Commands -->
6280
- @if (editable() && enableSlashCommands() && editor()) {
6281
- <tiptap-slash-commands
6282
- [editor]="editor()!"
6283
- [config]="slashCommandsConfigComputed()"
6284
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6285
- ></tiptap-slash-commands>
6286
- }
6287
-
6288
- <!-- Table Menu -->
6289
- @if (editable() && editor()) {
6290
- <tiptap-table-bubble-menu
6291
- [editor]="editor()!"
6292
- [config]="tableBubbleMenuConfig()"
6293
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6294
- ></tiptap-table-bubble-menu>
6295
- }
6296
-
6297
- <!-- Cell Menu -->
6298
- @if (editable() && editor()) {
6299
- <tiptap-cell-bubble-menu
6300
- [editor]="editor()!"
6301
- [config]="cellBubbleMenuConfig()"
6302
- [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6303
- ></tiptap-cell-bubble-menu>
6304
- }
6305
-
6306
- <!-- Counters -->
6307
- @if (editable() && !mergedDisabled() && showFooter() && (showCharacterCount() || showWordCount())) {
6308
- <div class="character-count" [class.limit-reached]="maxCharacters() && characterCount() >= maxCharacters()!">
6309
- @if (showCharacterCount()) {
6310
- {{ characterCount() }}
6311
- {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
6312
- @if (maxCharacters()) {
6313
- / {{ maxCharacters() }}
6314
- }
6315
- }
6316
-
6317
- @if (showCharacterCount() && showWordCount()) {
6318
- ,
6319
- }
6320
-
6321
- @if (showWordCount()) {
6322
- {{ wordCount() }}
6323
- {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
6324
- }
6325
- </div>
6326
- }
6327
- </div>
6328
- `, 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-secondary);--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-text-secondary);--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: var(--ate-sub-border-radius);--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:hidden;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{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);height:var(--ate-scrollbar-width)}.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:8px var(--ate-content-padding);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:16px;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:16px;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"] }]
6281
+ ], template: `
6282
+ <div class="tiptap-editor">
6283
+ <!-- Toolbar -->
6284
+ @if (editable() && !mergedDisabled() && showToolbar() && editor()) {
6285
+ <tiptap-toolbar
6286
+ [editor]="editor()!"
6287
+ [config]="toolbarConfig()"
6288
+ [imageUpload]="imageUploadConfig()"
6289
+ [floating]="floatingToolbar()"
6290
+ (mouseenter)="hideBubbleMenus()"
6291
+ (mouseleave)="showBubbleMenus()"
6292
+ />
6293
+ }
6294
+
6295
+ @if (showEditToggle() && !mergedDisabled()) {
6296
+ <tiptap-edit-toggle
6297
+ [editable]="editable()"
6298
+ [translations]="currentTranslations()"
6299
+ (toggle)="toggleEditMode($event)"
6300
+ />
6301
+ }
6302
+
6303
+ <!-- Editor Content -->
6304
+ <div
6305
+ #editorElement
6306
+ class="tiptap-content"
6307
+ [class.drag-over]="isDragOver()"
6308
+ (dragover)="onDragOver($event)"
6309
+ (drop)="onDrop($event)"
6310
+ (click)="onEditorClick($event)"
6311
+ ></div>
6312
+
6313
+ <!-- Text Bubble Menu -->
6314
+ @if (editable() && showBubbleMenu() && editor()) {
6315
+ <tiptap-bubble-menu
6316
+ [editor]="editor()!"
6317
+ [config]="bubbleMenuConfig()"
6318
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6319
+ ></tiptap-bubble-menu>
6320
+ }
6321
+
6322
+ <!-- Image Bubble Menu -->
6323
+ @if (editable() && showImageBubbleMenu() && editor()) {
6324
+ <tiptap-image-bubble-menu
6325
+ [editor]="editor()!"
6326
+ [config]="imageBubbleMenuConfig()"
6327
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6328
+ ></tiptap-image-bubble-menu>
6329
+ }
6330
+
6331
+ <!-- Link Bubble Menu -->
6332
+ @if (editable() && editor()) {
6333
+ <tiptap-link-bubble-menu
6334
+ [editor]="editor()!"
6335
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6336
+ ></tiptap-link-bubble-menu>
6337
+ }
6338
+
6339
+ <!-- Color Bubble Menu -->
6340
+ @if (editable() && editor()) {
6341
+ <tiptap-color-bubble-menu
6342
+ [editor]="editor()!"
6343
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6344
+ ></tiptap-color-bubble-menu>
6345
+ }
6346
+
6347
+ <!-- Slash Commands -->
6348
+ @if (editable() && enableSlashCommands() && editor()) {
6349
+ <tiptap-slash-commands
6350
+ [editor]="editor()!"
6351
+ [config]="slashCommandsConfigComputed()"
6352
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6353
+ ></tiptap-slash-commands>
6354
+ }
6355
+
6356
+ <!-- Table Menu -->
6357
+ @if (editable() && editor()) {
6358
+ <tiptap-table-bubble-menu
6359
+ [editor]="editor()!"
6360
+ [config]="tableBubbleMenuConfig()"
6361
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6362
+ ></tiptap-table-bubble-menu>
6363
+ }
6364
+
6365
+ <!-- Cell Menu -->
6366
+ @if (editable() && editor()) {
6367
+ <tiptap-cell-bubble-menu
6368
+ [editor]="editor()!"
6369
+ [config]="cellBubbleMenuConfig()"
6370
+ [style.display]="editorFullyInitialized() ? 'block' : 'none'"
6371
+ ></tiptap-cell-bubble-menu>
6372
+ }
6373
+
6374
+ <!-- Counters -->
6375
+ @if (editable() && !mergedDisabled() && showFooter() && (showCharacterCount() || showWordCount())) {
6376
+ <div class="character-count" [class.limit-reached]="maxCharacters() && characterCount() >= maxCharacters()!">
6377
+ @if (showCharacterCount()) {
6378
+ {{ characterCount() }}
6379
+ {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
6380
+ @if (maxCharacters()) {
6381
+ / {{ maxCharacters() }}
6382
+ }
6383
+ }
6384
+
6385
+ @if (showCharacterCount() && showWordCount()) {
6386
+ ,
6387
+ }
6388
+
6389
+ @if (showWordCount()) {
6390
+ {{ wordCount() }}
6391
+ {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
6392
+ }
6393
+ </div>
6394
+ }
6395
+ </div>
6396
+ `, 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-text-secondary);--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:hidden;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:8px var(--ate-content-padding);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"] }]
6329
6397
  }], ctorParameters: () => [] });
6330
6398
 
6331
6399
  /*