You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							1 line
						
					
					
						
							1.6 KiB
						
					
					
				
			
		
		
	
	
							1 line
						
					
					
						
							1.6 KiB
						
					
					
				| {"version":3,"file":"tiptap-extension-gapcursor.cjs","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;;;;;"} |