@tiptap/extension-table-row 2.3.2 → 2.5.0-beta.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 CHANGED
@@ -4,6 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@tiptap/core');
6
6
 
7
+ /**
8
+ * This extension allows you to create table rows.
9
+ * @see https://www.tiptap.dev/api/nodes/table-row
10
+ */
7
11
  const TableRow = core.Node.create({
8
12
  name: 'tableRow',
9
13
  addOptions() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAMa,MAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;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,CAAA;KAC/E;AACF,CAAA;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n /**\n * The HTML attributes for a table row node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table rows.\n * @see https://www.tiptap.dev/api/nodes/table-row\n */\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAWA;;;AAGG;AACU,MAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;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,CAAA;KAC/E;AACF,CAAA;;;;;"}
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { Node, mergeAttributes } from '@tiptap/core';
2
2
 
3
+ /**
4
+ * This extension allows you to create table rows.
5
+ * @see https://www.tiptap.dev/api/nodes/table-row
6
+ */
3
7
  const TableRow = Node.create({
4
8
  name: 'tableRow',
5
9
  addOptions() {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":[],"mappings":";;AAMa,MAAA,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;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,CAAA;KAC/E;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n /**\n * The HTML attributes for a table row node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table rows.\n * @see https://www.tiptap.dev/api/nodes/table-row\n */\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":[],"mappings":";;AAWA;;;AAGG;AACU,MAAA,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,SAAS,GAAA;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;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,CAAA;KAC/E;AACF,CAAA;;;;"}
package/dist/index.umd.js CHANGED
@@ -4,6 +4,10 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-table-row"] = {}, global.core));
5
5
  })(this, (function (exports, core) { 'use strict';
6
6
 
7
+ /**
8
+ * This extension allows you to create table rows.
9
+ * @see https://www.tiptap.dev/api/nodes/table-row
10
+ */
7
11
  const TableRow = core.Node.create({
8
12
  name: 'tableRow',
9
13
  addOptions() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAMa,QAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;EACnD,IAAA,IAAI,EAAE,UAAU;MAEhB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;EAED,IAAA,OAAO,EAAE,4BAA4B;EAErC,IAAA,SAAS,EAAE,KAAK;MAEhB,SAAS,GAAA;UACP,OAAO;cACL,EAAE,GAAG,EAAE,IAAI,EAAE;WACd,CAAA;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,CAAA;OAC/E;EACF,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/table-row.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TableRowOptions {\n /**\n * The HTML attributes for a table row node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>,\n}\n\n/**\n * This extension allows you to create table rows.\n * @see https://www.tiptap.dev/api/nodes/table-row\n */\nexport const TableRow = Node.create<TableRowOptions>({\n name: 'tableRow',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: '(tableCell | tableHeader)*',\n\n tableRole: 'row',\n\n parseHTML() {\n return [\n { tag: 'tr' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;EAWA;;;EAGG;AACU,QAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;EACnD,IAAA,IAAI,EAAE,UAAU;MAEhB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;EAED,IAAA,OAAO,EAAE,4BAA4B;EAErC,IAAA,SAAS,EAAE,KAAK;MAEhB,SAAS,GAAA;UACP,OAAO;cACL,EAAE,GAAG,EAAE,IAAI,EAAE;WACd,CAAA;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,CAAA;OAC/E;EACF,CAAA;;;;;;;;;;;"}
@@ -1,5 +1,14 @@
1
1
  import { Node } from '@tiptap/core';
2
2
  export interface TableRowOptions {
3
+ /**
4
+ * The HTML attributes for a table row node.
5
+ * @default {}
6
+ * @example { class: 'foo' }
7
+ */
3
8
  HTMLAttributes: Record<string, any>;
4
9
  }
10
+ /**
11
+ * This extension allows you to create table rows.
12
+ * @see https://www.tiptap.dev/api/nodes/table-row
13
+ */
5
14
  export declare const TableRow: Node<TableRowOptions, any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-table-row",
3
3
  "description": "table row extension for tiptap",
4
- "version": "2.3.2",
4
+ "version": "2.5.0-beta.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.3.2"
32
+ "@tiptap/core": "^2.5.0-beta.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@tiptap/core": "^2.0.0"
package/src/table-row.ts CHANGED
@@ -1,9 +1,18 @@
1
1
  import { mergeAttributes, Node } from '@tiptap/core'
2
2
 
3
3
  export interface TableRowOptions {
4
+ /**
5
+ * The HTML attributes for a table row node.
6
+ * @default {}
7
+ * @example { class: 'foo' }
8
+ */
4
9
  HTMLAttributes: Record<string, any>,
5
10
  }
6
11
 
12
+ /**
13
+ * This extension allows you to create table rows.
14
+ * @see https://www.tiptap.dev/api/nodes/table-row
15
+ */
7
16
  export const TableRow = Node.create<TableRowOptions>({
8
17
  name: 'tableRow',
9
18