@windoc/react 0.3.12 → 0.3.14
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/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +898 -590
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +882 -576
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/styles/editor.css +183 -192
package/dist/index.d.mts
CHANGED
|
@@ -31,6 +31,9 @@ type EditorInstance = {
|
|
|
31
31
|
executeListIndent: () => void;
|
|
32
32
|
executeListOutdent: () => void;
|
|
33
33
|
executeInsertTable: (rows: number, cols: number) => void;
|
|
34
|
+
executeTableTdBackgroundColor: (color: string) => void;
|
|
35
|
+
executeTableTdBorderColor: (color: string) => void;
|
|
36
|
+
executeTableTdPadding: (padding: [number, number, number, number]) => void;
|
|
34
37
|
executeImage: (options: {
|
|
35
38
|
value: string;
|
|
36
39
|
width: number;
|
|
@@ -141,6 +144,7 @@ type EditorInstance = {
|
|
|
141
144
|
getRangeContext: () => {
|
|
142
145
|
startRowNo: number;
|
|
143
146
|
startColNo: number;
|
|
147
|
+
isTable: boolean;
|
|
144
148
|
} | null;
|
|
145
149
|
getPaperMargin: () => number[];
|
|
146
150
|
getSearchNavigateInfo: () => {
|
|
@@ -290,10 +294,12 @@ interface EditorContextValue {
|
|
|
290
294
|
editorRef: MutableRefObject<EditorInstance | null>;
|
|
291
295
|
isApple: boolean;
|
|
292
296
|
rangeStyle: RangeStylePayload | null;
|
|
297
|
+
isInTable: boolean;
|
|
293
298
|
}
|
|
294
|
-
declare function EditorProvider({ editorRef, rangeStyle, children }: {
|
|
299
|
+
declare function EditorProvider({ editorRef, rangeStyle, isInTable, children }: {
|
|
295
300
|
editorRef: MutableRefObject<EditorInstance | null>;
|
|
296
301
|
rangeStyle: RangeStylePayload | null;
|
|
302
|
+
isInTable: boolean;
|
|
297
303
|
children: React.ReactNode;
|
|
298
304
|
}): react_jsx_runtime.JSX.Element;
|
|
299
305
|
declare function useEditor(): EditorContextValue;
|
|
@@ -361,6 +367,10 @@ declare function ListTool(): react_jsx_runtime.JSX.Element;
|
|
|
361
367
|
|
|
362
368
|
declare function TableTool(): react_jsx_runtime.JSX.Element;
|
|
363
369
|
|
|
370
|
+
declare function TableCellBgColorTool(): react_jsx_runtime.JSX.Element;
|
|
371
|
+
|
|
372
|
+
declare function TableCellBorderColorTool(): react_jsx_runtime.JSX.Element;
|
|
373
|
+
|
|
364
374
|
declare function ImageTool(): react_jsx_runtime.JSX.Element;
|
|
365
375
|
|
|
366
376
|
declare function ColumnTool(): react_jsx_runtime.JSX.Element;
|
|
@@ -397,4 +407,4 @@ declare function EditorOptionTool(): react_jsx_runtime.JSX.Element;
|
|
|
397
407
|
|
|
398
408
|
declare function WatermarkFooterTool(): react_jsx_runtime.JSX.Element;
|
|
399
409
|
|
|
400
|
-
export { BoldTool, CatalogToggleTool, CenterAlignTool, ColorTool, ColumnTool, Editor, EditorFooter, type EditorInstance, EditorModeTool, EditorOptionTool, EditorProvider, EditorToolbar, FontSizeTool, FontTool, FooterProvider, FooterStatus, FullscreenTool, HighlightTool, type ICatalogItem, type IComment, ImageTool, ItalicTool, JustifyTool, LeftAlignTool, LineHeightTool, ListTool, PageBreakTool, PageModeTool, PageScaleAddTool, PageScaleMinusTool, PageScalePercentageTool, PaperDirectionTool, PaperMarginTool, PaperSizeTool, type RangeStylePayload, RedoTool, RightAlignTool, SeparatorTool, StrikeoutTool, TableTool, TitleTool, UnderlineTool, UndoTool, WatermarkFooterTool, InsertElementTool as WatermarkTool, useEditor, useFooter };
|
|
410
|
+
export { BoldTool, CatalogToggleTool, CenterAlignTool, ColorTool, ColumnTool, Editor, EditorFooter, type EditorInstance, EditorModeTool, EditorOptionTool, EditorProvider, EditorToolbar, FontSizeTool, FontTool, FooterProvider, FooterStatus, FullscreenTool, HighlightTool, type ICatalogItem, type IComment, ImageTool, ItalicTool, JustifyTool, LeftAlignTool, LineHeightTool, ListTool, PageBreakTool, PageModeTool, PageScaleAddTool, PageScaleMinusTool, PageScalePercentageTool, PaperDirectionTool, PaperMarginTool, PaperSizeTool, type RangeStylePayload, RedoTool, RightAlignTool, SeparatorTool, StrikeoutTool, TableCellBgColorTool, TableCellBorderColorTool, TableTool, TitleTool, UnderlineTool, UndoTool, WatermarkFooterTool, InsertElementTool as WatermarkTool, useEditor, useFooter };
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ type EditorInstance = {
|
|
|
31
31
|
executeListIndent: () => void;
|
|
32
32
|
executeListOutdent: () => void;
|
|
33
33
|
executeInsertTable: (rows: number, cols: number) => void;
|
|
34
|
+
executeTableTdBackgroundColor: (color: string) => void;
|
|
35
|
+
executeTableTdBorderColor: (color: string) => void;
|
|
36
|
+
executeTableTdPadding: (padding: [number, number, number, number]) => void;
|
|
34
37
|
executeImage: (options: {
|
|
35
38
|
value: string;
|
|
36
39
|
width: number;
|
|
@@ -141,6 +144,7 @@ type EditorInstance = {
|
|
|
141
144
|
getRangeContext: () => {
|
|
142
145
|
startRowNo: number;
|
|
143
146
|
startColNo: number;
|
|
147
|
+
isTable: boolean;
|
|
144
148
|
} | null;
|
|
145
149
|
getPaperMargin: () => number[];
|
|
146
150
|
getSearchNavigateInfo: () => {
|
|
@@ -290,10 +294,12 @@ interface EditorContextValue {
|
|
|
290
294
|
editorRef: MutableRefObject<EditorInstance | null>;
|
|
291
295
|
isApple: boolean;
|
|
292
296
|
rangeStyle: RangeStylePayload | null;
|
|
297
|
+
isInTable: boolean;
|
|
293
298
|
}
|
|
294
|
-
declare function EditorProvider({ editorRef, rangeStyle, children }: {
|
|
299
|
+
declare function EditorProvider({ editorRef, rangeStyle, isInTable, children }: {
|
|
295
300
|
editorRef: MutableRefObject<EditorInstance | null>;
|
|
296
301
|
rangeStyle: RangeStylePayload | null;
|
|
302
|
+
isInTable: boolean;
|
|
297
303
|
children: React.ReactNode;
|
|
298
304
|
}): react_jsx_runtime.JSX.Element;
|
|
299
305
|
declare function useEditor(): EditorContextValue;
|
|
@@ -361,6 +367,10 @@ declare function ListTool(): react_jsx_runtime.JSX.Element;
|
|
|
361
367
|
|
|
362
368
|
declare function TableTool(): react_jsx_runtime.JSX.Element;
|
|
363
369
|
|
|
370
|
+
declare function TableCellBgColorTool(): react_jsx_runtime.JSX.Element;
|
|
371
|
+
|
|
372
|
+
declare function TableCellBorderColorTool(): react_jsx_runtime.JSX.Element;
|
|
373
|
+
|
|
364
374
|
declare function ImageTool(): react_jsx_runtime.JSX.Element;
|
|
365
375
|
|
|
366
376
|
declare function ColumnTool(): react_jsx_runtime.JSX.Element;
|
|
@@ -397,4 +407,4 @@ declare function EditorOptionTool(): react_jsx_runtime.JSX.Element;
|
|
|
397
407
|
|
|
398
408
|
declare function WatermarkFooterTool(): react_jsx_runtime.JSX.Element;
|
|
399
409
|
|
|
400
|
-
export { BoldTool, CatalogToggleTool, CenterAlignTool, ColorTool, ColumnTool, Editor, EditorFooter, type EditorInstance, EditorModeTool, EditorOptionTool, EditorProvider, EditorToolbar, FontSizeTool, FontTool, FooterProvider, FooterStatus, FullscreenTool, HighlightTool, type ICatalogItem, type IComment, ImageTool, ItalicTool, JustifyTool, LeftAlignTool, LineHeightTool, ListTool, PageBreakTool, PageModeTool, PageScaleAddTool, PageScaleMinusTool, PageScalePercentageTool, PaperDirectionTool, PaperMarginTool, PaperSizeTool, type RangeStylePayload, RedoTool, RightAlignTool, SeparatorTool, StrikeoutTool, TableTool, TitleTool, UnderlineTool, UndoTool, WatermarkFooterTool, InsertElementTool as WatermarkTool, useEditor, useFooter };
|
|
410
|
+
export { BoldTool, CatalogToggleTool, CenterAlignTool, ColorTool, ColumnTool, Editor, EditorFooter, type EditorInstance, EditorModeTool, EditorOptionTool, EditorProvider, EditorToolbar, FontSizeTool, FontTool, FooterProvider, FooterStatus, FullscreenTool, HighlightTool, type ICatalogItem, type IComment, ImageTool, ItalicTool, JustifyTool, LeftAlignTool, LineHeightTool, ListTool, PageBreakTool, PageModeTool, PageScaleAddTool, PageScaleMinusTool, PageScalePercentageTool, PaperDirectionTool, PaperMarginTool, PaperSizeTool, type RangeStylePayload, RedoTool, RightAlignTool, SeparatorTool, StrikeoutTool, TableCellBgColorTool, TableCellBorderColorTool, TableTool, TitleTool, UnderlineTool, UndoTool, WatermarkFooterTool, InsertElementTool as WatermarkTool, useEditor, useFooter };
|