{"version":3,"file":"index.cjs","sources":["../src/details-summary.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface DetailsSummaryOptions {\n  /**\n   * Custom HTML attributes that should be added to the rendered HTML tag.\n   */\n  HTMLAttributes: {\n    [key: string]: any\n  },\n}\n\nexport const DetailsSummary = Node.create<DetailsSummaryOptions>({\n  name: 'detailsSummary',\n\n  content: 'text*',\n\n  defining: true,\n\n  selectable: false,\n\n  isolating: true,\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n    }\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'summary',\n      },\n    ]\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return [\n      'summary',\n      mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n      0,\n    ]\n  },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAWa,MAAA,cAAc,GAAGA,SAAI,CAAC,MAAM,CAAwB;AAC/D,IAAA,IAAI,EAAE,gBAAgB;AAEtB,IAAA,OAAO,EAAE,OAAO;AAEhB,IAAA,QAAQ,EAAE,IAAI;AAEd,IAAA,UAAU,EAAE,KAAK;AAEjB,IAAA,SAAS,EAAE,IAAI;IAEf,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB;KACF;IAED,SAAS,GAAA;QACP,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,SAAS;AACf,aAAA;SACF;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;QAC3B,OAAO;YACL,SAAS;YACTC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC;YAC5D,CAAC;SACF;KACF;AACF,CAAA;;;;;"}