{"mappings":";2OAgCa,IAAAA,EAAYC,EAAU,OAAO,CACxC,KAAM,YAEN,uBAAqB,CACnB,MAAO,CACLC,EAAS,IAIb,iBAAiBC,EAAS,OACxB,IAAMC,EAAU,CACd,KAAMD,EAAU,KAChB,QAASA,EAAU,QACnB,QAASA,EAAU,SAGrB,MAAO,CACL,gBAAgBE,EAAAC,EAAaC,EAAkBJ,EAAW,iBAAkBC,CAAO,CAAC,KAAC,MAAAC,IAAA,OAAAA,EAAI,MAG9F,CAAA","names":["Gapcursor","Extension","gapCursor","extension","context","_a","callOrReturn","getExtensionField"],"sources":["../esm/npm/@tiptap/extension-gapcursor@2.27.3/node_modules/@tiptap/extension-gapcursor/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\u003cOptions, Storage\u003e {\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\u003cNodeConfig\u003cOptions\u003e\u003e['allowGapCursor'],\n      }) =\u003e 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"],"version":3}
