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