@tiptap/extension-gapcursor 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 +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +6 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +8 -1
- package/package.json +3 -3
- package/src/gapcursor.ts +8 -1
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 gapcursor = require('@tiptap/pm/gapcursor');
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* This extension allows you to add a gap cursor to your editor.
|
|
10
|
+
* A gap cursor is a cursor that appears when you click on a place
|
|
11
|
+
* where no content is present, for example inbetween nodes.
|
|
12
|
+
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
13
|
+
*/
|
|
8
14
|
const Gapcursor = core.Extension.create({
|
|
9
15
|
name: 'gapCursor',
|
|
10
16
|
addProseMirrorPlugins() {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n *
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string,\n options: Options,\n storage: Storage,\n parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'],\n }) => boolean | null),\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [\n gapCursor(),\n ]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n"],"names":["Extension","gapCursor","callOrReturn","getExtensionField"],"mappings":";;;;;;;AA0BA;;;;;AAKG;AACU,MAAA,SAAS,GAAGA,cAAS,CAAC,MAAM,CAAC;AACxC,IAAA,IAAI,EAAE,WAAW;IAEjB,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAAC,mBAAS,EAAE;SACZ,CAAA;KACF;AAED,IAAA,gBAAgB,CAAC,SAAS,EAAA;;AACxB,QAAA,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;SAC3B,CAAA;QAED,OAAO;AACL,YAAA,cAAc,EAAE,CAAA,EAAA,GAAAC,iBAAY,CAACC,sBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC,mCAAI,IAAI;SAC9F,CAAA;KACF;AACF,CAAA;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Extension, callOrReturn, getExtensionField } from '@tiptap/core';
|
|
2
2
|
import { gapCursor } from '@tiptap/pm/gapcursor';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* This extension allows you to add a gap cursor to your editor.
|
|
6
|
+
* A gap cursor is a cursor that appears when you click on a place
|
|
7
|
+
* where no content is present, for example inbetween nodes.
|
|
8
|
+
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
9
|
+
*/
|
|
4
10
|
const Gapcursor = Extension.create({
|
|
5
11
|
name: 'gapCursor',
|
|
6
12
|
addProseMirrorPlugins() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n *
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string,\n options: Options,\n storage: Storage,\n parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'],\n }) => boolean | null),\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [\n gapCursor(),\n ]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n"],"names":[],"mappings":";;;AA0BA;;;;;AAKG;AACU,MAAA,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC;AACxC,IAAA,IAAI,EAAE,WAAW;IAEjB,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAA,SAAS,EAAE;SACZ,CAAA;KACF;AAED,IAAA,gBAAgB,CAAC,SAAS,EAAA;;AACxB,QAAA,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;SAC3B,CAAA;QAED,OAAO;AACL,YAAA,cAAc,EAAE,CAAA,EAAA,GAAA,YAAY,CAAC,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC,mCAAI,IAAI;SAC9F,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-gapcursor"] = {}, global.core, global.gapcursor));
|
|
5
5
|
})(this, (function (exports, core, gapcursor) { 'use strict';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* This extension allows you to add a gap cursor to your editor.
|
|
9
|
+
* A gap cursor is a cursor that appears when you click on a place
|
|
10
|
+
* where no content is present, for example inbetween nodes.
|
|
11
|
+
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
12
|
+
*/
|
|
7
13
|
const Gapcursor = core.Extension.create({
|
|
8
14
|
name: 'gapCursor',
|
|
9
15
|
addProseMirrorPlugins() {
|
package/dist/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n *
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string,\n options: Options,\n storage: Storage,\n parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'],\n }) => boolean | null),\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [\n gapCursor(),\n ]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n"],"names":["Extension","gapCursor","callOrReturn","getExtensionField"],"mappings":";;;;;;EA0BA;;;;;EAKG;AACU,QAAA,SAAS,GAAGA,cAAS,CAAC,MAAM,CAAC;EACxC,IAAA,IAAI,EAAE,WAAW;MAEjB,qBAAqB,GAAA;UACnB,OAAO;EACL,YAAAC,mBAAS,EAAE;WACZ,CAAA;OACF;EAED,IAAA,gBAAgB,CAAC,SAAS,EAAA;;EACxB,QAAA,MAAM,OAAO,GAAG;cACd,IAAI,EAAE,SAAS,CAAC,IAAI;cACpB,OAAO,EAAE,SAAS,CAAC,OAAO;cAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;WAC3B,CAAA;UAED,OAAO;EACL,YAAA,cAAc,EAAE,CAAA,EAAA,GAAAC,iBAAY,CAACC,sBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC,mCAAI,IAAI;WAC9F,CAAA;OACF;EACF,CAAA;;;;;;;;;;;"}
|
|
@@ -2,7 +2,8 @@ import { Extension, ParentConfig } from '@tiptap/core';
|
|
|
2
2
|
declare module '@tiptap/core' {
|
|
3
3
|
interface NodeConfig<Options, Storage> {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.
|
|
6
|
+
* @default null
|
|
6
7
|
*/
|
|
7
8
|
allowGapCursor?: boolean | null | ((this: {
|
|
8
9
|
name: string;
|
|
@@ -12,4 +13,10 @@ declare module '@tiptap/core' {
|
|
|
12
13
|
}) => boolean | null);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* This extension allows you to add a gap cursor to your editor.
|
|
18
|
+
* A gap cursor is a cursor that appears when you click on a place
|
|
19
|
+
* where no content is present, for example inbetween nodes.
|
|
20
|
+
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
21
|
+
*/
|
|
15
22
|
export declare const Gapcursor: Extension<any, any>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-gapcursor",
|
|
3
3
|
"description": "gapcursor extension for tiptap",
|
|
4
|
-
"version": "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.
|
|
33
|
-
"@tiptap/pm": "^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/gapcursor.ts
CHANGED
|
@@ -9,7 +9,8 @@ import { gapCursor } from '@tiptap/pm/gapcursor'
|
|
|
9
9
|
declare module '@tiptap/core' {
|
|
10
10
|
interface NodeConfig<Options, Storage> {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.
|
|
13
|
+
* @default null
|
|
13
14
|
*/
|
|
14
15
|
allowGapCursor?:
|
|
15
16
|
| boolean
|
|
@@ -23,6 +24,12 @@ declare module '@tiptap/core' {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* This extension allows you to add a gap cursor to your editor.
|
|
29
|
+
* A gap cursor is a cursor that appears when you click on a place
|
|
30
|
+
* where no content is present, for example inbetween nodes.
|
|
31
|
+
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
32
|
+
*/
|
|
26
33
|
export const Gapcursor = Extension.create({
|
|
27
34
|
name: 'gapCursor',
|
|
28
35
|
|