oasis-editor 0.0.201 → 0.0.202
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/{OasisEditorApp-RTw7Wzrq.js → OasisEditorApp-Dq5qnZLi.js} +1 -1
- package/dist/app/controllers/useEditorSurfaceEvents.d.ts +2 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/formatPainter.d.ts +21 -0
- package/dist/core/commands/publicCommandTypes.d.ts +3 -0
- package/dist/defaultToolbar-1jqykReg.js +1 -0
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/pt-BR.d.ts +4 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +5 -0
- package/dist/ui/OasisEditorEditorProps.d.ts +4 -0
- package/dist/ui/app/buildEditorViewProps.d.ts +1 -0
- package/dist/ui/app/createEditorFormatPainter.d.ts +25 -0
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +8 -0
- package/dist/ui/app/essentials/types.d.ts +2 -0
- package/dist/ui/app/useEditorInteractionWiring.d.ts +2 -0
- package/package.json +1 -1
- package/dist/defaultToolbar-DlMhsvGq.js +0 -1
|
@@ -17,6 +17,8 @@ export interface UseEditorSurfaceEventsProps {
|
|
|
17
17
|
}) => void;
|
|
18
18
|
};
|
|
19
19
|
clearPendingCaretTextStyle: () => void;
|
|
20
|
+
/** Called after the final pointer selection has been committed to EditorState. */
|
|
21
|
+
onSelectionFinalized?: () => void;
|
|
20
22
|
clearPreferredColumn: () => void;
|
|
21
23
|
resetTransactionGrouping: () => void;
|
|
22
24
|
focusInputAfterPointerSelection: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const OASIS_BUILTIN_COMMANDS: readonly ["selectAll", "insertFootnote", "insertText", "insertEquation", "updateEquation", "insertTableOfContents", "updateTableOfContents", "pastePlainText", "paste", "pasteAsPlainText", "pasteMergeFormatting", "bold", "italic", "underline", "strike", "superscript", "subscript", "link", "unlink", "alignLeft", "alignCenter", "alignRight", "alignJustify", "orderedList", "bulletList", "find", "replace", "toggleTrackChanges", "acceptRevisions", "rejectRevisions", "toggleShowMargins", "toggleShowParagraphMarks", "togglePreciseFonts", "undo", "redo", "pageBreak", "lineBreak", "splitBlock", "setFontFamily", "setFontSize", "increaseFontSize", "decreaseFontSize", "changeTextCase", "clearFormatting", "setColor", "setHighlight", "setTextShading", "setStyleId", "setCharacterStyleId", "setUnderlineStyle", "documentStyles", "print", "copy", "cut", "newDocument", "exportDocx", "exportPdf", "importDocument", "insertHtml", "insertImage", "editImageAlt", "insertImageCaption", "imageContext", "imageWidthCm", "imageHeightCm", "imageCrop", "imageCropAspect", "imageCropShape", "imageCropFill", "imageCropFit", "imageCropReset", "imageBorder", "outdent", "indent", "togglePageBreakBefore", "toggleKeepWithNext", "setSpacingAfter", "setSpacingBefore", "setIndentLeft", "setIndentRight", "setIndentFirstLine", "setIndentHanging", "setSpecialIndent", "setParagraphShading", "applyParagraphBorders", "setLineHeight", "setListFormat", "setListStartAt", "toggleOrientation", "setOrientation", "sectionBreakNextPage", "sectionBreakContinuous", "setPageMargins", "applyDocumentTheme", "setDocumentColorScheme", "setDocumentFontScheme", "setDocumentParagraphSpacing", "setDocumentEffects", "setDocumentPageColor", "setDocumentWatermark", "setDocumentPageBorder", "setDocumentDesignDefault", "tableContext", "tableMerge", "tableSplit", "tableInsertColumnBefore", "tableInsertColumnAfter", "tableDeleteColumn", "tableInsertRowBefore", "tableInsertRowAfter", "tableDeleteRow", "tableCellShading", "tableCellBorders", "tableCellNoBorders", "tableApplyBorderPreset", "toggleTableDrawBorders", "toggleTableGridlines", "tableWidth100", "tableAlignLeft", "tableAlignCenter", "tableAlignRight", "tableSetCellWidth", "tableToggleHeaderRow", "tableToggleTotalRow", "tableToggleBandedRows", "tableToggleFirstColumn", "tableToggleLastColumn", "tableToggleBandedColumns", "setTableStyle", "tableToggleAutoFit", "tableDistributeColumns", "tableDistributeRows", "insertTable", "insertShape", "openSymbolDialog", "openEquationDialog"];
|
|
1
|
+
export declare const OASIS_BUILTIN_COMMANDS: readonly ["selectAll", "insertFootnote", "insertText", "insertEquation", "updateEquation", "insertTableOfContents", "updateTableOfContents", "pastePlainText", "paste", "pasteAsPlainText", "pasteMergeFormatting", "formatPainter", "formatPainterContinuous", "cancelFormatPainter", "bold", "italic", "underline", "strike", "superscript", "subscript", "link", "unlink", "alignLeft", "alignCenter", "alignRight", "alignJustify", "orderedList", "bulletList", "find", "replace", "toggleTrackChanges", "acceptRevisions", "rejectRevisions", "toggleShowMargins", "toggleShowParagraphMarks", "togglePreciseFonts", "undo", "redo", "pageBreak", "lineBreak", "splitBlock", "setFontFamily", "setFontSize", "increaseFontSize", "decreaseFontSize", "changeTextCase", "clearFormatting", "setColor", "setHighlight", "setTextShading", "setStyleId", "setCharacterStyleId", "setUnderlineStyle", "documentStyles", "print", "copy", "cut", "newDocument", "exportDocx", "exportPdf", "importDocument", "insertHtml", "insertImage", "editImageAlt", "insertImageCaption", "imageContext", "imageWidthCm", "imageHeightCm", "imageCrop", "imageCropAspect", "imageCropShape", "imageCropFill", "imageCropFit", "imageCropReset", "imageBorder", "outdent", "indent", "togglePageBreakBefore", "toggleKeepWithNext", "setSpacingAfter", "setSpacingBefore", "setIndentLeft", "setIndentRight", "setIndentFirstLine", "setIndentHanging", "setSpecialIndent", "setParagraphShading", "applyParagraphBorders", "setLineHeight", "setListFormat", "setListStartAt", "toggleOrientation", "setOrientation", "sectionBreakNextPage", "sectionBreakContinuous", "setPageMargins", "applyDocumentTheme", "setDocumentColorScheme", "setDocumentFontScheme", "setDocumentParagraphSpacing", "setDocumentEffects", "setDocumentPageColor", "setDocumentWatermark", "setDocumentPageBorder", "setDocumentDesignDefault", "tableContext", "tableMerge", "tableSplit", "tableInsertColumnBefore", "tableInsertColumnAfter", "tableDeleteColumn", "tableInsertRowBefore", "tableInsertRowAfter", "tableDeleteRow", "tableCellShading", "tableCellBorders", "tableCellNoBorders", "tableApplyBorderPreset", "toggleTableDrawBorders", "toggleTableGridlines", "tableWidth100", "tableAlignLeft", "tableAlignCenter", "tableAlignRight", "tableSetCellWidth", "tableToggleHeaderRow", "tableToggleTotalRow", "tableToggleBandedRows", "tableToggleFirstColumn", "tableToggleLastColumn", "tableToggleBandedColumns", "setTableStyle", "tableToggleAutoFit", "tableDistributeColumns", "tableDistributeRows", "insertTable", "insertShape", "openSymbolDialog", "openEquationDialog"];
|
|
2
2
|
export type OasisBuiltinCommand = (typeof OASIS_BUILTIN_COMMANDS)[number];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EditorParagraphListStyle, EditorParagraphStyle, EditorState, EditorTextStyle } from '../model.js';
|
|
2
|
+
/**
|
|
3
|
+
* A value snapshot, never a reference to mutable document nodes.
|
|
4
|
+
* Paragraph formatting is copied only from whole-paragraph selections or
|
|
5
|
+
* a caret source, and applied only to fully selected target paragraphs.
|
|
6
|
+
*/
|
|
7
|
+
export interface FormatPainterSnapshot {
|
|
8
|
+
text: EditorTextStyle | undefined;
|
|
9
|
+
paragraph: EditorParagraphStyle | undefined;
|
|
10
|
+
list: EditorParagraphListStyle | undefined;
|
|
11
|
+
copyParagraph: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function captureFormatPainter(state: EditorState): FormatPainterSnapshot | null;
|
|
14
|
+
/** Select the word underneath a mouse/touch click, or use the explicit range. */
|
|
15
|
+
export declare function resolveFormatPainterTarget(state: EditorState, expandCaretToWord: boolean): EditorState | null;
|
|
16
|
+
/**
|
|
17
|
+
* Applies a captured formatting snapshot without touching run content,
|
|
18
|
+
* hyperlinks, revision metadata or other structural anchors. Uses the regular
|
|
19
|
+
* immutable paragraph replacement path for table/zone/document fidelity.
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyCapturedFormatPainter(state: EditorState, captured: FormatPainterSnapshot): EditorState;
|
|
@@ -42,6 +42,9 @@ export interface OasisCommandPayloads {
|
|
|
42
42
|
paste: undefined;
|
|
43
43
|
pasteAsPlainText: undefined;
|
|
44
44
|
pasteMergeFormatting: undefined;
|
|
45
|
+
formatPainter: undefined;
|
|
46
|
+
formatPainterContinuous: undefined;
|
|
47
|
+
cancelFormatPainter: undefined;
|
|
45
48
|
bold: undefined;
|
|
46
49
|
italic: undefined;
|
|
47
50
|
underline: undefined;
|