{"mappings":";oIAiCO,IAAMA,EAAa,WAMbC,EAAaC,EAAK,OAA0B,CAEvD,KAAM,aAEN,YAAU,CACR,MAAO,CACL,eAAgB,CAAA,IAIpB,QAAS,SAET,MAAO,QAEP,SAAU,GAEV,WAAS,CACP,MAAO,CACL,CAAE,IAAK,YAAY,IAIvB,WAAW,CAAE,eAAAC,CAAc,EAAE,CAC3B,MAAO,CAAC,aAAcC,EAAgB,KAAK,QAAQ,eAAgBD,CAAc,EAAG,CAAC,GAGvF,aAAW,CACT,MAAO,CACL,cAAe,IAAM,CAAC,CAAE,SAAAE,CAAQ,IACvBA,EAAS,OAAO,KAAK,IAAI,EAElC,iBAAkB,IAAM,CAAC,CAAE,SAAAA,CAAQ,IAC1BA,EAAS,WAAW,KAAK,IAAI,EAEtC,gBAAiB,IAAM,CAAC,CAAE,SAAAA,CAAQ,IACzBA,EAAS,KAAK,KAAK,IAAI,IAKpC,sBAAoB,CAClB,MAAO,CACL,cAAe,IAAM,KAAK,OAAO,SAAS,iBAAgB,IAI9D,eAAa,CACX,MAAO,CACLC,EAAkB,CAChB,KAAMN,EACN,KAAM,KAAK,KACZ,GAGN,CAAA","names":["inputRegex","Blockquote","Node","HTMLAttributes","mergeAttributes","commands","wrappingInputRule"],"sources":["../esm/npm/@tiptap/extension-blockquote@2.27.3/node_modules/@tiptap/extension-blockquote/src/blockquote.ts"],"sourcesContent":["import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nexport interface BlockquoteOptions {\n  /**\n   * HTML attributes to add to the blockquote element\n   * @default {}\n   * @example { class: 'foo' }\n   */\n  HTMLAttributes: Record\u003cstring, any\u003e,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands\u003cReturnType\u003e {\n    blockQuote: {\n      /**\n       * Set a blockquote node\n       */\n      setBlockquote: () =\u003e ReturnType,\n      /**\n       * Toggle a blockquote node\n       */\n      toggleBlockquote: () =\u003e ReturnType,\n      /**\n       * Unset a blockquote node\n       */\n      unsetBlockquote: () =\u003e ReturnType,\n    }\n  }\n}\n\n/**\n * Matches a blockquote to a `\u003e` as input.\n */\nexport const inputRegex = /^\\s*\u003e\\s$/\n\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nexport const Blockquote = Node.create\u003cBlockquoteOptions\u003e({\n\n  name: 'blockquote',\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  content: 'block+',\n\n  group: 'block',\n\n  defining: true,\n\n  parseHTML() {\n    return [\n      { tag: 'blockquote' },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['blockquote', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n  },\n\n  addCommands() {\n    return {\n      setBlockquote: () =\u003e ({ commands }) =\u003e {\n        return commands.wrapIn(this.name)\n      },\n      toggleBlockquote: () =\u003e ({ commands }) =\u003e {\n        return commands.toggleWrap(this.name)\n      },\n      unsetBlockquote: () =\u003e ({ commands }) =\u003e {\n        return commands.lift(this.name)\n      },\n    }\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-Shift-b': () =\u003e this.editor.commands.toggleBlockquote(),\n    }\n  },\n\n  addInputRules() {\n    return [\n      wrappingInputRule({\n        find: inputRegex,\n        type: this.type,\n      }),\n    ]\n  },\n})\n"],"version":3}
