@kerebron/extension-menu 0.4.26 → 0.4.27

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.
@@ -1,61 +0,0 @@
1
- import { EditorState, Plugin } from 'prosemirror-state';
2
- import { EditorView } from 'prosemirror-view';
3
- import type { CoreEditor } from '@kerebron/editor';
4
- import { CustomMenuOptions } from './ExtensionCustomMenu.js';
5
- import type { MenuElement } from './menu.js';
6
- interface ToolItem {
7
- id: string;
8
- label: string;
9
- element: MenuElement;
10
- isPinned: boolean;
11
- }
12
- export declare class CustomMenuView {
13
- readonly editorView: EditorView;
14
- readonly editor: CoreEditor;
15
- readonly content: readonly (readonly MenuElement[])[];
16
- wrapper: HTMLElement;
17
- toolbar: HTMLElement;
18
- overflowMenu: HTMLElement;
19
- pinnedDropdownMenu: HTMLElement | null;
20
- modal: HTMLElement | null;
21
- tools: ToolItem[];
22
- root: Document | ShadowRoot;
23
- resizeHandle: HTMLElement;
24
- editorContainer: HTMLElement;
25
- private closeOverflowHandler;
26
- private closePinnedDropdownHandler;
27
- private submenuStack;
28
- private pinnedDropdownStack;
29
- constructor(editorView: EditorView, editor: CoreEditor, content: readonly (readonly MenuElement[])[]);
30
- private initializeTools;
31
- /**
32
- * Generate a stable ID from a label by converting it to a kebab-case slug.
33
- * Falls back to a hash if the label is empty or contains only special characters.
34
- */
35
- private generateStableId;
36
- /**
37
- * Simple hash function for generating stable IDs from strings.
38
- */
39
- private simpleHash;
40
- private extractLabel;
41
- private loadPinnedState;
42
- private savePinnedState;
43
- private showSubmenu;
44
- private goBack;
45
- private showPinnedDropdown;
46
- private pinnedDropdownGoBack;
47
- private pinnedDropdownShowSubmenu;
48
- private renderPinnedDropdown;
49
- private renderOverflowMenu;
50
- private render;
51
- private openManageModal;
52
- private updateModalState;
53
- private setupResize;
54
- update(view: EditorView, prevState: EditorState): void;
55
- destroy(): void;
56
- }
57
- export declare class CustomMenuPlugin extends Plugin {
58
- constructor(editor: CoreEditor, options: CustomMenuOptions);
59
- }
60
- export {};
61
- //# sourceMappingURL=CustomMenuPlugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomMenuPlugin.d.ts","sourceRoot":"","sources":["../src/CustomMenuPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQ7C,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,cAAc;IAkBvB,QAAQ,CAAC,UAAU,EAAE,UAAU;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE;IAnBvD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,WAAW,CAAC;IAC1B,kBAAkB,EAAE,WAAW,GAAG,IAAI,CAAQ;IAC9C,KAAK,EAAE,WAAW,GAAG,IAAI,CAAQ;IACjC,KAAK,EAAE,QAAQ,EAAE,CAAM;IACvB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC5B,YAAY,EAAE,WAAW,CAAC;IAC1B,eAAe,EAAE,WAAW,CAAC;IAC7B,OAAO,CAAC,oBAAoB,CAA0C;IACtE,OAAO,CAAC,0BAA0B,CAA0C;IAC5E,OAAO,CAAC,YAAY,CAAmD;IACvE,OAAO,CAAC,mBAAmB,C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