@tiptap/extension-table-row 2.11.7 → 3.0.0-beta.1

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025, Tiptap GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # @tiptap/extension-table-row
2
+
2
3
  [![Version](https://img.shields.io/npm/v/@tiptap/extension-table-row.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-table-row)
3
4
  [![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-table-row.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
4
5
  [![License](https://img.shields.io/npm/l/@tiptap/extension-table-row.svg)](https://www.npmjs.com/package/@tiptap/extension-table-row)
5
6
  [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
6
7
 
7
8
  ## Introduction
8
- Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*.
9
+
10
+ Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_.
9
11
 
10
12
  ## Official Documentation
13
+
11
14
  Documentation can be found on the [Tiptap website](https://tiptap.dev).
12
15
 
13
16
  ## License
17
+
14
18
  Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).
package/dist/index.cjs CHANGED
@@ -1,32 +1,34 @@
1
- 'use strict';
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2
19
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@tiptap/core');
6
-
7
- /**
8
- * This extension allows you to create table rows.
9
- * @see https://www.tiptap.dev/api/nodes/table-row
10
- */
11
- const TableRow = core.Node.create({
12
- name: 'tableRow',
13
- addOptions() {
14
- return {
15
- HTMLAttributes: {},
16
- };
17
- },
18
- content: '(tableCell | tableHeader)*',
19
- tableRole: 'row',
20
- parseHTML() {
21
- return [
22
- { tag: 'tr' },
23
- ];
24
- },
25
- renderHTML({ HTMLAttributes }) {
26
- return ['tr', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
27
- },
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TableRow: () => import_extension_table2.TableRow,
24
+ default: () => index_default
28
25
  });
29
-
30
- exports.TableRow = TableRow;
31
- exports.default = TableRow;
32
- //# sourceMappingURL=index.cjs.map
26
+ module.exports = __toCommonJS(index_exports);
27
+ var import_extension_table = require("@tiptap/extension-table");
28
+ var import_extension_table2 = require("@tiptap/extension-table");
29
+ var index_default = import_extension_table.TableRow;
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ TableRow
33
+ });
34
+ //# sourceMappingURL=index.cjs.map
@@ -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 /**\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;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,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;AACF,CAAA;;;;;"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { TableRow } from '@tiptap/extension-table'\n\nexport type { TableRowOptions } from '@tiptap/extension-table'\nexport { TableRow } from '@tiptap/extension-table'\n\nexport default TableRow\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAyB;AAGzB,IAAAA,0BAAyB;AAEzB,IAAO,gBAAQ;","names":["import_extension_table"]}
@@ -0,0 +1,2 @@
1
+ import { TableRow } from '@tiptap/extension-table';
2
+ export { TableRow, TableRowOptions, TableRow as default } from '@tiptap/extension-table';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- import { TableRow } from './table-row.js';
2
- export * from './table-row.js';
3
- export default TableRow;
4
- //# sourceMappingURL=index.d.ts.map
1
+ import { TableRow } from '@tiptap/extension-table';
2
+ export { TableRow, TableRowOptions, TableRow as default } from '@tiptap/extension-table';
package/dist/index.js CHANGED
@@ -1,27 +1,9 @@
1
- import { Node, mergeAttributes } from '@tiptap/core';
2
-
3
- /**
4
- * This extension allows you to create table rows.
5
- * @see https://www.tiptap.dev/api/nodes/table-row
6
- */
7
- const TableRow = Node.create({
8
- name: 'tableRow',
9
- addOptions() {
10
- return {
11
- HTMLAttributes: {},
12
- };
13
- },
14
- content: '(tableCell | tableHeader)*',
15
- tableRole: 'row',
16
- parseHTML() {
17
- return [
18
- { tag: 'tr' },
19
- ];
20
- },
21
- renderHTML({ HTMLAttributes }) {
22
- return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
23
- },
24
- });
25
-
26
- export { TableRow, TableRow as default };
27
- //# sourceMappingURL=index.js.map
1
+ // src/index.ts
2
+ import { TableRow } from "@tiptap/extension-table";
3
+ import { TableRow as TableRow2 } from "@tiptap/extension-table";
4
+ var index_default = TableRow;
5
+ export {
6
+ TableRow2 as TableRow,
7
+ index_default as default
8
+ };
9
+ //# sourceMappingURL=index.js.map
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 /**\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;KACF;AAED,IAAA,OAAO,EAAE,4BAA4B;AAErC,IAAA,SAAS,EAAE,KAAK;IAEhB,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;AACF,CAAA;;;;"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { TableRow } from '@tiptap/extension-table'\n\nexport type { TableRowOptions } from '@tiptap/extension-table'\nexport { TableRow } from '@tiptap/extension-table'\n\nexport default TableRow\n"],"mappings":";AAAA,SAAS,gBAAgB;AAGzB,SAAS,YAAAA,iBAAgB;AAEzB,IAAO,gBAAQ;","names":["TableRow"]}
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.11.7",
4
+ "version": "3.0.0-beta.1",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -15,24 +15,26 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/index.d.ts",
18
+ "types": {
19
+ "import": "./dist/index.d.ts",
20
+ "require": "./dist/index.d.cts"
21
+ },
19
22
  "import": "./dist/index.js",
20
23
  "require": "./dist/index.cjs"
21
24
  }
22
25
  },
23
26
  "main": "dist/index.cjs",
24
27
  "module": "dist/index.js",
25
- "umd": "dist/index.umd.js",
26
28
  "types": "dist/index.d.ts",
27
29
  "files": [
28
30
  "src",
29
31
  "dist"
30
32
  ],
31
33
  "devDependencies": {
32
- "@tiptap/core": "^2.11.7"
34
+ "@tiptap/extension-table": "^3.0.0-beta.1"
33
35
  },
34
36
  "peerDependencies": {
35
- "@tiptap/core": "^2.7.0"
37
+ "@tiptap/extension-table": "^3.0.0-beta.0"
36
38
  },
37
39
  "repository": {
38
40
  "type": "git",
@@ -40,7 +42,7 @@
40
42
  "directory": "packages/extension-table-row"
41
43
  },
42
44
  "scripts": {
43
- "clean": "rm -rf dist",
44
- "build": "npm run clean && rollup -c"
45
+ "build": "tsup",
46
+ "lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
45
47
  }
46
- }
48
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { TableRow } from './table-row.js'
1
+ import { TableRow } from '@tiptap/extension-table'
2
2
 
3
- export * from './table-row.js'
3
+ export type { TableRowOptions } from '@tiptap/extension-table'
4
+ export { TableRow } from '@tiptap/extension-table'
4
5
 
5
6
  export default TableRow
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,cAAc,gBAAgB,CAAA;AAE9B,eAAe,QAAQ,CAAA"}
package/dist/index.umd.js DELETED
@@ -1,36 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-table-row"] = {}, global.core));
5
- })(this, (function (exports, core) { 'use strict';
6
-
7
- /**
8
- * This extension allows you to create table rows.
9
- * @see https://www.tiptap.dev/api/nodes/table-row
10
- */
11
- const TableRow = core.Node.create({
12
- name: 'tableRow',
13
- addOptions() {
14
- return {
15
- HTMLAttributes: {},
16
- };
17
- },
18
- content: '(tableCell | tableHeader)*',
19
- tableRole: 'row',
20
- parseHTML() {
21
- return [
22
- { tag: 'tr' },
23
- ];
24
- },
25
- renderHTML({ HTMLAttributes }) {
26
- return ['tr', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
27
- },
28
- });
29
-
30
- exports.TableRow = TableRow;
31
- exports.default = TableRow;
32
-
33
- Object.defineProperty(exports, '__esModule', { value: true });
34
-
35
- }));
36
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
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;OACF;EAED,IAAA,OAAO,EAAE,4BAA4B;EAErC,IAAA,SAAS,EAAE,KAAK;MAEhB,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;EACF,CAAA;;;;;;;;;;;"}
@@ -1,15 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface TableRowOptions {
3
- /**
4
- * The HTML attributes for a table row node.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- /**
11
- * This extension allows you to create table rows.
12
- * @see https://www.tiptap.dev/api/nodes/table-row
13
- */
14
- export declare const TableRow: Node<TableRowOptions, any>;
15
- //# sourceMappingURL=table-row.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../src/table-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,4BAsBnB,CAAA"}
package/src/table-row.ts DELETED
@@ -1,38 +0,0 @@
1
- import { mergeAttributes, Node } from '@tiptap/core'
2
-
3
- export interface TableRowOptions {
4
- /**
5
- * The HTML attributes for a table row node.
6
- * @default {}
7
- * @example { class: 'foo' }
8
- */
9
- HTMLAttributes: Record<string, any>,
10
- }
11
-
12
- /**
13
- * This extension allows you to create table rows.
14
- * @see https://www.tiptap.dev/api/nodes/table-row
15
- */
16
- export const TableRow = Node.create<TableRowOptions>({
17
- name: 'tableRow',
18
-
19
- addOptions() {
20
- return {
21
- HTMLAttributes: {},
22
- }
23
- },
24
-
25
- content: '(tableCell | tableHeader)*',
26
-
27
- tableRole: 'row',
28
-
29
- parseHTML() {
30
- return [
31
- { tag: 'tr' },
32
- ]
33
- },
34
-
35
- renderHTML({ HTMLAttributes }) {
36
- return ['tr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
37
- },
38
- })