quill-table-up 3.2.2 → 3.3.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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 zzxming
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 zzxming
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/dist/index.d.ts CHANGED
@@ -81,7 +81,7 @@ declare class TableCellFormat extends ContainerFormat {
81
81
  static isAllowStyle(str: string): boolean;
82
82
  static create(value: TableCellValue): HTMLTableCellElement;
83
83
  static formats(domNode: HTMLElement): Record<string, any>;
84
- isChildHeadTableCellInner(): boolean | null;
84
+ isChildHeadTableCellInner(): boolean;
85
85
  setFormatValue(name: string, value?: any): void;
86
86
  setStyleBoder(name: string, value?: any): void;
87
87
  getNearByCell(direction: 'left' | 'top'): TableCellFormat[];
@@ -322,16 +322,24 @@ declare const tableUpInternal: {
322
322
  };
323
323
  //#endregion
324
324
  //#region src/modules/table-dom-selector.d.ts
325
- declare class TableDomSelector {
325
+ interface TableModuleLifecycle {
326
+ hide: () => void;
327
+ show: () => void;
328
+ update: () => void;
329
+ destroy: () => void;
330
+ }
331
+ declare class TableDomSelector implements TableModuleLifecycle {
326
332
  tableModule: TableUp;
327
333
  quill: Quill;
328
334
  table?: HTMLTableElement;
335
+ tableSelectMouseDownHandler: (event: MouseEvent) => void;
329
336
  constructor(tableModule: TableUp, quill: Quill);
330
337
  tableSelectHandler(event: MouseEvent): void;
331
338
  setSelectionTable(table: HTMLTableElement | undefined): void;
332
339
  hide(): void;
333
340
  show(): void;
334
341
  update(): void;
342
+ destroy(): void;
335
343
  }
336
344
  //#endregion
337
345
  //#region src/modules/table-align.d.ts
@@ -901,7 +909,7 @@ declare class TableSelection extends TableDomSelector {
901
909
  setSelectionData(selection: Selection, selectionData: SelectionData): void;
902
910
  selectionDirectionUp(selection: SelectionData): boolean;
903
911
  resolveOptions(options: Partial<TableSelectionOptions>): TableSelectionOptions;
904
- selectionChangeHandler(): void;
912
+ selectionChangeHandler: () => void;
905
913
  helpLinesInitial(): HTMLDivElement;
906
914
  computeSelectedTds(startPoint: Position, endPoint: Position): TableCellInnerFormat[];
907
915
  getScrollPositionDiff(): Position;
@@ -1221,6 +1229,7 @@ declare class TableUp {
1221
1229
  fixTableByLisenter: (this: any) => void;
1222
1230
  selector?: HTMLElement;
1223
1231
  resizeOb: ResizeObserver;
1232
+ editableObserver: MutationObserver;
1224
1233
  modules: Record<string, Constructor>;
1225
1234
  get statics(): any;
1226
1235
  constructor(quill: Quill, options: Partial<TableUpOptions>);
@@ -1254,6 +1263,8 @@ declare class TableUp {
1254
1263
  BorderColor: string;
1255
1264
  } & Partial<TableTextOptions>;
1256
1265
  initModules(): void;
1266
+ listenEditableChange(): void;
1267
+ destroyModules(): void;
1257
1268
  getModule<T>(name: string): T | undefined;
1258
1269
  quillHack(): void;
1259
1270
  buildCustomSelect(customSelect: ((module: TableUp, picker: QuillThemePicker) => HTMLElement | Promise<HTMLElement>) | undefined, picker: QuillThemePicker): Promise<void>;
@@ -1279,5 +1290,5 @@ declare class TableUp {
1279
1290
  convertTableBodyByCells(tableBlot: TableMainFormat, selecteds: TableCellInnerFormat[], tag: TableBodyTag): void;
1280
1291
  }
1281
1292
  //#endregion
1282
- export { BlockEmbedOverride, BlockOverride, ClipboardOptions, Constructor, ContainerFormat, InternalModule, InternalTableMenuModule, InternalTableSelectionModule, Matcher, MenuTooltipInstance, Position, QuillTheme, QuillThemePicker, RelactiveRect, ScrollOverride, Scrollbar, SelectionData, Selector, SkipRowCount, TableAlign, TableBodyFormat, TableBodyTag, TableCaptionFormat, TableCaptionValue, TableCellFormat, TableCellInnerFormat, TableCellValue, TableClipboard, TableColFormat, TableColValue, TableColgroupFormat, TableConstantsData, TableCreatorTextOptions, TableDomSelector, TableFootFormat, TableHeadFormat, TableMainFormat, TableMenuCommon, TableMenuContextmenu, TableMenuOptions, TableMenuOptionsInput, TableMenuSelect, TableMenuTexts, TableResizeBox, TableResizeBoxOptions, TableResizeCommon, TableResizeCommonHelper, TableResizeLine, TableResizeScale, TableResizeScaleOptions, TableRowFormat, TableRowValue, TableSelection, TableSelectionOptions, TableTextOptions, TableUp, TableUp as default, TableUpExtraModule, TableUpModule, TableUpOptions, TableValue, TableVirtualScrollbar, TableWrapperFormat, Tool, ToolOption, ToolOptionBreak, Writable, applyCellUpdates, blotName, createColorPicker, createSelectBox, createTooltip, defaultCustomSelect, findParentBlot, findParentBlots, getCellPositions, getColRect, getCountByPosition, getTableCellStructure, getTableMainRect, groupCellByRow, isCellsSpan, isTableAlignRight, parsePasteDelta, pasteCells, pasteWithLoop, pasteWithStructure, prepareCellUpdate, randomId, removeOverlappingCells, tableMenuTools, tableUpEvent, tableUpInternal, tableUpSize, updateTableConstants };
1293
+ export { BlockEmbedOverride, BlockOverride, ClipboardOptions, Constructor, ContainerFormat, InternalModule, InternalTableMenuModule, InternalTableSelectionModule, Matcher, MenuTooltipInstance, Position, QuillTheme, QuillThemePicker, RelactiveRect, ScrollOverride, Scrollbar, SelectionData, Selector, SkipRowCount, TableAlign, TableBodyFormat, TableBodyTag, TableCaptionFormat, TableCaptionValue, TableCellFormat, TableCellInnerFormat, TableCellValue, TableClipboard, TableColFormat, TableColValue, TableColgroupFormat, TableConstantsData, TableCreatorTextOptions, TableDomSelector, TableFootFormat, TableHeadFormat, TableMainFormat, TableMenuCommon, TableMenuContextmenu, TableMenuOptions, TableMenuOptionsInput, TableMenuSelect, TableMenuTexts, TableModuleLifecycle, TableResizeBox, TableResizeBoxOptions, TableResizeCommon, TableResizeCommonHelper, TableResizeLine, TableResizeScale, TableResizeScaleOptions, TableRowFormat, TableRowValue, TableSelection, TableSelectionOptions, TableTextOptions, TableUp, TableUp as default, TableUpExtraModule, TableUpModule, TableUpOptions, TableValue, TableVirtualScrollbar, TableWrapperFormat, Tool, ToolOption, ToolOptionBreak, Writable, applyCellUpdates, blotName, createColorPicker, createSelectBox, createTooltip, defaultCustomSelect, findParentBlot, findParentBlots, getCellPositions, getColRect, getCountByPosition, getTableCellStructure, getTableMainRect, groupCellByRow, isCellsSpan, isTableAlignRight, parsePasteDelta, pasteCells, pasteWithLoop, pasteWithStructure, prepareCellUpdate, randomId, removeOverlappingCells, tableMenuTools, tableUpEvent, tableUpInternal, tableUpSize, updateTableConstants };
1283
1294
  //# sourceMappingURL=index.d.ts.map