@seyamali/aurelia-editor 0.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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +154 -0
  3. package/dist/core/commands.d.ts +1 -0
  4. package/dist/core/engine.d.ts +11 -0
  5. package/dist/core/registry.d.ts +13 -0
  6. package/dist/core/sdk.d.ts +57 -0
  7. package/dist/counter.d.ts +1 -0
  8. package/dist/horizontal-rule-plugin-DdpCd1us.js +20 -0
  9. package/dist/index-C9G087KG.js +54332 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/main.d.ts +0 -0
  12. package/dist/omni-editor.js +6 -0
  13. package/dist/omni-editor.umd.cjs +822 -0
  14. package/dist/plugins/advanced/asset-link-node.d.ts +18 -0
  15. package/dist/plugins/advanced/code-block-node.d.ts +33 -0
  16. package/dist/plugins/advanced/code-blocks.d.ts +13 -0
  17. package/dist/plugins/advanced/footnote-node.d.ts +59 -0
  18. package/dist/plugins/advanced/footnote-plugin.d.ts +6 -0
  19. package/dist/plugins/advanced/footnote.d.ts +8 -0
  20. package/dist/plugins/advanced/html-snippet-node.d.ts +16 -0
  21. package/dist/plugins/advanced/markdown.d.ts +5 -0
  22. package/dist/plugins/advanced/media-embed.d.ts +4 -0
  23. package/dist/plugins/advanced/placeholder-node.d.ts +22 -0
  24. package/dist/plugins/advanced/placeholder.d.ts +18 -0
  25. package/dist/plugins/advanced/revision-history.d.ts +22 -0
  26. package/dist/plugins/advanced/source-view.d.ts +37 -0
  27. package/dist/plugins/advanced/style-node.d.ts +18 -0
  28. package/dist/plugins/advanced/youtube-node.d.ts +34 -0
  29. package/dist/plugins/collaboration/revision-history.d.ts +25 -0
  30. package/dist/plugins/collaboration/revision-ui.d.ts +2 -0
  31. package/dist/plugins/collaboration/suggestion-node.d.ts +21 -0
  32. package/dist/plugins/collaboration/track-changes.d.ts +8 -0
  33. package/dist/plugins/configuration/accessibility.d.ts +11 -0
  34. package/dist/plugins/configuration/context-aware-toolbar.d.ts +66 -0
  35. package/dist/plugins/configuration/i18n.d.ts +40 -0
  36. package/dist/plugins/configuration/toolbar-config.d.ts +73 -0
  37. package/dist/plugins/configuration/toolbar-customization-ui.d.ts +73 -0
  38. package/dist/plugins/configuration/toolbar-customization.d.ts +12 -0
  39. package/dist/plugins/configuration/toolbar-system.d.ts +25 -0
  40. package/dist/plugins/configuration/toolbar-ui.d.ts +1 -0
  41. package/dist/plugins/custom-plugin-demo.d.ts +11 -0
  42. package/dist/plugins/essentials/clipboard.d.ts +4 -0
  43. package/dist/plugins/essentials/history.d.ts +12 -0
  44. package/dist/plugins/essentials/horizontal-rule-plugin.d.ts +2 -0
  45. package/dist/plugins/export/pdf-export.d.ts +4 -0
  46. package/dist/plugins/export/word-export.d.ts +4 -0
  47. package/dist/plugins/formatting/basic-styles.d.ts +33 -0
  48. package/dist/plugins/formatting/custom-heading-node.d.ts +17 -0
  49. package/dist/plugins/formatting/custom-link-node.d.ts +17 -0
  50. package/dist/plugins/formatting/custom-paragraph-node.d.ts +16 -0
  51. package/dist/plugins/formatting/icon-node.d.ts +22 -0
  52. package/dist/plugins/formatting/span-node.d.ts +18 -0
  53. package/dist/plugins/import/word-import.d.ts +5 -0
  54. package/dist/plugins/layout/headings.d.ts +7 -0
  55. package/dist/plugins/layout/indent.d.ts +2 -0
  56. package/dist/plugins/layout/layout-node.d.ts +22 -0
  57. package/dist/plugins/layout/lists.d.ts +22 -0
  58. package/dist/plugins/layout/table-resizer.d.ts +5 -0
  59. package/dist/plugins/layout/tables.d.ts +16 -0
  60. package/dist/plugins/media/custom-image-node.d.ts +23 -0
  61. package/dist/plugins/media/embed-plugin.d.ts +9 -0
  62. package/dist/plugins/media/image-drag-move.d.ts +2 -0
  63. package/dist/plugins/media/image-node.d.ts +70 -0
  64. package/dist/plugins/media/image-popover-ui.d.ts +2 -0
  65. package/dist/plugins/media/image-resizer.d.ts +6 -0
  66. package/dist/plugins/media/image-url-modal.d.ts +3 -0
  67. package/dist/plugins/media/images.d.ts +4 -0
  68. package/dist/plugins/media/link-popover-ui.d.ts +3 -0
  69. package/dist/plugins/media/links.d.ts +3 -0
  70. package/dist/plugins/media/unified-image-modal.d.ts +3 -0
  71. package/dist/plugins/page-layout/page-break-node.d.ts +20 -0
  72. package/dist/plugins/page-layout/page-break.d.ts +7 -0
  73. package/dist/plugins/page-layout/toc-node.d.ts +46 -0
  74. package/dist/plugins/page-layout/toc-plugin.d.ts +8 -0
  75. package/dist/plugins/productivity/autosave.d.ts +6 -0
  76. package/dist/plugins/productivity/case-change.d.ts +11 -0
  77. package/dist/plugins/productivity/document-outline.d.ts +12 -0
  78. package/dist/plugins/productivity/emoji-ui.d.ts +2 -0
  79. package/dist/plugins/productivity/emoji.d.ts +9 -0
  80. package/dist/plugins/productivity/find-replace-ui.d.ts +2 -0
  81. package/dist/plugins/productivity/find-replace.d.ts +26 -0
  82. package/dist/plugins/productivity/format-painter.d.ts +10 -0
  83. package/dist/plugins/productivity/minimap.d.ts +6 -0
  84. package/dist/plugins/productivity/productivity-pack.d.ts +5 -0
  85. package/dist/plugins/productivity/slash-commands.d.ts +5 -0
  86. package/dist/plugins/productivity/slash-menu-ui.d.ts +25 -0
  87. package/dist/plugins/upload/adapters.d.ts +16 -0
  88. package/dist/plugins/upload/upload-manager.d.ts +20 -0
  89. package/dist/shared/dialog-system.d.ts +28 -0
  90. package/dist/spare.d.ts +7 -0
  91. package/dist/ui/code-block-popover-ui.d.ts +5 -0
  92. package/dist/ui/components/editor-main-html.d.ts +1 -0
  93. package/dist/ui/components/modals-html.d.ts +1 -0
  94. package/dist/ui/components/status-bar-html.d.ts +1 -0
  95. package/dist/ui/components/toolbar-html.d.ts +1 -0
  96. package/dist/ui/icons.d.ts +53 -0
  97. package/dist/ui/layout.d.ts +1 -0
  98. package/dist/ui/revision-history-ui.d.ts +2 -0
  99. package/dist/ui/table-grid-picker.d.ts +3 -0
  100. package/dist/ui/table-popover-ui.d.ts +2 -0
  101. package/dist/ui/toolbar-delegation.d.ts +6 -0
  102. package/dist/ui/toolbar-logic/advanced-logic.d.ts +2 -0
  103. package/dist/ui/toolbar-logic/basic-logic.d.ts +2 -0
  104. package/dist/ui/toolbar-logic/document-logic.d.ts +2 -0
  105. package/dist/ui/toolbar-logic/state-logic.d.ts +1 -0
  106. package/dist/ui/toolbar-setup.d.ts +6 -0
  107. package/dist/ui/toolbar.d.ts +3 -0
  108. package/dist/ui/track-changes-ui.d.ts +2 -0
  109. package/dist/vite.svg +1 -0
  110. package/package.json +48 -0
@@ -0,0 +1,18 @@
1
+ import { DecoratorNode, NodeKey, SerializedLexicalNode, Spread, DOMConversionMap, DOMExportOutput } from 'lexical';
2
+ export type SerializedAssetLinkNode = Spread<{
3
+ attributes: Record<string, string>;
4
+ }, SerializedLexicalNode>;
5
+ export declare class AssetLinkNode extends DecoratorNode<HTMLElement> {
6
+ __attributes: Record<string, string>;
7
+ static getType(): string;
8
+ static clone(node: AssetLinkNode): AssetLinkNode;
9
+ constructor(attributes: Record<string, string>, key?: NodeKey);
10
+ static importJSON(serializedNode: SerializedAssetLinkNode): AssetLinkNode;
11
+ exportJSON(): SerializedAssetLinkNode;
12
+ createDOM(): HTMLElement;
13
+ updateDOM(): false;
14
+ decorate(): HTMLElement;
15
+ static importDOM(): DOMConversionMap | null;
16
+ exportDOM(): DOMExportOutput;
17
+ }
18
+ export declare function $createAssetLinkNode(attributes: Record<string, string>): AssetLinkNode;
@@ -0,0 +1,33 @@
1
+ import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedElementNode, Spread } from 'lexical';
2
+ import { CodeNode } from '@lexical/code';
3
+ export type SerializedCodeBlockNode = Spread<{
4
+ language: string | null;
5
+ showLineNumbers: boolean;
6
+ }, SerializedElementNode>;
7
+ /**
8
+ * Enhanced CodeBlockNode with language support, line numbers, and copy functionality
9
+ */
10
+ export declare class CodeBlockNode extends CodeNode {
11
+ __language: string | null;
12
+ __showLineNumbers: boolean;
13
+ constructor(language?: string | null, showLineNumbers?: boolean, key?: NodeKey);
14
+ static getType(): string;
15
+ static clone(node: CodeBlockNode): CodeBlockNode;
16
+ static importJSON(serializedNode: SerializedCodeBlockNode): CodeBlockNode;
17
+ exportJSON(): SerializedCodeBlockNode;
18
+ createDOM(_config: EditorConfig): HTMLElement;
19
+ updateDOM(prevNode: CodeBlockNode, dom: HTMLElement): boolean;
20
+ private _ensureDecorations;
21
+ exportDOM(): DOMExportOutput;
22
+ static importDOM(): DOMConversionMap | null;
23
+ getLanguage(): string | null;
24
+ setLanguage(language: string | null): this;
25
+ getShowLineNumbers(): boolean;
26
+ setShowLineNumbers(show: boolean): void;
27
+ canInsertTab(): boolean;
28
+ canIndent(): false;
29
+ collapseAtStart(): boolean;
30
+ private copyCode;
31
+ }
32
+ export declare function $createCodeBlockNode(language?: string | null, showLineNumbers?: boolean): CodeBlockNode;
33
+ export declare function $isCodeBlockNode(node: LexicalNode | null | undefined): node is CodeBlockNode;
@@ -0,0 +1,13 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ import { EditorPlugin } from '../../core/registry';
3
+ export declare const INSERT_CODE_BLOCK_COMMAND: LexicalCommand<string | null>;
4
+ export declare const SET_CODE_LANGUAGE_COMMAND: LexicalCommand<{
5
+ nodeKey: string;
6
+ language: string;
7
+ }>;
8
+ export declare const TOGGLE_LINE_NUMBERS_COMMAND: LexicalCommand<string>;
9
+ export declare const SUPPORTED_LANGUAGES: {
10
+ value: string;
11
+ label: string;
12
+ }[];
13
+ export declare const CodeBlockPlugin: EditorPlugin;
@@ -0,0 +1,59 @@
1
+ import { DecoratorNode, EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
2
+ export type SerializedFootnoteRefNode = Spread<{
3
+ footnoteId: string;
4
+ type: 'footnote-ref';
5
+ version: 1;
6
+ }, SerializedLexicalNode>;
7
+ export declare class FootnoteRefNode extends DecoratorNode<HTMLElement> {
8
+ __footnoteId: string;
9
+ static getType(): string;
10
+ static clone(node: FootnoteRefNode): FootnoteRefNode;
11
+ static importJSON(serializedNode: SerializedFootnoteRefNode): FootnoteRefNode;
12
+ constructor(footnoteId: string, key?: NodeKey);
13
+ exportJSON(): SerializedFootnoteRefNode;
14
+ getFootnoteId(): string;
15
+ createDOM(_config: EditorConfig): HTMLElement;
16
+ updateDOM(prevNode: FootnoteRefNode, dom: HTMLElement): boolean;
17
+ decorate(): HTMLElement;
18
+ isInline(): boolean;
19
+ }
20
+ export declare function $createFootnoteRefNode(footnoteId: string): FootnoteRefNode;
21
+ export declare function $isFootnoteRefNode(node: LexicalNode | null | undefined): node is FootnoteRefNode;
22
+ export type SerializedFootnoteContentNode = Spread<{
23
+ footnoteId: string;
24
+ content: string;
25
+ type: 'footnote-content';
26
+ version: 1;
27
+ }, SerializedLexicalNode>;
28
+ export declare class FootnoteContentNode extends DecoratorNode<HTMLElement> {
29
+ __footnoteId: string;
30
+ __content: string;
31
+ static getType(): string;
32
+ static clone(node: FootnoteContentNode): FootnoteContentNode;
33
+ static importJSON(serializedNode: SerializedFootnoteContentNode): FootnoteContentNode;
34
+ constructor(footnoteId: string, content: string, key?: NodeKey);
35
+ exportJSON(): SerializedFootnoteContentNode;
36
+ getFootnoteId(): string;
37
+ getContent(): string;
38
+ setContent(content: string): void;
39
+ createDOM(_config: EditorConfig): HTMLElement;
40
+ updateDOM(prevNode: FootnoteContentNode, dom: HTMLElement): boolean;
41
+ decorate(): HTMLElement;
42
+ }
43
+ export declare function $createFootnoteContentNode(footnoteId: string, content: string): FootnoteContentNode;
44
+ export declare function $isFootnoteContentNode(node: LexicalNode | null | undefined): node is FootnoteContentNode;
45
+ export type SerializedFootnoteContainerNode = Spread<{
46
+ type: 'footnote-container';
47
+ version: 1;
48
+ }, SerializedLexicalNode>;
49
+ export declare class FootnoteContainerNode extends DecoratorNode<HTMLElement> {
50
+ static getType(): string;
51
+ static clone(node: FootnoteContainerNode): FootnoteContainerNode;
52
+ static importJSON(_serializedNode: SerializedFootnoteContainerNode): FootnoteContainerNode;
53
+ exportJSON(): SerializedFootnoteContainerNode;
54
+ createDOM(_config: EditorConfig): HTMLElement;
55
+ updateDOM(): boolean;
56
+ decorate(): HTMLElement;
57
+ }
58
+ export declare function $createFootnoteContainerNode(): FootnoteContainerNode;
59
+ export declare function $isFootnoteContainerNode(node: LexicalNode | null | undefined): node is FootnoteContainerNode;
@@ -0,0 +1,6 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ import { EditorPlugin } from '../../core/registry';
3
+ export declare const INSERT_FOOTNOTE_COMMAND: LexicalCommand<void>;
4
+ export declare const UPDATE_FOOTNOTE_NUMBERS_COMMAND: LexicalCommand<void>;
5
+ export declare const FootnotePlugin: EditorPlugin;
6
+ export default FootnotePlugin;
@@ -0,0 +1,8 @@
1
+ import { LexicalCommand, NodeKey } from 'lexical';
2
+ import { EditorSDK } from '../../core/sdk';
3
+ export declare const INSERT_FOOTNOTE_COMMAND: LexicalCommand<string>;
4
+ export declare const EDIT_FOOTNOTE_COMMAND: LexicalCommand<NodeKey>;
5
+ export declare const FootnotePlugin: {
6
+ name: string;
7
+ init: (sdk: EditorSDK) => void;
8
+ };
@@ -0,0 +1,16 @@
1
+ import { DecoratorNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
2
+ export type SerializedHTMLSnippetNode = Spread<{
3
+ html: string;
4
+ }, SerializedLexicalNode>;
5
+ export declare class HTMLSnippetNode extends DecoratorNode<HTMLElement> {
6
+ __html: string;
7
+ static getType(): string;
8
+ static clone(node: HTMLSnippetNode): HTMLSnippetNode;
9
+ constructor(html: string, key?: NodeKey);
10
+ static importJSON(serializedNode: SerializedHTMLSnippetNode): HTMLSnippetNode;
11
+ exportJSON(): SerializedHTMLSnippetNode;
12
+ createDOM(): HTMLElement;
13
+ updateDOM(): false;
14
+ decorate(): HTMLElement;
15
+ }
16
+ export declare function $createHTMLSnippetNode(html: string): HTMLSnippetNode;
@@ -0,0 +1,5 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ import { EditorPlugin } from '../../core/registry';
3
+ export declare const IMPORT_MARKDOWN_COMMAND: LexicalCommand<string>;
4
+ export declare const EXPORT_MARKDOWN_COMMAND: LexicalCommand<void>;
5
+ export declare const MarkdownPlugin: EditorPlugin;
@@ -0,0 +1,4 @@
1
+ export declare const MediaEmbedPlugin: {
2
+ insertYouTube: (editor: any) => Promise<void>;
3
+ insertHTMLSnippet: (editor: any) => Promise<void>;
4
+ };
@@ -0,0 +1,22 @@
1
+ import { DecoratorNode, EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
2
+ export type SerializedPlaceholderNode = Spread<{
3
+ name: string;
4
+ }, SerializedLexicalNode>;
5
+ export declare class PlaceholderNode extends DecoratorNode<HTMLElement> {
6
+ __name: string;
7
+ static getType(): string;
8
+ static clone(node: PlaceholderNode): PlaceholderNode;
9
+ static importJSON(serializedNode: SerializedPlaceholderNode): PlaceholderNode;
10
+ constructor(name: string, key?: NodeKey);
11
+ exportJSON(): SerializedPlaceholderNode;
12
+ createDOM(_config: EditorConfig): HTMLElement;
13
+ private getPlaceholderMetadata;
14
+ private tooltipElement;
15
+ private showTooltip;
16
+ private hideTooltip;
17
+ updateDOM(prevNode: PlaceholderNode, dom: HTMLElement): boolean;
18
+ decorate(): HTMLElement;
19
+ getTextContent(): string;
20
+ }
21
+ export declare function $createPlaceholderNode(name: string): PlaceholderNode;
22
+ export declare function $isPlaceholderNode(node: LexicalNode | null | undefined): node is PlaceholderNode;
@@ -0,0 +1,18 @@
1
+ import { LexicalEditor, LexicalCommand } from 'lexical';
2
+ import { EditorSDK } from '../../core/sdk';
3
+ /**
4
+ * Sanitizes a placeholder name to ensure it's safe and valid.
5
+ * Only allows alphanumeric characters and underscores.
6
+ * Prevents script injection and unsafe content.
7
+ */
8
+ export declare function sanitizePlaceholderName(name: string): string | null;
9
+ /**
10
+ * Checks if a placeholder name is valid (exists in predefined list).
11
+ */
12
+ export declare function isValidPlaceholderName(name: string): boolean;
13
+ export declare function showPlaceholderInsertPanel(editor: LexicalEditor): void;
14
+ export declare const INSERT_PLACEHOLDER_COMMAND: LexicalCommand<string>;
15
+ export declare const PlaceholderPlugin: {
16
+ name: string;
17
+ init: (sdk: EditorSDK) => void;
18
+ };
@@ -0,0 +1,22 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ import { EditorPlugin } from '../../core/registry';
3
+ export interface Revision {
4
+ id: string;
5
+ timestamp: number;
6
+ name: string;
7
+ state: string;
8
+ author: string;
9
+ isAuto: boolean;
10
+ }
11
+ export declare const SAVE_REVISION_COMMAND: LexicalCommand<{
12
+ name?: string;
13
+ isAuto?: boolean;
14
+ }>;
15
+ export declare const RESTORE_REVISION_COMMAND: LexicalCommand<string>;
16
+ export declare const TOGGLE_REVISION_HISTORY_COMMAND: LexicalCommand<void>;
17
+ export declare const RevisionHistoryPlugin: EditorPlugin;
18
+ /**
19
+ * Utility for Diffing (Internal Use for UI)
20
+ * Simple word-level diff
21
+ */
22
+ export declare function diffHtml(oldHtml: string, newHtml: string): string;
@@ -0,0 +1,37 @@
1
+ export declare const SourceViewPlugin: {
2
+ _fullDocTemplate: {
3
+ head: string;
4
+ docType: string;
5
+ } | null;
6
+ _originalHtml: string | null;
7
+ _isDirty: boolean;
8
+ _listener: (() => void) | null;
9
+ /**
10
+ * Get HTML from Editor with literal fidelity.
11
+ */
12
+ getHtml: (editor: any) => string;
13
+ /**
14
+ * Professional HTML Beautifier
15
+ * Adds line breaks and indentation to a dense HTML string.
16
+ */
17
+ beautifyHTML: (html: string) => string;
18
+ /**
19
+ * Professional CSS Sandboxer
20
+ * Prefixes all selectors with .editor-container to ensure scoped styling and high specificity.
21
+ * Uses a robust balanced-brace parser to correctly handle nested rules (@keyframes, @media).
22
+ */
23
+ proxyCSS: (css: string) => string;
24
+ /**
25
+ * Replaces the editor content and injects styles into the document head for "Same-to-Same" design.
26
+ */
27
+ setHtml: (editor: any, html: string) => void;
28
+ /**
29
+ * Pure HTML post-processor to remove ALL Lexical pollution.
30
+ * This is the "Same-to-Same" guardian.
31
+ */
32
+ cleanHtml: (html: string) => string;
33
+ /**
34
+ * Permissive sanitizer to keep layout and attributes intact.
35
+ */
36
+ sanitizeHTML: (html: string) => string;
37
+ };
@@ -0,0 +1,18 @@
1
+ import { DecoratorNode, NodeKey, SerializedLexicalNode, Spread, DOMConversionMap, DOMExportOutput } from 'lexical';
2
+ export type SerializedStyleNode = Spread<{
3
+ css: string;
4
+ }, SerializedLexicalNode>;
5
+ export declare class StyleNode extends DecoratorNode<HTMLElement> {
6
+ __css: string;
7
+ static getType(): string;
8
+ static clone(node: StyleNode): StyleNode;
9
+ constructor(css: string, key?: NodeKey);
10
+ static importJSON(serializedNode: SerializedStyleNode): StyleNode;
11
+ exportJSON(): SerializedStyleNode;
12
+ createDOM(): HTMLElement;
13
+ updateDOM(): false;
14
+ decorate(): HTMLElement;
15
+ static importDOM(): DOMConversionMap | null;
16
+ exportDOM(): DOMExportOutput;
17
+ }
18
+ export declare function $createStyleNode(css: string): StyleNode;
@@ -0,0 +1,34 @@
1
+ import { DecoratorNode, NodeKey, EditorConfig, LexicalNode, SerializedLexicalNode, Spread, LexicalEditor, DOMExportOutput, DOMConversionMap } from 'lexical';
2
+ export type YouTubeAlignment = 'left' | 'right' | 'center' | 'full';
3
+ export type SerializedYouTubeNode = Spread<{
4
+ videoID: string;
5
+ width?: number;
6
+ height?: number;
7
+ alignment?: YouTubeAlignment;
8
+ caption?: string;
9
+ showCaption?: boolean;
10
+ }, SerializedLexicalNode>;
11
+ export declare class YouTubeNode extends DecoratorNode<HTMLElement> {
12
+ __videoID: string;
13
+ __width: 'inherit' | number;
14
+ __height: 'inherit' | number;
15
+ __alignment: YouTubeAlignment;
16
+ __caption: string;
17
+ __showCaption: boolean;
18
+ static getType(): string;
19
+ static clone(node: YouTubeNode): YouTubeNode;
20
+ static importJSON(serializedNode: SerializedYouTubeNode): YouTubeNode;
21
+ exportJSON(): SerializedYouTubeNode;
22
+ constructor(videoID: string, width?: 'inherit' | number, height?: 'inherit' | number, alignment?: YouTubeAlignment, caption?: string, showCaption?: boolean, key?: NodeKey);
23
+ createDOM(_config: EditorConfig): HTMLElement;
24
+ updateDOM(prevNode: YouTubeNode): boolean;
25
+ static importDOM(): DOMConversionMap | null;
26
+ exportDOM(): DOMExportOutput;
27
+ decorate(editor?: LexicalEditor): HTMLElement;
28
+ setWidthAndHeight(width: number | 'inherit', height: number | 'inherit'): void;
29
+ setAlignment(alignment: YouTubeAlignment): void;
30
+ setCaption(caption: string): void;
31
+ setShowCaption(show: boolean): void;
32
+ }
33
+ export declare function $createYouTubeNode(videoID: string): YouTubeNode;
34
+ export declare function $isYouTubeNode(node: LexicalNode | null | undefined): node is YouTubeNode;
@@ -0,0 +1,25 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ export interface Revision {
3
+ id: string;
4
+ timestamp: number;
5
+ name: string;
6
+ state: string;
7
+ }
8
+ export declare const RevisionHistory: {
9
+ /**
10
+ * Saves the current editor state as a new revision.
11
+ */
12
+ saveSnapshot: (editor: LexicalEditor, name: string) => Revision;
13
+ /**
14
+ * Retrieves all saved revisions from local storage.
15
+ */
16
+ getHistory: () => Revision[];
17
+ /**
18
+ * Restores a specific revision to the editor.
19
+ */
20
+ restoreSnapshot: (editor: LexicalEditor, revision: Revision) => void;
21
+ /**
22
+ * Clears all history.
23
+ */
24
+ clearHistory: () => void;
25
+ };
@@ -0,0 +1,2 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ export declare function setupRevisionHistoryUI(internalEditor: LexicalEditor): void;
@@ -0,0 +1,21 @@
1
+ import { TextNode, NodeKey, EditorConfig, SerializedTextNode, Spread } from 'lexical';
2
+ export type SuggestionType = 'insert' | 'delete' | 'format';
3
+ export type SerializedSuggestionNode = Spread<{
4
+ suggestionType: SuggestionType;
5
+ author: string;
6
+ timestamp: number;
7
+ }, SerializedTextNode>;
8
+ export declare class SuggestionNode extends TextNode {
9
+ __suggestionType: SuggestionType;
10
+ __author: string;
11
+ __timestamp: number;
12
+ static getType(): string;
13
+ static clone(node: SuggestionNode): SuggestionNode;
14
+ constructor(type: SuggestionType, author: string, text: string, key?: NodeKey);
15
+ getSuggestionType(): SuggestionType;
16
+ getAuthor(): string;
17
+ getTimestamp(): number;
18
+ createDOM(config: EditorConfig): HTMLElement;
19
+ static importJSON(serializedNode: SerializedSuggestionNode): SuggestionNode;
20
+ exportJSON(): SerializedSuggestionNode;
21
+ }
@@ -0,0 +1,8 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ import { EditorPlugin } from '../../core/registry';
3
+ export declare const TOGGLE_TRACK_CHANGES_COMMAND: LexicalCommand<void>;
4
+ export declare const ACCEPT_SUGGESTION_COMMAND: LexicalCommand<string>;
5
+ export declare const REJECT_SUGGESTION_COMMAND: LexicalCommand<string>;
6
+ export declare const TrackChangesPlugin: EditorPlugin;
7
+ export declare const isTrackingEnabled: () => boolean;
8
+ export declare const toggleTracking: () => boolean;
@@ -0,0 +1,11 @@
1
+ export declare const AccessibilityManager: {
2
+ /**
3
+ * Announces a message to screen readers via aria-live region.
4
+ */
5
+ announce: (message: string) => void;
6
+ /**
7
+ * Setup keyboard shortcuts overview (can be extended to a modal later)
8
+ */
9
+ setupKeyboardListeners: () => void;
10
+ init: () => void;
11
+ };
@@ -0,0 +1,66 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ export type SelectionContext = 'text' | 'image' | 'table' | 'code' | 'empty' | 'mixed';
3
+ export interface ContextualToolbarConfig {
4
+ context: SelectionContext;
5
+ tools: string[];
6
+ position?: 'top' | 'floating' | 'inline';
7
+ }
8
+ export declare class ContextAwareToolbar {
9
+ private editor;
10
+ private currentContext;
11
+ private floatingToolbar;
12
+ constructor(editor: LexicalEditor);
13
+ /**
14
+ * Initialize context-aware toolbar
15
+ */
16
+ private init;
17
+ /**
18
+ * Create floating toolbar element
19
+ */
20
+ private createFloatingToolbar;
21
+ /**
22
+ * Attach selection change listeners
23
+ */
24
+ private attachListeners;
25
+ /**
26
+ * Detect current selection context
27
+ */
28
+ private detectContext;
29
+ /**
30
+ * Update toolbar visibility based on context
31
+ */
32
+ private updateToolbarVisibility;
33
+ /**
34
+ * Check if tool should show in context
35
+ */
36
+ private shouldShowInContext;
37
+ /**
38
+ * Check if tool is contextual (requires specific selection)
39
+ */
40
+ private isContextualTool;
41
+ /**
42
+ * Show floating toolbar
43
+ */
44
+ private showFloatingToolbar;
45
+ /**
46
+ * Hide floating toolbar
47
+ */
48
+ private hideFloatingToolbar;
49
+ /**
50
+ * Populate floating toolbar with tools
51
+ */
52
+ private populateFloatingToolbar;
53
+ /**
54
+ * Get tool icon
55
+ */
56
+ private getToolIcon;
57
+ /**
58
+ * Execute tool command
59
+ */
60
+ private executeToolCommand;
61
+ /**
62
+ * Get current context
63
+ */
64
+ getCurrentContext(): SelectionContext;
65
+ }
66
+ export default ContextAwareToolbar;
@@ -0,0 +1,40 @@
1
+ export type TranslationKeys = {
2
+ undo: string;
3
+ redo: string;
4
+ clearFormatting: string;
5
+ bold: string;
6
+ italic: string;
7
+ underline: string;
8
+ strikethrough: string;
9
+ subscript: string;
10
+ superscript: string;
11
+ code: string;
12
+ h1: string;
13
+ h2: string;
14
+ paragraph: string;
15
+ bullets: string;
16
+ numbers: string;
17
+ link: string;
18
+ image: string;
19
+ table: string;
20
+ youtube: string;
21
+ htmlSnippet: string;
22
+ placeholders: string;
23
+ codeBlock: string;
24
+ pdf: string;
25
+ word: string;
26
+ importWord: string;
27
+ pageBreak: string;
28
+ footnote: string;
29
+ toc: string;
30
+ outline: string;
31
+ settings: string;
32
+ trackChanges: string;
33
+ };
34
+ export type LanguageCode = 'en' | 'ar' | 'es' | 'fr';
35
+ export declare const I18nManager: {
36
+ getLanguage: () => LanguageCode;
37
+ setLanguage: (lang: LanguageCode) => void;
38
+ applyLanguage: (lang: LanguageCode) => void;
39
+ init: () => void;
40
+ };
@@ -0,0 +1,73 @@
1
+ export type ToolbarItemType = 'button' | 'dropdown' | 'separator' | 'select' | 'custom';
2
+ export interface ToolbarItem {
3
+ id: string;
4
+ type: ToolbarItemType;
5
+ label?: string;
6
+ icon?: string;
7
+ tooltip?: string;
8
+ command?: string;
9
+ commandPayload?: string;
10
+ group?: string;
11
+ contextual?: boolean;
12
+ requiredSelection?: 'text' | 'image' | 'table' | 'code' | 'any';
13
+ children?: ToolbarItem[];
14
+ enabled?: boolean;
15
+ visible?: boolean;
16
+ order?: number;
17
+ }
18
+ export interface ToolbarGroup {
19
+ id: string;
20
+ items: ToolbarItem[];
21
+ }
22
+ export interface ToolbarPreset {
23
+ id: string;
24
+ name: string;
25
+ description: string;
26
+ items: string[];
27
+ }
28
+ export interface ToolbarConfig {
29
+ preset?: string;
30
+ customItems?: string[];
31
+ hiddenItems?: string[];
32
+ groups?: ToolbarGroup[];
33
+ overflow?: boolean;
34
+ responsive?: boolean;
35
+ }
36
+ export declare const TOOLBAR_ITEMS: Record<string, ToolbarItem>;
37
+ export declare const TOOLBAR_PRESETS: Record<string, ToolbarPreset>;
38
+ export declare class ToolbarConfigManager {
39
+ private static STORAGE_KEY;
40
+ private static currentConfig;
41
+ /**
42
+ * Get active configuration from storage or default
43
+ */
44
+ static getConfig(): ToolbarConfig;
45
+ /**
46
+ * Save configuration
47
+ */
48
+ static saveConfig(config: ToolbarConfig): void;
49
+ /**
50
+ * Apply a specific preset
51
+ */
52
+ static applyPreset(presetId: string): void;
53
+ /**
54
+ * Render the toolbar based on config
55
+ */
56
+ static applyConfig(config: ToolbarConfig): void;
57
+ /**
58
+ * Reset to default configuration
59
+ */
60
+ static resetToDefault(): void;
61
+ /**
62
+ * Get all available items
63
+ */
64
+ static getAvailableItems(): ToolbarItem[];
65
+ /**
66
+ * Get currently active items
67
+ */
68
+ static getActiveItems(): string[];
69
+ /**
70
+ * Render individual toolbar item
71
+ */
72
+ private static renderToolbarItem;
73
+ }
@@ -0,0 +1,73 @@
1
+ export declare class ToolbarCustomizationUI {
2
+ private modal;
3
+ private draggedItem;
4
+ /**
5
+ * Initialize the customization UI
6
+ */
7
+ init(): void;
8
+ /**
9
+ * Create the customization modal
10
+ */
11
+ private createModal;
12
+ /**
13
+ * Attach event listeners
14
+ */
15
+ private attachEventListeners;
16
+ /**
17
+ * Show the customization modal
18
+ */
19
+ show(): void;
20
+ /**
21
+ * Hide the customization modal
22
+ */
23
+ hide(): void;
24
+ /**
25
+ * Refresh the UI with current configuration
26
+ */
27
+ private refreshUI;
28
+ /**
29
+ * Update active preset button highlighting
30
+ */
31
+ private updatePresetHighlight;
32
+ /**
33
+ * Populate active tools list
34
+ */
35
+ private populateActiveTools;
36
+ /**
37
+ * Populate available tools by group
38
+ */
39
+ private populateAvailableTools;
40
+ /**
41
+ * Create a tool item element
42
+ */
43
+ private createToolItem;
44
+ /**
45
+ * Initialize drag and drop
46
+ */
47
+ private initializeDragAndDrop;
48
+ /**
49
+ * Get element after drag position
50
+ */
51
+ private getDragAfterElement;
52
+ /**
53
+ * Add item to active tools
54
+ */
55
+ private addToActive;
56
+ /**
57
+ * Remove item from active tools
58
+ */
59
+ private removeFromActive;
60
+ /**
61
+ * Apply a preset
62
+ */
63
+ private applyPreset;
64
+ /**
65
+ * Save current configuration
66
+ */
67
+ private saveConfiguration;
68
+ /**
69
+ * Filter tools by search query
70
+ */
71
+ private filterTools;
72
+ }
73
+ export declare const toolbarCustomizationUI: ToolbarCustomizationUI;