@malva-ui/editor 0.1.13 → 0.1.14

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 (134) hide show
  1. package/README.md +5 -5
  2. package/fesm2022/malva-ui-editor-ai.mjs +17 -0
  3. package/fesm2022/malva-ui-editor-ai.mjs.map +1 -0
  4. package/fesm2022/malva-ui-editor.mjs +10227 -0
  5. package/fesm2022/malva-ui-editor.mjs.map +1 -0
  6. package/package.json +35 -26
  7. package/types/malva-ui-editor-ai.d.ts +1 -0
  8. package/types/malva-ui-editor.d.ts +2995 -0
  9. package/ai/index.d.ts +0 -12
  10. package/ai/malva-ui-editor-ai.d.ts +0 -5
  11. package/esm2022/ai/index.js +0 -12
  12. package/esm2022/ai/index.js.map +0 -1
  13. package/esm2022/ai/malva-ui-editor-ai.js +0 -5
  14. package/esm2022/ai/malva-ui-editor-ai.js.map +0 -1
  15. package/esm2022/index.js +0 -37
  16. package/esm2022/index.js.map +0 -1
  17. package/esm2022/lib/ai/editor-ai-actions.js +0 -69
  18. package/esm2022/lib/ai/editor-ai-actions.js.map +0 -1
  19. package/esm2022/lib/ai/editor-ai-context.js +0 -612
  20. package/esm2022/lib/ai/editor-ai-context.js.map +0 -1
  21. package/esm2022/lib/ai/editor-ai-menu.js +0 -288
  22. package/esm2022/lib/ai/editor-ai-menu.js.map +0 -1
  23. package/esm2022/lib/ai/editor-ai-review-bar.js +0 -223
  24. package/esm2022/lib/ai/editor-ai-review-bar.js.map +0 -1
  25. package/esm2022/lib/ai/editor-ai-stream.js +0 -677
  26. package/esm2022/lib/ai/editor-ai-stream.js.map +0 -1
  27. package/esm2022/lib/ai/editor-ai-suggestions.js +0 -751
  28. package/esm2022/lib/ai/editor-ai-suggestions.js.map +0 -1
  29. package/esm2022/lib/ai/editor-ai.tokens.js +0 -10
  30. package/esm2022/lib/ai/editor-ai.tokens.js.map +0 -1
  31. package/esm2022/lib/ai/editor-ai.types.js +0 -1
  32. package/esm2022/lib/ai/editor-ai.types.js.map +0 -1
  33. package/esm2022/lib/editor/editor.js +0 -985
  34. package/esm2022/lib/editor/editor.js.map +0 -1
  35. package/esm2022/lib/editor-extension-preflight.js +0 -83
  36. package/esm2022/lib/editor-extension-preflight.js.map +0 -1
  37. package/esm2022/lib/editor-serialization.js +0 -152
  38. package/esm2022/lib/editor-serialization.js.map +0 -1
  39. package/esm2022/lib/editor-toolbar-context.js +0 -259
  40. package/esm2022/lib/editor-toolbar-context.js.map +0 -1
  41. package/esm2022/lib/editor.tokens.js +0 -10
  42. package/esm2022/lib/editor.tokens.js.map +0 -1
  43. package/esm2022/lib/editor.types.js +0 -48
  44. package/esm2022/lib/editor.types.js.map +0 -1
  45. package/esm2022/lib/extensions/editor-block-handle.js +0 -760
  46. package/esm2022/lib/extensions/editor-block-handle.js.map +0 -1
  47. package/esm2022/lib/extensions/editor-extensions.js +0 -321
  48. package/esm2022/lib/extensions/editor-extensions.js.map +0 -1
  49. package/esm2022/lib/extensions/editor-markdown-compatibility.js +0 -162
  50. package/esm2022/lib/extensions/editor-markdown-compatibility.js.map +0 -1
  51. package/esm2022/lib/extensions/editor-upload-placeholder.js +0 -156
  52. package/esm2022/lib/extensions/editor-upload-placeholder.js.map +0 -1
  53. package/esm2022/lib/status/editor-status.js +0 -64
  54. package/esm2022/lib/status/editor-status.js.map +0 -1
  55. package/esm2022/lib/toolbar/editor-alignment.js +0 -203
  56. package/esm2022/lib/toolbar/editor-alignment.js.map +0 -1
  57. package/esm2022/lib/toolbar/editor-block-insert.js +0 -101
  58. package/esm2022/lib/toolbar/editor-block-insert.js.map +0 -1
  59. package/esm2022/lib/toolbar/editor-color-control.js +0 -71
  60. package/esm2022/lib/toolbar/editor-color-control.js.map +0 -1
  61. package/esm2022/lib/toolbar/editor-command-button.js +0 -115
  62. package/esm2022/lib/toolbar/editor-command-button.js.map +0 -1
  63. package/esm2022/lib/toolbar/editor-heading.js +0 -266
  64. package/esm2022/lib/toolbar/editor-heading.js.map +0 -1
  65. package/esm2022/lib/toolbar/editor-highlight.js +0 -84
  66. package/esm2022/lib/toolbar/editor-highlight.js.map +0 -1
  67. package/esm2022/lib/toolbar/editor-image-upload-dialog.js +0 -289
  68. package/esm2022/lib/toolbar/editor-image-upload-dialog.js.map +0 -1
  69. package/esm2022/lib/toolbar/editor-image-upload.js +0 -315
  70. package/esm2022/lib/toolbar/editor-image-upload.js.map +0 -1
  71. package/esm2022/lib/toolbar/editor-inline-marks.js +0 -124
  72. package/esm2022/lib/toolbar/editor-inline-marks.js.map +0 -1
  73. package/esm2022/lib/toolbar/editor-link.js +0 -265
  74. package/esm2022/lib/toolbar/editor-link.js.map +0 -1
  75. package/esm2022/lib/toolbar/editor-list.js +0 -249
  76. package/esm2022/lib/toolbar/editor-list.js.map +0 -1
  77. package/esm2022/lib/toolbar/editor-table.js +0 -292
  78. package/esm2022/lib/toolbar/editor-table.js.map +0 -1
  79. package/esm2022/lib/toolbar/editor-text-color.js +0 -82
  80. package/esm2022/lib/toolbar/editor-text-color.js.map +0 -1
  81. package/esm2022/lib/toolbar/editor-toolbar-widget.js +0 -41
  82. package/esm2022/lib/toolbar/editor-toolbar-widget.js.map +0 -1
  83. package/esm2022/lib/toolbar/editor-toolbar.defs.js +0 -60
  84. package/esm2022/lib/toolbar/editor-toolbar.defs.js.map +0 -1
  85. package/esm2022/lib/toolbar/editor-toolbar.js +0 -826
  86. package/esm2022/lib/toolbar/editor-toolbar.js.map +0 -1
  87. package/esm2022/lib/toolbar/editor-undo-redo.js +0 -72
  88. package/esm2022/lib/toolbar/editor-undo-redo.js.map +0 -1
  89. package/esm2022/lib/toolbar/editor-zoom.js +0 -330
  90. package/esm2022/lib/toolbar/editor-zoom.js.map +0 -1
  91. package/esm2022/lib/upload/editor-image-upload-coordinator.js +0 -480
  92. package/esm2022/lib/upload/editor-image-upload-coordinator.js.map +0 -1
  93. package/esm2022/malva-ui-editor.js +0 -5
  94. package/esm2022/malva-ui-editor.js.map +0 -1
  95. package/index.d.ts +0 -35
  96. package/lib/ai/editor-ai-actions.d.ts +0 -27
  97. package/lib/ai/editor-ai-context.d.ts +0 -307
  98. package/lib/ai/editor-ai-menu.d.ts +0 -142
  99. package/lib/ai/editor-ai-review-bar.d.ts +0 -116
  100. package/lib/ai/editor-ai-stream.d.ts +0 -207
  101. package/lib/ai/editor-ai-suggestions.d.ts +0 -219
  102. package/lib/ai/editor-ai.tokens.d.ts +0 -10
  103. package/lib/ai/editor-ai.types.d.ts +0 -176
  104. package/lib/editor/editor.d.ts +0 -243
  105. package/lib/editor-extension-preflight.d.ts +0 -23
  106. package/lib/editor-serialization.d.ts +0 -74
  107. package/lib/editor-toolbar-context.d.ts +0 -116
  108. package/lib/editor.tokens.d.ts +0 -6
  109. package/lib/editor.types.d.ts +0 -194
  110. package/lib/extensions/editor-block-handle.d.ts +0 -59
  111. package/lib/extensions/editor-extensions.d.ts +0 -165
  112. package/lib/extensions/editor-markdown-compatibility.d.ts +0 -11
  113. package/lib/extensions/editor-upload-placeholder.d.ts +0 -75
  114. package/lib/status/editor-status.d.ts +0 -24
  115. package/lib/toolbar/editor-alignment.d.ts +0 -61
  116. package/lib/toolbar/editor-block-insert.d.ts +0 -26
  117. package/lib/toolbar/editor-color-control.d.ts +0 -32
  118. package/lib/toolbar/editor-command-button.d.ts +0 -29
  119. package/lib/toolbar/editor-heading.d.ts +0 -68
  120. package/lib/toolbar/editor-highlight.d.ts +0 -21
  121. package/lib/toolbar/editor-image-upload-dialog.d.ts +0 -96
  122. package/lib/toolbar/editor-image-upload.d.ts +0 -71
  123. package/lib/toolbar/editor-inline-marks.d.ts +0 -30
  124. package/lib/toolbar/editor-link.d.ts +0 -78
  125. package/lib/toolbar/editor-list.d.ts +0 -67
  126. package/lib/toolbar/editor-table.d.ts +0 -133
  127. package/lib/toolbar/editor-text-color.d.ts +0 -21
  128. package/lib/toolbar/editor-toolbar-widget.d.ts +0 -19
  129. package/lib/toolbar/editor-toolbar.d.ts +0 -157
  130. package/lib/toolbar/editor-toolbar.defs.d.ts +0 -35
  131. package/lib/toolbar/editor-undo-redo.d.ts +0 -26
  132. package/lib/toolbar/editor-zoom.d.ts +0 -108
  133. package/lib/upload/editor-image-upload-coordinator.d.ts +0 -55
  134. package/malva-ui-editor.d.ts +0 -5
@@ -1,157 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import type { TemplateRef } from '@angular/core';
3
- import type { Editor } from '@tiptap/core';
4
- import type { Signal, WritableSignal } from '@angular/core';
5
- import { MlvMenu, MlvMenuTrigger } from '@malva-ui/core/menu';
6
- import { type MlvEditorToolbarContext } from '../editor-toolbar-context';
7
- import * as i0 from "@angular/core";
8
- /** @internal Named roving-focus root used by editor and compatibility toolbar shells. */
9
- export declare class MlvEditorToolbarRoot {
10
- /** Whether the toolbar has entered its compact overflow layout. */
11
- readonly narrow: WritableSignal<boolean>;
12
- /** Accessible toolbar name. */
13
- readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
14
- /** Whether the composite toolbar is unavailable. */
15
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
16
- /** Keyboard-navigation axis. */
17
- readonly orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
18
- /** Whether arrow navigation wraps at the boundaries. */
19
- readonly wrap: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
20
- /** @internal Editor-scoped focus registry. */
21
- private readonly _registry;
22
- /** @internal Transaction state that re-evaluates disabled toolbar widgets. */
23
- private readonly _revision;
24
- /** @internal Optional localized defaults. */
25
- private readonly _i18n;
26
- /** @internal Actual composite-root element. */
27
- private readonly _element;
28
- /** @internal Root teardown lifecycle. */
29
- private readonly _destroyRef;
30
- /** @internal Avoids DOM observers during server rendering. */
31
- private readonly _isBrowser;
32
- /** @internal Shared observer abstraction for responsive width changes. */
33
- private readonly _resizeObserver;
34
- constructor();
35
- /** @internal Resolves the user or localized toolbar label. */
36
- protected resolvedAriaLabel(): string;
37
- /** @internal Handles roving navigation from the host metadata event binding. */
38
- protected handleKeydown(event: KeyboardEvent): void;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbarRoot, never>;
40
- static ɵdir: i0.ɵɵDirectiveDeclaration<MlvEditorToolbarRoot, "[mlvEditorToolbarRoot]", ["mlvEditorToolbarRoot"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
41
- }
42
- /** @internal Responsive menu containing commands removed from the primary row. */
43
- export declare class MlvEditorToolbarOverflow {
44
- /** @protected Responsive state owned by the enclosing toolbar root. */
45
- protected readonly _root: MlvEditorToolbarRoot;
46
- /** @protected Editor-scoped command state. */
47
- protected readonly _context: MlvEditorToolbarContext;
48
- /** @private Command-state invalidation signal. */
49
- private readonly _revision;
50
- /** @private Roving coordinator used to recover focus after wide layout returns. */
51
- private readonly _roving;
52
- /** @private Detached overlay registry. */
53
- private readonly _overlays;
54
- /** @private Document used after a browser menu opens. */
55
- private readonly _document;
56
- /** @private Teardown scope for a currently open menu. */
57
- private readonly _destroyRef;
58
- /** @private Optional reactive localized editor copy. */
59
- private readonly _i18n;
60
- /** @protected Rendered overflow menu. */
61
- protected readonly _menu: Signal<MlvMenu>;
62
- /** @protected Trigger that owns the overflow menu. */
63
- protected readonly _trigger: Signal<MlvMenuTrigger>;
64
- /** @private Current detached-overlay registration. */
65
- private _unregister;
66
- /** @private Guards queued registration after close. */
67
- private _menuOpen;
68
- /** @private Previous responsive state used to identify a narrow-to-wide edge. */
69
- private _wasNarrow;
70
- /** @protected Formatting order retained when controls move into overflow. */
71
- protected readonly _alignments: Signal<{
72
- value: string;
73
- label: string;
74
- }[]>;
75
- /** @protected Reactive localized copy for every overflow command. */
76
- protected readonly _copy: Signal<{
77
- moreFormatting: string;
78
- bold: string;
79
- italic: string;
80
- strike: string;
81
- underline: string;
82
- alignLeft: string;
83
- alignCenter: string;
84
- alignRight: string;
85
- alignJustify: string;
86
- blockquote: string;
87
- codeBlock: string;
88
- horizontalRule: string;
89
- }>;
90
- /** @protected Bold toggle command. */
91
- protected readonly _bold: (editor: Editor) => boolean;
92
- /** @protected Italic toggle command. */
93
- protected readonly _italic: (editor: Editor) => boolean;
94
- /** @protected Strike toggle command. */
95
- protected readonly _strike: (editor: Editor) => boolean;
96
- /** @protected Underline toggle command. */
97
- protected readonly _underline: (editor: Editor) => boolean;
98
- /** @protected Blockquote toggle command. */
99
- protected readonly _blockquote: (editor: Editor) => boolean;
100
- /** @protected Code-block toggle command. */
101
- protected readonly _codeBlock: (editor: Editor) => boolean;
102
- /** @protected Horizontal-rule insertion command. */
103
- protected readonly _horizontalRule: (editor: Editor) => boolean;
104
- /** @protected Non-mutating bold capability check. */
105
- protected readonly _canBold: (editor: Editor) => boolean;
106
- /** @protected Non-mutating italic capability check. */
107
- protected readonly _canItalic: (editor: Editor) => boolean;
108
- /** @protected Non-mutating strike capability check. */
109
- protected readonly _canStrike: (editor: Editor) => boolean;
110
- /** @protected Non-mutating underline capability check. */
111
- protected readonly _canUnderline: (editor: Editor) => boolean;
112
- /** @protected Non-mutating blockquote capability check. */
113
- protected readonly _canBlockquote: (editor: Editor) => boolean;
114
- /** @protected Non-mutating code-block capability check. */
115
- protected readonly _canCodeBlock: (editor: Editor) => boolean;
116
- /** @protected Non-mutating horizontal-rule capability check. */
117
- protected readonly _canHorizontalRule: (editor: Editor) => boolean;
118
- constructor();
119
- /** @protected Whether the active extension set registered a command. */
120
- protected _supported(command: string): boolean;
121
- /** @protected Alignment command factory. */
122
- protected _align(value: string): (editor: Editor) => boolean;
123
- /** @protected Non-mutating alignment capability factory. */
124
- protected _canAlign(value: string): (editor: Editor) => boolean;
125
- /** @protected Whether the command is blocked or unsupported. */
126
- protected _commandDisabled(command: (editor: Editor) => boolean): boolean;
127
- /** @protected Executes one overflow command through the context guard. */
128
- protected _run(command: (editor: Editor) => boolean): void;
129
- /** @protected Registers the detached overflow panel with composite focus. */
130
- protected _registerOverlay(): void;
131
- /** @protected Releases focus ownership after close. */
132
- protected _unregisterOverlay(): void;
133
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbarOverflow, never>;
134
- static ɵcmp: i0.ɵɵComponentDeclaration<MlvEditorToolbarOverflow, "mlv-editor-toolbar-overflow", never, {}, {}, never, never, true, never>;
135
- }
136
- /** Public compatibility toolbar shell for standalone consumer use. */
137
- export declare class MlvEditorToolbar {
138
- /** Accessible toolbar name. */
139
- readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
140
- /** Whether all toolbar interactions are disabled. */
141
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
142
- /** Optional content rendered before built-in groups. */
143
- readonly startTemplate: import("@angular/core").InputSignal<TemplateRef<{
144
- $implicit: MlvEditorToolbarContext;
145
- }> | null>;
146
- /** Optional content rendered after built-in groups. */
147
- readonly endTemplate: import("@angular/core").InputSignal<TemplateRef<{
148
- $implicit: MlvEditorToolbarContext;
149
- }> | null>;
150
- /** Context supplied to custom toolbar templates. */
151
- readonly context: import("@angular/core").InputSignal<MlvEditorToolbarContext>;
152
- /** @internal Invalidates built-in command state for the supplied standalone editor. */
153
- private readonly _revision;
154
- constructor();
155
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbar, never>;
156
- static ɵcmp: i0.ɵɵComponentDeclaration<MlvEditorToolbar, "mlv-editor-toolbar", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "startTemplate": { "alias": "startTemplate"; "required": false; "isSignal": true; }; "endTemplate": { "alias": "endTemplate"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": true; "isSignal": true; }; }, {}, never, ["[mlvEditorToolbarStart]", "[mlvEditorToolbarEnd]", "*"], true, never>;
157
- }
@@ -1,35 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import type { MlvEditorToolbarContext } from '../editor-toolbar-context';
3
- import * as i0 from "@angular/core";
4
- /** @internal Template context supplied to replaceable toolbar definitions. */
5
- interface MlvEditorToolbarTemplateContext {
6
- readonly $implicit: MlvEditorToolbarContext;
7
- }
8
- /** Complete replacement template for an editor's built-in toolbar. */
9
- export declare class MlvEditorToolbarDef {
10
- /** The projected template, whose implicit context is `MlvEditorToolbarContext`. */
11
- readonly templateRef: TemplateRef<MlvEditorToolbarTemplateContext> | null;
12
- /** Narrows `let-context` to the editor toolbar context. */
13
- static ngTemplateContextGuard(_dir: MlvEditorToolbarDef, _context: unknown): _context is MlvEditorToolbarTemplateContext;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbarDef, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<MlvEditorToolbarDef, "[mlvEditorToolbar]", never, {}, {}, never, never, true, never>;
16
- }
17
- /** Template rendered before the built-in toolbar groups. */
18
- export declare class MlvEditorToolbarStartDef {
19
- /** The projected template, whose implicit context is `MlvEditorToolbarContext`. */
20
- readonly templateRef: TemplateRef<MlvEditorToolbarTemplateContext> | null;
21
- /** Narrows `let-context` to the editor toolbar context. */
22
- static ngTemplateContextGuard(_dir: MlvEditorToolbarStartDef, _context: unknown): _context is MlvEditorToolbarTemplateContext;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbarStartDef, never>;
24
- static ɵdir: i0.ɵɵDirectiveDeclaration<MlvEditorToolbarStartDef, "[mlvEditorToolbarStart]", never, {}, {}, never, never, true, never>;
25
- }
26
- /** Template rendered after the built-in toolbar groups. */
27
- export declare class MlvEditorToolbarEndDef {
28
- /** The projected template, whose implicit context is `MlvEditorToolbarContext`. */
29
- readonly templateRef: TemplateRef<MlvEditorToolbarTemplateContext> | null;
30
- /** Narrows `let-context` to the editor toolbar context. */
31
- static ngTemplateContextGuard(_dir: MlvEditorToolbarEndDef, _context: unknown): _context is MlvEditorToolbarTemplateContext;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorToolbarEndDef, never>;
33
- static ɵdir: i0.ɵɵDirectiveDeclaration<MlvEditorToolbarEndDef, "[mlvEditorToolbarEnd]", never, {}, {}, never, never, true, never>;
34
- }
35
- export {};
@@ -1,26 +0,0 @@
1
- import type { Editor } from '@tiptap/core';
2
- import * as i0 from "@angular/core";
3
- /** Undo and redo actions backed by Tiptap history commands. */
4
- export declare class MlvEditorUndoRedo {
5
- /** @private Optional localized editor copy. */
6
- private readonly _i18n;
7
- /** @protected Resolved copy with SSR-safe English fallbacks. */
8
- protected readonly _copy: import("@angular/core").Signal<{
9
- undo: string;
10
- redo: string;
11
- }>;
12
- /** @protected Tiptap availability query for undo. */
13
- protected readonly _canUndo: (editor: Editor) => boolean;
14
- /** @protected Tiptap availability query for redo. */
15
- protected readonly _canRedo: (editor: Editor) => boolean;
16
- /** @protected Current history availability for undo. */
17
- protected readonly _canExecuteUndo: (editor: Editor) => boolean;
18
- /** @protected Current history availability for redo. */
19
- protected readonly _canExecuteRedo: (editor: Editor) => boolean;
20
- /** @protected Selection-restoring undo command. */
21
- protected readonly _undo: (editor: Editor) => boolean;
22
- /** @protected Selection-restoring redo command. */
23
- protected readonly _redo: (editor: Editor) => boolean;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorUndoRedo, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<MlvEditorUndoRedo, "mlv-editor-undo-redo", never, {}, {}, never, never, true, never>;
26
- }
@@ -1,108 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import type { OnChanges, SimpleChanges } from '@angular/core';
3
- import { MlvInput } from '@malva-ui/core/input';
4
- import { MlvPopup, MlvPopupTrigger } from '@malva-ui/core/popup';
5
- import * as i0 from "@angular/core";
6
- /** View-only editor zoom stepper and preset menu. */
7
- export declare class MlvEditorZoom implements OnChanges {
8
- /** Current view-only zoom percentage. */
9
- readonly zoom: import("@angular/core").ModelSignal<number>;
10
- /** Preset percentages displayed by the zoom menu. */
11
- readonly zoomLevels: import("@angular/core").InputSignal<readonly number[]>;
12
- /** Smallest permitted zoom percentage. */
13
- readonly min: import("@angular/core").InputSignal<number>;
14
- /** Largest permitted zoom percentage. */
15
- readonly max: import("@angular/core").InputSignal<number>;
16
- /** Recalculates the largest safe zoom whenever the content viewport resizes. */
17
- readonly fitToContainer: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
18
- /** @protected Editor-scoped view and command state. */
19
- protected readonly _context: import("@malva-ui/editor").MlvEditorToolbarContext;
20
- /** @private Shared observer abstraction for the editor viewport. */
21
- private readonly _resizeObserver;
22
- /** @private Component host used to retain a stable focus-restore target. */
23
- private readonly _host;
24
- /** @private Registry that keeps focus within the editor composite. */
25
- private readonly _overlays;
26
- /** @private Document used only after a browser menu opens. */
27
- private readonly _document;
28
- /** @private Component teardown scope. */
29
- private readonly _destroyRef;
30
- /** @private Prevents browser view access during server rendering. */
31
- private readonly _isBrowser;
32
- /** @private Optional reactive localized editor copy. */
33
- private readonly _i18n;
34
- /** @protected Rendered mixed-control popup. */
35
- protected readonly _popup: import("@angular/core").Signal<MlvPopup>;
36
- /** @protected Trigger that owns the detached popup. */
37
- protected readonly _trigger: import("@angular/core").Signal<MlvPopupTrigger>;
38
- /** @protected Percentage field focused when the popup opens. */
39
- protected readonly _input: import("@angular/core").Signal<MlvInput>;
40
- /** @protected Stable id used to resolve this component's detached panel. */
41
- protected readonly _panelId: string;
42
- /** @private Last synchronized model value. */
43
- private _lastZoom;
44
- /** @private Last synchronized editor-context value. */
45
- private _lastContextZoom;
46
- /** @private Distinguishes initial context adoption from later writes. */
47
- private _initialized;
48
- /** @private Whether Angular assigned the public model, including an explicit default. */
49
- private _zoomWasSupplied;
50
- /** @private Current detached-popup registration teardown. */
51
- private _unregister;
52
- /** @private Guards a queued popup registration after close or destroy. */
53
- private _menuOpen;
54
- /** @private Connected trigger retained while the popup is open. */
55
- private _restoreFocusTarget;
56
- /** @protected Numeric field draft kept separate until commit. */
57
- protected readonly _draft: import("@angular/core").WritableSignal<string>;
58
- /** @protected Normalized inclusive zoom bounds. */
59
- protected readonly _bounds: import("@angular/core").Signal<{
60
- min: number;
61
- max: number;
62
- }>;
63
- /** @protected Finite, in-range, sorted menu presets. */
64
- protected readonly _presetLevels: import("@angular/core").Signal<number[]>;
65
- /** @protected Whether the complete editor composite is disabled. */
66
- protected readonly _disabled: import("@angular/core").Signal<boolean>;
67
- /** @protected Reactive localized labels for every zoom surface. */
68
- protected readonly _copy: import("@angular/core").Signal<{
69
- zoom: string;
70
- zoomOut: string;
71
- zoomIn: string;
72
- fitToContainer: string;
73
- }>;
74
- /** @protected Whether decrementing would exceed the lower bound. */
75
- protected readonly _zoomOutDisabled: import("@angular/core").Signal<boolean>;
76
- /** @protected Whether incrementing would exceed the upper bound. */
77
- protected readonly _zoomInDisabled: import("@angular/core").Signal<boolean>;
78
- constructor();
79
- ngOnChanges(changes: SimpleChanges): void;
80
- /** @protected Selects the previous preset or the exact minimum. */
81
- protected _zoomOut(): void;
82
- /** @protected Selects the next preset or the exact maximum. */
83
- protected _zoomIn(): void;
84
- /** @protected Applies a menu preset without dispatching an editor transaction. */
85
- protected _select(level: number): void;
86
- /** @protected Commits a finite numeric field value and restores the normalized display. */
87
- protected _applyDraft(event?: Event): void;
88
- /** @protected Fits against the viewport's latest synchronous width. */
89
- protected _fitCurrentViewport(): void;
90
- /** @protected Registers the detached dialog and moves focus to its field. */
91
- protected _onPopupOpened(): void;
92
- /** @protected Releases focus ownership and restores the visible trigger. */
93
- protected _onPopupClosed(): void;
94
- /** @private Removes detached popup focus ownership without moving focus. */
95
- private _releaseOverlay;
96
- /** @private Synchronizes the literal public model with the nearest toolbar context. */
97
- private _synchronizeZoom;
98
- /** @private Ordered stepping levels, including exact configured bounds. */
99
- private _steps;
100
- /** @private Applies a clamped visual-only percentage to model and context. */
101
- private _setZoom;
102
- /** @private Calculates the largest integer zoom whose natural content fits. */
103
- private _fit;
104
- /** @private Clamps a finite percentage to the configured inclusive bounds. */
105
- private _clamp;
106
- static ɵfac: i0.ɵɵFactoryDeclaration<MlvEditorZoom, never>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<MlvEditorZoom, "mlv-editor-zoom", never, { "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "zoomLevels": { "alias": "zoomLevels"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "fitToContainer": { "alias": "fitToContainer"; "required": false; "isSignal": true; }; }, { "zoom": "zoomChange"; }, never, never, true, never>;
108
- }
@@ -1,55 +0,0 @@
1
- import { InjectionToken, type Signal } from '@angular/core';
2
- import type { Editor } from '@tiptap/core';
3
- import { MlvEditorImageUploadControl, type MlvEditorError, type MlvEditorImageUploadCancelled, type MlvEditorImageUploadFailure, type MlvEditorImageUploadOptions, type MlvEditorImageUploadSuccess, type MlvEditorImageUploader } from '../editor.types';
4
- type MlvEditorImageUploadTerminalReason = 'success' | 'cancelled' | 'lifecycle-abort' | 'removed';
5
- interface MlvEditorImageUploadTerminalEvent {
6
- readonly id: string;
7
- readonly reason: MlvEditorImageUploadTerminalReason;
8
- }
9
- /** Internal upload coordinator shared by every editor image entry point. */
10
- export interface MlvEditorImageUploadCoordinator extends MlvEditorImageUploadControl {
11
- /** Observes explicit terminal transitions synchronously. */
12
- onTerminal(listener: (event: MlvEditorImageUploadTerminalEvent) => void): () => void;
13
- /** Claims live dialog ownership until the returned release is called. */
14
- claimDialogOwnership(id: string): () => void;
15
- /** Whether a live dialog owned this upload at the current terminal delivery. */
16
- hasDialogOwner(id: string): boolean;
17
- }
18
- /** @internal Resolves only capabilities created by the Malva coordinator factory. */
19
- export declare function resolveMlvEditorImageUploadCoordinator(control: MlvEditorImageUploadControl | undefined): MlvEditorImageUploadCoordinator | undefined;
20
- /** Internal lifecycle and event connection supplied by the owning editor. */
21
- export interface MlvEditorImageUploadCoordinatorConnection {
22
- /** Current Tiptap editor instance. */
23
- readonly editor: Signal<Editor | null>;
24
- /** Per-editor uploader input. */
25
- readonly imageUploader: Signal<MlvEditorImageUploader | undefined>;
26
- /** Current validation and URL-policy options. */
27
- readonly imageUploadOptions: Signal<MlvEditorImageUploadOptions>;
28
- /** Whether the full editor composite is disabled. */
29
- readonly disabled: () => boolean;
30
- /** Whether the editor content is read-only. */
31
- readonly readonly: () => boolean;
32
- /** Emits one successful upload payload. */
33
- readonly emitSuccess: (event: MlvEditorImageUploadSuccess) => void;
34
- /** Emits one failed upload payload. */
35
- readonly emitFailure: (event: MlvEditorImageUploadFailure) => void;
36
- /** Emits one explicit cancellation payload. */
37
- readonly emitCancelled: (event: MlvEditorImageUploadCancelled) => void;
38
- /** Emits the shared recoverable editor error. */
39
- readonly emitError: (error: MlvEditorError) => void;
40
- }
41
- /** Minimal abort registry contract used without coupling consumers to its class. */
42
- export interface MlvEditorImageUploadAbortRegistryLike {
43
- /** Registers one active abort callback and returns its unregister function. */
44
- register(abort: () => void): () => void;
45
- }
46
- /** Internal editor-scoped coordinator token consumed by upload entry points. */
47
- export declare const MLV_EDITOR_IMAGE_UPLOAD_COORDINATOR: InjectionToken<MlvEditorImageUploadCoordinator>;
48
- /**
49
- * Creates one editor-scoped upload coordinator.
50
- *
51
- * @internal The returned value is exposed only through
52
- * `MLV_EDITOR_IMAGE_UPLOAD_COORDINATOR`.
53
- */
54
- export declare function createMlvEditorImageUploadCoordinator(connection: MlvEditorImageUploadCoordinatorConnection, injectedUploader: MlvEditorImageUploader | undefined, abortRegistry: MlvEditorImageUploadAbortRegistryLike): MlvEditorImageUploadCoordinator;
55
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@malva-ui/editor" />
5
- export * from './index';