oasis-editor 0.0.201 → 0.0.203
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-CucwP8bN.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 +10 -0
- package/dist/core/commands/reviewNavigation.d.ts +26 -0
- package/dist/defaultToolbar-CDrL4Brv.js +1 -0
- package/dist/i18n/locales/en.d.ts +12 -0
- package/dist/i18n/locales/pt-BR.d.ts +12 -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 +16 -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", "nextRevision", "previousRevision", "nextComment", "previousComment", "resolveComment", "reopenComment", "deleteComment", "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;
|
|
@@ -61,6 +64,13 @@ export interface OasisCommandPayloads {
|
|
|
61
64
|
toggleTrackChanges: undefined;
|
|
62
65
|
acceptRevisions: undefined;
|
|
63
66
|
rejectRevisions: undefined;
|
|
67
|
+
nextRevision: undefined;
|
|
68
|
+
previousRevision: undefined;
|
|
69
|
+
nextComment: undefined;
|
|
70
|
+
previousComment: undefined;
|
|
71
|
+
resolveComment: undefined;
|
|
72
|
+
reopenComment: undefined;
|
|
73
|
+
deleteComment: undefined;
|
|
64
74
|
toggleShowMargins: undefined;
|
|
65
75
|
toggleShowParagraphMarks: undefined;
|
|
66
76
|
togglePreciseFonts: undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EditorComment, EditorState } from '../model.js';
|
|
2
|
+
interface ReviewRange {
|
|
3
|
+
id: string;
|
|
4
|
+
startIndex: number;
|
|
5
|
+
startOffset: number;
|
|
6
|
+
endIndex: number;
|
|
7
|
+
endOffset: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function collectNavigableRevisions(state: EditorState): ReviewRange[];
|
|
10
|
+
export declare function navigateRevision(state: EditorState, direction: "next" | "previous"): EditorState;
|
|
11
|
+
export declare function collectNavigableComments(state: EditorState): string[];
|
|
12
|
+
export declare function navigateComment(state: EditorState, direction: "next" | "previous"): EditorState;
|
|
13
|
+
/**
|
|
14
|
+
* An exact navigated range takes precedence over merely touching its end.
|
|
15
|
+
* This keeps Resolve/Delete tied to the selected thread rather than a nearby
|
|
16
|
+
* overlapping comment. Replies without anchors are managed by parent id.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSelectedReviewComment(state: EditorState): EditorComment | null;
|
|
19
|
+
/** Keep all comment metadata/anchors intact for DOCX round-trip. */
|
|
20
|
+
export declare function setSelectedCommentResolved(state: EditorState, resolved: boolean): EditorState;
|
|
21
|
+
/**
|
|
22
|
+
* Deleting a parent thread deletes all its descendants, preventing dangling
|
|
23
|
+
* parentId pointers in commentsExtended.xml.
|
|
24
|
+
*/
|
|
25
|
+
export declare function deleteSelectedComment(state: EditorState): EditorState;
|
|
26
|
+
export {};
|