@tiptap/extension-dropcursor 3.0.0-next.2 → 3.0.0-next.4

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Tiptap GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # @tiptap/extension-dropcursor
2
+
2
3
  [![Version](https://img.shields.io/npm/v/@tiptap/extension-dropcursor.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-dropcursor)
3
4
  [![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-dropcursor.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
4
5
  [![License](https://img.shields.io/npm/l/@tiptap/extension-dropcursor.svg)](https://www.npmjs.com/package/@tiptap/extension-dropcursor)
5
6
  [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
6
7
 
7
8
  ## Introduction
8
- Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*.
9
+
10
+ Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_.
9
11
 
10
12
  ## Official Documentation
13
+
11
14
  Documentation can be found on the [Tiptap website](https://tiptap.dev).
12
15
 
13
16
  ## License
17
+
14
18
  Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).
package/dist/index.cjs CHANGED
@@ -18,36 +18,19 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- Dropcursor: () => Dropcursor,
24
- default: () => src_default
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Dropcursor: () => import_extensions2.Dropcursor,
24
+ DropcursorOptions: () => import_extensions2.DropcursorOptions,
25
+ default: () => index_default
25
26
  });
26
- module.exports = __toCommonJS(src_exports);
27
-
28
- // src/dropcursor.ts
29
- var import_core = require("@tiptap/core");
30
- var import_dropcursor = require("@tiptap/pm/dropcursor");
31
- var Dropcursor = import_core.Extension.create({
32
- name: "dropCursor",
33
- addOptions() {
34
- return {
35
- color: "currentColor",
36
- width: 1,
37
- class: void 0
38
- };
39
- },
40
- addProseMirrorPlugins() {
41
- return [
42
- (0, import_dropcursor.dropCursor)(this.options)
43
- ];
44
- }
45
- });
46
-
47
- // src/index.ts
48
- var src_default = Dropcursor;
27
+ module.exports = __toCommonJS(index_exports);
28
+ var import_extensions = require("@tiptap/extensions");
29
+ var import_extensions2 = require("@tiptap/extensions");
30
+ var index_default = import_extensions.Dropcursor;
49
31
  // Annotate the CommonJS export names for ESM import in node:
50
32
  0 && (module.exports = {
51
- Dropcursor
33
+ Dropcursor,
34
+ DropcursorOptions
52
35
  });
53
36
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/dropcursor.ts"],"sourcesContent":["import { Dropcursor } from './dropcursor.js'\n\nexport * from './dropcursor.js'\n\nexport default Dropcursor\n","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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAC1B,wBAA2B;AA+BpB,IAAM,aAAa,sBAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO;AAAA,UACL,8BAAW,KAAK,OAAO;AAAA,IACzB;AAAA,EACF;AACF,CAAC;;;AD5CD,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Dropcursor } from '@tiptap/extensions'\n\nexport { Dropcursor, DropcursorOptions } from '@tiptap/extensions'\n\nexport default Dropcursor\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA2B;AAE3B,IAAAA,qBAA8C;AAE9C,IAAO,gBAAQ;","names":["import_extensions"]}
package/dist/index.d.cts CHANGED
@@ -1,31 +1,2 @@
1
- import { Extension } from '@tiptap/core';
2
-
3
- interface DropcursorOptions {
4
- /**
5
- * The color of the drop cursor
6
- * @default 'currentColor'
7
- * @example 'red'
8
- */
9
- color: string | undefined;
10
- /**
11
- * The width of the drop cursor
12
- * @default 1
13
- * @example 2
14
- */
15
- width: number | undefined;
16
- /**
17
- * The class of the drop cursor
18
- * @default undefined
19
- * @example 'drop-cursor'
20
- */
21
- class: string | undefined;
22
- }
23
- /**
24
- * This extension allows you to add a drop cursor to your editor.
25
- * A drop cursor is a line that appears when you drag and drop content
26
- * inbetween nodes.
27
- * @see https://tiptap.dev/api/extensions/dropcursor
28
- */
29
- declare const Dropcursor: Extension<DropcursorOptions, any>;
30
-
31
- export { Dropcursor, type DropcursorOptions, Dropcursor as default };
1
+ import { Dropcursor } from '@tiptap/extensions';
2
+ export { Dropcursor, DropcursorOptions, Dropcursor as default } from '@tiptap/extensions';
package/dist/index.d.ts CHANGED
@@ -1,31 +1,2 @@
1
- import { Extension } from '@tiptap/core';
2
-
3
- interface DropcursorOptions {
4
- /**
5
- * The color of the drop cursor
6
- * @default 'currentColor'
7
- * @example 'red'
8
- */
9
- color: string | undefined;
10
- /**
11
- * The width of the drop cursor
12
- * @default 1
13
- * @example 2
14
- */
15
- width: number | undefined;
16
- /**
17
- * The class of the drop cursor
18
- * @default undefined
19
- * @example 'drop-cursor'
20
- */
21
- class: string | undefined;
22
- }
23
- /**
24
- * This extension allows you to add a drop cursor to your editor.
25
- * A drop cursor is a line that appears when you drag and drop content
26
- * inbetween nodes.
27
- * @see https://tiptap.dev/api/extensions/dropcursor
28
- */
29
- declare const Dropcursor: Extension<DropcursorOptions, any>;
30
-
31
- export { Dropcursor, type DropcursorOptions, Dropcursor as default };
1
+ import { Dropcursor } from '@tiptap/extensions';
2
+ export { Dropcursor, DropcursorOptions, Dropcursor as default } from '@tiptap/extensions';
package/dist/index.js CHANGED
@@ -1,26 +1,10 @@
1
- // src/dropcursor.ts
2
- import { Extension } from "@tiptap/core";
3
- import { dropCursor } from "@tiptap/pm/dropcursor";
4
- var Dropcursor = Extension.create({
5
- name: "dropCursor",
6
- addOptions() {
7
- return {
8
- color: "currentColor",
9
- width: 1,
10
- class: void 0
11
- };
12
- },
13
- addProseMirrorPlugins() {
14
- return [
15
- dropCursor(this.options)
16
- ];
17
- }
18
- });
19
-
20
1
  // src/index.ts
21
- var src_default = Dropcursor;
2
+ import { Dropcursor } from "@tiptap/extensions";
3
+ import { Dropcursor as Dropcursor2, DropcursorOptions } from "@tiptap/extensions";
4
+ var index_default = Dropcursor;
22
5
  export {
23
- Dropcursor,
24
- src_default as default
6
+ Dropcursor2 as Dropcursor,
7
+ DropcursorOptions,
8
+ index_default as default
25
9
  };
26
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dropcursor.ts","../src/index.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","import { Dropcursor } from './dropcursor.js'\n\nexport * from './dropcursor.js'\n\nexport default Dropcursor\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AA+BpB,IAAM,aAAa,UAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO;AAAA,MACL,WAAW,KAAK,OAAO;AAAA,IACzB;AAAA,EACF;AACF,CAAC;;;AC5CD,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Dropcursor } from '@tiptap/extensions'\n\nexport { Dropcursor, DropcursorOptions } from '@tiptap/extensions'\n\nexport default Dropcursor\n"],"mappings":";AAAA,SAAS,kBAAkB;AAE3B,SAAS,cAAAA,aAAY,yBAAyB;AAE9C,IAAO,gBAAQ;","names":["Dropcursor"]}
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": "3.0.0-next.2",
4
+ "version": "3.0.0-next.4",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -15,7 +15,10 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/index.d.ts",
18
+ "types": {
19
+ "import": "./dist/index.d.ts",
20
+ "require": "./dist/index.d.cts"
21
+ },
19
22
  "import": "./dist/index.js",
20
23
  "require": "./dist/index.cjs"
21
24
  }
@@ -28,12 +31,10 @@
28
31
  "dist"
29
32
  ],
30
33
  "devDependencies": {
31
- "@tiptap/core": "^3.0.0-next.2",
32
- "@tiptap/pm": "^3.0.0-next.2"
34
+ "@tiptap/extensions": "^3.0.0-next.4"
33
35
  },
34
36
  "peerDependencies": {
35
- "@tiptap/core": "^3.0.0-next.1",
36
- "@tiptap/pm": "^3.0.0-next.1"
37
+ "@tiptap/extensions": "^3.0.0-next.3"
37
38
  },
38
39
  "repository": {
39
40
  "type": "git",
@@ -41,6 +42,7 @@
41
42
  "directory": "packages/extension-dropcursor"
42
43
  },
43
44
  "scripts": {
44
- "build": "tsup"
45
+ "build": "tsup",
46
+ "lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
45
47
  }
46
- }
48
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Dropcursor } from './dropcursor.js'
1
+ import { Dropcursor } from '@tiptap/extensions'
2
2
 
3
- export * from './dropcursor.js'
3
+ export { Dropcursor, DropcursorOptions } from '@tiptap/extensions'
4
4
 
5
5
  export default Dropcursor
package/src/dropcursor.ts DELETED
@@ -1,49 +0,0 @@
1
- import { Extension } from '@tiptap/core'
2
- import { dropCursor } from '@tiptap/pm/dropcursor'
3
-
4
- export interface DropcursorOptions {
5
- /**
6
- * The color of the drop cursor
7
- * @default 'currentColor'
8
- * @example 'red'
9
- */
10
- color: string | undefined,
11
-
12
- /**
13
- * The width of the drop cursor
14
- * @default 1
15
- * @example 2
16
- */
17
- width: number | undefined,
18
-
19
- /**
20
- * The class of the drop cursor
21
- * @default undefined
22
- * @example 'drop-cursor'
23
- */
24
- class: string | undefined,
25
- }
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
- */
33
- export const Dropcursor = Extension.create<DropcursorOptions>({
34
- name: 'dropCursor',
35
-
36
- addOptions() {
37
- return {
38
- color: 'currentColor',
39
- width: 1,
40
- class: undefined,
41
- }
42
- },
43
-
44
- addProseMirrorPlugins() {
45
- return [
46
- dropCursor(this.options),
47
- ]
48
- },
49
- })