@flogeez/angular-tiptap-editor 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +17 -19
  3. package/esm2022/lib/components/bubble-menus/base/ate-base-bubble-menu.mjs +3 -3
  4. package/esm2022/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.mjs +1 -1
  5. package/esm2022/lib/components/bubble-menus/color/ate-color-bubble-menu.component.mjs +2 -2
  6. package/esm2022/lib/components/bubble-menus/link/ate-link-bubble-menu.component.mjs +2 -2
  7. package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +23 -7
  8. package/esm2022/lib/components/editor/ate-block-controls.component.mjs +4 -4
  9. package/esm2022/lib/components/slash-commands/ate-slash-commands.component.mjs +2 -2
  10. package/esm2022/lib/components/table-of-contents/ate-table-of-contents.component.mjs +359 -0
  11. package/esm2022/lib/extensions/ate-block-controls.extension.mjs +3 -3
  12. package/esm2022/lib/i18n/ateTranslationsModel.mjs +1 -1
  13. package/esm2022/lib/i18n/de_ateTranslations.mjs +2 -1
  14. package/esm2022/lib/i18n/en_ateTranslations.mjs +2 -1
  15. package/esm2022/lib/i18n/fr_ateTranslations.mjs +2 -1
  16. package/esm2022/lib/services/ate-image.service.mjs +2 -2
  17. package/esm2022/public-api.mjs +2 -1
  18. package/fesm2022/flogeez-angular-tiptap-editor.mjs +392 -19
  19. package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
  20. package/lib/components/bubble-menus/base/ate-base-bubble-menu.d.ts +1 -1
  21. package/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.d.ts +1 -1
  22. package/lib/components/table-of-contents/ate-table-of-contents.component.d.ts +48 -0
  23. package/lib/i18n/ateTranslationsModel.d.ts +1 -0
  24. package/lib/services/ate-i18n.service.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/public-api.d.ts +1 -0
  27. package/src/lib/styles/ate-variables.global.css +173 -0
  28. package/src/lib/styles/index.css +1 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, computed, effect, Directive, output, Component, ChangeDetectionStrategy, signal, Injectable, viewChild, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, DestroyRef, Injector, untracked, makeEnvironmentProviders, APP_INITIALIZER } from '@angular/core';
2
+ import { inject, ElementRef, input, computed, effect, Directive, output, Component, ChangeDetectionStrategy, signal, Injectable, viewChild, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, DestroyRef, Injector, untracked, HostListener, makeEnvironmentProviders, APP_INITIALIZER } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { Node as Node$1, mergeAttributes, nodeInputRule, Extension, getAttributes, Editor } from '@tiptap/core';
5
5
  import StarterKit from '@tiptap/starter-kit';
@@ -1086,6 +1086,7 @@ const ENGLISH_TRANSLATIONS = {
1086
1086
  viewMode: "Switch to View Mode",
1087
1087
  blockAdd: "Click to add a block",
1088
1088
  blockDrag: "Drag to move this block",
1089
+ tableOfContents: "Table of Contents",
1089
1090
  },
1090
1091
  common: {
1091
1092
  cancel: "Cancel",
@@ -1275,6 +1276,7 @@ const FRENCH_TRANSLATIONS = {
1275
1276
  viewMode: "Passer en mode affichage",
1276
1277
  blockAdd: "Cliquer pour ajouter un bloc",
1277
1278
  blockDrag: "Faire glisser pour déplacer ce bloc",
1279
+ tableOfContents: "Sommaire",
1278
1280
  },
1279
1281
  common: {
1280
1282
  cancel: "Annuler",
@@ -1464,6 +1466,7 @@ const GERMAN_TRANSLATIONS = {
1464
1466
  viewMode: "In den Ansichtsmodus wechseln",
1465
1467
  blockAdd: "Klicken, um einen Block hinzuzufügen",
1466
1468
  blockDrag: "Ziehen, um diesen Block zu verschieben",
1469
+ tableOfContents: "Inhaltsverzeichnis",
1467
1470
  },
1468
1471
  common: {
1469
1472
  cancel: "Abbrechen",
@@ -1712,7 +1715,7 @@ class AteImageService {
1712
1715
  // Detect if it's base64 or remote URL
1713
1716
  if (src.startsWith("data:") ||
1714
1717
  src.startsWith("blob:") ||
1715
- src.startsWith(window.location.origin)) {
1718
+ (typeof window !== "undefined" && src.startsWith(window.location.origin))) {
1716
1719
  const link = document.createElement("a");
1717
1720
  link.href = src;
1718
1721
  link.download = fileName;
@@ -3919,7 +3922,7 @@ class AteBaseBubbleMenu {
3919
3922
  if (this.updateTimeout) {
3920
3923
  clearTimeout(this.updateTimeout);
3921
3924
  }
3922
- this.updateTimeout = window.setTimeout(() => {
3925
+ this.updateTimeout = setTimeout(() => {
3923
3926
  const ed = this.editor();
3924
3927
  if (!ed) {
3925
3928
  return;
@@ -4058,7 +4061,7 @@ class AteBaseBubbleMenu {
4058
4061
  return new DOMRect(-9999, -9999, 0, 0);
4059
4062
  }
4060
4063
  // 1. Try native selection for multi-line accuracy
4061
- const selection = window.getSelection();
4064
+ const selection = typeof window !== "undefined" ? window.getSelection() : null;
4062
4065
  if (selection && selection.rangeCount > 0) {
4063
4066
  const range = selection.getRangeAt(0);
4064
4067
  const rect = range.getBoundingClientRect();
@@ -5296,7 +5299,7 @@ class AteLinkBubbleMenuComponent extends AteBaseSubBubbleMenu {
5296
5299
  /* ignore */
5297
5300
  }
5298
5301
  // Use native selection for multi-line accuracy
5299
- const selection = window.getSelection();
5302
+ const selection = typeof window !== "undefined" ? window.getSelection() : null;
5300
5303
  if (selection && selection.rangeCount > 0) {
5301
5304
  const range = selection.getRangeAt(0);
5302
5305
  const rect = range.getBoundingClientRect();
@@ -5549,7 +5552,7 @@ class AteColorBubbleMenuComponent extends AteBaseSubBubbleMenu {
5549
5552
  /* ignore */
5550
5553
  }
5551
5554
  // Use native selection for multi-line accuracy
5552
- const selection = window.getSelection();
5555
+ const selection = typeof window !== "undefined" ? window.getSelection() : null;
5553
5556
  if (selection && selection.rangeCount > 0) {
5554
5557
  const range = selection.getRangeAt(0);
5555
5558
  const rect = range.getBoundingClientRect();
@@ -6127,7 +6130,7 @@ class AteSlashCommandsComponent {
6127
6130
  catch (error) {
6128
6131
  console.warn("Error calculating coordinates:", error);
6129
6132
  // Fallback to window.getSelection
6130
- const selection = window.getSelection();
6133
+ const selection = typeof window !== "undefined" ? window.getSelection() : null;
6131
6134
  if (!selection || selection.rangeCount === 0) {
6132
6135
  return new DOMRect(-9999, -9999, 0, 0);
6133
6136
  }
@@ -6306,7 +6309,7 @@ class AteBlockControlsComponent {
6306
6309
  }
6307
6310
  ngOnDestroy() {
6308
6311
  if (this.updateTimeout) {
6309
- window.clearTimeout(this.updateTimeout);
6312
+ clearTimeout(this.updateTimeout);
6310
6313
  }
6311
6314
  if (this.tippyInstance) {
6312
6315
  this.tippyInstance.destroy();
@@ -6348,10 +6351,10 @@ class AteBlockControlsComponent {
6348
6351
  }
6349
6352
  updateMenu(show) {
6350
6353
  if (this.updateTimeout) {
6351
- window.clearTimeout(this.updateTimeout);
6354
+ clearTimeout(this.updateTimeout);
6352
6355
  }
6353
6356
  const delay = show ? 0 : 400;
6354
- this.updateTimeout = window.setTimeout(() => {
6357
+ this.updateTimeout = setTimeout(() => {
6355
6358
  if (show) {
6356
6359
  this.showTippy();
6357
6360
  }
@@ -7859,7 +7862,7 @@ const AteBlockControlsExtension = Extension.create({
7859
7862
  lastMouseX = event.clientX;
7860
7863
  lastMouseY = event.clientY;
7861
7864
  if (rafId === null) {
7862
- rafId = window.requestAnimationFrame(() => {
7865
+ rafId = requestAnimationFrame(() => {
7863
7866
  update(view);
7864
7867
  rafId = null;
7865
7868
  });
@@ -7868,7 +7871,7 @@ const AteBlockControlsExtension = Extension.create({
7868
7871
  },
7869
7872
  mouseleave: () => {
7870
7873
  if (rafId) {
7871
- window.cancelAnimationFrame(rafId);
7874
+ cancelAnimationFrame(rafId);
7872
7875
  rafId = null;
7873
7876
  }
7874
7877
  reset();
@@ -8718,7 +8721,11 @@ class AngularTiptapEditorComponent {
8718
8721
  [class.limit-reached]="finalMaxCharacters() && characterCount() >= finalMaxCharacters()!">
8719
8722
  @if (finalShowCharacterCount()) {
8720
8723
  {{ characterCount() }}
8721
- {{ characterCount() > 1 ? currentTranslations().editor.characterPlural : currentTranslations().editor.character }}
8724
+ {{
8725
+ characterCount() > 1
8726
+ ? currentTranslations().editor.characterPlural
8727
+ : currentTranslations().editor.character
8728
+ }}
8722
8729
  @if (finalMaxCharacters()) {
8723
8730
  / {{ finalMaxCharacters() }}
8724
8731
  }
@@ -8730,12 +8737,16 @@ class AngularTiptapEditorComponent {
8730
8737
 
8731
8738
  @if (finalShowWordCount()) {
8732
8739
  {{ wordCount() }}
8733
- {{ wordCount() > 1 ? currentTranslations().editor.wordPlural : currentTranslations().editor.word }}
8740
+ {{
8741
+ wordCount() > 1
8742
+ ? currentTranslations().editor.wordPlural
8743
+ : currentTranslations().editor.word
8744
+ }}
8734
8745
  }
8735
8746
  </div>
8736
8747
  }
8737
8748
  </div>
8738
- `, isInline: true, styles: [":host{--ate-primary: #2563eb;--ate-primary-hover: #153ca9;--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-selection-bg: var(--ate-primary-light-alpha);--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-block: 16px;--ate-content-padding-inline: 16px;--ate-content-gutter: 0px;--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: 4px;--ate-menu-gap: 2px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-gap: var(--ate-menu-gap);--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);--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);--ate-tooltip-bg: var(--ate-code-block-background, #0f172a);--ate-tooltip-color: var(--ate-code-block-color, #e2e8f0)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host.ate-blocks-inside{--ate-content-gutter: 54px}@media (max-width: 768px){:host.ate-blocks-inside{--ate-content-gutter: 0px}ate-block-controls{display:none!important}}:host ::ng-deep .ProseMirror{padding-inline:calc(var(--ate-content-padding-inline) + var(--ate-content-gutter));padding-block:var(--ate-content-padding-block);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 ::selection{background-color:var(--ate-selection-bg);color:inherit}:host ::ng-deep .ProseMirror ::-moz-selection{background-color:var(--ate-selection-bg);color:inherit}: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] img{cursor:pointer}:host ::ng-deep .ProseMirror[contenteditable=false] a{cursor:pointer}: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,:host ::ng-deep .resizable-image-container.selected img{border-color:var(--ate-image-selected-color);transition:all .2s ease}:host ::ng-deep .ProseMirror [data-text-align=center],:host ::ng-deep .ProseMirror [data-align=center]{text-align:center}:host ::ng-deep .ProseMirror [data-text-align=right],:host ::ng-deep .ProseMirror [data-align=right]{text-align:right}:host ::ng-deep .ProseMirror [data-text-align=left],:host ::ng-deep .ProseMirror [data-align=left]{text-align:left}:host ::ng-deep .resizable-image-wrapper{display:block;width:100%;margin:.5em 0}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;max-width:100%}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000;opacity:0;transition:opacity .2s ease}:host:not(.is-readonly):not(.is-disabled) ::ng-deep .resizable-image-container:hover .resize-controls,:host:not(.is-readonly):not(.is-disabled) ::ng-deep body.resizing .resize-controls{opacity:1}:host ::ng-deep .resize-handle{position:absolute;width:.35rem;height:2rem;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:var(--ate-border-radius);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-w:hover,:host ::ng-deep .resize-handle-e:hover{background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9);background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w{top:50%;left:.35rem;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:.35rem;transform:translateY(-50%);cursor:e-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 .resizable-image-container{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 .resizable-image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"], dependencies: [{ kind: "component", type: AteToolbarComponent, selector: "ate-toolbar", inputs: ["editor", "config", "imageUpload", "floating"] }, { kind: "component", type: AteBubbleMenuComponent, selector: "ate-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteImageBubbleMenuComponent, selector: "ate-image-bubble-menu", inputs: ["config", "imageUpload"] }, { kind: "component", type: AteTableBubbleMenuComponent, selector: "ate-table-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteCellBubbleMenuComponent, selector: "ate-cell-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteSlashCommandsComponent, selector: "ate-slash-commands", inputs: ["editor", "config"] }, { kind: "component", type: AteLinkBubbleMenuComponent, selector: "ate-link-bubble-menu" }, { kind: "component", type: AteColorBubbleMenuComponent, selector: "ate-color-bubble-menu" }, { kind: "component", type: AteEditToggleComponent, selector: "ate-edit-toggle", inputs: ["editable", "translations"], outputs: ["editToggle"] }, { kind: "component", type: AteBlockControlsComponent, selector: "ate-block-controls", inputs: ["editor", "hoveredData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8749
+ `, isInline: true, styles: [":host{--ate-primary: #2563eb;--ate-primary-hover: #153ca9;--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-selection-bg: var(--ate-primary-light-alpha);--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-sub-border-radius: 8px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-text-color: var(--ate-text, #2d3748);--ate-placeholder-color: var(--ate-text-muted, #a0aec0);--ate-line-height: 1.6;--ate-content-padding-block: 16px;--ate-content-padding-inline: 16px;--ate-content-gutter: 0px;--ate-menu-bg: var(--ate-surface, #ffffff);--ate-menu-border-radius: var(--ate-border-radius, 12px);--ate-menu-border: var(--ate-border, #e2e8f0);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 4px;--ate-menu-gap: 2px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-gap: var(--ate-menu-gap);--ate-toolbar-background: var(--ate-surface-secondary, #f8f9fa);--ate-toolbar-border-color: var(--ate-border, #e2e8f0);--ate-toolbar-button-color: var(--ate-text-secondary, #64748b);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 90% );--ate-toolbar-button-active-color: var(--ate-primary, #2563eb);--ate-counter-color: var(--ate-text-secondary, #64748b);--ate-counter-background: var(--ate-surface-secondary, #f8f9fa);--ate-counter-border-color: var(--ate-border, #e2e8f0);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary, #2563eb);--ate-blockquote-border-color: var(--ate-border, #e2e8f0);--ate-blockquote-background: var(--ate-surface-secondary, #f8f9fa);--ate-code-background: var(--ate-surface-secondary, #f8f9fa);--ate-code-color: var(--ate-text, #2d3748);--ate-code-border-color: var(--ate-border, #e2e8f0);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border, #e2e8f0);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary, #2563eb);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border, #e2e8f0);--ate-scrollbar-thumb-hover: var(--ate-text-muted, #a0aec0);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border, #e2e8f0);--ate-table-header-background: var(--ate-surface-secondary, #f8f9fa);--ate-table-header-color: var(--ate-text, #2d3748);--ate-table-cell-background: var(--ate-surface, #ffffff);--ate-table-cell-selected-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 90% );--ate-table-resize-handle-color: var(--ate-primary, #2563eb);--ate-table-row-hover-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 95% );--ate-tooltip-bg: var(--ate-code-block-background, #0f172a);--ate-tooltip-color: var(--ate-code-block-color, #e2e8f0)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host.ate-blocks-inside{--ate-content-gutter: 54px}@media (max-width: 768px){:host.ate-blocks-inside{--ate-content-gutter: 0px}ate-block-controls{display:none!important}}:host ::ng-deep .ProseMirror{padding-inline:calc(var(--ate-content-padding-inline) + var(--ate-content-gutter));padding-block:var(--ate-content-padding-block);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 ::selection{background-color:var(--ate-selection-bg);color:inherit}:host ::ng-deep .ProseMirror ::-moz-selection{background-color:var(--ate-selection-bg);color:inherit}: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] img{cursor:pointer}:host ::ng-deep .ProseMirror[contenteditable=false] a{cursor:pointer}: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,:host ::ng-deep .resizable-image-container.selected img{border-color:var(--ate-image-selected-color);transition:all .2s ease}:host ::ng-deep .ProseMirror [data-text-align=center],:host ::ng-deep .ProseMirror [data-align=center]{text-align:center}:host ::ng-deep .ProseMirror [data-text-align=right],:host ::ng-deep .ProseMirror [data-align=right]{text-align:right}:host ::ng-deep .ProseMirror [data-text-align=left],:host ::ng-deep .ProseMirror [data-align=left]{text-align:left}:host ::ng-deep .resizable-image-wrapper{display:block;width:100%;margin:.5em 0}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;max-width:100%}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000;opacity:0;transition:opacity .2s ease}:host:not(.is-readonly):not(.is-disabled) ::ng-deep .resizable-image-container:hover .resize-controls,:host:not(.is-readonly):not(.is-disabled) ::ng-deep body.resizing .resize-controls{opacity:1}:host ::ng-deep .resize-handle{position:absolute;width:.35rem;height:2rem;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:var(--ate-border-radius);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-w:hover,:host ::ng-deep .resize-handle-e:hover{background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9);background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w{top:50%;left:.35rem;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:.35rem;transform:translateY(-50%);cursor:e-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 .resizable-image-container{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 .resizable-image-container:hover .image-size-info{opacity:1}:host ::ng-deep .ProseMirror table{border-collapse:separate;border-spacing:0;margin:0;table-layout:fixed;width:100%;border-radius:8px;overflow:hidden}:host ::ng-deep .ProseMirror table td,:host ::ng-deep .ProseMirror table th{border:none;border-right:1px solid var(--ate-table-border-color);border-bottom:1px solid var(--ate-table-border-color);box-sizing:border-box;min-width:1em;padding:8px 12px;position:relative;vertical-align:top;text-align:left}:host ::ng-deep .ProseMirror table td{background:var(--ate-table-cell-background)}:host ::ng-deep .ProseMirror table td:first-child,:host ::ng-deep .ProseMirror table th:first-child{border-left:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child td,:host ::ng-deep .ProseMirror table tr:first-child th{border-top:1px solid var(--ate-table-border-color)}:host ::ng-deep .ProseMirror table tr:first-child th:first-child{border-top-left-radius:8px}:host ::ng-deep .ProseMirror table tr:first-child th:last-child{border-top-right-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:first-child{border-bottom-left-radius:8px}:host ::ng-deep .ProseMirror table tr:last-child td:last-child{border-bottom-right-radius:8px}:host ::ng-deep .ProseMirror table th{background:var(--ate-table-header-background);font-weight:600;color:var(--ate-table-header-color)}:host ::ng-deep .ProseMirror table .selectedCell:after{background:var(--ate-table-cell-selected-background);content:\"\";inset:0;pointer-events:none;position:absolute;z-index:2}:host ::ng-deep .ProseMirror table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--ate-table-resize-handle-color);opacity:0;transition:opacity .2s ease}:host ::ng-deep .ProseMirror table:hover .column-resize-handle{opacity:1}:host ::ng-deep .ProseMirror table .column-resize-handle:hover{background-color:var(--ate-focus-color)}:host ::ng-deep .ProseMirror .tableWrapper{overflow-x:auto;margin:1em 0;border-radius:8px}:host ::ng-deep .ProseMirror .tableWrapper table{margin:0;border-radius:8px;min-width:600px;overflow:hidden}:host ::ng-deep .ProseMirror table p{margin:0}:host ::ng-deep .ProseMirror table tbody tr:hover td{background-color:var(--ate-table-row-hover-background)}\n"], dependencies: [{ kind: "component", type: AteToolbarComponent, selector: "ate-toolbar", inputs: ["editor", "config", "imageUpload", "floating"] }, { kind: "component", type: AteBubbleMenuComponent, selector: "ate-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteImageBubbleMenuComponent, selector: "ate-image-bubble-menu", inputs: ["config", "imageUpload"] }, { kind: "component", type: AteTableBubbleMenuComponent, selector: "ate-table-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteCellBubbleMenuComponent, selector: "ate-cell-bubble-menu", inputs: ["config"] }, { kind: "component", type: AteSlashCommandsComponent, selector: "ate-slash-commands", inputs: ["editor", "config"] }, { kind: "component", type: AteLinkBubbleMenuComponent, selector: "ate-link-bubble-menu" }, { kind: "component", type: AteColorBubbleMenuComponent, selector: "ate-color-bubble-menu" }, { kind: "component", type: AteEditToggleComponent, selector: "ate-edit-toggle", inputs: ["editable", "translations"], outputs: ["editToggle"] }, { kind: "component", type: AteBlockControlsComponent, selector: "ate-block-controls", inputs: ["editor", "hoveredData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8739
8750
  }
8740
8751
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularTiptapEditorComponent, decorators: [{
8741
8752
  type: Component,
@@ -8879,7 +8890,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
8879
8890
  [class.limit-reached]="finalMaxCharacters() && characterCount() >= finalMaxCharacters()!">
8880
8891
  @if (finalShowCharacterCount()) {
8881
8892
  {{ characterCount() }}
8882
- {{ characterCount() > 1 ? currentTranslations().editor.characterPlural : currentTranslations().editor.character }}
8893
+ {{
8894
+ characterCount() > 1
8895
+ ? currentTranslations().editor.characterPlural
8896
+ : currentTranslations().editor.character
8897
+ }}
8883
8898
  @if (finalMaxCharacters()) {
8884
8899
  / {{ finalMaxCharacters() }}
8885
8900
  }
@@ -8891,14 +8906,372 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
8891
8906
 
8892
8907
  @if (finalShowWordCount()) {
8893
8908
  {{ wordCount() }}
8894
- {{ wordCount() > 1 ? currentTranslations().editor.wordPlural : currentTranslations().editor.word }}
8909
+ {{
8910
+ wordCount() > 1
8911
+ ? currentTranslations().editor.wordPlural
8912
+ : currentTranslations().editor.word
8913
+ }}
8895
8914
  }
8896
8915
  </div>
8897
8916
  }
8898
8917
  </div>
8899
- `, styles: [":host{--ate-primary: #2563eb;--ate-primary-hover: #153ca9;--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-selection-bg: var(--ate-primary-light-alpha);--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-block: 16px;--ate-content-padding-inline: 16px;--ate-content-gutter: 0px;--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: 4px;--ate-menu-gap: 2px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-gap: var(--ate-menu-gap);--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);--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);--ate-tooltip-bg: var(--ate-code-block-background, #0f172a);--ate-tooltip-color: var(--ate-code-block-color, #e2e8f0)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host.ate-blocks-inside{--ate-content-gutter: 54px}@media (max-width: 768px){:host.ate-blocks-inside{--ate-content-gutter: 0px}ate-block-controls{display:none!important}}:host ::ng-deep .ProseMirror{padding-inline:calc(var(--ate-content-padding-inline) + var(--ate-content-gutter));padding-block:var(--ate-content-padding-block);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 ::selection{background-color:var(--ate-selection-bg);color:inherit}:host ::ng-deep .ProseMirror ::-moz-selection{background-color:var(--ate-selection-bg);color:inherit}: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] img{cursor:pointer}:host ::ng-deep .ProseMirror[contenteditable=false] a{cursor:pointer}: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,:host ::ng-deep .resizable-image-container.selected img{border-color:var(--ate-image-selected-color);transition:all .2s ease}:host ::ng-deep .ProseMirror [data-text-align=center],:host ::ng-deep .ProseMirror [data-align=center]{text-align:center}:host ::ng-deep .ProseMirror [data-text-align=right],:host ::ng-deep .ProseMirror [data-align=right]{text-align:right}:host ::ng-deep .ProseMirror [data-text-align=left],:host ::ng-deep .ProseMirror [data-align=left]{text-align:left}:host ::ng-deep .resizable-image-wrapper{display:block;width:100%;margin:.5em 0}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;max-width:100%}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000;opacity:0;transition:opacity .2s ease}:host:not(.is-readonly):not(.is-disabled) ::ng-deep .resizable-image-container:hover .resize-controls,:host:not(.is-readonly):not(.is-disabled) ::ng-deep body.resizing .resize-controls{opacity:1}:host ::ng-deep .resize-handle{position:absolute;width:.35rem;height:2rem;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:var(--ate-border-radius);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-w:hover,:host ::ng-deep .resize-handle-e:hover{background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9);background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w{top:50%;left:.35rem;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:.35rem;transform:translateY(-50%);cursor:e-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 .resizable-image-container{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 .resizable-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"] }]
8918
+ `, styles: [":host{--ate-primary: #2563eb;--ate-primary-hover: #153ca9;--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-selection-bg: var(--ate-primary-light-alpha);--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-sub-border-radius: 8px;--ate-focus-color: var(--ate-primary);--ate-background: var(--ate-surface);--ate-text-color: var(--ate-text, #2d3748);--ate-placeholder-color: var(--ate-text-muted, #a0aec0);--ate-line-height: 1.6;--ate-content-padding-block: 16px;--ate-content-padding-inline: 16px;--ate-content-gutter: 0px;--ate-menu-bg: var(--ate-surface, #ffffff);--ate-menu-border-radius: var(--ate-border-radius, 12px);--ate-menu-border: var(--ate-border, #e2e8f0);--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ate-menu-padding: 4px;--ate-menu-gap: 2px;--ate-toolbar-padding: var(--ate-menu-padding);--ate-toolbar-gap: var(--ate-menu-gap);--ate-toolbar-background: var(--ate-surface-secondary, #f8f9fa);--ate-toolbar-border-color: var(--ate-border, #e2e8f0);--ate-toolbar-button-color: var(--ate-text-secondary, #64748b);--ate-toolbar-button-hover-background: transparent;--ate-toolbar-button-active-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 90% );--ate-toolbar-button-active-color: var(--ate-primary, #2563eb);--ate-counter-color: var(--ate-text-secondary, #64748b);--ate-counter-background: var(--ate-surface-secondary, #f8f9fa);--ate-counter-border-color: var(--ate-border, #e2e8f0);--ate-drag-background: #f0f8ff;--ate-drag-border-color: var(--ate-primary, #2563eb);--ate-blockquote-border-color: var(--ate-border, #e2e8f0);--ate-blockquote-background: var(--ate-surface-secondary, #f8f9fa);--ate-code-background: var(--ate-surface-secondary, #f8f9fa);--ate-code-color: var(--ate-text, #2d3748);--ate-code-border-color: var(--ate-border, #e2e8f0);--ate-code-block-background: #0f172a;--ate-code-block-color: #e2e8f0;--ate-code-block-border-color: var(--ate-border, #e2e8f0);--ate-image-border-radius: 16px;--ate-image-selected-color: var(--ate-primary, #2563eb);--ate-scrollbar-width: 10px;--ate-scrollbar-thumb: var(--ate-border, #e2e8f0);--ate-scrollbar-thumb-hover: var(--ate-text-muted, #a0aec0);--ate-scrollbar-track: transparent;--ate-table-border-color: var(--ate-border, #e2e8f0);--ate-table-header-background: var(--ate-surface-secondary, #f8f9fa);--ate-table-header-color: var(--ate-text, #2d3748);--ate-table-cell-background: var(--ate-surface, #ffffff);--ate-table-cell-selected-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 90% );--ate-table-resize-handle-color: var(--ate-primary, #2563eb);--ate-table-row-hover-background: color-mix( in srgb, var(--ate-primary, #2563eb), transparent 95% );--ate-tooltip-bg: var(--ate-code-block-background, #0f172a);--ate-tooltip-color: var(--ate-code-block-color, #e2e8f0)}:host(.dark),:host([data-theme=\"dark\"]){--ate-primary: #3b82f6;--ate-primary-contrast: #ffffff;--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);--ate-surface: #020617;--ate-surface-secondary: #0f172a;--ate-surface-tertiary: #1e293b;--ate-text: #f8fafc;--ate-text-secondary: #94a3b8;--ate-text-muted: #64748b;--ate-border: #1e293b;--ate-highlight-bg: #854d0e;--ate-highlight-color: #fef08a;--ate-button-hover: #1e293b;--ate-button-active: #0f172a;--ate-menu-border: rgba(255, 255, 255, .1);--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, .3), 0 10px 10px -5px rgba(0, 0, 0, .2);--ate-error-color: #f87171;--ate-error-bg: #450a0a;--ate-error-border: #7f1d1d;--ate-drag-background: var(--ate-surface-tertiary);--ate-drag-border-color: var(--ate-primary);--ate-blockquote-border-color: var(--ate-primary);--ate-toolbar-button-active-background: var(--ate-primary-light);--ate-toolbar-button-active-color: var(--ate-primary);--ate-button-hover: var(--ate-surface-tertiary);--ate-button-active: var(--ate-surface-secondary);--ate-scrollbar-thumb: var(--ate-surface-tertiary);--ate-scrollbar-thumb-hover: var(--ate-text-muted)}:host(.fill-container){display:block;height:100%}.ate-editor{border:var(--ate-border-width) solid var(--ate-border-color);border-radius:var(--ate-border-radius);background:var(--ate-background);overflow:visible;transition:border-color .2s ease;position:relative}:host(.floating-toolbar) .ate-editor{overflow:visible}:host(.fill-container) .ate-editor{display:flex;flex-direction:column;height:100%}:host(.fill-container) .ate-content-wrapper{flex:1;min-height:0}:host(.fill-container) .ate-content{flex:1;min-height:0;overflow-y:auto}.ate-editor:focus-within{border-color:var(--ate-focus-color)}.ate-content{min-height:var(--editor-min-height, 200px);height:var(--editor-height, auto);max-height:var(--editor-max-height, none);overflow-y:var(--editor-overflow, visible);outline:none;position:relative;scrollbar-width:thin;scrollbar-color:var(--ate-scrollbar-thumb) var(--ate-scrollbar-track)}:host(.is-disabled) .ate-content{cursor:not-allowed;opacity:.7;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:var(--ate-surface-tertiary)}:host(.is-readonly) .ate-content{cursor:default;-webkit-user-select:text;user-select:text}:host(.is-readonly) .ate-content ::ng-deep .ate-link{cursor:pointer;pointer-events:auto}.ate-content::-webkit-scrollbar{width:var(--ate-scrollbar-width)}.ate-content-wrapper{position:relative;display:flex;flex-direction:column;min-height:0}.ate-content-wrapper .ate-content{flex:1}.ate-content::-webkit-scrollbar-track{background:var(--ate-scrollbar-track)}.ate-content::-webkit-scrollbar-thumb{background:var(--ate-scrollbar-thumb);border:3px solid transparent;background-clip:content-box;border-radius:10px}.ate-content::-webkit-scrollbar-thumb:hover{background:var(--ate-scrollbar-thumb-hover);background-clip:content-box}.ate-content.drag-over{background:var(--ate-drag-background);border:2px dashed var(--ate-drag-border-color)}.character-count{padding:6px 8px;font-size:12px;color:var(--ate-counter-color);text-align:right;border-top:1px solid var(--ate-counter-border-color);background:var(--ate-counter-background);transition:color .2s ease;border-bottom-left-radius:calc(var(--ate-border-radius) - var(--ate-border-width));border-bottom-right-radius:calc(var(--ate-border-radius) - var(--ate-border-width))}.character-count.limit-reached{color:var(--ate-error-color, #ef4444);font-weight:600}:host.ate-blocks-inside{--ate-content-gutter: 54px}@media (max-width: 768px){:host.ate-blocks-inside{--ate-content-gutter: 0px}ate-block-controls{display:none!important}}:host ::ng-deep .ProseMirror{padding-inline:calc(var(--ate-content-padding-inline) + var(--ate-content-gutter));padding-block:var(--ate-content-padding-block);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 ::selection{background-color:var(--ate-selection-bg);color:inherit}:host ::ng-deep .ProseMirror ::-moz-selection{background-color:var(--ate-selection-bg);color:inherit}: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] img{cursor:pointer}:host ::ng-deep .ProseMirror[contenteditable=false] a{cursor:pointer}: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,:host ::ng-deep .resizable-image-container.selected img{border-color:var(--ate-image-selected-color);transition:all .2s ease}:host ::ng-deep .ProseMirror [data-text-align=center],:host ::ng-deep .ProseMirror [data-align=center]{text-align:center}:host ::ng-deep .ProseMirror [data-text-align=right],:host ::ng-deep .ProseMirror [data-align=right]{text-align:right}:host ::ng-deep .ProseMirror [data-text-align=left],:host ::ng-deep .ProseMirror [data-align=left]{text-align:left}:host ::ng-deep .resizable-image-wrapper{display:block;width:100%;margin:.5em 0}:host ::ng-deep .resizable-image-container{position:relative;display:inline-block;max-width:100%}:host ::ng-deep .resize-controls{position:absolute;inset:0;pointer-events:none;z-index:1000;opacity:0;transition:opacity .2s ease}:host:not(.is-readonly):not(.is-disabled) ::ng-deep .resizable-image-container:hover .resize-controls,:host:not(.is-readonly):not(.is-disabled) ::ng-deep body.resizing .resize-controls{opacity:1}:host ::ng-deep .resize-handle{position:absolute;width:.35rem;height:2rem;background:var(--ate-primary);border:2px solid var(--ate-surface);border-radius:var(--ate-border-radius);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-w:hover,:host ::ng-deep .resize-handle-e:hover{background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w:active,:host ::ng-deep .resize-handle-e:active{transform:translateY(-50%) scale(.9);background:var(--ate-primary-hover)}:host ::ng-deep .resize-handle-w{top:50%;left:.35rem;transform:translateY(-50%);cursor:w-resize}:host ::ng-deep .resize-handle-e{top:50%;right:.35rem;transform:translateY(-50%);cursor:e-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 .resizable-image-container{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 .resizable-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"] }]
8900
8919
  }], ctorParameters: () => [] });
8901
8920
 
8921
+ /**
8922
+ * Table of Contents Component (Notion-style)
8923
+ * Dynamically extracts headings from the active editor and displays them.
8924
+ * Configurable via inputs (floating, position, variants, hover expansion) and CSS variables.
8925
+ */
8926
+ class AteTableOfContentsComponent {
8927
+ // Helper method for exact native SVG dash width per heading level
8928
+ dashWidth(level) {
8929
+ switch (level) {
8930
+ case 1:
8931
+ return 16;
8932
+ case 2:
8933
+ return 12;
8934
+ case 3:
8935
+ return 8;
8936
+ case 4:
8937
+ return 6;
8938
+ case 5:
8939
+ return 4;
8940
+ default:
8941
+ return 3;
8942
+ }
8943
+ }
8944
+ constructor() {
8945
+ // Input accepts raw Editor, AteEditorRef, or ID of registered editor
8946
+ this.editor = input(null);
8947
+ // Optional custom title (if not provided, uses i18n translation)
8948
+ this.title = input(null);
8949
+ // Whether to show the header title
8950
+ this.showTitle = input(true);
8951
+ // Layout mode: floating on fixed position or inline inside parent container
8952
+ this.floating = input(false);
8953
+ // Floating position: 'right' | 'left'
8954
+ this.position = input("right");
8955
+ // Visual variant: 'card' | 'transparent' | 'minimal'
8956
+ this.variant = input("card");
8957
+ // Notion-style hover expansion (collapses text into dashes until hovered)
8958
+ this.hoverExpand = input(true);
8959
+ this.registry = inject(AteEditorRegistry);
8960
+ this.i18n = inject(AteI18nService);
8961
+ // Computed header title with fallback to i18n
8962
+ this.headerTitle = computed(() => {
8963
+ const custom = this.title();
8964
+ if (custom !== null && custom !== undefined) {
8965
+ return custom;
8966
+ }
8967
+ return this.i18n.editor().tableOfContents;
8968
+ });
8969
+ // Resolved editor instance
8970
+ this.resolvedEditor = computed(() => {
8971
+ const val = this.editor();
8972
+ if (!val) {
8973
+ return this.registry.activeEditor()?.editor || null;
8974
+ }
8975
+ if (val instanceof AteEditorRef) {
8976
+ return val.editor;
8977
+ }
8978
+ if (typeof val === "string") {
8979
+ return this.registry.get(val)?.editor || null;
8980
+ }
8981
+ return val;
8982
+ });
8983
+ // Table of Contents items
8984
+ this.items = signal([]);
8985
+ // Distinct mouse hover and keyboard focus state tracking
8986
+ this.isMouseHovered = signal(false);
8987
+ this.isFocused = signal(false);
8988
+ this.isExpanded = computed(() => this.isMouseHovered() || this.isFocused());
8989
+ this.onEditorUpdate = () => {
8990
+ const editor = this.resolvedEditor();
8991
+ if (editor) {
8992
+ this.updateHeadings(editor);
8993
+ }
8994
+ };
8995
+ // React strictly to editor instance changes without tracking internal signal updates
8996
+ effect(() => {
8997
+ const editor = this.resolvedEditor();
8998
+ untracked(() => {
8999
+ if (editor) {
9000
+ this.bindEditorEvents(editor);
9001
+ this.updateHeadings(editor);
9002
+ }
9003
+ else {
9004
+ this.items.set([]);
9005
+ }
9006
+ });
9007
+ });
9008
+ }
9009
+ ngOnDestroy() {
9010
+ const editor = this.resolvedEditor();
9011
+ if (editor) {
9012
+ this.unbindEditorEvents(editor);
9013
+ }
9014
+ }
9015
+ onScroll() {
9016
+ this.checkActiveHeading();
9017
+ }
9018
+ // Handle mouse hover state independently
9019
+ setMouseHover(hovered) {
9020
+ this.isMouseHovered.set(hovered);
9021
+ }
9022
+ // Handle keyboard focus state independently
9023
+ setFocused(focused) {
9024
+ this.isFocused.set(focused);
9025
+ }
9026
+ // Navigate to heading on click
9027
+ scrollToHeading(item, event) {
9028
+ event.preventDefault();
9029
+ event.stopPropagation();
9030
+ const editor = this.resolvedEditor();
9031
+ if (!editor || !editor.view) {
9032
+ return;
9033
+ }
9034
+ try {
9035
+ // 1. Position cursor inside the heading text (item.pos + 1 points to inline text)
9036
+ const targetPos = Math.min(item.pos + 1, editor.state.doc.content.size);
9037
+ editor.commands.setTextSelection(targetPos);
9038
+ editor.commands.focus();
9039
+ }
9040
+ catch (_e) {
9041
+ // Safe-guard against position selection errors
9042
+ }
9043
+ // 2. Smoothly scroll DOM node into view
9044
+ setTimeout(() => {
9045
+ try {
9046
+ const domNode = editor.view.nodeDOM(item.pos);
9047
+ if (domNode) {
9048
+ domNode.scrollIntoView({ behavior: "smooth", block: "start" });
9049
+ }
9050
+ }
9051
+ catch (_e) {
9052
+ // Safe-guard
9053
+ }
9054
+ }, 10);
9055
+ }
9056
+ bindEditorEvents(editor) {
9057
+ this.unbindEditorEvents(editor);
9058
+ editor.on("update", this.onEditorUpdate);
9059
+ editor.on("selectionUpdate", this.onEditorUpdate);
9060
+ }
9061
+ unbindEditorEvents(editor) {
9062
+ editor.off("update", this.onEditorUpdate);
9063
+ editor.off("selectionUpdate", this.onEditorUpdate);
9064
+ }
9065
+ updateHeadings(editor) {
9066
+ const nextItems = [];
9067
+ try {
9068
+ editor.state.doc.descendants((node, pos) => {
9069
+ if (node.type.name === "heading") {
9070
+ const text = node.textContent.trim();
9071
+ const level = node.attrs["level"] || 1;
9072
+ if (text) {
9073
+ nextItems.push({
9074
+ text,
9075
+ level,
9076
+ pos,
9077
+ id: `heading-${pos}`,
9078
+ active: false,
9079
+ });
9080
+ }
9081
+ }
9082
+ });
9083
+ }
9084
+ catch (_e) {
9085
+ // Safe guard against document access issues
9086
+ }
9087
+ untracked(() => {
9088
+ this.items.set(nextItems);
9089
+ this.checkActiveHeading();
9090
+ });
9091
+ }
9092
+ checkActiveHeading() {
9093
+ const editor = this.resolvedEditor();
9094
+ if (!editor || !editor.view) {
9095
+ return;
9096
+ }
9097
+ untracked(() => {
9098
+ const currentItems = this.items();
9099
+ if (currentItems.length === 0) {
9100
+ return;
9101
+ }
9102
+ const headingsWithDom = currentItems
9103
+ .map(item => {
9104
+ try {
9105
+ const dom = editor.view.nodeDOM(item.pos);
9106
+ return { item, dom };
9107
+ }
9108
+ catch (_e) {
9109
+ return { item, dom: null };
9110
+ }
9111
+ })
9112
+ .filter((entry) => entry.dom !== null);
9113
+ if (headingsWithDom.length === 0) {
9114
+ return;
9115
+ }
9116
+ const windowHeight = typeof window !== "undefined" ? window.innerHeight : 800;
9117
+ let activeItem = null;
9118
+ for (let i = headingsWithDom.length - 1; i >= 0; i--) {
9119
+ const { item, dom } = headingsWithDom[i];
9120
+ const rect = dom.getBoundingClientRect();
9121
+ if (rect.top <= windowHeight * 0.35) {
9122
+ activeItem = item;
9123
+ break;
9124
+ }
9125
+ }
9126
+ if (!activeItem && headingsWithDom.length > 0) {
9127
+ activeItem = headingsWithDom[0].item;
9128
+ }
9129
+ if (activeItem) {
9130
+ const updated = currentItems.map(item => ({
9131
+ ...item,
9132
+ active: item.id === activeItem.id,
9133
+ }));
9134
+ const isDifferent = updated.some((item, idx) => item.active !== currentItems[idx].active);
9135
+ if (isDifferent) {
9136
+ this.items.set(updated);
9137
+ }
9138
+ }
9139
+ });
9140
+ }
9141
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AteTableOfContentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9142
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AteTableOfContentsComponent, isStandalone: true, selector: "ate-table-of-contents", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, floating: { classPropertyName: "floating", publicName: "floating", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, hoverExpand: { classPropertyName: "hoverExpand", publicName: "hoverExpand", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:scroll": "onScroll()", "window:resize": "onScroll()" } }, ngImport: i0, template: `
9143
+ <div
9144
+ class="ate-toc-wrapper"
9145
+ [class.ate-toc-floating]="floating()"
9146
+ [class.ate-toc-position-left]="position() === 'left'"
9147
+ [class.ate-toc-position-right]="position() === 'right'"
9148
+ (mouseenter)="setMouseHover(true)"
9149
+ (mouseleave)="setMouseHover(false)"
9150
+ (focusin)="setFocused(true)"
9151
+ (focusout)="setFocused(false)">
9152
+ <div
9153
+ class="ate-toc"
9154
+ [class.ate-toc-floating]="floating()"
9155
+ [class.ate-toc-position-left]="position() === 'left'"
9156
+ [class.ate-toc-position-right]="position() === 'right'"
9157
+ [class.ate-toc-variant-card]="variant() === 'card'"
9158
+ [class.ate-toc-variant-transparent]="variant() === 'transparent'"
9159
+ [class.ate-toc-variant-minimal]="variant() === 'minimal'"
9160
+ [class.ate-toc-hover-expand]="floating() && hoverExpand()"
9161
+ [class.ate-toc-hovered]="floating() && hoverExpand() && isExpanded()"
9162
+ role="navigation"
9163
+ aria-label="Table of Contents">
9164
+ @if (items().length > 0) {
9165
+ @if (showTitle()) {
9166
+ <div class="ate-toc-header">{{ headerTitle() }}</div>
9167
+ }
9168
+ <div class="ate-toc-list">
9169
+ @for (item of items(); track item.id) {
9170
+ <button
9171
+ type="button"
9172
+ class="ate-toc-item"
9173
+ [class.ate-toc-active]="item.active"
9174
+ [attr.aria-current]="item.active ? 'true' : null"
9175
+ [attr.data-level]="item.level"
9176
+ (click)="scrollToHeading(item, $event)"
9177
+ [title]="item.text">
9178
+ <!-- Perfect native vector SVG dash with level-adapted viewBox & width -->
9179
+ <svg
9180
+ [attr.width]="dashWidth(item.level)"
9181
+ height="2"
9182
+ [attr.viewBox]="'0 0 ' + dashWidth(item.level) + ' 2'"
9183
+ fill="none"
9184
+ xmlns="http://www.w3.org/2000/svg"
9185
+ class="ate-toc-dash">
9186
+ <rect
9187
+ [attr.width]="dashWidth(item.level)"
9188
+ height="2"
9189
+ rx="1"
9190
+ ry="1"
9191
+ fill="currentColor"></rect>
9192
+ </svg>
9193
+
9194
+ <!-- Full heading text -->
9195
+ <span class="ate-toc-text">{{ item.text }}</span>
9196
+ </button>
9197
+ }
9198
+ </div>
9199
+ }
9200
+ </div>
9201
+ </div>
9202
+ `, isInline: true, styles: [":host{display:block}.ate-toc-wrapper.ate-toc-floating{position:fixed;top:var(--ate-toc-top, 50%);transform:translateY(-50%);z-index:var(--ate-toc-z-index, 95);display:flex;flex-direction:column;box-sizing:border-box}.ate-toc-wrapper.ate-toc-floating.ate-toc-position-right{right:var(--ate-toc-right, 2rem);left:auto;padding-left:var(--ate-toc-hitbox-padding, 16px);padding-right:0;padding-top:var(--ate-toc-hitbox-padding-vertical, 8px);padding-bottom:var(--ate-toc-hitbox-padding-vertical, 8px)}.ate-toc-wrapper.ate-toc-floating.ate-toc-position-left{left:var(--ate-toc-left, 2rem);right:auto;padding-right:var(--ate-toc-hitbox-padding, 16px);padding-left:0;padding-top:var(--ate-toc-hitbox-padding-vertical, 8px);padding-bottom:var(--ate-toc-hitbox-padding-vertical, 8px)}.ate-toc{font-family:inherit;-webkit-user-select:none;user-select:none;width:100%;box-sizing:border-box;transition:all .3s cubic-bezier(.25,.46,.45,.94)}.ate-toc.ate-toc-floating{max-height:var(--ate-toc-max-height, 400px);overflow:hidden;display:flex;flex-direction:column}.ate-toc.ate-toc-floating:not(.ate-toc-hover-expand),.ate-toc.ate-toc-floating.ate-toc-hover-expand:hover,.ate-toc.ate-toc-floating.ate-toc-hover-expand.ate-toc-hovered{width:var(--ate-toc-width, 240px);border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 16px));padding:var(--ate-toc-padding)}.ate-toc.ate-toc-floating.ate-toc-hover-expand:not(.ate-toc-hovered):not(:hover){width:var(--ate-toc-collapsed-width, 32px);border-radius:var(--ate-toc-collapsed-radius, 16px);padding:var(--ate-toc-padding)}.ate-toc.ate-toc-variant-card{background:var(--ate-toc-bg, var(--ate-surface, #ffffff));border:1px solid var(--ate-toc-border, var(--ate-border, #e2e8f0));border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 12px));box-shadow:var(--ate-toc-shadow, 0 4px 20px rgba(0, 0, 0, .06));padding:var(--ate-toc-padding)}.ate-toc.ate-toc-variant-minimal{background:transparent;border:1px solid transparent;box-shadow:none;border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 12px));padding:10px 12px}.ate-toc.ate-toc-variant-minimal:hover{background:var(--ate-toc-hover-bg, var(--ate-surface, rgba(255, 255, 255, .95)));border-color:var(--ate-toc-hover-border, var(--ate-border, #e2e8f0));box-shadow:var(--ate-toc-hover-shadow, 0 4px 20px rgba(0, 0, 0, .06))}.ate-toc.ate-toc-variant-transparent{background:transparent;border:none;box-shadow:none;padding:0}.ate-toc-header{font-size:.65rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--ate-text-muted, #9ca3af);margin-bottom:10px;margin-top:6px;padding-left:12px;padding-right:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease}.ate-toc-list{display:flex;flex-direction:column;gap:var(--ate-toc-text-gap, var(--ate-toc-gap, 2px));position:relative;transition:gap .2s ease}.ate-toc-item{display:flex;align-items:center;justify-content:flex-start;text-align:left;position:relative;text-decoration:none;background:transparent;border:none;padding-right:0;cursor:pointer;font:inherit;width:100%;height:var(--ate-toc-item-hover-height, 22px);color:var(--ate-toolbar-button-color, var(--ate-text-secondary, #64748b));outline:none;box-sizing:border-box;border-radius:var(--ate-sub-border-radius, 8px);transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden}.ate-toc-item:focus-visible{outline:2px solid var(--ate-primary, #2563eb);outline-offset:1px}.ate-toc-item[data-level=\"1\"]{padding-left:8px}.ate-toc-item[data-level=\"2\"]{padding-left:16px}.ate-toc-item[data-level=\"3\"]{padding-left:24px}.ate-toc-item[data-level=\"4\"]{padding-left:32px}.ate-toc-item[data-level=\"5\"]{padding-left:40px}.ate-toc-item[data-level=\"6\"]{padding-left:48px}.ate-toc-item:before{content:\"\";position:absolute;inset:0;background:var(--ate-primary, #2563eb);opacity:0;transition:opacity .2s ease;border-radius:var(--ate-sub-border-radius, 8px);pointer-events:none}.ate-toc-item:hover{color:var(--ate-toolbar-button-active-color, var(--ate-primary, #2563eb));background:var(--ate-toolbar-button-hover-background, transparent)}.ate-toc-item:hover:before{opacity:.1}.ate-toc-item.ate-toc-active{color:var(--ate-toolbar-button-active-color, var(--ate-primary, #2563eb));background:var( --ate-toolbar-button-active-background, var(--ate-primary-light, color-mix(in srgb, var(--ate-primary, #2563eb), transparent 90%)) );font-weight:600}.ate-toc-text{font-size:.8rem;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;min-width:0;opacity:1;max-width:250px;transform:translate(0);margin-left:4px;margin-right:0;transition:opacity .25s cubic-bezier(.25,.46,.45,.94),max-width .3s cubic-bezier(.25,.46,.45,.94),transform .25s cubic-bezier(.25,.46,.45,.94),margin .25s ease}.ate-toc-dash{display:none;height:3px;color:var(--ate-toc-dash-color, var(--ate-border, #cbd5e1));flex-shrink:0;vertical-align:middle;overflow:visible;transition:all .3s cubic-bezier(.25,.46,.45,.94)}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-header{display:none}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-dash{display:inline-block}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item{height:var(--ate-toc-item-height, 18px);padding-left:0;padding-right:0;background:transparent}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item:before{opacity:0}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item:hover .ate-toc-dash,.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item.ate-toc-active .ate-toc-dash{color:var(--ate-primary, #2563eb);opacity:1}.ate-toc.ate-toc-hover-expand.ate-toc-position-right:not(.ate-toc-hovered) .ate-toc-item{flex-direction:row-reverse;justify-content:flex-start}.ate-toc.ate-toc-hover-expand.ate-toc-position-right:not(.ate-toc-hovered) .ate-toc-text{opacity:0;max-width:0;transform:translate(4px);margin-right:0}.ate-toc.ate-toc-hover-expand:not(.ate-toc-position-right):not(.ate-toc-hovered) .ate-toc-item,.ate-toc.ate-toc-hover-expand.ate-toc-position-left:not(.ate-toc-hovered) .ate-toc-item{flex-direction:row;justify-content:flex-start}.ate-toc.ate-toc-hover-expand:not(.ate-toc-position-right):not(.ate-toc-hovered) .ate-toc-text,.ate-toc.ate-toc-hover-expand.ate-toc-position-left:not(.ate-toc-hovered) .ate-toc-text{opacity:0;max-width:0;transform:translate(-4px);margin-left:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9203
+ }
9204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AteTableOfContentsComponent, decorators: [{
9205
+ type: Component,
9206
+ args: [{ selector: "ate-table-of-contents", standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: `
9207
+ <div
9208
+ class="ate-toc-wrapper"
9209
+ [class.ate-toc-floating]="floating()"
9210
+ [class.ate-toc-position-left]="position() === 'left'"
9211
+ [class.ate-toc-position-right]="position() === 'right'"
9212
+ (mouseenter)="setMouseHover(true)"
9213
+ (mouseleave)="setMouseHover(false)"
9214
+ (focusin)="setFocused(true)"
9215
+ (focusout)="setFocused(false)">
9216
+ <div
9217
+ class="ate-toc"
9218
+ [class.ate-toc-floating]="floating()"
9219
+ [class.ate-toc-position-left]="position() === 'left'"
9220
+ [class.ate-toc-position-right]="position() === 'right'"
9221
+ [class.ate-toc-variant-card]="variant() === 'card'"
9222
+ [class.ate-toc-variant-transparent]="variant() === 'transparent'"
9223
+ [class.ate-toc-variant-minimal]="variant() === 'minimal'"
9224
+ [class.ate-toc-hover-expand]="floating() && hoverExpand()"
9225
+ [class.ate-toc-hovered]="floating() && hoverExpand() && isExpanded()"
9226
+ role="navigation"
9227
+ aria-label="Table of Contents">
9228
+ @if (items().length > 0) {
9229
+ @if (showTitle()) {
9230
+ <div class="ate-toc-header">{{ headerTitle() }}</div>
9231
+ }
9232
+ <div class="ate-toc-list">
9233
+ @for (item of items(); track item.id) {
9234
+ <button
9235
+ type="button"
9236
+ class="ate-toc-item"
9237
+ [class.ate-toc-active]="item.active"
9238
+ [attr.aria-current]="item.active ? 'true' : null"
9239
+ [attr.data-level]="item.level"
9240
+ (click)="scrollToHeading(item, $event)"
9241
+ [title]="item.text">
9242
+ <!-- Perfect native vector SVG dash with level-adapted viewBox & width -->
9243
+ <svg
9244
+ [attr.width]="dashWidth(item.level)"
9245
+ height="2"
9246
+ [attr.viewBox]="'0 0 ' + dashWidth(item.level) + ' 2'"
9247
+ fill="none"
9248
+ xmlns="http://www.w3.org/2000/svg"
9249
+ class="ate-toc-dash">
9250
+ <rect
9251
+ [attr.width]="dashWidth(item.level)"
9252
+ height="2"
9253
+ rx="1"
9254
+ ry="1"
9255
+ fill="currentColor"></rect>
9256
+ </svg>
9257
+
9258
+ <!-- Full heading text -->
9259
+ <span class="ate-toc-text">{{ item.text }}</span>
9260
+ </button>
9261
+ }
9262
+ </div>
9263
+ }
9264
+ </div>
9265
+ </div>
9266
+ `, styles: [":host{display:block}.ate-toc-wrapper.ate-toc-floating{position:fixed;top:var(--ate-toc-top, 50%);transform:translateY(-50%);z-index:var(--ate-toc-z-index, 95);display:flex;flex-direction:column;box-sizing:border-box}.ate-toc-wrapper.ate-toc-floating.ate-toc-position-right{right:var(--ate-toc-right, 2rem);left:auto;padding-left:var(--ate-toc-hitbox-padding, 16px);padding-right:0;padding-top:var(--ate-toc-hitbox-padding-vertical, 8px);padding-bottom:var(--ate-toc-hitbox-padding-vertical, 8px)}.ate-toc-wrapper.ate-toc-floating.ate-toc-position-left{left:var(--ate-toc-left, 2rem);right:auto;padding-right:var(--ate-toc-hitbox-padding, 16px);padding-left:0;padding-top:var(--ate-toc-hitbox-padding-vertical, 8px);padding-bottom:var(--ate-toc-hitbox-padding-vertical, 8px)}.ate-toc{font-family:inherit;-webkit-user-select:none;user-select:none;width:100%;box-sizing:border-box;transition:all .3s cubic-bezier(.25,.46,.45,.94)}.ate-toc.ate-toc-floating{max-height:var(--ate-toc-max-height, 400px);overflow:hidden;display:flex;flex-direction:column}.ate-toc.ate-toc-floating:not(.ate-toc-hover-expand),.ate-toc.ate-toc-floating.ate-toc-hover-expand:hover,.ate-toc.ate-toc-floating.ate-toc-hover-expand.ate-toc-hovered{width:var(--ate-toc-width, 240px);border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 16px));padding:var(--ate-toc-padding)}.ate-toc.ate-toc-floating.ate-toc-hover-expand:not(.ate-toc-hovered):not(:hover){width:var(--ate-toc-collapsed-width, 32px);border-radius:var(--ate-toc-collapsed-radius, 16px);padding:var(--ate-toc-padding)}.ate-toc.ate-toc-variant-card{background:var(--ate-toc-bg, var(--ate-surface, #ffffff));border:1px solid var(--ate-toc-border, var(--ate-border, #e2e8f0));border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 12px));box-shadow:var(--ate-toc-shadow, 0 4px 20px rgba(0, 0, 0, .06));padding:var(--ate-toc-padding)}.ate-toc.ate-toc-variant-minimal{background:transparent;border:1px solid transparent;box-shadow:none;border-radius:var(--ate-toc-border-radius, var(--ate-border-radius, 12px));padding:10px 12px}.ate-toc.ate-toc-variant-minimal:hover{background:var(--ate-toc-hover-bg, var(--ate-surface, rgba(255, 255, 255, .95)));border-color:var(--ate-toc-hover-border, var(--ate-border, #e2e8f0));box-shadow:var(--ate-toc-hover-shadow, 0 4px 20px rgba(0, 0, 0, .06))}.ate-toc.ate-toc-variant-transparent{background:transparent;border:none;box-shadow:none;padding:0}.ate-toc-header{font-size:.65rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--ate-text-muted, #9ca3af);margin-bottom:10px;margin-top:6px;padding-left:12px;padding-right:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease}.ate-toc-list{display:flex;flex-direction:column;gap:var(--ate-toc-text-gap, var(--ate-toc-gap, 2px));position:relative;transition:gap .2s ease}.ate-toc-item{display:flex;align-items:center;justify-content:flex-start;text-align:left;position:relative;text-decoration:none;background:transparent;border:none;padding-right:0;cursor:pointer;font:inherit;width:100%;height:var(--ate-toc-item-hover-height, 22px);color:var(--ate-toolbar-button-color, var(--ate-text-secondary, #64748b));outline:none;box-sizing:border-box;border-radius:var(--ate-sub-border-radius, 8px);transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden}.ate-toc-item:focus-visible{outline:2px solid var(--ate-primary, #2563eb);outline-offset:1px}.ate-toc-item[data-level=\"1\"]{padding-left:8px}.ate-toc-item[data-level=\"2\"]{padding-left:16px}.ate-toc-item[data-level=\"3\"]{padding-left:24px}.ate-toc-item[data-level=\"4\"]{padding-left:32px}.ate-toc-item[data-level=\"5\"]{padding-left:40px}.ate-toc-item[data-level=\"6\"]{padding-left:48px}.ate-toc-item:before{content:\"\";position:absolute;inset:0;background:var(--ate-primary, #2563eb);opacity:0;transition:opacity .2s ease;border-radius:var(--ate-sub-border-radius, 8px);pointer-events:none}.ate-toc-item:hover{color:var(--ate-toolbar-button-active-color, var(--ate-primary, #2563eb));background:var(--ate-toolbar-button-hover-background, transparent)}.ate-toc-item:hover:before{opacity:.1}.ate-toc-item.ate-toc-active{color:var(--ate-toolbar-button-active-color, var(--ate-primary, #2563eb));background:var( --ate-toolbar-button-active-background, var(--ate-primary-light, color-mix(in srgb, var(--ate-primary, #2563eb), transparent 90%)) );font-weight:600}.ate-toc-text{font-size:.8rem;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;min-width:0;opacity:1;max-width:250px;transform:translate(0);margin-left:4px;margin-right:0;transition:opacity .25s cubic-bezier(.25,.46,.45,.94),max-width .3s cubic-bezier(.25,.46,.45,.94),transform .25s cubic-bezier(.25,.46,.45,.94),margin .25s ease}.ate-toc-dash{display:none;height:3px;color:var(--ate-toc-dash-color, var(--ate-border, #cbd5e1));flex-shrink:0;vertical-align:middle;overflow:visible;transition:all .3s cubic-bezier(.25,.46,.45,.94)}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-header{display:none}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-dash{display:inline-block}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item{height:var(--ate-toc-item-height, 18px);padding-left:0;padding-right:0;background:transparent}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item:before{opacity:0}.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item:hover .ate-toc-dash,.ate-toc.ate-toc-hover-expand:not(.ate-toc-hovered) .ate-toc-item.ate-toc-active .ate-toc-dash{color:var(--ate-primary, #2563eb);opacity:1}.ate-toc.ate-toc-hover-expand.ate-toc-position-right:not(.ate-toc-hovered) .ate-toc-item{flex-direction:row-reverse;justify-content:flex-start}.ate-toc.ate-toc-hover-expand.ate-toc-position-right:not(.ate-toc-hovered) .ate-toc-text{opacity:0;max-width:0;transform:translate(4px);margin-right:0}.ate-toc.ate-toc-hover-expand:not(.ate-toc-position-right):not(.ate-toc-hovered) .ate-toc-item,.ate-toc.ate-toc-hover-expand.ate-toc-position-left:not(.ate-toc-hovered) .ate-toc-item{flex-direction:row;justify-content:flex-start}.ate-toc.ate-toc-hover-expand:not(.ate-toc-position-right):not(.ate-toc-hovered) .ate-toc-text,.ate-toc.ate-toc-hover-expand.ate-toc-position-left:not(.ate-toc-hovered) .ate-toc-text{opacity:0;max-width:0;transform:translate(-4px);margin-left:0}\n"] }]
9267
+ }], ctorParameters: () => [], propDecorators: { onScroll: [{
9268
+ type: HostListener,
9269
+ args: ["window:scroll", []]
9270
+ }, {
9271
+ type: HostListener,
9272
+ args: ["window:resize", []]
9273
+ }] } });
9274
+
8902
9275
  /**
8903
9276
  * Provides the necessary configuration and initialization for the Angular TipTap Editor.
8904
9277
  * This should be called in your app.config.ts (for standalone) or main.ts.
@@ -8978,5 +9351,5 @@ const ATE_TOOLBAR_KEYS = [
8978
9351
  * Generated bundle index. Do not edit.
8979
9352
  */
8980
9353
 
8981
- export { ATE_BUBBLE_MENU_KEYS, ATE_CELL_BUBBLE_MENU_KEYS, ATE_DEFAULT_BUBBLE_MENU_CONFIG, ATE_DEFAULT_CELL_MENU_CONFIG, ATE_DEFAULT_CONFIG, ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, ATE_DEFAULT_IMAGE_UPLOAD_CONFIG, ATE_DEFAULT_SLASH_COMMANDS_CONFIG, ATE_DEFAULT_TABLE_MENU_CONFIG, ATE_DEFAULT_TOOLBAR_CONFIG, ATE_GLOBAL_CONFIG, ATE_IMAGE_BUBBLE_MENU_KEYS, ATE_INITIAL_EDITOR_STATE, ATE_SLASH_COMMAND_KEYS, ATE_TABLE_BUBBLE_MENU_KEYS, ATE_TOOLBAR_KEYS, AngularTiptapEditorComponent, AteAngularNodeView, AteColorPickerService, AteDiscoveryCalculator, AteEditorCommandsService, AteEditorRef, AteEditorRegistry, AteExportService, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNodeViewRenderer, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, AteTooltipDirective, createAngularComponentExtension, createDefaultSlashCommands, filterSlashCommands, provideAteEditor, registerAngularComponent };
9354
+ export { ATE_BUBBLE_MENU_KEYS, ATE_CELL_BUBBLE_MENU_KEYS, ATE_DEFAULT_BUBBLE_MENU_CONFIG, ATE_DEFAULT_CELL_MENU_CONFIG, ATE_DEFAULT_CONFIG, ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, ATE_DEFAULT_IMAGE_UPLOAD_CONFIG, ATE_DEFAULT_SLASH_COMMANDS_CONFIG, ATE_DEFAULT_TABLE_MENU_CONFIG, ATE_DEFAULT_TOOLBAR_CONFIG, ATE_GLOBAL_CONFIG, ATE_IMAGE_BUBBLE_MENU_KEYS, ATE_INITIAL_EDITOR_STATE, ATE_SLASH_COMMAND_KEYS, ATE_TABLE_BUBBLE_MENU_KEYS, ATE_TOOLBAR_KEYS, AngularTiptapEditorComponent, AteAngularNodeView, AteColorPickerService, AteDiscoveryCalculator, AteEditorCommandsService, AteEditorRef, AteEditorRegistry, AteExportService, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNodeViewRenderer, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, AteTableOfContentsComponent, AteTooltipDirective, createAngularComponentExtension, createDefaultSlashCommands, filterSlashCommands, provideAteEditor, registerAngularComponent };
8982
9355
  //# sourceMappingURL=flogeez-angular-tiptap-editor.mjs.map