oasis-editor 0.0.39 → 0.0.41
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/dist/{OasisEditorApp-rHCQJW6I.js → OasisEditorApp-C9aMLBum.js} +51 -17
- package/dist/{index-XgdC48U9.js → index-CEIWNJ4A.js} +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +3 -3
- package/dist/ui/app/createEditorTableContextMenuActions.d.ts +20 -0
- package/dist/ui/app/useEditorContextMenuClipboard.d.ts +23 -17
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EditorState } from '../../core/model.js';
|
|
2
|
+
import { createEditorTableOperations } from '../../app/controllers/useEditorTableOperations.js';
|
|
3
|
+
import { EditorTableContextMenuActions } from './useEditorContextMenuClipboard.js';
|
|
4
|
+
|
|
5
|
+
type EditorTableOperations = ReturnType<typeof createEditorTableOperations>;
|
|
6
|
+
export interface EditorTableContextMenuActionsDeps {
|
|
7
|
+
state: () => EditorState;
|
|
8
|
+
tableOps: EditorTableOperations;
|
|
9
|
+
isInsideTable: () => boolean;
|
|
10
|
+
openTablePropertiesDialog: (tab: "table" | "cell") => void;
|
|
11
|
+
applyTableContextCommand: (producer: (current: EditorState) => EditorState, mergeKey: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Adapts the table operations + properties dialog into the flat action surface
|
|
15
|
+
* the context menu consumes. Pure callback wiring extracted from
|
|
16
|
+
* `OasisEditorApp` so the composition root stays free of per-feature operation
|
|
17
|
+
* mapping (S1).
|
|
18
|
+
*/
|
|
19
|
+
export declare function createEditorTableContextMenuActions(deps: EditorTableContextMenuActionsDeps): EditorTableContextMenuActions;
|
|
20
|
+
export {};
|
|
@@ -24,23 +24,29 @@ export interface EditorContextMenuClipboardDeps {
|
|
|
24
24
|
promptForLink: () => void;
|
|
25
25
|
openFontDialog: () => void;
|
|
26
26
|
openParagraphDialog: () => void;
|
|
27
|
-
table?:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
table?: EditorTableContextMenuActions;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The table-aware actions the context menu invokes when the selection is inside
|
|
31
|
+
* a table. Built by `createEditorTableContextMenuActions` from the table
|
|
32
|
+
* operations and dialog openers.
|
|
33
|
+
*/
|
|
34
|
+
export interface EditorTableContextMenuActions {
|
|
35
|
+
isInsideTable: () => boolean;
|
|
36
|
+
canMerge: () => boolean;
|
|
37
|
+
canSplit: () => boolean;
|
|
38
|
+
canEditColumn: () => boolean;
|
|
39
|
+
canEditRow: () => boolean;
|
|
40
|
+
openProperties: () => void;
|
|
41
|
+
openBordersAndShading: () => void;
|
|
42
|
+
merge: () => void;
|
|
43
|
+
split: () => void;
|
|
44
|
+
insertColumnBefore: () => void;
|
|
45
|
+
insertColumnAfter: () => void;
|
|
46
|
+
deleteColumn: () => void;
|
|
47
|
+
insertRowBefore: () => void;
|
|
48
|
+
insertRowAfter: () => void;
|
|
49
|
+
deleteRow: () => void;
|
|
44
50
|
}
|
|
45
51
|
export declare function createEditorContextMenuClipboard(deps: EditorContextMenuClipboardDeps): {
|
|
46
52
|
buildContextMenuItems: () => ContextMenuItem[];
|