@tiptap/extension-drag-handle-vue-2 3.26.1 → 3.27.1
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/index.d.cts +35 -36
- package/dist/index.d.ts +35 -36
- package/package.json +10 -7
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import * as vue from 'vue';
|
|
|
5
5
|
import { MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Node as Node$2, Slice, ParseOptions, Schema, ResolvedPos, Fragment } from '@tiptap/pm/model';
|
|
6
6
|
import { EditorState, Plugin, Transaction, PluginKey } from '@tiptap/pm/state';
|
|
7
7
|
import { NodeViewConstructor, NodeView, MarkViewConstructor, MarkView, EditorProps, EditorView } from '@tiptap/pm/view';
|
|
8
|
-
import {
|
|
8
|
+
import { MapResult, Transform } from '@tiptap/pm/transform';
|
|
9
9
|
import { NestedOptions, DragHandlePluginProps } from '@tiptap/extension-drag-handle';
|
|
10
10
|
|
|
11
11
|
type StringKeyOf<T> = Extract<keyof T, string>;
|
|
@@ -940,6 +940,36 @@ declare class Extendable<Options = any, Storage = any, Config = ExtensionConfig<
|
|
|
940
940
|
extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage> | NodeConfig<ExtendedOptions, ExtendedStorage> | MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: Partial<ExtendedConfig>): Extendable<ExtendedOptions, ExtendedStorage>;
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
+
interface ExtensionConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, ExtensionConfig<Options, Storage>, null> {
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* A class that represents a mappable position in the editor. It can be extended
|
|
948
|
+
* by other extensions to add additional position mapping capabilities.
|
|
949
|
+
*/
|
|
950
|
+
declare class MappablePosition {
|
|
951
|
+
/**
|
|
952
|
+
* The absolute position in the editor.
|
|
953
|
+
*/
|
|
954
|
+
position: number;
|
|
955
|
+
constructor(position: number);
|
|
956
|
+
/**
|
|
957
|
+
* Creates a MappablePosition from a JSON object.
|
|
958
|
+
*/
|
|
959
|
+
static fromJSON(json: any): MappablePosition;
|
|
960
|
+
/**
|
|
961
|
+
* Converts the MappablePosition to a JSON object.
|
|
962
|
+
*/
|
|
963
|
+
toJSON(): any;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* The result of the getUpdatedPosition function.
|
|
967
|
+
*/
|
|
968
|
+
interface GetUpdatedPositionResult {
|
|
969
|
+
position: MappablePosition;
|
|
970
|
+
mapResult: MapResult | null;
|
|
971
|
+
}
|
|
972
|
+
|
|
943
973
|
type AnyExtension = Extendable;
|
|
944
974
|
type Extensions = AnyExtension[];
|
|
945
975
|
type ParentConfig<T> = Partial<{
|
|
@@ -1759,6 +1789,10 @@ type Utils = {
|
|
|
1759
1789
|
*/
|
|
1760
1790
|
createMappablePosition: (position: number) => MappablePosition;
|
|
1761
1791
|
};
|
|
1792
|
+
interface Commands<ReturnType = any> {
|
|
1793
|
+
}
|
|
1794
|
+
interface Storage {
|
|
1795
|
+
}
|
|
1762
1796
|
|
|
1763
1797
|
/**
|
|
1764
1798
|
* Create a flattened array of extensions by traversing the `addExtensions` field.
|
|
@@ -1767,36 +1801,6 @@ type Utils = {
|
|
|
1767
1801
|
*/
|
|
1768
1802
|
declare function flattenExtensions(extensions: Extensions): Extensions;
|
|
1769
1803
|
|
|
1770
|
-
interface ExtensionConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, ExtensionConfig<Options, Storage>, null> {
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* A class that represents a mappable position in the editor. It can be extended
|
|
1775
|
-
* by other extensions to add additional position mapping capabilities.
|
|
1776
|
-
*/
|
|
1777
|
-
declare class MappablePosition {
|
|
1778
|
-
/**
|
|
1779
|
-
* The absolute position in the editor.
|
|
1780
|
-
*/
|
|
1781
|
-
position: number;
|
|
1782
|
-
constructor(position: number);
|
|
1783
|
-
/**
|
|
1784
|
-
* Creates a MappablePosition from a JSON object.
|
|
1785
|
-
*/
|
|
1786
|
-
static fromJSON(json: any): MappablePosition;
|
|
1787
|
-
/**
|
|
1788
|
-
* Converts the MappablePosition to a JSON object.
|
|
1789
|
-
*/
|
|
1790
|
-
toJSON(): any;
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* The result of the getUpdatedPosition function.
|
|
1794
|
-
*/
|
|
1795
|
-
interface GetUpdatedPositionResult {
|
|
1796
|
-
position: MappablePosition;
|
|
1797
|
-
mapResult: MapResult | null;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
1804
|
/**
|
|
1801
1805
|
* Returns a flattened and sorted extension list while
|
|
1802
1806
|
* also checking for duplicated extensions and warns the user.
|
|
@@ -3021,11 +3025,6 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
3021
3025
|
utils: Utils;
|
|
3022
3026
|
}
|
|
3023
3027
|
|
|
3024
|
-
interface Commands<ReturnType = any> {
|
|
3025
|
-
}
|
|
3026
|
-
interface Storage {
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
3028
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
3030
3029
|
type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element' | 'nestedOptions'> & {
|
|
3031
3030
|
class?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as vue from 'vue';
|
|
|
5
5
|
import { MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Node as Node$2, Slice, ParseOptions, Schema, ResolvedPos, Fragment } from '@tiptap/pm/model';
|
|
6
6
|
import { EditorState, Plugin, Transaction, PluginKey } from '@tiptap/pm/state';
|
|
7
7
|
import { NodeViewConstructor, NodeView, MarkViewConstructor, MarkView, EditorProps, EditorView } from '@tiptap/pm/view';
|
|
8
|
-
import {
|
|
8
|
+
import { MapResult, Transform } from '@tiptap/pm/transform';
|
|
9
9
|
import { NestedOptions, DragHandlePluginProps } from '@tiptap/extension-drag-handle';
|
|
10
10
|
|
|
11
11
|
type StringKeyOf<T> = Extract<keyof T, string>;
|
|
@@ -940,6 +940,36 @@ declare class Extendable<Options = any, Storage = any, Config = ExtensionConfig<
|
|
|
940
940
|
extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage> | NodeConfig<ExtendedOptions, ExtendedStorage> | MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: Partial<ExtendedConfig>): Extendable<ExtendedOptions, ExtendedStorage>;
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
+
interface ExtensionConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, ExtensionConfig<Options, Storage>, null> {
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* A class that represents a mappable position in the editor. It can be extended
|
|
948
|
+
* by other extensions to add additional position mapping capabilities.
|
|
949
|
+
*/
|
|
950
|
+
declare class MappablePosition {
|
|
951
|
+
/**
|
|
952
|
+
* The absolute position in the editor.
|
|
953
|
+
*/
|
|
954
|
+
position: number;
|
|
955
|
+
constructor(position: number);
|
|
956
|
+
/**
|
|
957
|
+
* Creates a MappablePosition from a JSON object.
|
|
958
|
+
*/
|
|
959
|
+
static fromJSON(json: any): MappablePosition;
|
|
960
|
+
/**
|
|
961
|
+
* Converts the MappablePosition to a JSON object.
|
|
962
|
+
*/
|
|
963
|
+
toJSON(): any;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* The result of the getUpdatedPosition function.
|
|
967
|
+
*/
|
|
968
|
+
interface GetUpdatedPositionResult {
|
|
969
|
+
position: MappablePosition;
|
|
970
|
+
mapResult: MapResult | null;
|
|
971
|
+
}
|
|
972
|
+
|
|
943
973
|
type AnyExtension = Extendable;
|
|
944
974
|
type Extensions = AnyExtension[];
|
|
945
975
|
type ParentConfig<T> = Partial<{
|
|
@@ -1759,6 +1789,10 @@ type Utils = {
|
|
|
1759
1789
|
*/
|
|
1760
1790
|
createMappablePosition: (position: number) => MappablePosition;
|
|
1761
1791
|
};
|
|
1792
|
+
interface Commands<ReturnType = any> {
|
|
1793
|
+
}
|
|
1794
|
+
interface Storage {
|
|
1795
|
+
}
|
|
1762
1796
|
|
|
1763
1797
|
/**
|
|
1764
1798
|
* Create a flattened array of extensions by traversing the `addExtensions` field.
|
|
@@ -1767,36 +1801,6 @@ type Utils = {
|
|
|
1767
1801
|
*/
|
|
1768
1802
|
declare function flattenExtensions(extensions: Extensions): Extensions;
|
|
1769
1803
|
|
|
1770
|
-
interface ExtensionConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, ExtensionConfig<Options, Storage>, null> {
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* A class that represents a mappable position in the editor. It can be extended
|
|
1775
|
-
* by other extensions to add additional position mapping capabilities.
|
|
1776
|
-
*/
|
|
1777
|
-
declare class MappablePosition {
|
|
1778
|
-
/**
|
|
1779
|
-
* The absolute position in the editor.
|
|
1780
|
-
*/
|
|
1781
|
-
position: number;
|
|
1782
|
-
constructor(position: number);
|
|
1783
|
-
/**
|
|
1784
|
-
* Creates a MappablePosition from a JSON object.
|
|
1785
|
-
*/
|
|
1786
|
-
static fromJSON(json: any): MappablePosition;
|
|
1787
|
-
/**
|
|
1788
|
-
* Converts the MappablePosition to a JSON object.
|
|
1789
|
-
*/
|
|
1790
|
-
toJSON(): any;
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* The result of the getUpdatedPosition function.
|
|
1794
|
-
*/
|
|
1795
|
-
interface GetUpdatedPositionResult {
|
|
1796
|
-
position: MappablePosition;
|
|
1797
|
-
mapResult: MapResult | null;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
1804
|
/**
|
|
1801
1805
|
* Returns a flattened and sorted extension list while
|
|
1802
1806
|
* also checking for duplicated extensions and warns the user.
|
|
@@ -3021,11 +3025,6 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
3021
3025
|
utils: Utils;
|
|
3022
3026
|
}
|
|
3023
3027
|
|
|
3024
|
-
interface Commands<ReturnType = any> {
|
|
3025
|
-
}
|
|
3026
|
-
interface Storage {
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
3028
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
3030
3029
|
type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element' | 'nestedOptions'> & {
|
|
3031
3030
|
class?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-drag-handle-vue-2",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.27.1",
|
|
4
4
|
"description": "drag handle extension for tiptap with vue 2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tiptap",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"url": "https://github.com/ueberdosis/tiptap",
|
|
14
14
|
"directory": "packages/extension-drag-handle-vue-2"
|
|
15
15
|
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/ueberdosis/tiptap/issues"
|
|
18
|
+
},
|
|
16
19
|
"funding": {
|
|
17
20
|
"type": "github",
|
|
18
21
|
"url": "https://github.com/sponsors/ueberdosis"
|
|
@@ -38,15 +41,15 @@
|
|
|
38
41
|
"devDependencies": {
|
|
39
42
|
"vue": "^2.0.0",
|
|
40
43
|
"vue-ts-types": "1.6.2",
|
|
41
|
-
"@tiptap/pm": "^3.
|
|
42
|
-
"@tiptap/
|
|
43
|
-
"@tiptap/
|
|
44
|
+
"@tiptap/pm": "^3.27.1",
|
|
45
|
+
"@tiptap/vue-2": "^3.27.1",
|
|
46
|
+
"@tiptap/extension-drag-handle": "^3.27.1"
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|
|
46
49
|
"vue": "^2.0.0",
|
|
47
|
-
"@tiptap/
|
|
48
|
-
"@tiptap/
|
|
49
|
-
"@tiptap/
|
|
50
|
+
"@tiptap/pm": "3.27.1",
|
|
51
|
+
"@tiptap/extension-drag-handle": "3.27.1",
|
|
52
|
+
"@tiptap/vue-2": "3.27.1"
|
|
50
53
|
},
|
|
51
54
|
"scripts": {
|
|
52
55
|
"build": "tsup"
|