@tiptap/extension-gapcursor 2.0.0-beta.32 → 2.0.0-beta.37
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/packages/extension-gapcursor/src/gapcursor.d.ts +15 -0
- package/dist/packages/extension-gapcursor/src/index.d.ts +3 -0
- package/dist/tiptap-extension-gapcursor.cjs.js +30 -0
- package/dist/tiptap-extension-gapcursor.cjs.js.map +1 -0
- package/dist/tiptap-extension-gapcursor.esm.js +25 -0
- package/dist/tiptap-extension-gapcursor.esm.js.map +1 -0
- package/dist/tiptap-extension-gapcursor.umd.js +33 -0
- package/dist/tiptap-extension-gapcursor.umd.js.map +1 -0
- package/package.json +3 -3
- package/src/gapcursor.ts +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Extension, ParentConfig } from '@tiptap/core';
|
|
2
|
+
declare module '@tiptap/core' {
|
|
3
|
+
interface NodeConfig<Options, Storage> {
|
|
4
|
+
/**
|
|
5
|
+
* Allow gap cursor
|
|
6
|
+
*/
|
|
7
|
+
allowGapCursor?: boolean | null | ((this: {
|
|
8
|
+
name: string;
|
|
9
|
+
options: Options;
|
|
10
|
+
storage: Storage;
|
|
11
|
+
parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'];
|
|
12
|
+
}) => boolean | null);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const Gapcursor: Extension<any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@tiptap/core');
|
|
6
|
+
var prosemirrorGapcursor = require('prosemirror-gapcursor');
|
|
7
|
+
|
|
8
|
+
const Gapcursor = core.Extension.create({
|
|
9
|
+
name: 'gapCursor',
|
|
10
|
+
addProseMirrorPlugins() {
|
|
11
|
+
return [
|
|
12
|
+
prosemirrorGapcursor.gapCursor(),
|
|
13
|
+
];
|
|
14
|
+
},
|
|
15
|
+
extendNodeSchema(extension) {
|
|
16
|
+
var _a;
|
|
17
|
+
const context = {
|
|
18
|
+
name: extension.name,
|
|
19
|
+
options: extension.options,
|
|
20
|
+
storage: extension.storage,
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
allowGapCursor: (_a = core.callOrReturn(core.getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.Gapcursor = Gapcursor;
|
|
29
|
+
exports["default"] = Gapcursor;
|
|
30
|
+
//# sourceMappingURL=tiptap-extension-gapcursor.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiptap-extension-gapcursor.cjs.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * Allow gap cursor\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\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":";;;;;;;AAyBa,MAAA,SAAS,GAAGA,cAAS,CAAC,MAAM,CAAC;AACxC,IAAA,IAAI,EAAE,WAAW;IAEjB,qBAAqB,GAAA;QACnB,OAAO;AACL,YAAAC,8BAAS,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;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Extension, callOrReturn, getExtensionField } from '@tiptap/core';
|
|
2
|
+
import { gapCursor } from 'prosemirror-gapcursor';
|
|
3
|
+
|
|
4
|
+
const Gapcursor = Extension.create({
|
|
5
|
+
name: 'gapCursor',
|
|
6
|
+
addProseMirrorPlugins() {
|
|
7
|
+
return [
|
|
8
|
+
gapCursor(),
|
|
9
|
+
];
|
|
10
|
+
},
|
|
11
|
+
extendNodeSchema(extension) {
|
|
12
|
+
var _a;
|
|
13
|
+
const context = {
|
|
14
|
+
name: extension.name,
|
|
15
|
+
options: extension.options,
|
|
16
|
+
storage: extension.storage,
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export { Gapcursor, Gapcursor as default };
|
|
25
|
+
//# sourceMappingURL=tiptap-extension-gapcursor.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiptap-extension-gapcursor.esm.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * Allow gap cursor\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\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":";;;AAyBa,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;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core'), require('prosemirror-gapcursor')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core', 'prosemirror-gapcursor'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-gapcursor"] = {}, global.core, global.prosemirrorGapcursor));
|
|
5
|
+
})(this, (function (exports, core, prosemirrorGapcursor) { 'use strict';
|
|
6
|
+
|
|
7
|
+
const Gapcursor = core.Extension.create({
|
|
8
|
+
name: 'gapCursor',
|
|
9
|
+
addProseMirrorPlugins() {
|
|
10
|
+
return [
|
|
11
|
+
prosemirrorGapcursor.gapCursor(),
|
|
12
|
+
];
|
|
13
|
+
},
|
|
14
|
+
extendNodeSchema(extension) {
|
|
15
|
+
var _a;
|
|
16
|
+
const context = {
|
|
17
|
+
name: extension.name,
|
|
18
|
+
options: extension.options,
|
|
19
|
+
storage: extension.storage,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
allowGapCursor: (_a = core.callOrReturn(core.getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
exports.Gapcursor = Gapcursor;
|
|
28
|
+
exports["default"] = Gapcursor;
|
|
29
|
+
|
|
30
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
31
|
+
|
|
32
|
+
}));
|
|
33
|
+
//# sourceMappingURL=tiptap-extension-gapcursor.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiptap-extension-gapcursor.umd.js","sources":["../src/gapcursor.ts"],"sourcesContent":["import {\n callOrReturn,\n Extension,\n getExtensionField,\n ParentConfig,\n} from '@tiptap/core'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig<Options, Storage> {\n /**\n * Allow gap cursor\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\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":";;;;;;AAyBa,QAAA,SAAS,GAAGA,cAAS,CAAC,MAAM,CAAC;EACxC,IAAA,IAAI,EAAE,WAAW;MAEjB,qBAAqB,GAAA;UACnB,OAAO;EACL,YAAAC,8BAAS,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;;;;;;;;;;;"}
|
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.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.37",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@types/prosemirror-gapcursor": "^1.0.4",
|
|
28
|
-
"prosemirror-gapcursor": "^1.2.
|
|
28
|
+
"prosemirror-gapcursor": "^1.2.1"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "https://github.com/ueberdosis/tiptap",
|
|
33
33
|
"directory": "packages/extension-gapcursor"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "591c0807a2ab5c34b4b7fe12c12511fe4f493ebd"
|
|
36
36
|
}
|