@tiptap/extension-dropcursor 2.3.2 → 2.5.0-beta.0

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.cjs CHANGED
@@ -5,6 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@tiptap/core');
6
6
  var dropcursor = require('@tiptap/pm/dropcursor');
7
7
 
8
+ /**
9
+ * This extension allows you to add a drop cursor to your editor.
10
+ * A drop cursor is a line that appears when you drag and drop content
11
+ * inbetween nodes.
12
+ * @see https://tiptap.dev/api/extensions/dropcursor
13
+ */
8
14
  const Dropcursor = core.Extension.create({
9
15
  name: 'dropCursor',
10
16
  addOptions() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n color: string | undefined,\n width: number | undefined,\n class: string | undefined,\n}\n\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":["Extension","dropCursor"],"mappings":";;;;;;;AASa,MAAA,UAAU,GAAGA,cAAS,CAAC,MAAM,CAAoB;AAC5D,IAAA,IAAI,EAAE,YAAY;IAElB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,KAAK,EAAE,SAAS;SACjB,CAAA;KACF;IAED,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAAC,qBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;SACzB,CAAA;KACF;AACF,CAAA;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor\n * @default 'currentColor'\n * @example 'red'\n */\n color: string | undefined,\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined,\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined,\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":["Extension","dropCursor"],"mappings":";;;;;;;AA0BA;;;;;AAKG;AACU,MAAA,UAAU,GAAGA,cAAS,CAAC,MAAM,CAAoB;AAC5D,IAAA,IAAI,EAAE,YAAY;IAElB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,KAAK,EAAE,SAAS;SACjB,CAAA;KACF;IAED,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAAC,qBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;SACzB,CAAA;KACF;AACF,CAAA;;;;;"}
package/dist/index.js CHANGED
@@ -1,6 +1,12 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
  import { dropCursor } from '@tiptap/pm/dropcursor';
3
3
 
4
+ /**
5
+ * This extension allows you to add a drop cursor to your editor.
6
+ * A drop cursor is a line that appears when you drag and drop content
7
+ * inbetween nodes.
8
+ * @see https://tiptap.dev/api/extensions/dropcursor
9
+ */
4
10
  const Dropcursor = Extension.create({
5
11
  name: 'dropCursor',
6
12
  addOptions() {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n color: string | undefined,\n width: number | undefined,\n class: string | undefined,\n}\n\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":[],"mappings":";;;AASa,MAAA,UAAU,GAAG,SAAS,CAAC,MAAM,CAAoB;AAC5D,IAAA,IAAI,EAAE,YAAY;IAElB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,KAAK,EAAE,SAAS;SACjB,CAAA;KACF;IAED,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAA,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;SACzB,CAAA;KACF;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor\n * @default 'currentColor'\n * @example 'red'\n */\n color: string | undefined,\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined,\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined,\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":[],"mappings":";;;AA0BA;;;;;AAKG;AACU,MAAA,UAAU,GAAG,SAAS,CAAC,MAAM,CAAoB;AAC5D,IAAA,IAAI,EAAE,YAAY;IAElB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,KAAK,EAAE,SAAS;SACjB,CAAA;KACF;IAED,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAA,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;SACzB,CAAA;KACF;AACF,CAAA;;;;"}
package/dist/index.umd.js CHANGED
@@ -4,6 +4,12 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-dropcursor"] = {}, global.core, global.dropcursor));
5
5
  })(this, (function (exports, core, dropcursor) { 'use strict';
6
6
 
7
+ /**
8
+ * This extension allows you to add a drop cursor to your editor.
9
+ * A drop cursor is a line that appears when you drag and drop content
10
+ * inbetween nodes.
11
+ * @see https://tiptap.dev/api/extensions/dropcursor
12
+ */
7
13
  const Dropcursor = core.Extension.create({
8
14
  name: 'dropCursor',
9
15
  addOptions() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n color: string | undefined,\n width: number | undefined,\n class: string | undefined,\n}\n\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":["Extension","dropCursor"],"mappings":";;;;;;AASa,QAAA,UAAU,GAAGA,cAAS,CAAC,MAAM,CAAoB;EAC5D,IAAA,IAAI,EAAE,YAAY;MAElB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,KAAK,EAAE,cAAc;EACrB,YAAA,KAAK,EAAE,CAAC;EACR,YAAA,KAAK,EAAE,SAAS;WACjB,CAAA;OACF;MAED,qBAAqB,GAAA;UACnB,OAAO;EACL,YAAAC,qBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;WACzB,CAAA;OACF;EACF,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/dropcursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor\n * @default 'currentColor'\n * @example 'red'\n */\n color: string | undefined,\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined,\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined,\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create<DropcursorOptions>({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ]\n },\n})\n"],"names":["Extension","dropCursor"],"mappings":";;;;;;EA0BA;;;;;EAKG;AACU,QAAA,UAAU,GAAGA,cAAS,CAAC,MAAM,CAAoB;EAC5D,IAAA,IAAI,EAAE,YAAY;MAElB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,KAAK,EAAE,cAAc;EACrB,YAAA,KAAK,EAAE,CAAC;EACR,YAAA,KAAK,EAAE,SAAS;WACjB,CAAA;OACF;MAED,qBAAqB,GAAA;UACnB,OAAO;EACL,YAAAC,qBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;WACzB,CAAA;OACF;EACF,CAAA;;;;;;;;;;;"}
@@ -1,7 +1,28 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
  export interface DropcursorOptions {
3
+ /**
4
+ * The color of the drop cursor
5
+ * @default 'currentColor'
6
+ * @example 'red'
7
+ */
3
8
  color: string | undefined;
9
+ /**
10
+ * The width of the drop cursor
11
+ * @default 1
12
+ * @example 2
13
+ */
4
14
  width: number | undefined;
15
+ /**
16
+ * The class of the drop cursor
17
+ * @default undefined
18
+ * @example 'drop-cursor'
19
+ */
5
20
  class: string | undefined;
6
21
  }
22
+ /**
23
+ * This extension allows you to add a drop cursor to your editor.
24
+ * A drop cursor is a line that appears when you drag and drop content
25
+ * inbetween nodes.
26
+ * @see https://tiptap.dev/api/extensions/dropcursor
27
+ */
7
28
  export declare const Dropcursor: Extension<DropcursorOptions, any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-dropcursor",
3
3
  "description": "dropcursor extension for tiptap",
4
- "version": "2.3.2",
4
+ "version": "2.5.0-beta.0",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -29,8 +29,8 @@
29
29
  "dist"
30
30
  ],
31
31
  "devDependencies": {
32
- "@tiptap/core": "^2.3.2",
33
- "@tiptap/pm": "^2.3.2"
32
+ "@tiptap/core": "^2.5.0-beta.0",
33
+ "@tiptap/pm": "^2.5.0-beta.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@tiptap/core": "^2.0.0",
package/src/dropcursor.ts CHANGED
@@ -2,11 +2,34 @@ import { Extension } from '@tiptap/core'
2
2
  import { dropCursor } from '@tiptap/pm/dropcursor'
3
3
 
4
4
  export interface DropcursorOptions {
5
+ /**
6
+ * The color of the drop cursor
7
+ * @default 'currentColor'
8
+ * @example 'red'
9
+ */
5
10
  color: string | undefined,
11
+
12
+ /**
13
+ * The width of the drop cursor
14
+ * @default 1
15
+ * @example 2
16
+ */
6
17
  width: number | undefined,
18
+
19
+ /**
20
+ * The class of the drop cursor
21
+ * @default undefined
22
+ * @example 'drop-cursor'
23
+ */
7
24
  class: string | undefined,
8
25
  }
9
26
 
27
+ /**
28
+ * This extension allows you to add a drop cursor to your editor.
29
+ * A drop cursor is a line that appears when you drag and drop content
30
+ * inbetween nodes.
31
+ * @see https://tiptap.dev/api/extensions/dropcursor
32
+ */
10
33
  export const Dropcursor = Extension.create<DropcursorOptions>({
11
34
  name: 'dropCursor',
12
35