1 | export declare type EditorSchema<Nodes extends string = string, Marks extends string = string> = import('../model').Schema<Nodes, Marks>;
|
2 | export declare type EditorView<Schema extends EditorSchema = EditorSchema> = import('../view').EditorView<Schema>;
|
3 | export declare type Selection<Schema extends EditorSchema = EditorSchema> = import('../state').Selection<Schema>;
|
4 | export declare type DecorationSet<Schema extends EditorSchema = EditorSchema> = import('../view').DecorationSet<Schema>;
|
5 | export declare type Transaction<Schema extends EditorSchema = EditorSchema> = import('../state').Transaction<Schema>;
|
6 | export declare type PluginKey<PluginState = EditorSchema> = import('../state').PluginKey<PluginState, EditorSchema>;
|
7 | export declare type Mark<Schema extends EditorSchema = EditorSchema> = import('../model').Mark<Schema>;
|
8 | export declare type ResolvedPos<Schema extends EditorSchema = EditorSchema> = import('../model').ResolvedPos<Schema>;
|
9 | export declare type InputRule<Schema extends EditorSchema = EditorSchema> = import('../inputrules').InputRule<Schema>;
|
10 | export declare type Fragment<Schema extends EditorSchema = EditorSchema> = import('../model').Fragment<Schema>;
|
11 | export declare type NodeView<Schema extends EditorSchema = EditorSchema> = import('../view').NodeView<Schema>;
|
12 | export declare type ProsemirrorNode<Schema extends EditorSchema = EditorSchema> = import('../model').Node<Schema>;
|
13 | export declare type ProsemirrorPlugin<PluginState = any> = import('../state').Plugin<PluginState, EditorSchema>;
|
14 | export declare type MarkType<Schema extends EditorSchema = EditorSchema> = import('../model').MarkType<Schema>;
|
15 | export declare type NodeType<Schema extends EditorSchema = EditorSchema> = import('../model').NodeType<Schema>;
|
16 | export declare type EditorState<Schema extends EditorSchema = EditorSchema> = Readonly<import('../state').EditorState<Schema>>;
|
17 | export declare type Slice<Schema extends EditorSchema = EditorSchema> = import('../model').Slice<Schema>;
|
18 | export declare type Decoration = import('../view').Decoration;
|
19 | export declare type Mapping = import('../transform').Mapping;
|
20 | declare const _brand: unique symbol;
|
21 | interface Branding<Type> {
|
22 | readonly [_brand]: Type;
|
23 | }
|
24 | declare type Brand<Type, B> = Type & Branding<B>;
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare type NonChainableCommandFunction<Schema extends EditorSchema = EditorSchema, Extra extends object = object> = Brand<CommandFunction<Schema, Extra>, 'non-chainable'>;
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare type DispatchFunction<Schema extends EditorSchema = EditorSchema> = (tr: Transaction<Schema>) => void;
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | export declare type ProsemirrorCommandFunction<Schema extends EditorSchema = EditorSchema> = (state: EditorState<Schema>, dispatch: DispatchFunction<Schema> | undefined, view: EditorView<Schema> | undefined) => boolean;
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | export declare type CommandFunction<Schema extends EditorSchema = EditorSchema, ExtraProps extends object = object> = (params: CommandFunctionProps<Schema> & ExtraProps) => boolean;
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | export interface CommandFunctionProps<Schema extends EditorSchema = EditorSchema> {
|
82 | |
83 |
|
84 |
|
85 | tr: Transaction<Schema>;
|
86 | |
87 |
|
88 |
|
89 | state: EditorState<Schema>;
|
90 | |
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | dispatch?: DispatchFunction<Schema>;
|
100 | |
101 |
|
102 |
|
103 | view?: EditorView<Schema>;
|
104 | }
|
105 | export {};
|