{"version":3,"file":"taiga-ui-editor-extensions-table.mjs","sources":["../../../projects/editor/extensions/table/index.ts","../../../projects/editor/extensions/table/taiga-ui-editor-extensions-table.ts"],"sourcesContent":["import {mergeAttributes} from '@tiptap/core';\nimport {createColGroup, Table} from '@tiptap/extension-table';\n\nexport const TuiTable = Table.extend({\n    renderHTML({node, HTMLAttributes}) {\n        const {colgroup, tableWidth, tableMinWidth} = createColGroup(\n            node,\n            this.options.cellMinWidth,\n        );\n\n        return [\n            'div',\n            {class: 'tui-table-wrapper'},\n            [\n                'table',\n                mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n                    style: tableWidth\n                        ? `width: ${tableWidth}`\n                        : `min-width: ${tableMinWidth}`,\n                }),\n                colgroup,\n                ['tbody', 0],\n            ],\n        ];\n    },\n})\n    .configure({\n        resizable: true,\n        lastColumnResizable: true,\n        allowTableNodeSelection: true,\n    })\n    .extend();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGa,MAAA,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AACjC,IAAA,UAAU,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,EAAA;AAC7B,QAAA,MAAM,EAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAC,GAAG,cAAc,CACxD,IAAI,EACJ,IAAI,CAAC,OAAO,CAAC,YAAY,CAC5B,CAAC;QAEF,OAAO;YACH,KAAK;YACL,EAAC,KAAK,EAAE,mBAAmB,EAAC;AAC5B,YAAA;gBACI,OAAO;gBACP,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE;AACzD,oBAAA,KAAK,EAAE,UAAU;0BACX,CAAU,OAAA,EAAA,UAAU,CAAE,CAAA;0BACtB,CAAc,WAAA,EAAA,aAAa,CAAE,CAAA;iBACtC,CAAC;gBACF,QAAQ;gBACR,CAAC,OAAO,EAAE,CAAC,CAAC;AACf,aAAA;SACJ,CAAC;KACL;CACJ,CAAC;AACG,KAAA,SAAS,CAAC;AACP,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,uBAAuB,EAAE,IAAI;CAChC,CAAC;AACD,KAAA,MAAM;;AC/BX;;AAEG;;;;"}