@tiptap/extension-drag-handle-vue-2 2.24.1 → 3.0.0-beta.10

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.js CHANGED
@@ -1,51 +1,66 @@
1
- import { dragHandlePluginDefaultKey, DragHandlePlugin } from '@tiptap/extension-drag-handle';
2
- import Vue from 'vue';
3
-
4
- const DragHandle = Vue.extend({
5
- name: 'DragHandleVue',
6
- props: {
7
- pluginKey: {
8
- type: [String, Object],
9
- default: dragHandlePluginDefaultKey,
10
- },
11
- editor: {
12
- type: Object,
13
- required: true,
14
- },
15
- tippyOptions: {
16
- type: Object,
17
- default: () => ({}),
18
- },
19
- onNodeChange: {
20
- type: Function,
21
- default: null,
22
- },
23
- class: {
24
- type: String,
25
- default: 'drag-handle',
26
- },
1
+ // src/DragHandle.ts
2
+ import {
3
+ defaultComputePositionConfig,
4
+ DragHandlePlugin,
5
+ dragHandlePluginDefaultKey
6
+ } from "@tiptap/extension-drag-handle";
7
+ import Vue from "vue";
8
+ var DragHandle = Vue.extend({
9
+ name: "DragHandleVue",
10
+ props: {
11
+ pluginKey: {
12
+ type: [String, Object],
13
+ default: dragHandlePluginDefaultKey
27
14
  },
28
- mounted() {
29
- const { editor, pluginKey, onNodeChange, tippyOptions, } = this.$props;
30
- editor.registerPlugin(DragHandlePlugin({
31
- editor,
32
- element: this.$el,
33
- pluginKey,
34
- tippyOptions,
35
- onNodeChange,
36
- }));
15
+ editor: {
16
+ type: Object,
17
+ required: true
37
18
  },
38
- // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
39
- beforeDestroy() {
40
- const { pluginKey, editor } = this.$props;
41
- editor.unregisterPlugin(pluginKey);
19
+ computePositionConfig: {
20
+ type: Object,
21
+ default: () => ({})
42
22
  },
43
- render(h) {
44
- return h('div', {
45
- class: this.class,
46
- }, this.$slots.default);
23
+ onNodeChange: {
24
+ type: Function,
25
+ default: null
47
26
  },
27
+ class: {
28
+ type: String,
29
+ default: "drag-handle"
30
+ }
31
+ },
32
+ mounted() {
33
+ const { editor, pluginKey, onNodeChange } = this.$props;
34
+ editor.registerPlugin(
35
+ DragHandlePlugin({
36
+ editor,
37
+ element: this.$el,
38
+ pluginKey,
39
+ computePositionConfig: { ...defaultComputePositionConfig, ...this.computePositionConfig },
40
+ onNodeChange
41
+ }).plugin
42
+ );
43
+ },
44
+ // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
45
+ beforeDestroy() {
46
+ const { pluginKey, editor } = this.$props;
47
+ editor.unregisterPlugin(pluginKey);
48
+ },
49
+ render(h) {
50
+ return h(
51
+ "div",
52
+ {
53
+ class: this.class
54
+ },
55
+ this.$slots.default
56
+ );
57
+ }
48
58
  });
49
59
 
50
- export { DragHandle, DragHandle as default };
51
- //# sourceMappingURL=index.js.map
60
+ // src/index.ts
61
+ var index_default = DragHandle;
62
+ export {
63
+ DragHandle,
64
+ index_default as default
65
+ };
66
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/DragHandle.ts"],"sourcesContent":["import { Editor } from '@tiptap/core'\nimport {\n DragHandlePlugin,\n dragHandlePluginDefaultKey,\n DragHandlePluginProps,\n} from '@tiptap/extension-drag-handle'\nimport Vue, { PropType } from 'vue'\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element'> & {\n class?: string;\n onNodeChange?: (data: { node: Node | null; editor: Editor; pos: number }) => void;\n};\n\nexport const DragHandle = Vue.extend({\n name: 'DragHandleVue',\n\n props: {\n pluginKey: {\n type: [String, Object] as PropType<DragHandleProps['pluginKey']>,\n default: dragHandlePluginDefaultKey,\n },\n\n editor: {\n type: Object as PropType<DragHandleProps['editor']>,\n required: true,\n },\n\n tippyOptions: {\n type: Object as PropType<DragHandleProps['tippyOptions']>,\n default: () => ({}),\n },\n\n onNodeChange: {\n type: Function as PropType<DragHandleProps['onNodeChange']>,\n default: null,\n },\n\n class: {\n type: String as PropType<DragHandleProps['class']>,\n default: 'drag-handle',\n },\n },\n\n mounted() {\n const {\n editor,\n pluginKey,\n onNodeChange,\n tippyOptions,\n } = this.$props\n\n editor.registerPlugin(DragHandlePlugin({\n editor,\n element: this.$el as HTMLElement,\n pluginKey,\n tippyOptions,\n onNodeChange,\n }))\n },\n\n // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle\n beforeDestroy() {\n const { pluginKey, editor } = this.$props\n\n editor.unregisterPlugin(pluginKey as string)\n },\n\n render(h) {\n return h('div', {\n class: this.class,\n }, this.$slots.default)\n },\n})\n"],"names":[],"mappings":";;;AAea,MAAA,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC;AACnC,IAAA,IAAI,EAAE,eAAe;AAErB,IAAA,KAAK,EAAE;AACL,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAA2C;AAChE,YAAA,OAAO,EAAE,0BAA0B;AACpC,SAAA;AAED,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA6C;AACnD,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AAED,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAAmD;AACzD,YAAA,OAAO,EAAE,OAAO,EAAE,CAAC;AACpB,SAAA;AAED,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,QAAqD;AAC3D,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AAED,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA4C;AAClD,YAAA,OAAO,EAAE,aAAa;AACvB,SAAA;AACF,KAAA;IAED,OAAO,GAAA;AACL,QAAA,MAAM,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,YAAY,GACb,GAAG,IAAI,CAAC,MAAM;AAEf,QAAA,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC;YACrC,MAAM;YACN,OAAO,EAAE,IAAI,CAAC,GAAkB;YAChC,SAAS;YACT,YAAY;YACZ,YAAY;AACb,SAAA,CAAC,CAAC;KACJ;;IAGD,aAAa,GAAA;QACX,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM;AAEzC,QAAA,MAAM,CAAC,gBAAgB,CAAC,SAAmB,CAAC;KAC7C;AAED,IAAA,MAAM,CAAC,CAAC,EAAA;QACN,OAAO,CAAC,CAAC,KAAK,EAAE;YACd,KAAK,EAAE,IAAI,CAAC,KAAK;AAClB,SAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;KACxB;AACF,CAAA;;;;"}
1
+ {"version":3,"sources":["../src/DragHandle.ts","../src/index.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport {\n type DragHandlePluginProps,\n defaultComputePositionConfig,\n DragHandlePlugin,\n dragHandlePluginDefaultKey,\n} from '@tiptap/extension-drag-handle'\nimport Vue, { type PropType } from 'vue'\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>\n\nexport type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element'> & {\n class?: string\n onNodeChange?: (data: { node: Node | null; editor: Editor; pos: number }) => void\n}\n\nexport const DragHandle = Vue.extend({\n name: 'DragHandleVue',\n\n props: {\n pluginKey: {\n type: [String, Object] as PropType<DragHandleProps['pluginKey']>,\n default: dragHandlePluginDefaultKey,\n },\n\n editor: {\n type: Object as PropType<DragHandleProps['editor']>,\n required: true,\n },\n\n computePositionConfig: {\n type: Object as PropType<DragHandleProps['computePositionConfig']>,\n default: () => ({}),\n },\n\n onNodeChange: {\n type: Function as PropType<DragHandleProps['onNodeChange']>,\n default: null,\n },\n\n class: {\n type: String as PropType<DragHandleProps['class']>,\n default: 'drag-handle',\n },\n },\n\n mounted() {\n const { editor, pluginKey, onNodeChange } = this.$props\n\n editor.registerPlugin(\n DragHandlePlugin({\n editor,\n element: this.$el as HTMLElement,\n pluginKey,\n computePositionConfig: { ...defaultComputePositionConfig, ...this.computePositionConfig },\n onNodeChange,\n }).plugin,\n )\n },\n\n // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle\n beforeDestroy() {\n const { pluginKey, editor } = this.$props\n\n editor.unregisterPlugin(pluginKey as string)\n },\n\n render(h) {\n return h(\n 'div',\n {\n class: this.class,\n },\n this.$slots.default,\n )\n },\n})\n","import { DragHandle } from './DragHandle.js'\n\nexport * from './DragHandle.js'\n\nexport default DragHandle\n"],"mappings":";AACA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,SAA4B;AAS5B,IAAM,aAAa,IAAI,OAAO;AAAA,EACnC,MAAM;AAAA,EAEN,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACX;AAAA,IAEA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IAEA,uBAAuB;AAAA,MACrB,MAAM;AAAA,MACN,SAAS,OAAO,CAAC;AAAA,IACnB;AAAA,IAEA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IAEA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,UAAU;AACR,UAAM,EAAE,QAAQ,WAAW,aAAa,IAAI,KAAK;AAEjD,WAAO;AAAA,MACL,iBAAiB;AAAA,QACf;AAAA,QACA,SAAS,KAAK;AAAA,QACd;AAAA,QACA,uBAAuB,EAAE,GAAG,8BAA8B,GAAG,KAAK,sBAAsB;AAAA,QACxF;AAAA,MACF,CAAC,EAAE;AAAA,IACL;AAAA,EACF;AAAA;AAAA,EAGA,gBAAgB;AACd,UAAM,EAAE,WAAW,OAAO,IAAI,KAAK;AAEnC,WAAO,iBAAiB,SAAmB;AAAA,EAC7C;AAAA,EAEA,OAAO,GAAG;AACR,WAAO;AAAA,MACL;AAAA,MACA;AAAA,QACE,OAAO,KAAK;AAAA,MACd;AAAA,MACA,KAAK,OAAO;AAAA,IACd;AAAA,EACF;AACF,CAAC;;;ACxED,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-drag-handle-vue-2",
3
3
  "description": "drag handle extension for tiptap with vue 2",
4
- "version": "2.24.1",
4
+ "version": "3.0.0-beta.10",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -20,34 +20,36 @@
20
20
  "type": "module",
21
21
  "exports": {
22
22
  ".": {
23
- "types": "./dist/index.d.ts",
23
+ "types": {
24
+ "import": "./dist/index.d.ts",
25
+ "require": "./dist/index.d.cts"
26
+ },
24
27
  "import": "./dist/index.js",
25
28
  "require": "./dist/index.cjs"
26
29
  }
27
30
  },
28
31
  "main": "dist/index.cjs",
29
32
  "module": "dist/index.js",
30
- "umd": "dist/index.umd.js",
31
33
  "types": "dist/index.d.ts",
32
34
  "files": [
33
35
  "src",
34
36
  "dist"
35
37
  ],
36
38
  "peerDependencies": {
37
- "@tiptap/extension-drag-handle": "^2.14.0",
38
- "@tiptap/pm": "^2.7.0",
39
- "@tiptap/vue-2": "^2.7.0",
40
- "vue": "^2.0.0"
39
+ "vue": "^2.0.0",
40
+ "@tiptap/vue-2": "3.0.0-beta.10",
41
+ "@tiptap/extension-drag-handle": "3.0.0-beta.10",
42
+ "@tiptap/pm": "3.0.0-beta.10"
41
43
  },
42
44
  "devDependencies": {
43
- "@tiptap/extension-drag-handle": "^2.24.1",
44
- "@tiptap/pm": "^2.24.1",
45
- "@tiptap/vue-2": "^2.24.1",
46
45
  "vue": "^2.0.0",
47
- "vue-ts-types": "1.6.2"
46
+ "vue-ts-types": "1.6.2",
47
+ "@tiptap/extension-drag-handle": "3.0.0-beta.10",
48
+ "@tiptap/pm": "3.0.0-beta.10",
49
+ "@tiptap/vue-2": "3.0.0-beta.10"
48
50
  },
49
51
  "scripts": {
50
- "clean": "rm -rf dist",
51
- "build": "npm run clean && rollup -c"
52
+ "build": "tsup",
53
+ "lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
52
54
  }
53
- }
55
+ }
package/src/DragHandle.ts CHANGED
@@ -1,17 +1,18 @@
1
- import { Editor } from '@tiptap/core'
1
+ import type { Editor } from '@tiptap/core'
2
2
  import {
3
+ type DragHandlePluginProps,
4
+ defaultComputePositionConfig,
3
5
  DragHandlePlugin,
4
6
  dragHandlePluginDefaultKey,
5
- DragHandlePluginProps,
6
7
  } from '@tiptap/extension-drag-handle'
7
- import Vue, { PropType } from 'vue'
8
+ import Vue, { type PropType } from 'vue'
8
9
 
9
- type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
10
+ type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>
10
11
 
11
12
  export type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element'> & {
12
- class?: string;
13
- onNodeChange?: (data: { node: Node | null; editor: Editor; pos: number }) => void;
14
- };
13
+ class?: string
14
+ onNodeChange?: (data: { node: Node | null; editor: Editor; pos: number }) => void
15
+ }
15
16
 
16
17
  export const DragHandle = Vue.extend({
17
18
  name: 'DragHandleVue',
@@ -27,8 +28,8 @@ export const DragHandle = Vue.extend({
27
28
  required: true,
28
29
  },
29
30
 
30
- tippyOptions: {
31
- type: Object as PropType<DragHandleProps['tippyOptions']>,
31
+ computePositionConfig: {
32
+ type: Object as PropType<DragHandleProps['computePositionConfig']>,
32
33
  default: () => ({}),
33
34
  },
34
35
 
@@ -44,20 +45,17 @@ export const DragHandle = Vue.extend({
44
45
  },
45
46
 
46
47
  mounted() {
47
- const {
48
- editor,
49
- pluginKey,
50
- onNodeChange,
51
- tippyOptions,
52
- } = this.$props
48
+ const { editor, pluginKey, onNodeChange } = this.$props
53
49
 
54
- editor.registerPlugin(DragHandlePlugin({
55
- editor,
56
- element: this.$el as HTMLElement,
57
- pluginKey,
58
- tippyOptions,
59
- onNodeChange,
60
- }))
50
+ editor.registerPlugin(
51
+ DragHandlePlugin({
52
+ editor,
53
+ element: this.$el as HTMLElement,
54
+ pluginKey,
55
+ computePositionConfig: { ...defaultComputePositionConfig, ...this.computePositionConfig },
56
+ onNodeChange,
57
+ }).plugin,
58
+ )
61
59
  },
62
60
 
63
61
  // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
@@ -68,8 +66,12 @@ export const DragHandle = Vue.extend({
68
66
  },
69
67
 
70
68
  render(h) {
71
- return h('div', {
72
- class: this.class,
73
- }, this.$slots.default)
69
+ return h(
70
+ 'div',
71
+ {
72
+ class: this.class,
73
+ },
74
+ this.$slots.default,
75
+ )
74
76
  },
75
77
  })
@@ -1,29 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- import { DragHandlePluginProps } from '@tiptap/extension-drag-handle';
3
- import Vue from 'vue';
4
- type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
5
- export type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element'> & {
6
- class?: string;
7
- onNodeChange?: (data: {
8
- node: Node | null;
9
- editor: Editor;
10
- pos: number;
11
- }) => void;
12
- };
13
- export declare const DragHandle: import("vue/types/vue").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue>, unknown, unknown, unknown, {
14
- pluginKey: string | import("prosemirror-state").PluginKey<any> | undefined;
15
- editor: Editor;
16
- tippyOptions: {} | undefined;
17
- onNodeChange: (((data: {
18
- editor: Editor;
19
- node: import("prosemirror-model").Node | null;
20
- pos: number;
21
- }) => void) & ((data: {
22
- node: Node | null;
23
- editor: Editor;
24
- pos: number;
25
- }) => void)) | undefined;
26
- class: string | undefined;
27
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin>;
28
- export {};
29
- //# sourceMappingURL=DragHandle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DragHandle.d.ts","sourceRoot":"","sources":["../src/DragHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,+BAA+B,CAAA;AACtC,OAAO,GAAiB,MAAM,KAAK,CAAA;AAEnC,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,GAAG;IAC5F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACnF,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;0BAHC;QAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;gFA8DjF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,cAAc,iBAAiB,CAAA;AAE/B,eAAe,UAAU,CAAA"}
package/dist/index.umd.js DELETED
@@ -1,59 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/extension-drag-handle'), require('vue')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@tiptap/extension-drag-handle', 'vue'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-drag-handle-vue-2"] = {}, global.extensionDragHandle, global.Vue));
5
- })(this, (function (exports, extensionDragHandle, Vue) { 'use strict';
6
-
7
- const DragHandle = Vue.extend({
8
- name: 'DragHandleVue',
9
- props: {
10
- pluginKey: {
11
- type: [String, Object],
12
- default: extensionDragHandle.dragHandlePluginDefaultKey,
13
- },
14
- editor: {
15
- type: Object,
16
- required: true,
17
- },
18
- tippyOptions: {
19
- type: Object,
20
- default: () => ({}),
21
- },
22
- onNodeChange: {
23
- type: Function,
24
- default: null,
25
- },
26
- class: {
27
- type: String,
28
- default: 'drag-handle',
29
- },
30
- },
31
- mounted() {
32
- const { editor, pluginKey, onNodeChange, tippyOptions, } = this.$props;
33
- editor.registerPlugin(extensionDragHandle.DragHandlePlugin({
34
- editor,
35
- element: this.$el,
36
- pluginKey,
37
- tippyOptions,
38
- onNodeChange,
39
- }));
40
- },
41
- // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
42
- beforeDestroy() {
43
- const { pluginKey, editor } = this.$props;
44
- editor.unregisterPlugin(pluginKey);
45
- },
46
- render(h) {
47
- return h('div', {
48
- class: this.class,
49
- }, this.$slots.default);
50
- },
51
- });
52
-
53
- exports.DragHandle = DragHandle;
54
- exports.default = DragHandle;
55
-
56
- Object.defineProperty(exports, '__esModule', { value: true });
57
-
58
- }));
59
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/DragHandle.ts"],"sourcesContent":["import { Editor } from '@tiptap/core'\nimport {\n DragHandlePlugin,\n dragHandlePluginDefaultKey,\n DragHandlePluginProps,\n} from '@tiptap/extension-drag-handle'\nimport Vue, { PropType } from 'vue'\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport type DragHandleProps = Omit<Optional<DragHandlePluginProps, 'pluginKey'>, 'element'> & {\n class?: string;\n onNodeChange?: (data: { node: Node | null; editor: Editor; pos: number }) => void;\n};\n\nexport const DragHandle = Vue.extend({\n name: 'DragHandleVue',\n\n props: {\n pluginKey: {\n type: [String, Object] as PropType<DragHandleProps['pluginKey']>,\n default: dragHandlePluginDefaultKey,\n },\n\n editor: {\n type: Object as PropType<DragHandleProps['editor']>,\n required: true,\n },\n\n tippyOptions: {\n type: Object as PropType<DragHandleProps['tippyOptions']>,\n default: () => ({}),\n },\n\n onNodeChange: {\n type: Function as PropType<DragHandleProps['onNodeChange']>,\n default: null,\n },\n\n class: {\n type: String as PropType<DragHandleProps['class']>,\n default: 'drag-handle',\n },\n },\n\n mounted() {\n const {\n editor,\n pluginKey,\n onNodeChange,\n tippyOptions,\n } = this.$props\n\n editor.registerPlugin(DragHandlePlugin({\n editor,\n element: this.$el as HTMLElement,\n pluginKey,\n tippyOptions,\n onNodeChange,\n }))\n },\n\n // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle\n beforeDestroy() {\n const { pluginKey, editor } = this.$props\n\n editor.unregisterPlugin(pluginKey as string)\n },\n\n render(h) {\n return h('div', {\n class: this.class,\n }, this.$slots.default)\n },\n})\n"],"names":["dragHandlePluginDefaultKey","DragHandlePlugin"],"mappings":";;;;;;AAea,QAAA,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC;EACnC,IAAA,IAAI,EAAE,eAAe;EAErB,IAAA,KAAK,EAAE;EACL,QAAA,SAAS,EAAE;EACT,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAA2C;EAChE,YAAA,OAAO,EAAEA,8CAA0B;EACpC,SAAA;EAED,QAAA,MAAM,EAAE;EACN,YAAA,IAAI,EAAE,MAA6C;EACnD,YAAA,QAAQ,EAAE,IAAI;EACf,SAAA;EAED,QAAA,YAAY,EAAE;EACZ,YAAA,IAAI,EAAE,MAAmD;EACzD,YAAA,OAAO,EAAE,OAAO,EAAE,CAAC;EACpB,SAAA;EAED,QAAA,YAAY,EAAE;EACZ,YAAA,IAAI,EAAE,QAAqD;EAC3D,YAAA,OAAO,EAAE,IAAI;EACd,SAAA;EAED,QAAA,KAAK,EAAE;EACL,YAAA,IAAI,EAAE,MAA4C;EAClD,YAAA,OAAO,EAAE,aAAa;EACvB,SAAA;EACF,KAAA;MAED,OAAO,GAAA;EACL,QAAA,MAAM,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,YAAY,GACb,GAAG,IAAI,CAAC,MAAM;EAEf,QAAA,MAAM,CAAC,cAAc,CAACC,oCAAgB,CAAC;cACrC,MAAM;cACN,OAAO,EAAE,IAAI,CAAC,GAAkB;cAChC,SAAS;cACT,YAAY;cACZ,YAAY;EACb,SAAA,CAAC,CAAC;OACJ;;MAGD,aAAa,GAAA;UACX,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM;EAEzC,QAAA,MAAM,CAAC,gBAAgB,CAAC,SAAmB,CAAC;OAC7C;EAED,IAAA,MAAM,CAAC,CAAC,EAAA;UACN,OAAO,CAAC,CAAC,KAAK,EAAE;cACd,KAAK,EAAE,IAAI,CAAC,KAAK;EAClB,SAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;OACxB;EACF,CAAA;;;;;;;;;;;"}