quill-table-up 2.2.4 → 2.3.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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "quill-table-up",
3
3
  "type": "module",
4
- "version": "2.2.4",
5
- "packageManager": "pnpm@9.9.0",
4
+ "version": "2.3.1",
5
+ "packageManager": "pnpm@10.12.1",
6
6
  "description": "A table module for quill2.x",
7
7
  "author": "zzxming",
8
8
  "license": "MIT",
@@ -32,9 +32,9 @@
32
32
  "scripts": {
33
33
  "lint": "eslint . --cache",
34
34
  "lint:fix": "eslint . --fix",
35
- "build": "gulp --require @esbuild-kit/cjs-loader",
36
- "dev": "gulp --require @esbuild-kit/cjs-loader dev",
37
- "server": "node ./server.js",
35
+ "build": "tsx ./scripts/build.ts",
36
+ "dev": "tsx ./scripts/build.ts watch",
37
+ "server": "tsx ./scripts/start-server.ts",
38
38
  "test:unit": "vitest",
39
39
  "test:unit-ui": "vitest --ui",
40
40
  "test:e2e": "playwright test",
@@ -44,25 +44,24 @@
44
44
  "quill": "^2.0.3"
45
45
  },
46
46
  "dependencies": {
47
- "@floating-ui/dom": "^1.6.13"
47
+ "@floating-ui/dom": "^1.7.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/preset-env": "^7.27.1",
51
- "@esbuild-kit/cjs-loader": "^2.4.4",
52
- "@playwright/test": "^1.52.0",
50
+ "@babel/preset-env": "^7.27.2",
51
+ "@oxc-project/runtime": "^0.73.0",
52
+ "@playwright/test": "^1.53.0",
53
53
  "@rollup/plugin-babel": "^6.0.4",
54
- "@rollup/plugin-node-resolve": "^16.0.1",
55
- "@rollup/plugin-terser": "^0.4.4",
56
- "@rollup/plugin-typescript": "^11.1.6",
57
- "@types/node": "^20.17.23",
58
- "@typescript-eslint/eslint-plugin": "^8.31.1",
59
- "@typescript-eslint/parser": "^8.31.1",
60
- "@vitest/coverage-v8": "^3.1.2",
61
- "@vitest/ui": "^3.1.2",
54
+ "@rollup/plugin-typescript": "^12.1.2",
55
+ "@types/gulp": "^4.0.17",
56
+ "@types/node": "^24.0.1",
57
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
58
+ "@typescript-eslint/parser": "^8.34.0",
59
+ "@vitest/coverage-v8": "^3.2.3",
60
+ "@vitest/ui": "^3.2.3",
62
61
  "@zzxming/eslint-config": "0.4.5",
63
62
  "autoprefixer": "^10.4.21",
64
- "eslint": "^9.25.0",
65
- "gulp": "^4.0.2",
63
+ "eslint": "^9.29.0",
64
+ "gulp": "^5.0.1",
66
65
  "gulp-clean-css": "^4.3.0",
67
66
  "gulp-less": "^5.0.0",
68
67
  "gulp-postcss": "^10.0.0",
@@ -70,11 +69,11 @@
70
69
  "parchment": "^3.0.0",
71
70
  "postcss-pxtorem": "^6.1.0",
72
71
  "resize-observer-polyfill": "^1.5.1",
73
- "rollup": "^4.40.1",
74
- "rollup-plugin-dts": "^6.2.1",
75
- "rollup-plugin-svg-import": "^3.0.0",
72
+ "tsdown": "^0.12.7",
76
73
  "tslib": "^2.8.1",
74
+ "tsx": "^4.20.3",
77
75
  "typescript": "~5.7.3",
78
- "vitest": "^3.1.2"
76
+ "vitest": "^3.2.3",
77
+ "ws": "^8.18.2"
79
78
  }
80
79
  }
@@ -8,32 +8,33 @@ test.beforeEach(async ({ page }) => {
8
8
 
9
9
  extendTest('test menu color picker should work correctly', async ({ page }) => {
10
10
  await createTableBySelect(page, 'container1', 3, 3);
11
- const container1Cell = page.locator('#editor1').getByRole('cell').nth(0);
11
+ const container1Cell = page.locator('#editor1 .ql-table-cell').nth(0);
12
12
  await container1Cell.click();
13
13
  await container1Cell.click({ button: 'right' });
14
14
 
15
15
  await page.locator('.table-up-menu.is-contextmenu .table-up-menu__item').filter({ hasText: 'Set background color' }).first().click();
16
- await page.waitForTimeout(1000);
17
-
18
16
  await page.locator('.table-up-tooltip .table-up-color-map .table-up-color-map__item[style="background-color: rgb(255, 255, 255);"]').first().click();
19
17
  await expect(page.locator('.table-up-menu.is-contextmenu')).toBeVisible();
20
- await expect(page.locator('#editor1').getByRole('cell').nth(0)).toHaveCSS('background-color', 'rgb(255, 255, 255)');
18
+ await expect(page.locator('#editor1 .ql-table-cell').nth(0)).toHaveCSS('background-color', 'rgb(255, 255, 255)');
19
+
20
+ await page.mouse.click(0, 0);
21
21
 
22
22
  await createTableBySelect(page, 'container2', 3, 3);
23
- const container2Cell = page.locator('#editor2').getByRole('cell').nth(0);
24
- await container2Cell.click();
23
+ await page.locator('#editor2 .ql-table-cell').nth(0).click();
24
+ await page.waitForTimeout(1000);
25
25
 
26
26
  await page.locator('#editor2 .table-up-menu .color-selector').nth(0).click();
27
27
  await page.waitForTimeout(1000);
28
28
 
29
29
  await page.locator('.table-up-tooltip .table-up-color-map .table-up-color-map__item[style="background-color: rgb(255, 255, 255);"]').first().click();
30
30
  await expect(page.locator('#editor2 .table-up-menu')).toBeVisible();
31
- await expect(page.locator('#editor2').getByRole('cell').nth(0)).toHaveCSS('background-color', 'rgb(255, 255, 255)');
31
+ await expect(page.locator('#editor2 .ql-table-cell').nth(0)).toHaveCSS('background-color', 'rgb(255, 255, 255)');
32
32
  });
33
33
 
34
34
  extendTest('test menu color picker should not have two at the same time', async ({ page }) => {
35
35
  await createTableBySelect(page, 'container2', 3, 3);
36
- await page.locator('#editor2').getByRole('cell').nth(0).click();
36
+ await page.locator('#editor2 .ql-table-cell').nth(0).click();
37
+ await page.waitForTimeout(1000);
37
38
 
38
39
  await page.locator('#editor2 .table-up-menu .color-selector').nth(0).click();
39
40
  await page.waitForTimeout(1000);
@@ -115,7 +115,7 @@ test('test TableSelection set indent format', async ({ page }) => {
115
115
  expect(await page.locator('#editor1 .ql-table-cell-inner p.ql-indent-1').count()).toBe(4);
116
116
  });
117
117
 
118
- test('test TableSelection set multiple format', async ({ page }) => {
118
+ test('test TableSelection set format header', async ({ page }) => {
119
119
  await createTableBySelect(page, 'container1', 2, 2);
120
120
  const cell = page.locator('#editor1 .ql-editor .ql-table td').nth(0);
121
121
  const cellBounding = (await cell.boundingBox())!;
@@ -125,13 +125,38 @@ test('test TableSelection set multiple format', async ({ page }) => {
125
125
  await page.mouse.move(cellBounding.x + cellBounding.width * 2 - 10, cellBounding.y + cellBounding.height * 2 - 10);
126
126
  await page.mouse.up();
127
127
 
128
- await page.locator('#editor1 .ql-editor p').nth(0).type('1');
129
- const cells = page.locator('#editor1 .ql-editor .ql-table-cell-inner');
130
- await cells.all().then(async (elements) => {
131
- for (const element of elements) {
132
- await element.type('1');
133
- }
134
- });
128
+ await page.locator('#container1 .ql-toolbar .ql-header').nth(0).click();
129
+ await page.locator('#container1 .ql-toolbar .ql-header .ql-picker-options .ql-picker-item').nth(0).click();
130
+
131
+ expect(await page.locator('#editor1 .ql-table-cell-inner h1').count()).toBe(4);
132
+ });
133
+
134
+ extendTest('test TableSelection set multiple format', async ({ page, editorPage }) => {
135
+ editorPage.index = 0;
136
+ await editorPage.setContents([
137
+ { insert: '\n' },
138
+ { insert: { 'table-up-col': { tableId: '1', colId: '1', full: false, width: 100 } } },
139
+ { insert: { 'table-up-col': { tableId: '1', colId: '2', full: false, width: 100 } } },
140
+ { insert: '1' },
141
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
142
+ { insert: '2' },
143
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
144
+ { insert: '3' },
145
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
146
+ { insert: '4' },
147
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
148
+ { insert: '\n' },
149
+ ]);
150
+ await page.waitForTimeout(1000);
151
+ const cell = page.locator('#editor1 .ql-editor .ql-table td').nth(0);
152
+ const cellBounding = (await cell.boundingBox())!;
153
+ expect(cellBounding).not.toBeNull();
154
+ await cell.click();
155
+ await page.mouse.down();
156
+ await page.mouse.move(cellBounding.x + cellBounding.width * 1.5, cellBounding.y + cellBounding.height * 1.5);
157
+ await page.mouse.up();
158
+ await editorPage.blur();
159
+ await editorPage.focus();
135
160
 
136
161
  await page.locator('.ql-toolbar .ql-bold').nth(0).click();
137
162
  await page.locator('.ql-toolbar .ql-italic').nth(0).click();
@@ -145,7 +170,6 @@ test('test TableSelection set multiple format', async ({ page }) => {
145
170
  expect(await page.locator('#editor1 .ql-table-cell-inner em').count()).toBe(4);
146
171
  expect(await page.locator('#editor1 .ql-table-cell-inner s').count()).toBe(4);
147
172
  expect(await page.locator('#editor1 .ql-table-cell-inner u').count()).toBe(4);
148
-
149
173
  await strongEl.all().then(async (elements) => {
150
174
  for (const element of elements) {
151
175
  await expect(element).toHaveCSS('background-color', 'rgb(230, 0, 0)');
@@ -175,6 +199,53 @@ test('test TableSelection clean format', async ({ page }) => {
175
199
  expect(await cleanEl.count()).toBe(0);
176
200
  });
177
201
 
202
+ extendTest('test TableSelection set format in part of cell text', async ({ page, editorPage }) => {
203
+ editorPage.index = 0;
204
+ await editorPage.setContents([
205
+ { insert: '\n' },
206
+ { insert: { 'table-up-col': { tableId: '1', colId: '1', full: false, width: 100 } } },
207
+ { insert: { 'table-up-col': { tableId: '1', colId: '2', full: false, width: 100 } } },
208
+ { insert: '1' },
209
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
210
+ { insert: '1' },
211
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
212
+ { insert: '1' },
213
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
214
+ { insert: '2' },
215
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
216
+ { insert: '2' },
217
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
218
+ { insert: '2' },
219
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
220
+ { insert: '3' },
221
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
222
+ { insert: '4' },
223
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
224
+ { insert: '\n' },
225
+ ]);
226
+ await page.waitForTimeout(1000);
227
+ await page.locator('#editor1 .ql-editor .ql-table td').nth(0).click();
228
+
229
+ await editorPage.setSelection(4, 0);
230
+ await page.locator('#container1 .ql-toolbar .ql-header').nth(0).click();
231
+ await page.locator('#container1 .ql-toolbar .ql-header .ql-picker-options .ql-picker-item').nth(0).click();
232
+ const selectionAfterHeader = await editorPage.getSelection();
233
+ expect(selectionAfterHeader).toEqual({ index: 4, length: 0 });
234
+
235
+ await editorPage.setSelection(6, 0);
236
+ await page.locator('.ql-toolbar .ql-list[value="bullet"]').nth(0).click();
237
+ const selectionAfterList = await editorPage.getSelection();
238
+ expect(selectionAfterList).toEqual({ index: 6, length: 0 });
239
+
240
+ await page.locator('#editor1 .ql-editor .ql-table td').nth(1).click();
241
+ await editorPage.setSelection(9, 3);
242
+ await page.locator('.ql-toolbar .ql-bold').nth(0).click();
243
+ await page.locator('.ql-toolbar .ql-italic').nth(0).click();
244
+
245
+ expect(await page.locator('#editor1 .ql-table-cell-inner strong').count()).toBe(2);
246
+ expect(await page.locator('#editor1 .ql-table-cell-inner em').count()).toBe(2);
247
+ });
248
+
178
249
  extendTest('test TableSelection should update when text change', async ({ page, editorPage }) => {
179
250
  editorPage.index = 0;
180
251
  await createTableBySelect(page, 'container1', 3, 3);
@@ -576,3 +647,20 @@ extendTest('toolbox bounds should same with quill.root', async ({ page, editorPa
576
647
  expect(quillRootBoundingAfter).not.toBeNull();
577
648
  expect(toolboxBoundingAfter).toEqual(quillRootBoundingAfter);
578
649
  });
650
+
651
+ extendTest('TableSelection should not update when input composition', async ({ page, editorPage }) => {
652
+ editorPage.index = 0;
653
+ await createTableBySelect(page, 'container1', 3, 3);
654
+
655
+ await page.locator('#editor1 .ql-table .ql-table-cell').nth(0).click();
656
+ const selectionLine = page.locator('#container1 .table-up-selection .table-up-selection__line');
657
+ await expect(selectionLine).toBeVisible();
658
+ const bounding = (await selectionLine.boundingBox())!;
659
+ expect(bounding).not.toBeNull();
660
+
661
+ await page.dispatchEvent('#editor1 .ql-editor .ql-table-cell', 'compositionstart');
662
+ await page.type('#editor1 .ql-editor .ql-table-cell', 'zhongwen');
663
+
664
+ const composingBounding = (await selectionLine.boundingBox())!;
665
+ expect(composingBounding).toEqual(bounding);
666
+ });
@@ -2,7 +2,7 @@ import Quill from 'quill';
2
2
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
3
3
  import { TableCellFormat } from '../../formats';
4
4
  import { TableUp } from '../../table-up';
5
- import { createQuillWithTableModule, createTableBodyHTML, createTableCaptionHTML, createTaleColHTML, expectDelta } from './utils';
5
+ import { createQuillWithTableModule, createTableBodyHTML, createTableCaptionHTML, createTableDeltaOps, createTaleColHTML, expectDelta } from './utils';
6
6
 
7
7
  const Delta = Quill.import('delta');
8
8
 
@@ -278,3 +278,104 @@ describe('test table child sort', () => {
278
278
  );
279
279
  });
280
280
  });
281
+
282
+ describe('test table around line', () => {
283
+ it('table around should always have a `block` line', async () => {
284
+ const quill = createQuillWithTableModule(`<p><br></p>`);
285
+ quill.setContents([
286
+ { insert: '1' },
287
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
288
+ { insert: '2' },
289
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
290
+ { insert: '3' },
291
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '3', rowspan: 1, colspan: 1 } }, insert: '\n' },
292
+ { insert: { 'table-up-col': { tableId: '1', colId: '1', full: false, width: 100 } } },
293
+ { insert: { 'table-up-col': { tableId: '1', colId: '2', full: false, width: 100 } } },
294
+ { insert: { 'table-up-col': { tableId: '1', colId: '3', full: false, width: 100 } } },
295
+ { insert: 'title' },
296
+ { attributes: { 'table-up-caption': { tableId: '1', side: 'top' } }, insert: '\n' },
297
+ ]);
298
+ await vi.runAllTimersAsync();
299
+
300
+ expect(quill.root).toEqualHTML(
301
+ `
302
+ <p><br></p>
303
+ <div>
304
+ <table cellpadding="0" cellspacing="0" style="margin-right: auto; width: 300px;">
305
+ ${createTableCaptionHTML({ text: 'title' })}
306
+ ${createTaleColHTML(3, { full: false, width: 100 })}
307
+ ${createTableBodyHTML(1, 3, { isEmpty: false })}
308
+ </table>
309
+ </div>
310
+ <p><br></p>
311
+ `,
312
+ { ignoreAttrs: ['class', 'data-table-id', 'data-row-id', 'data-col-id', 'data-rowspan', 'data-colspan', 'contenteditable'] },
313
+ );
314
+ expectDelta(
315
+ new Delta([
316
+ { insert: '\ntitle' },
317
+ { attributes: { 'table-up-caption': { side: 'top' } }, insert: '\n' },
318
+ { insert: { 'table-up-col': { full: false, width: 100 } } },
319
+ { insert: { 'table-up-col': { full: false, width: 100 } } },
320
+ { insert: { 'table-up-col': { full: false, width: 100 } } },
321
+ { insert: '1' },
322
+ { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' },
323
+ { insert: '2' },
324
+ { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' },
325
+ { insert: '3' },
326
+ { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' },
327
+ { insert: '\n' },
328
+ ]),
329
+ quill.getContents(),
330
+ );
331
+ });
332
+
333
+ it('table around line should allow `code-block` and `list`', async () => {
334
+ const quill = createQuillWithTableModule(`<p><br></p>`);
335
+ quill.setContents(createTableDeltaOps(3, 3, { full: false }));
336
+ quill.formatLine(0, 0, 'code-block', true);
337
+ quill.formatLine(22, 0, 'list', 'ordered');
338
+ await vi.runAllTimersAsync();
339
+ expect(quill.root).toEqualHTML(
340
+ `
341
+ <div class="ql-code-block-container" spellcheck="false"><div class="ql-code-block"><br></div></div>
342
+ <div>
343
+ <table cellpadding="0" cellspacing="0" style="margin-right: auto; width: 300px;">
344
+ ${createTaleColHTML(3, { full: false, width: 100 })}
345
+ ${createTableBodyHTML(3, 3, { isEmpty: false })}
346
+ </table>
347
+ </div>
348
+ <ol><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span><br></li></ol>
349
+ `,
350
+ { ignoreAttrs: ['class', 'data-table-id', 'data-row-id', 'data-col-id', 'data-rowspan', 'data-colspan', 'contenteditable'] },
351
+ );
352
+ expectDelta(
353
+ new Delta([
354
+ { attributes: { 'code-block': 'plain' }, insert: '\n' },
355
+ { insert: { 'table-up-col': { tableId: '1', colId: '1', full: false, width: 100 } } },
356
+ { insert: { 'table-up-col': { tableId: '1', colId: '2', full: false, width: 100 } } },
357
+ { insert: { 'table-up-col': { tableId: '1', colId: '3', full: false, width: 100 } } },
358
+ { insert: '1' },
359
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
360
+ { insert: '2' },
361
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
362
+ { insert: '3' },
363
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '1', colId: '3', rowspan: 1, colspan: 1 } }, insert: '\n' },
364
+ { insert: '4' },
365
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
366
+ { insert: '5' },
367
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
368
+ { insert: '6' },
369
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '2', colId: '3', rowspan: 1, colspan: 1 } }, insert: '\n' },
370
+ { insert: '7' },
371
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '3', colId: '1', rowspan: 1, colspan: 1 } }, insert: '\n' },
372
+ { insert: '8' },
373
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '3', colId: '2', rowspan: 1, colspan: 1 } }, insert: '\n' },
374
+ { insert: '9' },
375
+ { attributes: { 'table-up-cell-inner': { tableId: '1', rowId: '3', colId: '3', rowspan: 1, colspan: 1 } }, insert: '\n' },
376
+ { attributes: { list: 'ordered' }, insert: '\n' },
377
+ ]),
378
+ quill.getContents(),
379
+ );
380
+ });
381
+ });
@@ -1,7 +1,10 @@
1
+ import Quill from 'quill';
1
2
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
3
  import { TableCellInnerFormat } from '../../formats';
3
4
  import { TableUp } from '../../table-up';
4
- import { createQuillWithTableModule, createTable, createTaleColHTML } from './utils';
5
+ import { createQuillWithTableModule, createTable, createTaleColHTML, expectDelta } from './utils';
6
+
7
+ const Delta = Quill.import('delta');
5
8
 
6
9
  beforeEach(() => {
7
10
  vi.useFakeTimers();
@@ -292,4 +295,76 @@ describe('merge and split cell', () => {
292
295
  { ignoreAttrs: ['class', 'style', 'data-table-id', 'contenteditable'] },
293
296
  );
294
297
  });
298
+
299
+ it('split cell should copy style to split cells', async () => {
300
+ const quill = createQuillWithTableModule(`<p><br></p>`);
301
+ quill.setContents([
302
+ { insert: '\n' },
303
+ { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: '1vwhsx9zayhi', full: true, width: 20 } } },
304
+ { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'gpais2dyp87', full: true, width: 20 } } },
305
+ { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'xtfguzk629', full: true, width: 20 } } },
306
+ { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: '94w8b6fhy2p', full: true, width: 20 } } },
307
+ { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'y0epsy6odnm', full: true, width: 20 } } },
308
+ { insert: '1' },
309
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
310
+ { insert: '2' },
311
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
312
+ { insert: '3' },
313
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
314
+ { insert: '4' },
315
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
316
+ { insert: '6' },
317
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
318
+ { insert: '7' },
319
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
320
+ { insert: '8' },
321
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
322
+ { insert: '9' },
323
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
324
+ { insert: '11' },
325
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
326
+ { insert: '12' },
327
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
328
+ { insert: '13' },
329
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
330
+ { insert: '14' },
331
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
332
+ { insert: '16' },
333
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
334
+ { insert: '17' },
335
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
336
+ { insert: '18' },
337
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
338
+ { insert: '19' },
339
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 4, colspan: 4, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' },
340
+ { insert: '5' },
341
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' },
342
+ { insert: '10' },
343
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' },
344
+ { insert: '15' },
345
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' },
346
+ { insert: '20' },
347
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' },
348
+ { insert: '21' },
349
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1 } }, insert: '\n' },
350
+ { insert: '22' },
351
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'gpais2dyp87', rowspan: 1, colspan: 1 } }, insert: '\n' },
352
+ { insert: '23' },
353
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'xtfguzk629', rowspan: 1, colspan: 1 } }, insert: '\n' },
354
+ { insert: '24' },
355
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1 } }, insert: '\n' },
356
+ { insert: '25' },
357
+ { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' },
358
+ { insert: '\n' },
359
+ ]);
360
+ await vi.runAllTimersAsync();
361
+ const tableModule = quill.getModule(TableUp.moduleName) as TableUp;
362
+ const tds = quill.scroll.descendants(TableCellInnerFormat, 0);
363
+ tableModule.splitCell([tds[0]]);
364
+ await vi.runAllTimersAsync();
365
+ expectDelta(
366
+ new Delta([{ insert: '\n' }, { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: '1vwhsx9zayhi', full: true, width: 20 } } }, { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'gpais2dyp87', full: true, width: 20 } } }, { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'xtfguzk629', full: true, width: 20 } } }, { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: '94w8b6fhy2p', full: true, width: 20 } } }, { insert: { 'table-up-col': { tableId: '8v36875pbr6', colId: 'y0epsy6odnm', full: true, width: 20 } } }, { insert: '1' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '2' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '3' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '4' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '6' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '7' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '8' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '9' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '11' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '12' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '13' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '14' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '16' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '17' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '18' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '19' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: 'gpais2dyp87', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: 'xtfguzk629', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '5' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'zjhlbpvwjo', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: 'gpais2dyp87', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: 'xtfguzk629', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '10' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'ogznp2n7y8b', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: 'gpais2dyp87', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: 'xtfguzk629', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '15' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: '9vw214waitk', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: 'gpais2dyp87', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: 'xtfguzk629', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1, style: 'border-color: rgb(0, 153, 255);' } }, insert: '\n' }, { insert: '20' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'j4uarvyr86d', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '21' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: '1vwhsx9zayhi', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '22' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'gpais2dyp87', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '23' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'xtfguzk629', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '24' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: '94w8b6fhy2p', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '25' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '\n' }]),
367
+ quill.getContents(),
368
+ );
369
+ });
295
370
  });