@tiptap/extension-table-row 2.11.6 → 3.0.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/LICENSE.md +21 -0
- package/README.md +5 -1
- package/dist/index.cjs +32 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +9 -27
- package/dist/index.js.map +1 -1
- package/package.json +10 -8
- package/src/index.ts +3 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.umd.js +0 -36
- package/dist/index.umd.js.map +0 -1
- package/dist/table-row.d.ts +0 -15
- package/dist/table-row.d.ts.map +0 -1
- package/src/table-row.ts +0 -38
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
|
[](https://www.npmjs.com/package/@tiptap/extension-table-row)
|
|
3
4
|
[](https://npmcharts.com/compare/tiptap?minimal=true)
|
|
4
5
|
[](https://www.npmjs.com/package/@tiptap/extension-table-row)
|
|
5
6
|
[](https://github.com/sponsors/ueberdosis)
|
|
6
7
|
|
|
7
8
|
## Introduction
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { TableRow } from '
|
|
2
|
-
export
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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,"
|
|
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": "
|
|
4
|
+
"version": "3.0.0-beta.0",
|
|
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":
|
|
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/
|
|
34
|
+
"@tiptap/extension-table": "^3.0.0-beta.0"
|
|
33
35
|
},
|
|
34
36
|
"peerDependencies": {
|
|
35
|
-
"@tiptap/
|
|
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
|
-
"
|
|
44
|
-
"
|
|
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 '
|
|
1
|
+
import { TableRow } from '@tiptap/extension-table'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type { TableRowOptions } from '@tiptap/extension-table'
|
|
4
|
+
export { TableRow } from '@tiptap/extension-table'
|
|
4
5
|
|
|
5
6
|
export default TableRow
|
package/dist/index.d.ts.map
DELETED
|
@@ -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
|
package/dist/index.umd.js.map
DELETED
|
@@ -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;;;;;;;;;;;"}
|
package/dist/table-row.d.ts
DELETED
|
@@ -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
|
package/dist/table-row.d.ts.map
DELETED
|
@@ -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
|
-
})
|