oasis-editor 0.0.214 → 0.0.216
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-z4XAN0Fg.js +1 -0
- package/dist/core/commands/bookmark.d.ts +16 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/pageNumber.d.ts +17 -0
- package/dist/core/commands/publicCommandTypes.d.ts +7 -0
- package/dist/defaultToolbar-CKYcsSYD.js +1 -0
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/pt-BR.d.ts +1 -0
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/createEssentialsPlugin.d.ts +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +20 -1
- package/dist/plugins/internal/essentialsCommandGroups/bookmark.d.ts +9 -0
- package/dist/ui/app/essentials/bookmark.d.ts +8 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-F11O2dC0.js +0 -1
- package/dist/defaultToolbar-CCLAYtj2.js +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorBookmark, EditorBookmarkAnchor, EditorState } from '../model.js';
|
|
2
|
+
/**
|
|
3
|
+
* Add a bookmark over the current selection (single point when collapsed) and
|
|
4
|
+
* keep the selection unchanged. `name` is the Word bookmark / hyperlink /
|
|
5
|
+
* cross-reference target; a deterministic default is used when omitted.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createBookmark(state: EditorState, name?: string): EditorState;
|
|
8
|
+
/**
|
|
9
|
+
* Remove a bookmark by editor-local id, returning the same state if it does
|
|
10
|
+
* not exist.
|
|
11
|
+
*/
|
|
12
|
+
export declare function removeBookmark(state: EditorState, bookmarkId: string): EditorState;
|
|
13
|
+
/** List authorable (non-hidden) bookmarks, for cross-reference/target pickers. */
|
|
14
|
+
export declare function listBookmarks(state: EditorState): EditorBookmark[];
|
|
15
|
+
/** True when a visible bookmark covers the given (block, offset) anchor. */
|
|
16
|
+
export declare function isAnchorInBookmark(state: EditorState, anchor: EditorBookmarkAnchor): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
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", "newComment", "replyComment", "editComment", "toggleCommentsPanel", "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", "editHeader", "editFooter", "insertPageNumber", "insertPageNumberXOfY", "placePageNumberTop", "placePageNumberBottom", "exitHeaderFooter", "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", "newComment", "replyComment", "editComment", "toggleCommentsPanel", "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", "setSectionPageNumbering", "editHeader", "editFooter", "insertPageNumber", "insertPageNumberXOfY", "placePageNumberTop", "placePageNumberBottom", "insertBookmark", "removeBookmark", "exitHeaderFooter", "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];
|
|
@@ -2,6 +2,12 @@ import { EditorState, EditorTextRun, PageNumberFormat } from '../model.js';
|
|
|
2
2
|
export type PageNumberFieldKind = "page" | "xOfY";
|
|
3
3
|
export type PageNumberPlacement = "current" | "top" | "bottom";
|
|
4
4
|
export type PageNumberAlign = "left" | "center" | "right" | "justify";
|
|
5
|
+
/**
|
|
6
|
+
* OOXML `ST_NumberFormat` page-number values the editor can author. Stored
|
|
7
|
+
* verbatim on `EditorPageNumbering.format` so uncommon imports still
|
|
8
|
+
* round-trip even though only these can be authored.
|
|
9
|
+
*/
|
|
10
|
+
export type SectionPageNumberFormat = "decimal" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "none";
|
|
5
11
|
export interface PageNumberPlacementOptions {
|
|
6
12
|
/** Field shape: bare PAGE or the Page X of Y combination. Default `page`. */
|
|
7
13
|
kind?: PageNumberFieldKind;
|
|
@@ -38,3 +44,14 @@ export declare function insertPageNumberField(state: EditorState, kind?: PageNum
|
|
|
38
44
|
export declare function placePageNumber(state: EditorState, position: PageNumberPlacement, options?: PageNumberPlacementOptions): EditorState;
|
|
39
45
|
/** Exported for tests: whether the active zone is a header or footer. */
|
|
40
46
|
export declare function isInHeaderOrFooter(state: EditorState): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Set page numbering on the active section (`w:pgNumType`): the starting page
|
|
49
|
+
* number and/or the number format. Only explicitly provided fields update;
|
|
50
|
+
* omitted fields are left unchanged. `format` uses the OOXML `ST_NumberFormat`
|
|
51
|
+
* vocabulary (`decimal`, `upperRoman`, `lowerRoman`, `upperLetter`,
|
|
52
|
+
* `lowerLetter`, `none`).
|
|
53
|
+
*/
|
|
54
|
+
export declare function setSectionPageNumbering(state: EditorState, numbering: {
|
|
55
|
+
start?: number;
|
|
56
|
+
format?: SectionPageNumberFormat;
|
|
57
|
+
}): EditorState;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommandRef } from './CommandRef.js';
|
|
2
2
|
import { EditorPageMargins, EditorMathExpression, EditorPageBorder, EditorWatermark } from '../model.js';
|
|
3
|
+
import { SectionPageNumberFormat } from './pageNumber.js';
|
|
3
4
|
import { TextCaseMode } from './text.js';
|
|
4
5
|
import { TableBorderPreset } from './table.js';
|
|
5
6
|
import { DesignThemeId } from './design.js';
|
|
@@ -139,12 +140,18 @@ export interface OasisCommandPayloads {
|
|
|
139
140
|
sectionBreakNextPage: undefined;
|
|
140
141
|
sectionBreakContinuous: undefined;
|
|
141
142
|
setPageMargins: SetPageMarginsPayload;
|
|
143
|
+
setSectionPageNumbering: {
|
|
144
|
+
start?: number;
|
|
145
|
+
format?: SectionPageNumberFormat;
|
|
146
|
+
};
|
|
142
147
|
editHeader: undefined;
|
|
143
148
|
editFooter: undefined;
|
|
144
149
|
insertPageNumber: undefined;
|
|
145
150
|
insertPageNumberXOfY: undefined;
|
|
146
151
|
placePageNumberTop: undefined;
|
|
147
152
|
placePageNumberBottom: undefined;
|
|
153
|
+
insertBookmark: string | undefined;
|
|
154
|
+
removeBookmark: string;
|
|
148
155
|
exitHeaderFooter: undefined;
|
|
149
156
|
applyDocumentTheme: DesignThemeId;
|
|
150
157
|
setDocumentColorScheme: string;
|