@tiptap/extension-table-row 3.0.0-next.3 → 3.0.0-next.4

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) 2024, 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
@@ -18,38 +18,19 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- TableRow: () => TableRow,
24
- default: () => src_default
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TableRow: () => import_extension_table2.TableRow,
24
+ TableRowOptions: () => import_extension_table2.TableRowOptions,
25
+ default: () => index_default
25
26
  });
26
- module.exports = __toCommonJS(src_exports);
27
-
28
- // src/table-row.ts
29
- var import_core = require("@tiptap/core");
30
- var TableRow = import_core.Node.create({
31
- name: "tableRow",
32
- addOptions() {
33
- return {
34
- HTMLAttributes: {}
35
- };
36
- },
37
- content: "(tableCell | tableHeader)*",
38
- tableRole: "row",
39
- parseHTML() {
40
- return [
41
- { tag: "tr" }
42
- ];
43
- },
44
- renderHTML({ HTMLAttributes }) {
45
- return ["tr", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0];
46
- }
47
- });
48
-
49
- // src/index.ts
50
- var src_default = TableRow;
27
+ module.exports = __toCommonJS(index_exports);
28
+ var import_extension_table = require("@tiptap/extension-table");
29
+ var import_extension_table2 = require("@tiptap/extension-table");
30
+ var index_default = import_extension_table.TableRow;
51
31
  // Annotate the CommonJS export names for ESM import in node:
52
32
  0 && (module.exports = {
53
- TableRow
33
+ TableRow,
34
+ TableRowOptions
54
35
  });
55
36
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/table-row.ts"],"sourcesContent":["import { TableRow } from './table-row.js'\n\nexport * from './table-row.js'\n\nexport default TableRow\n","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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AAe/B,IAAM,WAAW,iBAAK,OAAwB;AAAA,EACnD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,EAET,WAAW;AAAA,EAEX,YAAY;AACV,WAAO;AAAA,MACL,EAAE,KAAK,KAAK;AAAA,IACd;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,UAAM,6BAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AACF,CAAC;;;ADjCD,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { TableRow } from '@tiptap/extension-table'\n\nexport { TableRow, TableRowOptions } from '@tiptap/extension-table'\n\nexport default TableRow\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAyB;AAEzB,IAAAA,0BAA0C;AAE1C,IAAO,gBAAQ;","names":["import_extension_table"]}
package/dist/index.d.cts CHANGED
@@ -1,17 +1,2 @@
1
- import { Node } from '@tiptap/core';
2
-
3
- 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
- * This extension allows you to create table rows.
13
- * @see https://www.tiptap.dev/api/nodes/table-row
14
- */
15
- declare const TableRow: Node<TableRowOptions, any>;
16
-
17
- export { TableRow, type TableRowOptions, TableRow as default };
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,17 +1,2 @@
1
- import { Node } from '@tiptap/core';
2
-
3
- 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
- * This extension allows you to create table rows.
13
- * @see https://www.tiptap.dev/api/nodes/table-row
14
- */
15
- declare const TableRow: Node<TableRowOptions, any>;
16
-
17
- export { TableRow, type TableRowOptions, TableRow as default };
1
+ import { TableRow } from '@tiptap/extension-table';
2
+ export { TableRow, TableRowOptions, TableRow as default } from '@tiptap/extension-table';
package/dist/index.js CHANGED
@@ -1,28 +1,10 @@
1
- // src/table-row.ts
2
- import { mergeAttributes, Node } from "@tiptap/core";
3
- var TableRow = Node.create({
4
- name: "tableRow",
5
- addOptions() {
6
- return {
7
- HTMLAttributes: {}
8
- };
9
- },
10
- content: "(tableCell | tableHeader)*",
11
- tableRole: "row",
12
- parseHTML() {
13
- return [
14
- { tag: "tr" }
15
- ];
16
- },
17
- renderHTML({ HTMLAttributes }) {
18
- return ["tr", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
19
- }
20
- });
21
-
22
1
  // src/index.ts
23
- var src_default = TableRow;
2
+ import { TableRow } from "@tiptap/extension-table";
3
+ import { TableRow as TableRow2, TableRowOptions } from "@tiptap/extension-table";
4
+ var index_default = TableRow;
24
5
  export {
25
- TableRow,
26
- src_default as default
6
+ TableRow2 as TableRow,
7
+ TableRowOptions,
8
+ index_default as default
27
9
  };
28
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/table-row.ts","../src/index.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","import { TableRow } from './table-row.js'\n\nexport * from './table-row.js'\n\nexport default TableRow\n"],"mappings":";AAAA,SAAS,iBAAiB,YAAY;AAe/B,IAAM,WAAW,KAAK,OAAwB;AAAA,EACnD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,EAET,WAAW;AAAA,EAEX,YAAY;AACV,WAAO;AAAA,MACL,EAAE,KAAK,KAAK;AAAA,IACd;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,MAAM,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AACF,CAAC;;;ACjCD,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { TableRow } from '@tiptap/extension-table'\n\nexport { TableRow, TableRowOptions } from '@tiptap/extension-table'\n\nexport default TableRow\n"],"mappings":";AAAA,SAAS,gBAAgB;AAEzB,SAAS,YAAAA,WAAU,uBAAuB;AAE1C,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": "3.0.0-next.3",
4
+ "version": "3.0.0-next.4",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -15,7 +15,10 @@
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
  }
@@ -28,10 +31,10 @@
28
31
  "dist"
29
32
  ],
30
33
  "devDependencies": {
31
- "@tiptap/core": "^3.0.0-next.3"
34
+ "@tiptap/extension-table": "^3.0.0-next.4"
32
35
  },
33
36
  "peerDependencies": {
34
- "@tiptap/core": "^3.0.0-next.1"
37
+ "@tiptap/extension-table": "^3.0.0-next.3"
35
38
  },
36
39
  "repository": {
37
40
  "type": "git",
@@ -39,6 +42,7 @@
39
42
  "directory": "packages/extension-table-row"
40
43
  },
41
44
  "scripts": {
42
- "build": "tsup"
45
+ "build": "tsup",
46
+ "lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
43
47
  }
44
- }
48
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { TableRow } from './table-row.js'
1
+ import { TableRow } from '@tiptap/extension-table'
2
2
 
3
- export * from './table-row.js'
3
+ export { TableRow, TableRowOptions } from '@tiptap/extension-table'
4
4
 
5
5
  export default TableRow
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
- })