Preview: index.js.map
Size: 1.86 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/extension-gapcursor/dist/index.js.map
{"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;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;QAED,OAAO;AACL,YAAA,cAAc,EAAE,CAAA,EAAA,GAAA,YAAY,CAAC,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC,mCAAI,IAAI;SAC9F;KACF;AACF,CAAA;;;;"}
Directory Contents
Dirs: 0 × Files: 10