quill-table-up 2.0.3 → 2.0.5

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/README.md CHANGED
@@ -65,6 +65,7 @@ const quill = new Quill('#editor', {
65
65
  | attribute | description | type | default |
66
66
  | ------------------ | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------- |
67
67
  | full | if set `true`. width max will be 100% | `boolean` | `false` |
68
+ | fullSwitch | enable to choose insert a full width table | `boolean` | `true` |
68
69
  | texts | the text used to create the table | `TableTextOptions` | `defaultTexts` |
69
70
  | customSelect | display a custom select to custom row and column number add a table. module provides default selector `defaultCustomSelect` | `(tableModule: TableUp, picker: Picker) => Promise<HTMLElement> \| HTMLElement` | - |
70
71
  | customBtn | display a custom button to custom row and column number add a table. it only when use `defaultCustomSelect` will effect | `boolean` | `false` |
@@ -87,6 +88,7 @@ const quill = new Quill('#editor', {
87
88
 
88
89
  ```ts
89
90
  const defaultTexts = {
91
+ fullCheckboxText: 'Insert full width table',
90
92
  customBtnText: 'Custom',
91
93
  confirmText: 'Confirm',
92
94
  cancelText: 'Cancel',
package/dist/index.d.ts CHANGED
@@ -8,6 +8,12 @@ import TypeCodeBlock from 'quill/formats/code';
8
8
  import TypeHeader from 'quill/formats/header';
9
9
  import TypeListItem from 'quill/formats/list';
10
10
 
11
+ interface ColorPickerOptions {
12
+ color: string;
13
+ onChange: (color: string) => void;
14
+ }
15
+ declare const createColorPicker: (options?: Partial<ColorPickerOptions>) => HTMLDivElement;
16
+
11
17
  type QuillThemePicker = (Picker & {
12
18
  options: HTMLElement;
13
19
  });
@@ -60,7 +66,7 @@ interface TableTextOptions extends TableCreatorTextOptions {
60
66
  interface TableUpOptions {
61
67
  customSelect?: (tableModule: TableUp, picker: QuillThemePicker) => Promise<HTMLElement> | HTMLElement;
62
68
  full: boolean;
63
- fullSwtich: boolean;
69
+ fullSwitch: boolean;
64
70
  customBtn: boolean;
65
71
  texts: TableTextOptions;
66
72
  icon: string;
@@ -134,6 +140,15 @@ interface TableConstantsData {
134
140
  tableUpEvent: Record<string, string>;
135
141
  }
136
142
 
143
+ interface TableSelectOptions {
144
+ row: number;
145
+ col: number;
146
+ onSelect: (row: number, col: number) => void;
147
+ customBtn: boolean;
148
+ texts: Partial<TableCreatorTextOptions>;
149
+ }
150
+ declare const createSelectBox: (options?: Partial<TableSelectOptions>) => HTMLDivElement;
151
+
137
152
  interface ToolTipOptions {
138
153
  direction?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
139
154
  msg?: string;
@@ -151,6 +166,7 @@ interface TooltipInstance {
151
166
  show: (force?: boolean) => void;
152
167
  hide: (force?: boolean) => void;
153
168
  }
169
+ declare const createTooltip: (target: HTMLElement, options?: ToolTipOptions) => TooltipInstance | null;
154
170
 
155
171
  declare const blotName: {
156
172
  readonly container: "table-up-container";
@@ -892,4 +908,4 @@ declare class TableUp {
892
908
  declare function updateTableConstants(data: Partial<TableConstantsData>): void;
893
909
  declare function defaultCustomSelect(tableModule: TableUp, picker: QuillThemePicker): HTMLDivElement;
894
910
 
895
- export { BlockOverride, BlockquoteOverride, CodeBlockOverride, type Constructor, ContainerFormat, HeaderOverride, type InternalModule, type InternalTableSelectionModule, ListItemOverride, type QuillTheme, type QuillThemePicker, type RelactiveRect, ScrollOverride, Scrollbar, type SkipRowCount, TableAlign, TableBodyFormat, TableCellFormat, TableCellInnerFormat, type TableCellValue, TableColFormat, type TableColValue, TableColgroupFormat, type TableConstantsData, type TableCreatorTextOptions, TableMainFormat, TableMenuCommon, TableMenuContextmenu, type TableMenuOptions, type TableMenuOptionsInput$1 as TableMenuOptionsInput, TableMenuSelect, TableResizeBox, TableResizeCommon, TableResizeLine, TableResizeScale, type TableResizeScaleOptions, TableRowFormat, type TableRowValue, TableSelection, type TableSelectionOptions, type TableTextOptions, TableUp, type TableUpOptions, type TableValue, TableVirtualScrollbar, TableWrapperFormat, type Tool, type ToolOption, type ToolOptionBreak, blotName, TableUp as default, defaultCustomSelect, findParentBlot, findParentBlots, isTableAlignRight, randomId, tableCantInsert, tableUpEvent, tableUpSize, updateTableConstants };
911
+ export { BlockOverride, BlockquoteOverride, CodeBlockOverride, type Constructor, ContainerFormat, HeaderOverride, type InternalModule, type InternalTableSelectionModule, ListItemOverride, type QuillTheme, type QuillThemePicker, type RelactiveRect, ScrollOverride, Scrollbar, type SkipRowCount, TableAlign, TableBodyFormat, TableCellFormat, TableCellInnerFormat, type TableCellValue, TableColFormat, type TableColValue, TableColgroupFormat, type TableConstantsData, type TableCreatorTextOptions, TableMainFormat, TableMenuCommon, TableMenuContextmenu, type TableMenuOptions, type TableMenuOptionsInput$1 as TableMenuOptionsInput, TableMenuSelect, TableResizeBox, TableResizeCommon, TableResizeLine, TableResizeScale, type TableResizeScaleOptions, TableRowFormat, type TableRowValue, TableSelection, type TableSelectionOptions, type TableTextOptions, TableUp, type TableUpOptions, type TableValue, TableVirtualScrollbar, TableWrapperFormat, type Tool, type ToolOption, type ToolOptionBreak, blotName, createColorPicker, createSelectBox, createTooltip, TableUp as default, defaultCustomSelect, findParentBlot, findParentBlots, isTableAlignRight, randomId, tableCantInsert, tableUpEvent, tableUpSize, updateTableConstants };