@flogeez/angular-tiptap-editor 3.0.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +71 -723
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +630 -56
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/index.d.ts +79 -19
- package/package.json +1 -1
- package/src/lib/styles/ate-bubble-menu.global.css +13 -9
- package/src/lib/styles/ate-tooltip.global.css +47 -0
- package/src/lib/styles/index.css +1 -0
package/index.d.ts
CHANGED
|
@@ -2,11 +2,29 @@ import * as _flogeez_angular_tiptap_editor from '@flogeez/angular-tiptap-editor'
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { Injector, Type, AfterViewInit, OnDestroy, ElementRef, EnvironmentProviders, InjectionToken, Signal } from '@angular/core';
|
|
4
4
|
import { Editor, NodeConfig, Extension, Node as Node$2, Mark, EditorOptions, JSONContent } from '@tiptap/core';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
5
|
import { Node as Node$1 } from '@tiptap/pm/model';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
7
|
import { ControlValueAccessor } from '@angular/forms';
|
|
8
|
+
import * as _popperjs_core from '@popperjs/core';
|
|
8
9
|
import { Decoration, EditorView, NodeView } from '@tiptap/pm/view';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface representing a single item in the slash commands menu.
|
|
13
|
+
*/
|
|
14
|
+
interface AteSlashCommandItem {
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
keywords: string[];
|
|
19
|
+
command: (editor: Editor) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Custom slash commands configuration.
|
|
23
|
+
*/
|
|
24
|
+
interface AteCustomSlashCommands {
|
|
25
|
+
commands?: AteSlashCommandItem[];
|
|
26
|
+
}
|
|
27
|
+
|
|
10
28
|
type SupportedLocale = "en" | "fr" | (string & {});
|
|
11
29
|
interface AteTranslations {
|
|
12
30
|
toolbar: {
|
|
@@ -166,6 +184,8 @@ interface AteTranslations {
|
|
|
166
184
|
confirmDelete: string;
|
|
167
185
|
toggleEdit: string;
|
|
168
186
|
viewMode: string;
|
|
187
|
+
blockAdd: string;
|
|
188
|
+
blockDrag: string;
|
|
169
189
|
};
|
|
170
190
|
common: {
|
|
171
191
|
cancel: string;
|
|
@@ -344,6 +364,8 @@ declare class AteI18nService {
|
|
|
344
364
|
confirmDelete: string;
|
|
345
365
|
toggleEdit: string;
|
|
346
366
|
viewMode: string;
|
|
367
|
+
blockAdd: string;
|
|
368
|
+
blockDrag: string;
|
|
347
369
|
}>;
|
|
348
370
|
readonly common: _angular_core.Signal<{
|
|
349
371
|
cancel: string;
|
|
@@ -409,17 +431,6 @@ declare class AteI18nService {
|
|
|
409
431
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteI18nService>;
|
|
410
432
|
}
|
|
411
433
|
|
|
412
|
-
interface AteSlashCommandItem {
|
|
413
|
-
title: string;
|
|
414
|
-
description: string;
|
|
415
|
-
icon: string;
|
|
416
|
-
keywords: string[];
|
|
417
|
-
command: (editor: Editor) => void;
|
|
418
|
-
}
|
|
419
|
-
interface AteCustomSlashCommands {
|
|
420
|
-
commands?: AteSlashCommandItem[];
|
|
421
|
-
}
|
|
422
|
-
|
|
423
434
|
type AteStateCalculator = (editor: Editor) => Partial<{
|
|
424
435
|
[K in keyof AteEditorStateSnapshot]: AteEditorStateSnapshot[K] extends object ? Partial<AteEditorStateSnapshot[K]> : AteEditorStateSnapshot[K];
|
|
425
436
|
}>;
|
|
@@ -934,6 +945,10 @@ interface RegisterAngularComponentOptions<T = unknown> {
|
|
|
934
945
|
* Can be a direct Component class or a full registration options object.
|
|
935
946
|
*/
|
|
936
947
|
type AteAngularNode = Type<unknown> | RegisterAngularComponentOptions<unknown>;
|
|
948
|
+
/** Possible display modes for block level controls */
|
|
949
|
+
type AteBlockControlsMode = "inside" | "outside" | "none";
|
|
950
|
+
/** Possible values for editor autofocus */
|
|
951
|
+
type AteAutofocusMode = "start" | "end" | "all" | boolean | number;
|
|
937
952
|
/**
|
|
938
953
|
* Global configuration interface for Angular Tiptap Editor.
|
|
939
954
|
* Uses a flat structure for common settings and objects for complex configurations.
|
|
@@ -946,7 +961,7 @@ interface AteEditorConfig {
|
|
|
946
961
|
/** Editor height (e.g., '300px', 300, 'auto') */
|
|
947
962
|
height?: string | number;
|
|
948
963
|
/** Focus position on initialization */
|
|
949
|
-
autofocus?:
|
|
964
|
+
autofocus?: AteAutofocusMode;
|
|
950
965
|
/** Placeholder text displayed when the editor is empty */
|
|
951
966
|
placeholder?: string;
|
|
952
967
|
/** Initial editing state (if false, the editor is read-only) */
|
|
@@ -989,6 +1004,13 @@ interface AteEditorConfig {
|
|
|
989
1004
|
enableSlashCommands?: boolean;
|
|
990
1005
|
/** Maximum number of characters allowed */
|
|
991
1006
|
maxCharacters?: number;
|
|
1007
|
+
/**
|
|
1008
|
+
* Block level controls (plus button and drag handle) display mode.
|
|
1009
|
+
* - 'inside': Elements are placed inside the editor (reserves space via padding).
|
|
1010
|
+
* - 'outside': Elements float outside the editor boundary (no layout shift).
|
|
1011
|
+
* - 'none': Disabled (not displayed).
|
|
1012
|
+
*/
|
|
1013
|
+
blockControls?: AteBlockControlsMode;
|
|
992
1014
|
/** Detailed toolbar configuration (items, groups) */
|
|
993
1015
|
toolbar?: AteToolbarConfig;
|
|
994
1016
|
/** Text context menu configuration */
|
|
@@ -1063,8 +1085,9 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1063
1085
|
enableSlashCommands: _angular_core.InputSignal<boolean | undefined>;
|
|
1064
1086
|
slashCommands: _angular_core.InputSignal<AteSlashCommandsConfig | undefined>;
|
|
1065
1087
|
customSlashCommands: _angular_core.InputSignal<AteCustomSlashCommands | undefined>;
|
|
1088
|
+
blockControls: _angular_core.InputSignal<AteBlockControlsMode | undefined>;
|
|
1066
1089
|
locale: _angular_core.InputSignal<SupportedLocale | undefined>;
|
|
1067
|
-
autofocus: _angular_core.InputSignal<
|
|
1090
|
+
autofocus: _angular_core.InputSignal<AteAutofocusMode | undefined>;
|
|
1068
1091
|
seamless: _angular_core.InputSignal<boolean | undefined>;
|
|
1069
1092
|
floatingToolbar: _angular_core.InputSignal<boolean | undefined>;
|
|
1070
1093
|
showEditToggle: _angular_core.InputSignal<boolean | undefined>;
|
|
@@ -1128,12 +1151,18 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1128
1151
|
private _wordCount;
|
|
1129
1152
|
private _isDragOver;
|
|
1130
1153
|
private _editorFullyInitialized;
|
|
1154
|
+
private _hoveredBlock;
|
|
1131
1155
|
private lastEmittedHtml;
|
|
1132
1156
|
readonly editor: _angular_core.Signal<Editor | null>;
|
|
1133
1157
|
readonly characterCount: _angular_core.Signal<number>;
|
|
1134
1158
|
readonly wordCount: _angular_core.Signal<number>;
|
|
1135
1159
|
readonly isDragOver: _angular_core.Signal<boolean>;
|
|
1136
1160
|
readonly editorFullyInitialized: _angular_core.Signal<boolean>;
|
|
1161
|
+
readonly hoveredBlock: _angular_core.Signal<{
|
|
1162
|
+
node: Node$1;
|
|
1163
|
+
element: HTMLElement;
|
|
1164
|
+
pos: number;
|
|
1165
|
+
} | null>;
|
|
1137
1166
|
private _isFormControlDisabled;
|
|
1138
1167
|
readonly isFormControlDisabled: _angular_core.Signal<boolean>;
|
|
1139
1168
|
readonly mergedDisabled: _angular_core.Signal<boolean>;
|
|
@@ -1162,8 +1191,9 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1162
1191
|
readonly finalCellBubbleMenuConfig: _angular_core.Signal<Partial<Record<"mergeCells" | "splitCell", boolean>>>;
|
|
1163
1192
|
readonly finalEnableSlashCommands: _angular_core.Signal<boolean>;
|
|
1164
1193
|
readonly finalSlashCommandsConfig: _angular_core.Signal<AteCustomSlashCommands>;
|
|
1165
|
-
readonly finalAutofocus: _angular_core.Signal<
|
|
1194
|
+
readonly finalAutofocus: _angular_core.Signal<AteAutofocusMode | undefined>;
|
|
1166
1195
|
readonly finalMaxCharacters: _angular_core.Signal<number | undefined>;
|
|
1196
|
+
readonly finalBlockControls: _angular_core.Signal<AteBlockControlsMode>;
|
|
1167
1197
|
readonly finalShowCharacterCount: _angular_core.Signal<boolean>;
|
|
1168
1198
|
readonly finalShowWordCount: _angular_core.Signal<boolean>;
|
|
1169
1199
|
readonly finalLocale: _angular_core.Signal<SupportedLocale>;
|
|
@@ -1196,7 +1226,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1196
1226
|
theme?: "light" | "dark" | "auto";
|
|
1197
1227
|
mode?: "classic" | "seamless";
|
|
1198
1228
|
height?: string | number;
|
|
1199
|
-
autofocus?:
|
|
1229
|
+
autofocus?: AteAutofocusMode;
|
|
1200
1230
|
placeholder?: string;
|
|
1201
1231
|
editable?: boolean;
|
|
1202
1232
|
minHeight?: string | number;
|
|
@@ -1218,6 +1248,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1218
1248
|
downloadImage?: boolean;
|
|
1219
1249
|
enableSlashCommands?: boolean;
|
|
1220
1250
|
maxCharacters?: number;
|
|
1251
|
+
blockControls?: AteBlockControlsMode;
|
|
1221
1252
|
toolbar?: AteToolbarConfig;
|
|
1222
1253
|
bubbleMenu?: AteBubbleMenuConfig;
|
|
1223
1254
|
imageBubbleMenu?: AteImageBubbleMenuConfig;
|
|
@@ -1252,7 +1283,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1252
1283
|
private setupFormControlSubscription;
|
|
1253
1284
|
onEditorClick(event: Event): void;
|
|
1254
1285
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularTiptapEditorComponent, never>;
|
|
1255
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularTiptapEditorComponent, "angular-tiptap-editor", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fillContainer": { "alias": "fillContainer"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; "isSignal": true; }; "showWordCount": { "alias": "showWordCount"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "enableOfficePaste": { "alias": "enableOfficePaste"; "required": false; "isSignal": true; }; "enableSlashCommands": { "alias": "enableSlashCommands"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "customSlashCommands": { "alias": "customSlashCommands"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "seamless": { "alias": "seamless"; "required": false; "isSignal": true; }; "floatingToolbar": { "alias": "floatingToolbar"; "required": false; "isSignal": true; }; "showEditToggle": { "alias": "showEditToggle"; "required": false; "isSignal": true; }; "spellcheck": { "alias": "spellcheck"; "required": false; "isSignal": true; }; "tiptapExtensions": { "alias": "tiptapExtensions"; "required": false; "isSignal": true; }; "tiptapOptions": { "alias": "tiptapOptions"; "required": false; "isSignal": true; }; "showBubbleMenu": { "alias": "showBubbleMenu"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "showImageBubbleMenu": { "alias": "showImageBubbleMenu"; "required": false; "isSignal": true; }; "imageBubbleMenu": { "alias": "imageBubbleMenu"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "showTableBubbleMenu": { "alias": "showTableBubbleMenu"; "required": false; "isSignal": true; }; "tableBubbleMenu": { "alias": "tableBubbleMenu"; "required": false; "isSignal": true; }; "showCellBubbleMenu": { "alias": "showCellBubbleMenu"; "required": false; "isSignal": true; }; "cellBubbleMenu": { "alias": "cellBubbleMenu"; "required": false; "isSignal": true; }; "stateCalculators": { "alias": "stateCalculators"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "imageUploadHandler": { "alias": "imageUploadHandler"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; }, never, never, true, [{ directive: typeof AteNoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
1286
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularTiptapEditorComponent, "angular-tiptap-editor", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fillContainer": { "alias": "fillContainer"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; "isSignal": true; }; "showWordCount": { "alias": "showWordCount"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "enableOfficePaste": { "alias": "enableOfficePaste"; "required": false; "isSignal": true; }; "enableSlashCommands": { "alias": "enableSlashCommands"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "customSlashCommands": { "alias": "customSlashCommands"; "required": false; "isSignal": true; }; "blockControls": { "alias": "blockControls"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "seamless": { "alias": "seamless"; "required": false; "isSignal": true; }; "floatingToolbar": { "alias": "floatingToolbar"; "required": false; "isSignal": true; }; "showEditToggle": { "alias": "showEditToggle"; "required": false; "isSignal": true; }; "spellcheck": { "alias": "spellcheck"; "required": false; "isSignal": true; }; "tiptapExtensions": { "alias": "tiptapExtensions"; "required": false; "isSignal": true; }; "tiptapOptions": { "alias": "tiptapOptions"; "required": false; "isSignal": true; }; "showBubbleMenu": { "alias": "showBubbleMenu"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "showImageBubbleMenu": { "alias": "showImageBubbleMenu"; "required": false; "isSignal": true; }; "imageBubbleMenu": { "alias": "imageBubbleMenu"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "showTableBubbleMenu": { "alias": "showTableBubbleMenu"; "required": false; "isSignal": true; }; "tableBubbleMenu": { "alias": "tableBubbleMenu"; "required": false; "isSignal": true; }; "showCellBubbleMenu": { "alias": "showCellBubbleMenu"; "required": false; "isSignal": true; }; "cellBubbleMenu": { "alias": "cellBubbleMenu"; "required": false; "isSignal": true; }; "stateCalculators": { "alias": "stateCalculators"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "imageUploadHandler": { "alias": "imageUploadHandler"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; }, never, never, true, [{ directive: typeof AteNoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
1256
1287
|
}
|
|
1257
1288
|
|
|
1258
1289
|
/**
|
|
@@ -1275,6 +1306,35 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
1275
1306
|
*/
|
|
1276
1307
|
declare function provideAteEditor(config?: AteEditorConfig): EnvironmentProviders;
|
|
1277
1308
|
|
|
1309
|
+
declare class AteTooltipDirective implements OnDestroy {
|
|
1310
|
+
private readonly el;
|
|
1311
|
+
private tippyInstance;
|
|
1312
|
+
content: _angular_core.InputSignal<string | null>;
|
|
1313
|
+
placement: _angular_core.InputSignal<_popperjs_core.Placement>;
|
|
1314
|
+
delay: _angular_core.InputSignal<number | [number, number]>;
|
|
1315
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Computed logic for ARIA shortcuts.
|
|
1318
|
+
*/
|
|
1319
|
+
protected readonly ariaShortcut: _angular_core.Signal<string | null>;
|
|
1320
|
+
/**
|
|
1321
|
+
* Computed logic for Tippy content.
|
|
1322
|
+
* Includes strict escaping of dynamic content to prevent XSS.
|
|
1323
|
+
*/
|
|
1324
|
+
private readonly processedTooltip;
|
|
1325
|
+
constructor();
|
|
1326
|
+
ngOnDestroy(): void;
|
|
1327
|
+
/**
|
|
1328
|
+
* Basic HTML escaping for security.
|
|
1329
|
+
* Effectively neutralizes scripts or malicious HTML tags.
|
|
1330
|
+
*/
|
|
1331
|
+
private escapeHtml;
|
|
1332
|
+
private initTippy;
|
|
1333
|
+
private destroyTippy;
|
|
1334
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteTooltipDirective, never>;
|
|
1335
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AteTooltipDirective, "[ateTooltip]", never, { "content": { "alias": "ateTooltip"; "required": false; "isSignal": true; }; "placement": { "alias": "ateTooltipPlacement"; "required": false; "isSignal": true; }; "delay": { "alias": "ateTooltipDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "ateTooltipDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1278
1338
|
declare class AteImageService {
|
|
1279
1339
|
/** Signals for image state */
|
|
1280
1340
|
selectedImage: _angular_core.WritableSignal<AteImageData | null>;
|
|
@@ -1661,5 +1721,5 @@ declare function createAngularComponentExtension<T = unknown>(injector: Injector
|
|
|
1661
1721
|
*/
|
|
1662
1722
|
declare function registerAngularComponent<T = unknown>(injectorOrOptions: Injector | RegisterAngularComponentOptions<T>, maybeOptions?: RegisterAngularComponentOptions<T>): Node$2;
|
|
1663
1723
|
|
|
1664
|
-
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, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNodeViewRenderer, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, createAngularComponentExtension, createDefaultSlashCommands, filterSlashCommands, provideAteEditor, registerAngularComponent };
|
|
1665
|
-
export type { AteAngularNode, AteBubbleMenuConfig, AteBubbleMenuKey, AteCellBubbleMenuConfig, AteCellBubbleMenuKey, AteColorEditMode, AteColorPickerSelection, AteComponentRenderOptions, AteCustomBubbleMenuItem, AteCustomSlashCommands, AteCustomToolbarItem, AteEditorConfig, AteEditorStateSnapshot, AteImageBubbleMenuConfig, AteImageBubbleMenuKey, AteImageData, AteImageUploadConfig, AteImageUploadContext, AteImageUploadHandler, AteImageUploadHandlerResult, AteImageUploadOptions, AteImageUploadResult, AteResizeOptions, AteSlashCommandItem, AteSlashCommandKey, AteSlashCommandsConfig, AteStateCalculator, AteTableBubbleMenuConfig, AteTableBubbleMenuKey, AteToolbarConfig, AteToolbarKey, AteTranslations, RegisterAngularComponentOptions, SupportedLocale };
|
|
1724
|
+
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, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNodeViewRenderer, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, AteTooltipDirective, createAngularComponentExtension, createDefaultSlashCommands, filterSlashCommands, provideAteEditor, registerAngularComponent };
|
|
1725
|
+
export type { AteAngularNode, AteAutofocusMode, AteBlockControlsMode, AteBubbleMenuConfig, AteBubbleMenuKey, AteCellBubbleMenuConfig, AteCellBubbleMenuKey, AteColorEditMode, AteColorPickerSelection, AteComponentRenderOptions, AteCustomBubbleMenuItem, AteCustomSlashCommands, AteCustomToolbarItem, AteEditorConfig, AteEditorStateSnapshot, AteImageBubbleMenuConfig, AteImageBubbleMenuKey, AteImageData, AteImageUploadConfig, AteImageUploadContext, AteImageUploadHandler, AteImageUploadHandlerResult, AteImageUploadOptions, AteImageUploadResult, AteResizeOptions, AteSlashCommandItem, AteSlashCommandKey, AteSlashCommandsConfig, AteStateCalculator, AteTableBubbleMenuConfig, AteTableBubbleMenuKey, AteToolbarConfig, AteToolbarKey, AteTranslations, RegisterAngularComponentOptions, SupportedLocale };
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
/*
|
|
2
|
-
.tippy-box
|
|
3
|
-
|
|
1
|
+
/* Global styles for Tiptap bubble menus & Slash menu */
|
|
2
|
+
.tippy-box[data-theme~="ate-bubble-menu"],
|
|
3
|
+
.tippy-box[data-theme~="slash-menu"] {
|
|
4
|
+
/* Default Tippy limits to 350px */
|
|
4
5
|
max-width: none !important;
|
|
5
6
|
background: transparent !important;
|
|
6
7
|
box-shadow: none !important;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
.tippy-content
|
|
10
|
-
|
|
11
|
-
padding
|
|
10
|
+
.tippy-box[data-theme~="ate-bubble-menu"] .tippy-content,
|
|
11
|
+
.tippy-box[data-theme~="slash-menu"] .tippy-content {
|
|
12
|
+
/* Internal container shouldn't add padding, we handle it in .bubble-menu or .slash-commands-menu */
|
|
13
|
+
padding: 0 !important;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
/* Scoped bubble-menu styles - Restoring original design exactly as requested */
|
|
17
|
+
.tippy-box[data-theme~="ate-bubble-menu"] .bubble-menu {
|
|
15
18
|
display: flex !important;
|
|
16
19
|
align-items: center;
|
|
17
20
|
gap: var(--ate-menu-gap, 2px);
|
|
@@ -25,8 +28,9 @@
|
|
|
25
28
|
white-space: nowrap;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
/*
|
|
29
|
-
.tippy-box[data-reference-hidden]
|
|
31
|
+
/* Hidden state when reference scrolls out of view */
|
|
32
|
+
.tippy-box[data-theme~="ate-bubble-menu"][data-reference-hidden],
|
|
33
|
+
.tippy-box[data-theme~="slash-menu"][data-reference-hidden] {
|
|
30
34
|
opacity: 0 !important;
|
|
31
35
|
transition: opacity 0.18s cubic-bezier(0, 0, 0.2, 1);
|
|
32
36
|
pointer-events: none !important;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* ate-tooltip tippy theme */
|
|
2
|
+
.tippy-box[data-theme~="ate-tooltip"] {
|
|
3
|
+
background-color: var(--ate-tooltip-bg, #0f172a);
|
|
4
|
+
color: var(--ate-tooltip-color, #e2e8f0);
|
|
5
|
+
border-radius: var(--ate-sub-border-radius, 6px);
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
line-height: 1.4;
|
|
8
|
+
padding: 0;
|
|
9
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
10
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
transition: opacity 0.1s ease-out;
|
|
13
|
+
text-align: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tippy-box[data-theme~="ate-tooltip"] .tippy-content {
|
|
17
|
+
padding: 4px 6px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Multi-line support */
|
|
21
|
+
.tippy-box[data-theme~="ate-tooltip"] .ate-tooltip-label {
|
|
22
|
+
display: block;
|
|
23
|
+
color: var(--ate-tooltip-color, #e2e8f0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tippy-box[data-theme~="ate-tooltip"] .ate-tooltip-shortcut {
|
|
27
|
+
display: block;
|
|
28
|
+
font-size: 10px;
|
|
29
|
+
opacity: 0.6;
|
|
30
|
+
margin-top: 2px;
|
|
31
|
+
font-family:
|
|
32
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
|
|
33
|
+
monospace;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tippy-box[data-theme~="ate-tooltip"] .ate-tooltip-shortcut kbd {
|
|
37
|
+
background: none;
|
|
38
|
+
border: none;
|
|
39
|
+
padding: 0;
|
|
40
|
+
color: inherit;
|
|
41
|
+
font: inherit;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Visibility state */
|
|
45
|
+
.tippy-box[data-theme~="ate-tooltip"][data-state="hidden"] {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
}
|