@tiptap/extension-table-header 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAWA;;;AAGG;AACU,MAAA,WAAW,GAAGA,SAAI,CAAC,MAAM,CAAqB;AACzD,IAAA,IAAI,EAAE,aAAa;IAEnB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAWA;;;AAGG;AACU,MAAA,WAAW,GAAGA,SAAI,CAAC,MAAM,CAAqB;AACzD,IAAA,IAAI,EAAE,aAAa;IAEnB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB;KACF;AAED,IAAA,OAAO,EAAE,QAAQ;IAEjB,aAAa,GAAA;QACX,OAAO;AACL,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AACD,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,OAAO,IAAG;oBACnB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC;oBACjD,MAAM,KAAK,GAAG;0BACV,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;0BACpD,IAAI;AAER,oBAAA,OAAO,KAAK;iBACb;AACF,aAAA;SACF;KACF;AAED,IAAA,SAAS,EAAE,aAAa;AAExB,IAAA,SAAS,EAAE,IAAI;IAEf,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;AAC3B,QAAA,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;KAC/E;AAEF,CAAA;;;;;"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":[],"mappings":";;AAWA;;;AAGG;AACU,MAAA,WAAW,GAAG,IAAI,CAAC,MAAM,CAAqB;AACzD,IAAA,IAAI,EAAE,aAAa;IAEnB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":[],"mappings":";;AAWA;;;AAGG;AACU,MAAA,WAAW,GAAG,IAAI,CAAC,MAAM,CAAqB;AACzD,IAAA,IAAI,EAAE,aAAa;IAEnB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB;KACF;AAED,IAAA,OAAO,EAAE,QAAQ;IAEjB,aAAa,GAAA;QACX,OAAO;AACL,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AACD,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,OAAO,IAAG;oBACnB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC;oBACjD,MAAM,KAAK,GAAG;0BACV,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;0BACpD,IAAI;AAER,oBAAA,OAAO,KAAK;iBACb;AACF,aAAA;SACF;KACF;AAED,IAAA,SAAS,EAAE,aAAa;AAExB,IAAA,SAAS,EAAE,IAAI;IAEf,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;AAC3B,QAAA,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;KAC/E;AAEF,CAAA;;;;"}
|
package/dist/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;EAWA;;;EAGG;AACU,QAAA,WAAW,GAAGA,SAAI,CAAC,MAAM,CAAqB;EACzD,IAAA,IAAI,EAAE,aAAa;MAEnB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,cAAc,EAAE,EAAE;WACnB
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/table-header.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableHeaderOptions {\n /**\n * The HTML attributes for a table header node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table headers.\n * @see https://www.tiptap.dev/api/nodes/table-header\n */\nexport const TableHeader = Node.create<TableHeaderOptions>({\n name: 'tableHeader',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n addAttributes() {\n return {\n colspan: {\n default: 1,\n },\n rowspan: {\n default: 1,\n },\n colwidth: {\n default: null,\n parseHTML: element => {\n const colwidth = element.getAttribute('colwidth')\n const value = colwidth\n ? colwidth.split(',').map(width => parseInt(width, 10))\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'header_cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'th' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['th', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;EAWA;;;EAGG;AACU,QAAA,WAAW,GAAGA,SAAI,CAAC,MAAM,CAAqB;EACzD,IAAA,IAAI,EAAE,aAAa;MAEnB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,cAAc,EAAE,EAAE;WACnB;OACF;EAED,IAAA,OAAO,EAAE,QAAQ;MAEjB,aAAa,GAAA;UACX,OAAO;EACL,YAAA,OAAO,EAAE;EACP,gBAAA,OAAO,EAAE,CAAC;EACX,aAAA;EACD,YAAA,OAAO,EAAE;EACP,gBAAA,OAAO,EAAE,CAAC;EACX,aAAA;EACD,YAAA,QAAQ,EAAE;EACR,gBAAA,OAAO,EAAE,IAAI;kBACb,SAAS,EAAE,OAAO,IAAG;sBACnB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC;sBACjD,MAAM,KAAK,GAAG;4BACV,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;4BACpD,IAAI;EAER,oBAAA,OAAO,KAAK;mBACb;EACF,aAAA;WACF;OACF;EAED,IAAA,SAAS,EAAE,aAAa;EAExB,IAAA,SAAS,EAAE,IAAI;MAEf,SAAS,GAAA;UACP,OAAO;cACL,EAAE,GAAG,EAAE,IAAI,EAAE;WACd;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;EAC3B,QAAA,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;OAC/E;EAEF,CAAA;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-table-header",
|
|
3
3
|
"description": "table cell extension for tiptap",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.0",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tiptap/core": "^2.
|
|
32
|
+
"@tiptap/core": "^2.10.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@tiptap/core": "^2.7.0"
|