@flogeez/angular-tiptap-editor 3.4.4 → 3.4.6
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 +15 -0
- package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +31 -20
- package/esm2022/lib/components/table-of-contents/ate-table-of-contents.component.mjs +5 -5
- package/esm2022/lib/components/ui/ate-button.component.mjs +4 -4
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +35 -24
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/lib/components/editor/angular-tiptap-editor.component.d.ts +19 -18
- package/lib/components/table-of-contents/ate-table-of-contents.component.d.ts +3 -3
- package/lib/components/ui/ate-button.component.d.ts +2 -2
- package/package.json +6 -2
- package/styles/ate-bubble-menu.global.css +48 -0
- package/styles/ate-tooltip.global.css +47 -0
- package/styles/ate-variables.global.css +173 -0
- package/styles/index.css +42 -0
- package/styles/material-symbols.css +21 -0
|
@@ -26,38 +26,39 @@ export declare class AngularTiptapEditorComponent implements AfterViewInit, OnDe
|
|
|
26
26
|
config: import("@angular/core").InputSignal<AteEditorConfig>;
|
|
27
27
|
content: import("@angular/core").InputSignal<string>;
|
|
28
28
|
placeholder: import("@angular/core").InputSignal<string | undefined>;
|
|
29
|
-
editable: import("@angular/core").
|
|
30
|
-
disabled: import("@angular/core").
|
|
29
|
+
editable: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
30
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
31
31
|
minHeight: import("@angular/core").InputSignal<string | number | undefined>;
|
|
32
32
|
height: import("@angular/core").InputSignal<string | number | undefined>;
|
|
33
33
|
maxHeight: import("@angular/core").InputSignal<string | number | undefined>;
|
|
34
|
-
fillContainer: import("@angular/core").
|
|
35
|
-
showToolbar: import("@angular/core").
|
|
36
|
-
showFooter: import("@angular/core").
|
|
37
|
-
showCharacterCount: import("@angular/core").
|
|
38
|
-
showWordCount: import("@angular/core").
|
|
34
|
+
fillContainer: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
35
|
+
showToolbar: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
36
|
+
showFooter: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
37
|
+
showCharacterCount: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
38
|
+
showWordCount: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
39
39
|
maxCharacters: import("@angular/core").InputSignal<number | undefined>;
|
|
40
|
-
enableOfficePaste: import("@angular/core").
|
|
41
|
-
enableSlashCommands: import("@angular/core").
|
|
40
|
+
enableOfficePaste: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
41
|
+
enableSlashCommands: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
42
42
|
slashCommands: import("@angular/core").InputSignal<AteSlashCommandsConfig | undefined>;
|
|
43
43
|
customSlashCommands: import("@angular/core").InputSignal<AteCustomSlashCommands | undefined>;
|
|
44
44
|
blockControls: import("@angular/core").InputSignal<AteBlockControlsMode | undefined>;
|
|
45
45
|
locale: import("@angular/core").InputSignal<SupportedLocale | undefined>;
|
|
46
46
|
autofocus: import("@angular/core").InputSignal<AteAutofocusMode | undefined>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
mode: import("@angular/core").InputSignal<"classic" | "seamless" | undefined>;
|
|
48
|
+
seamless: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
49
|
+
floatingToolbar: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
50
|
+
showEditToggle: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
51
|
+
spellcheck: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
51
52
|
tiptapExtensions: import("@angular/core").InputSignal<(Mark<any, any> | Node<any, any> | Extension<any, any>)[] | undefined>;
|
|
52
53
|
tiptapOptions: import("@angular/core").InputSignal<Partial<EditorOptions> | undefined>;
|
|
53
|
-
showBubbleMenu: import("@angular/core").
|
|
54
|
+
showBubbleMenu: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
54
55
|
bubbleMenu: import("@angular/core").InputSignal<Partial<AteBubbleMenuConfig> | undefined>;
|
|
55
|
-
showImageBubbleMenu: import("@angular/core").
|
|
56
|
+
showImageBubbleMenu: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
56
57
|
imageBubbleMenu: import("@angular/core").InputSignal<Partial<Partial<Record<"separator" | "alignLeft" | "alignCenter" | "alignRight" | "changeImage" | "downloadImage" | "resizeSmall" | "resizeMedium" | "resizeLarge" | "resizeOriginal" | "deleteImage", boolean>>> | undefined>;
|
|
57
58
|
toolbar: import("@angular/core").InputSignal<Partial<AteToolbarConfig> | undefined>;
|
|
58
|
-
showTableBubbleMenu: import("@angular/core").
|
|
59
|
+
showTableBubbleMenu: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
59
60
|
tableBubbleMenu: import("@angular/core").InputSignal<Partial<Partial<Record<"addColumnBefore" | "addColumnAfter" | "deleteColumn" | "addRowBefore" | "addRowAfter" | "deleteRow" | "deleteTable" | "toggleHeaderColumn" | "toggleHeaderRow" | "separator", boolean>>> | undefined>;
|
|
60
|
-
showCellBubbleMenu: import("@angular/core").
|
|
61
|
+
showCellBubbleMenu: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
61
62
|
cellBubbleMenu: import("@angular/core").InputSignal<Partial<Partial<Record<"mergeCells" | "splitCell", boolean>>> | undefined>;
|
|
62
63
|
/**
|
|
63
64
|
* Additionnal state calculators to extend the reactive editor state.
|
|
@@ -249,5 +250,5 @@ export declare class AngularTiptapEditorComponent implements AfterViewInit, OnDe
|
|
|
249
250
|
private setupFormControlSubscription;
|
|
250
251
|
onEditorClick(event: Event): void;
|
|
251
252
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularTiptapEditorComponent, never>;
|
|
252
|
-
static ɵcmp: i0.ɵɵ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; }; "editorId": { "alias": "editorId"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; "imageUploaded": "imageUploaded"; }, never, never, true, [{ directive: typeof i1.AteNoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
253
|
+
static ɵcmp: i0.ɵɵ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; }; "mode": { "alias": "mode"; "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; }; "editorId": { "alias": "editorId"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; "imageUploaded": "imageUploaded"; }, never, never, true, [{ directive: typeof i1.AteNoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
253
254
|
}
|
|
@@ -11,12 +11,12 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class AteTableOfContentsComponent implements OnDestroy {
|
|
12
12
|
editor: import("@angular/core").InputSignal<string | Editor | AteEditorRef | null | undefined>;
|
|
13
13
|
title: import("@angular/core").InputSignal<string | null>;
|
|
14
|
-
showTitle: import("@angular/core").
|
|
15
|
-
floating: import("@angular/core").
|
|
14
|
+
showTitle: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
floating: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
16
|
positionMode: import("@angular/core").InputSignal<"fixed" | "absolute">;
|
|
17
17
|
position: import("@angular/core").InputSignal<"left" | "right">;
|
|
18
18
|
variant: import("@angular/core").InputSignal<AteTocVariant>;
|
|
19
|
-
hoverExpand: import("@angular/core").
|
|
19
|
+
hoverExpand: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
20
20
|
maxDepth: import("@angular/core").InputSignalWithTransform<number, string | number>;
|
|
21
21
|
private readonly registry;
|
|
22
22
|
private readonly i18n;
|
|
@@ -11,8 +11,8 @@ export interface AteButtonConfig {
|
|
|
11
11
|
export declare class AteButtonComponent {
|
|
12
12
|
icon: import("@angular/core").InputSignal<string>;
|
|
13
13
|
title: import("@angular/core").InputSignal<string>;
|
|
14
|
-
active: import("@angular/core").
|
|
15
|
-
disabled: import("@angular/core").
|
|
14
|
+
active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
16
|
color: import("@angular/core").InputSignal<string | undefined>;
|
|
17
17
|
backgroundColor: import("@angular/core").InputSignal<string | undefined>;
|
|
18
18
|
variant: import("@angular/core").InputSignal<"text" | "default" | "danger">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flogeez/angular-tiptap-editor",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6",
|
|
4
4
|
"description": "A modern, customizable rich-text editor for Angular (18+), built with Tiptap and featuring complete internationalization support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"tslib": "^2.3.0"
|
|
46
46
|
},
|
|
47
|
-
"
|
|
47
|
+
"style": "styles/index.css",
|
|
48
|
+
"sideEffects": [
|
|
49
|
+
"*.css",
|
|
50
|
+
"**/*.css"
|
|
51
|
+
],
|
|
48
52
|
"module": "fesm2022/flogeez-angular-tiptap-editor.mjs",
|
|
49
53
|
"typings": "index.d.ts",
|
|
50
54
|
"exports": {
|
|
@@ -0,0 +1,48 @@
|
|
|
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 */
|
|
5
|
+
max-width: none !important;
|
|
6
|
+
background: transparent !important;
|
|
7
|
+
box-shadow: none !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
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;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Scoped bubble-menu styles - Restoring original design exactly as requested */
|
|
17
|
+
.tippy-box[data-theme~="ate-bubble-menu"] .bubble-menu {
|
|
18
|
+
display: flex !important;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--ate-menu-gap, 2px);
|
|
21
|
+
background: var(--ate-menu-bg, rgb(255, 255, 255)) !important;
|
|
22
|
+
border: 1px solid var(--ate-menu-border, rgba(0, 0, 0, 0.1));
|
|
23
|
+
border-radius: var(--ate-menu-border-radius, 12px);
|
|
24
|
+
padding: var(--ate-menu-padding, 4px);
|
|
25
|
+
box-shadow: var(--ate-menu-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));
|
|
26
|
+
z-index: 1000;
|
|
27
|
+
animation: slideUp 0.18s cubic-bezier(0, 0, 0.2, 1);
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
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] {
|
|
34
|
+
opacity: 0 !important;
|
|
35
|
+
transition: opacity 0.18s cubic-bezier(0, 0, 0.2, 1);
|
|
36
|
+
pointer-events: none !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes slideUp {
|
|
40
|
+
from {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transform: translateY(6px) scale(0.98);
|
|
43
|
+
}
|
|
44
|
+
to {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: translateY(0) scale(1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Full Design Tokens & CSS Custom Properties for angular-tiptap-editor
|
|
3
|
+
========================================================================== */
|
|
4
|
+
:root {
|
|
5
|
+
/* ===== BASE TOKENS ===== */
|
|
6
|
+
--ate-primary: #2563eb;
|
|
7
|
+
--ate-primary-hover: #153ca9;
|
|
8
|
+
--ate-primary-contrast: #ffffff;
|
|
9
|
+
--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 90%);
|
|
10
|
+
--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 95%);
|
|
11
|
+
--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 85%);
|
|
12
|
+
|
|
13
|
+
--ate-surface: #ffffff;
|
|
14
|
+
--ate-surface-secondary: #f8f9fa;
|
|
15
|
+
--ate-surface-tertiary: #f1f5f9;
|
|
16
|
+
--ate-surface-hover: rgba(37, 99, 235, 0.05);
|
|
17
|
+
|
|
18
|
+
--ate-text: #2d3748;
|
|
19
|
+
--ate-text-primary: #1e293b;
|
|
20
|
+
--ate-text-secondary: #64748b;
|
|
21
|
+
--ate-text-muted: #a0aec0;
|
|
22
|
+
|
|
23
|
+
--ate-border: #e2e8f0;
|
|
24
|
+
|
|
25
|
+
--ate-highlight-bg: #fef08a;
|
|
26
|
+
--ate-highlight-color: #854d0e;
|
|
27
|
+
|
|
28
|
+
--ate-button-hover: #f1f5f9;
|
|
29
|
+
--ate-button-active: #e2e8f0;
|
|
30
|
+
|
|
31
|
+
--ate-selection-bg: var(--ate-primary-light-alpha);
|
|
32
|
+
|
|
33
|
+
--ate-error-color: #c53030;
|
|
34
|
+
--ate-error-bg: #fed7d7;
|
|
35
|
+
--ate-error-border: #feb2b2;
|
|
36
|
+
|
|
37
|
+
/* ===== COMPONENT TOKENS ===== */
|
|
38
|
+
--ate-border-color: var(--ate-border);
|
|
39
|
+
--ate-border-width: 2px;
|
|
40
|
+
--ate-border-radius: 12px;
|
|
41
|
+
--ate-sub-border-radius: 8px;
|
|
42
|
+
--ate-focus-color: var(--ate-primary);
|
|
43
|
+
--ate-background: var(--ate-surface);
|
|
44
|
+
|
|
45
|
+
/* Content */
|
|
46
|
+
--ate-text-color: var(--ate-text);
|
|
47
|
+
--ate-placeholder-color: var(--ate-text-muted);
|
|
48
|
+
--ate-line-height: 1.6;
|
|
49
|
+
--ate-content-padding-block: 16px;
|
|
50
|
+
--ate-content-padding-inline: 16px;
|
|
51
|
+
--ate-content-gutter: 0px;
|
|
52
|
+
|
|
53
|
+
/* Menus (Slash/Bubble/TOC) */
|
|
54
|
+
--ate-menu-bg: var(--ate-surface);
|
|
55
|
+
--ate-menu-border-radius: var(--ate-border-radius);
|
|
56
|
+
--ate-menu-border: var(--ate-border);
|
|
57
|
+
--ate-menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
58
|
+
--ate-menu-padding: 4px;
|
|
59
|
+
--ate-menu-gap: 2px;
|
|
60
|
+
|
|
61
|
+
/* Toolbar */
|
|
62
|
+
--ate-toolbar-padding: var(--ate-menu-padding);
|
|
63
|
+
--ate-toolbar-gap: var(--ate-menu-gap);
|
|
64
|
+
--ate-toolbar-background: var(--ate-surface-secondary);
|
|
65
|
+
--ate-toolbar-border-color: var(--ate-border);
|
|
66
|
+
--ate-toolbar-button-color: var(--ate-text-secondary);
|
|
67
|
+
--ate-toolbar-button-hover-background: transparent;
|
|
68
|
+
--ate-toolbar-button-active-background: var(--ate-primary-light);
|
|
69
|
+
--ate-toolbar-button-active-color: var(--ate-primary);
|
|
70
|
+
|
|
71
|
+
/* Counter & Footer */
|
|
72
|
+
--ate-counter-color: var(--ate-text-secondary);
|
|
73
|
+
--ate-counter-background: var(--ate-surface-secondary);
|
|
74
|
+
--ate-counter-border-color: var(--ate-border);
|
|
75
|
+
|
|
76
|
+
/* Table of Contents (TOC) */
|
|
77
|
+
--ate-toc-width: 240px;
|
|
78
|
+
--ate-toc-gap: 2px;
|
|
79
|
+
--ate-toc-item-height: 16px;
|
|
80
|
+
--ate-toc-item-hover-height: 24px;
|
|
81
|
+
--ate-toc-border-radius: var(--ate-border-radius);
|
|
82
|
+
--ate-toc-padding: var(--ate-menu-padding);
|
|
83
|
+
--ate-toc-hitbox-padding: 16px;
|
|
84
|
+
--ate-toc-hitbox-padding-vertical: 8px;
|
|
85
|
+
|
|
86
|
+
/* Drag & Drop */
|
|
87
|
+
--ate-drag-background: #f0f8ff;
|
|
88
|
+
--ate-drag-border-color: var(--ate-primary);
|
|
89
|
+
|
|
90
|
+
/* Blockquote */
|
|
91
|
+
--ate-blockquote-border-color: var(--ate-border);
|
|
92
|
+
--ate-blockquote-background: var(--ate-surface-secondary);
|
|
93
|
+
|
|
94
|
+
/* Code */
|
|
95
|
+
--ate-code-background: var(--ate-surface-secondary);
|
|
96
|
+
--ate-code-color: var(--ate-text);
|
|
97
|
+
--ate-code-border-color: var(--ate-border);
|
|
98
|
+
|
|
99
|
+
--ate-code-block-background: #0f172a;
|
|
100
|
+
--ate-code-block-color: #e2e8f0;
|
|
101
|
+
--ate-code-block-border-color: var(--ate-border);
|
|
102
|
+
|
|
103
|
+
/* Images */
|
|
104
|
+
--ate-image-border-radius: 16px;
|
|
105
|
+
--ate-image-selected-color: var(--ate-primary);
|
|
106
|
+
|
|
107
|
+
/* Scrollbars */
|
|
108
|
+
--ate-scrollbar-width: 10px;
|
|
109
|
+
--ate-scrollbar-thumb: var(--ate-border);
|
|
110
|
+
--ate-scrollbar-thumb-hover: var(--ate-text-muted);
|
|
111
|
+
--ate-scrollbar-track: transparent;
|
|
112
|
+
|
|
113
|
+
/* Tables */
|
|
114
|
+
--ate-table-border-color: var(--ate-border);
|
|
115
|
+
--ate-table-header-background: var(--ate-surface-secondary);
|
|
116
|
+
--ate-table-header-color: var(--ate-text);
|
|
117
|
+
--ate-table-cell-background: var(--ate-surface);
|
|
118
|
+
--ate-table-cell-selected-background: var(--ate-primary-light);
|
|
119
|
+
--ate-table-resize-handle-color: var(--ate-primary);
|
|
120
|
+
--ate-table-row-hover-background: var(--ate-primary-lighter);
|
|
121
|
+
|
|
122
|
+
/* Floating UI & Tooltips */
|
|
123
|
+
--ate-tooltip-bg: var(--ate-code-block-background, #0f172a);
|
|
124
|
+
--ate-tooltip-color: var(--ate-code-block-color, #e2e8f0);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Dark mode global theme support */
|
|
128
|
+
.dark,
|
|
129
|
+
:root.dark,
|
|
130
|
+
body.dark,
|
|
131
|
+
:root[data-theme="dark"],
|
|
132
|
+
[data-theme="dark"] {
|
|
133
|
+
--ate-primary: #3b82f6;
|
|
134
|
+
--ate-primary-contrast: #ffffff;
|
|
135
|
+
--ate-primary-light: color-mix(in srgb, var(--ate-primary), transparent 85%);
|
|
136
|
+
--ate-primary-lighter: color-mix(in srgb, var(--ate-primary), transparent 92%);
|
|
137
|
+
--ate-primary-light-alpha: color-mix(in srgb, var(--ate-primary), transparent 80%);
|
|
138
|
+
|
|
139
|
+
--ate-surface: #020617;
|
|
140
|
+
--ate-surface-secondary: #0f172a;
|
|
141
|
+
--ate-surface-tertiary: #1e293b;
|
|
142
|
+
--ate-surface-hover: rgba(59, 130, 246, 0.1);
|
|
143
|
+
|
|
144
|
+
--ate-text: #f8fafc;
|
|
145
|
+
--ate-text-primary: #f8fafc;
|
|
146
|
+
--ate-text-secondary: #94a3b8;
|
|
147
|
+
--ate-text-muted: #64748b;
|
|
148
|
+
|
|
149
|
+
--ate-border: #1e293b;
|
|
150
|
+
|
|
151
|
+
--ate-highlight-bg: #854d0e;
|
|
152
|
+
--ate-highlight-color: #fef08a;
|
|
153
|
+
|
|
154
|
+
--ate-button-hover: #1e293b;
|
|
155
|
+
--ate-button-active: #0f172a;
|
|
156
|
+
|
|
157
|
+
--ate-menu-border: rgba(255, 255, 255, 0.1);
|
|
158
|
+
--ate-menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
159
|
+
|
|
160
|
+
--ate-error-color: #f87171;
|
|
161
|
+
--ate-error-bg: #450a0a;
|
|
162
|
+
--ate-error-border: #7f1d1d;
|
|
163
|
+
|
|
164
|
+
--ate-drag-background: var(--ate-surface-tertiary);
|
|
165
|
+
--ate-drag-border-color: var(--ate-primary);
|
|
166
|
+
--ate-blockquote-border-color: var(--ate-primary);
|
|
167
|
+
--ate-toolbar-button-active-background: var(--ate-primary-light);
|
|
168
|
+
--ate-toolbar-button-active-color: var(--ate-primary);
|
|
169
|
+
--ate-button-hover: var(--ate-surface-tertiary);
|
|
170
|
+
--ate-button-active: var(--ate-surface-secondary);
|
|
171
|
+
--ate-scrollbar-thumb: var(--ate-surface-tertiary);
|
|
172
|
+
--ate-scrollbar-thumb-hover: var(--ate-text-muted);
|
|
173
|
+
}
|
package/styles/index.css
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@import "./ate-variables.global.css";
|
|
2
|
+
@import "./ate-bubble-menu.global.css";
|
|
3
|
+
@import "./ate-tooltip.global.css";
|
|
4
|
+
@import "./material-symbols.css";
|
|
5
|
+
|
|
6
|
+
/* Styles for links */
|
|
7
|
+
.ate-link {
|
|
8
|
+
color: var(--ate-primary, #2563eb);
|
|
9
|
+
text-decoration: underline;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
transition: color 0.2s ease;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ate-link:hover {
|
|
15
|
+
color: var(--ate-primary-hover, #153ca9);
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Styles for highlight */
|
|
20
|
+
.ate-highlight {
|
|
21
|
+
background-color: var(--ate-highlight-bg, #fef08a);
|
|
22
|
+
padding: 0.1em 0.2em;
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
color: var(--ate-highlight-color, #854d0e);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Styles for text alignment - Tiptap uses classes */
|
|
28
|
+
.ProseMirror .has-text-align-left {
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ProseMirror .has-text-align-center {
|
|
33
|
+
text-align: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ProseMirror .has-text-align-right {
|
|
37
|
+
text-align: right;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ProseMirror .has-text-align-justify {
|
|
41
|
+
text-align: justify;
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.material-symbols-outlined {
|
|
2
|
+
font-family: "Material Symbols Outlined";
|
|
3
|
+
font-weight: normal;
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-size: 24px;
|
|
6
|
+
line-height: 1;
|
|
7
|
+
letter-spacing: normal;
|
|
8
|
+
text-transform: none;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
word-wrap: normal;
|
|
12
|
+
direction: ltr;
|
|
13
|
+
font-feature-settings: "liga";
|
|
14
|
+
-webkit-font-feature-settings: "liga";
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
font-variation-settings:
|
|
17
|
+
"FILL" 0,
|
|
18
|
+
"wght" 400,
|
|
19
|
+
"GRAD" 0,
|
|
20
|
+
"opsz" 24;
|
|
21
|
+
}
|