@tiptap/extension-table-cell 2.0.0-beta.15 → 2.0.0-beta.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-table-cell",
3
3
  "description": "table cell extension for tiptap",
4
- "version": "2.0.0-beta.15",
4
+ "version": "2.0.0-beta.19",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -28,5 +28,5 @@
28
28
  "url": "https://github.com/ueberdosis/tiptap",
29
29
  "directory": "packages/extension-table-cell"
30
30
  },
31
- "gitHead": "42e8755d87b37506d537152dbae4b0c8d497fd48"
31
+ "gitHead": "fce16e805824972834d5a8ce8d60e3ff41d63c7e"
32
32
  }
package/src/table-cell.ts CHANGED
@@ -7,8 +7,10 @@ export interface TableCellOptions {
7
7
  export const TableCell = Node.create<TableCellOptions>({
8
8
  name: 'tableCell',
9
9
 
10
- defaultOptions: {
11
- HTMLAttributes: {},
10
+ addOptions() {
11
+ return {
12
+ HTMLAttributes: {},
13
+ }
12
14
  },
13
15
 
14
16
  content: 'block+',
package/CHANGELOG.md DELETED
@@ -1,180 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.0.0-beta.15](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.14...@tiptap/extension-table-cell@2.0.0-beta.15) (2021-09-08)
7
-
8
-
9
- ### Features
10
-
11
- * parseHTML for attributes should return the value instead of an object now, fix [#1863](https://github.com/ueberdosis/tiptap/issues/1863) ([8a3b47a](https://github.com/ueberdosis/tiptap/commit/8a3b47a529d28b28b50d634c6ff69b8e5aad3080))
12
-
13
-
14
-
15
-
16
-
17
- # [2.0.0-beta.14](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.13...@tiptap/extension-table-cell@2.0.0-beta.14) (2021-07-26)
18
-
19
- **Note:** Version bump only for package @tiptap/extension-table-cell
20
-
21
-
22
-
23
-
24
-
25
- # [2.0.0-beta.13](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.12...@tiptap/extension-table-cell@2.0.0-beta.13) (2021-05-18)
26
-
27
- **Note:** Version bump only for package @tiptap/extension-table-cell
28
-
29
-
30
-
31
-
32
-
33
- # [2.0.0-beta.12](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.11...@tiptap/extension-table-cell@2.0.0-beta.12) (2021-05-13)
34
-
35
- **Note:** Version bump only for package @tiptap/extension-table-cell
36
-
37
-
38
-
39
-
40
-
41
- # [2.0.0-beta.11](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.10...@tiptap/extension-table-cell@2.0.0-beta.11) (2021-05-07)
42
-
43
-
44
- ### Bug Fixes
45
-
46
- * revert adding exports ([bc320d0](https://github.com/ueberdosis/tiptap/commit/bc320d0b4b80b0e37a7e47a56e0f6daec6e65d98))
47
-
48
-
49
-
50
-
51
-
52
- # [2.0.0-beta.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.9...@tiptap/extension-table-cell@2.0.0-beta.10) (2021-05-06)
53
-
54
-
55
- ### Bug Fixes
56
-
57
- * revert adding type: module ([f8d6475](https://github.com/ueberdosis/tiptap/commit/f8d6475e2151faea6f96baecdd6bd75880d50d2c))
58
-
59
-
60
-
61
-
62
-
63
- # [2.0.0-beta.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.8...@tiptap/extension-table-cell@2.0.0-beta.9) (2021-05-06)
64
-
65
-
66
- ### Bug Fixes
67
-
68
- * add exports to package.json ([1277fa4](https://github.com/ueberdosis/tiptap/commit/1277fa47151e9c039508cdb219bdd0ffe647f4ee))
69
-
70
-
71
-
72
-
73
-
74
- # [2.0.0-beta.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.7...@tiptap/extension-table-cell@2.0.0-beta.8) (2021-05-06)
75
-
76
- **Note:** Version bump only for package @tiptap/extension-table-cell
77
-
78
-
79
-
80
-
81
-
82
- # [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.6...@tiptap/extension-table-cell@2.0.0-beta.7) (2021-05-05)
83
-
84
- **Note:** Version bump only for package @tiptap/extension-table-cell
85
-
86
-
87
-
88
-
89
-
90
- # [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.5...@tiptap/extension-table-cell@2.0.0-beta.6) (2021-04-23)
91
-
92
- **Note:** Version bump only for package @tiptap/extension-table-cell
93
-
94
-
95
-
96
-
97
-
98
- # [2.0.0-beta.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.4...@tiptap/extension-table-cell@2.0.0-beta.5) (2021-04-22)
99
-
100
- **Note:** Version bump only for package @tiptap/extension-table-cell
101
-
102
-
103
-
104
-
105
-
106
- # [2.0.0-beta.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.3...@tiptap/extension-table-cell@2.0.0-beta.4) (2021-04-21)
107
-
108
- **Note:** Version bump only for package @tiptap/extension-table-cell
109
-
110
-
111
-
112
-
113
-
114
- # [2.0.0-beta.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.2...@tiptap/extension-table-cell@2.0.0-beta.3) (2021-04-16)
115
-
116
- **Note:** Version bump only for package @tiptap/extension-table-cell
117
-
118
-
119
-
120
-
121
-
122
- # [2.0.0-beta.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-beta.1...@tiptap/extension-table-cell@2.0.0-beta.2) (2021-04-15)
123
-
124
- **Note:** Version bump only for package @tiptap/extension-table-cell
125
-
126
-
127
-
128
-
129
-
130
- # [2.0.0-beta.1](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.11...@tiptap/extension-table-cell@2.0.0-beta.1) (2021-03-05)
131
-
132
- **Note:** Version bump only for package @tiptap/extension-table-cell
133
-
134
-
135
-
136
-
137
-
138
- # [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.10...@tiptap/extension-table-cell@2.0.0-alpha.11) (2021-02-16)
139
-
140
- **Note:** Version bump only for package @tiptap/extension-table-cell
141
-
142
-
143
-
144
-
145
-
146
- # [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.9...@tiptap/extension-table-cell@2.0.0-alpha.10) (2021-02-07)
147
-
148
- **Note:** Version bump only for package @tiptap/extension-table-cell
149
-
150
-
151
-
152
-
153
-
154
- # [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.8...@tiptap/extension-table-cell@2.0.0-alpha.9) (2021-02-05)
155
-
156
- **Note:** Version bump only for package @tiptap/extension-table-cell
157
-
158
-
159
-
160
-
161
-
162
- # [2.0.0-alpha.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.7...@tiptap/extension-table-cell@2.0.0-alpha.8) (2021-01-29)
163
-
164
- **Note:** Version bump only for package @tiptap/extension-table-cell
165
-
166
-
167
-
168
-
169
-
170
- # [2.0.0-alpha.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-table-cell@2.0.0-alpha.6...@tiptap/extension-table-cell@2.0.0-alpha.7) (2021-01-29)
171
-
172
- **Note:** Version bump only for package @tiptap/extension-table-cell
173
-
174
-
175
-
176
-
177
-
178
- # 2.0.0-alpha.6 (2021-01-28)
179
-
180
- **Note:** Version bump only for package @tiptap/extension-table-cell
@@ -1,3 +0,0 @@
1
- import { TableCell } from './table-cell';
2
- export * from './table-cell';
3
- export default TableCell;
@@ -1,5 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface TableCellOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- export declare const TableCell: Node<TableCellOptions>;
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@tiptap/core');
6
-
7
- const TableCell = core.Node.create({
8
- name: 'tableCell',
9
- defaultOptions: {
10
- HTMLAttributes: {},
11
- },
12
- content: 'block+',
13
- addAttributes() {
14
- return {
15
- colspan: {
16
- default: 1,
17
- },
18
- rowspan: {
19
- default: 1,
20
- },
21
- colwidth: {
22
- default: null,
23
- parseHTML: element => {
24
- const colwidth = element.getAttribute('colwidth');
25
- const value = colwidth
26
- ? [parseInt(colwidth, 10)]
27
- : null;
28
- return value;
29
- },
30
- },
31
- };
32
- },
33
- tableRole: 'cell',
34
- isolating: true,
35
- parseHTML() {
36
- return [
37
- { tag: 'td' },
38
- ];
39
- },
40
- renderHTML({ HTMLAttributes }) {
41
- return ['td', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
42
- },
43
- });
44
-
45
- exports.TableCell = TableCell;
46
- exports['default'] = TableCell;
47
- //# sourceMappingURL=tiptap-extension-table-cell.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-table-cell.cjs.js","sources":["../src/table-cell.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TableCellOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableCell = Node.create<TableCellOptions>({\n name: 'tableCell',\n\n defaultOptions: {\n HTMLAttributes: {},\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 ? [parseInt(colwidth, 10)]\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'td' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['td', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;MAMa,SAAS,GAAGA,SAAI,CAAC,MAAM,CAAmB;IACrD,IAAI,EAAE,WAAW;IAEjB,cAAc,EAAE;QACd,cAAc,EAAE,EAAE;KACnB;IAED,OAAO,EAAE,QAAQ;IAEjB,aAAa;QACX,OAAO;YACL,OAAO,EAAE;gBACP,OAAO,EAAE,CAAC;aACX;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,CAAC;aACX;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,OAAO;oBAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;oBACjD,MAAM,KAAK,GAAG,QAAQ;0BAClB,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;0BACxB,IAAI,CAAA;oBAER,OAAO,KAAK,CAAA;iBACb;aACF;SACF,CAAA;KACF;IAED,SAAS,EAAE,MAAM;IAEjB,SAAS,EAAE,IAAI;IAEf,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;CAEF;;;;;"}
@@ -1,42 +0,0 @@
1
- import { Node, mergeAttributes } from '@tiptap/core';
2
-
3
- const TableCell = Node.create({
4
- name: 'tableCell',
5
- defaultOptions: {
6
- HTMLAttributes: {},
7
- },
8
- content: 'block+',
9
- addAttributes() {
10
- return {
11
- colspan: {
12
- default: 1,
13
- },
14
- rowspan: {
15
- default: 1,
16
- },
17
- colwidth: {
18
- default: null,
19
- parseHTML: element => {
20
- const colwidth = element.getAttribute('colwidth');
21
- const value = colwidth
22
- ? [parseInt(colwidth, 10)]
23
- : null;
24
- return value;
25
- },
26
- },
27
- };
28
- },
29
- tableRole: 'cell',
30
- isolating: true,
31
- parseHTML() {
32
- return [
33
- { tag: 'td' },
34
- ];
35
- },
36
- renderHTML({ HTMLAttributes }) {
37
- return ['td', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
38
- },
39
- });
40
-
41
- export { TableCell, TableCell as default };
42
- //# sourceMappingURL=tiptap-extension-table-cell.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-table-cell.esm.js","sources":["../src/table-cell.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TableCellOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableCell = Node.create<TableCellOptions>({\n name: 'tableCell',\n\n defaultOptions: {\n HTMLAttributes: {},\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 ? [parseInt(colwidth, 10)]\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'td' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['td', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":[],"mappings":";;MAMa,SAAS,GAAG,IAAI,CAAC,MAAM,CAAmB;IACrD,IAAI,EAAE,WAAW;IAEjB,cAAc,EAAE;QACd,cAAc,EAAE,EAAE;KACnB;IAED,OAAO,EAAE,QAAQ;IAEjB,aAAa;QACX,OAAO;YACL,OAAO,EAAE;gBACP,OAAO,EAAE,CAAC;aACX;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,CAAC;aACX;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,OAAO;oBAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;oBACjD,MAAM,KAAK,GAAG,QAAQ;0BAClB,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;0BACxB,IAAI,CAAA;oBAER,OAAO,KAAK,CAAA;iBACb;aACF;SACF,CAAA;KACF;IAED,SAAS,EAAE,MAAM;IAEjB,SAAS,EAAE,IAAI;IAEf,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;CAEF;;;;"}
@@ -1,51 +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-cell'] = {}, global.core));
5
- }(this, (function (exports, core) { 'use strict';
6
-
7
- const TableCell = core.Node.create({
8
- name: 'tableCell',
9
- defaultOptions: {
10
- HTMLAttributes: {},
11
- },
12
- content: 'block+',
13
- addAttributes() {
14
- return {
15
- colspan: {
16
- default: 1,
17
- },
18
- rowspan: {
19
- default: 1,
20
- },
21
- colwidth: {
22
- default: null,
23
- parseHTML: element => {
24
- const colwidth = element.getAttribute('colwidth');
25
- const value = colwidth
26
- ? [parseInt(colwidth, 10)]
27
- : null;
28
- return value;
29
- },
30
- },
31
- };
32
- },
33
- tableRole: 'cell',
34
- isolating: true,
35
- parseHTML() {
36
- return [
37
- { tag: 'td' },
38
- ];
39
- },
40
- renderHTML({ HTMLAttributes }) {
41
- return ['td', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
42
- },
43
- });
44
-
45
- exports.TableCell = TableCell;
46
- exports['default'] = TableCell;
47
-
48
- Object.defineProperty(exports, '__esModule', { value: true });
49
-
50
- })));
51
- //# sourceMappingURL=tiptap-extension-table-cell.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-table-cell.umd.js","sources":["../src/table-cell.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TableCellOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const TableCell = Node.create<TableCellOptions>({\n name: 'tableCell',\n\n defaultOptions: {\n HTMLAttributes: {},\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 ? [parseInt(colwidth, 10)]\n : null\n\n return value\n },\n },\n }\n },\n\n tableRole: 'cell',\n\n isolating: true,\n\n parseHTML() {\n return [\n { tag: 'td' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['td', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;QAMa,SAAS,GAAGA,SAAI,CAAC,MAAM,CAAmB;MACrD,IAAI,EAAE,WAAW;MAEjB,cAAc,EAAE;UACd,cAAc,EAAE,EAAE;OACnB;MAED,OAAO,EAAE,QAAQ;MAEjB,aAAa;UACX,OAAO;cACL,OAAO,EAAE;kBACP,OAAO,EAAE,CAAC;eACX;cACD,OAAO,EAAE;kBACP,OAAO,EAAE,CAAC;eACX;cACD,QAAQ,EAAE;kBACR,OAAO,EAAE,IAAI;kBACb,SAAS,EAAE,OAAO;sBAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;sBACjD,MAAM,KAAK,GAAG,QAAQ;4BAClB,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;4BACxB,IAAI,CAAA;sBAER,OAAO,KAAK,CAAA;mBACb;eACF;WACF,CAAA;OACF;MAED,SAAS,EAAE,MAAM;MAEjB,SAAS,EAAE,IAAI;MAEf,SAAS;UACP,OAAO;cACL,EAAE,GAAG,EAAE,IAAI,EAAE;WACd,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE;UAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;OAC/E;GAEF;;;;;;;;;;;"}