oasis-editor 0.0.227 → 0.0.229
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-Dkk2-Ed0.js +1 -0
- package/dist/app/controllers/EditorCommandsController.d.ts +6 -1
- package/dist/app/services/FindReplaceService.d.ts +6 -18
- package/dist/assets/{importDocxWorker-D9et8X0W.js → importDocxWorker-dPLECw5a.js} +197 -181
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/dropCap.d.ts +23 -0
- package/dist/core/commands/fieldDate.d.ts +6 -0
- package/dist/core/commands/findReplace.d.ts +25 -0
- package/dist/core/commands/floatingAlignCommands.d.ts +98 -0
- package/dist/core/commands/floatingReorderCommands.d.ts +17 -0
- package/dist/core/commands/headerFooter.d.ts +17 -0
- package/dist/core/commands/horizontalLine.d.ts +3 -0
- package/dist/core/commands/hyphenation.d.ts +27 -0
- package/dist/core/commands/image.d.ts +45 -0
- package/dist/core/commands/noteOptions.d.ts +22 -0
- package/dist/core/commands/outlineStep.d.ts +13 -0
- package/dist/core/commands/pageSetup.d.ts +41 -1
- package/dist/core/commands/paragraphAdjustRightInd.d.ts +8 -0
- package/dist/core/commands/paragraphAlign.d.ts +10 -0
- package/dist/core/commands/paragraphAutoSpaceDE.d.ts +8 -0
- package/dist/core/commands/paragraphAutoSpaceDN.d.ts +8 -0
- package/dist/core/commands/paragraphBidi.d.ts +7 -0
- package/dist/core/commands/paragraphContextualSpacing.d.ts +7 -0
- package/dist/core/commands/paragraphKeepLinesTogether.d.ts +7 -0
- package/dist/core/commands/paragraphKeepWithNext.d.ts +7 -0
- package/dist/core/commands/paragraphKinsoku.d.ts +8 -0
- package/dist/core/commands/paragraphLineRule.d.ts +10 -0
- package/dist/core/commands/paragraphListLevel.d.ts +8 -0
- package/dist/core/commands/paragraphMirrorIndents.d.ts +7 -0
- package/dist/core/commands/paragraphMove.d.ts +8 -0
- package/dist/core/commands/paragraphOutlineLevel.d.ts +11 -0
- package/dist/core/commands/paragraphOverflowPunct.d.ts +8 -0
- package/dist/core/commands/paragraphPageBreakBefore.d.ts +7 -0
- package/dist/core/commands/paragraphReset.d.ts +9 -0
- package/dist/core/commands/paragraphSort.d.ts +7 -0
- package/dist/core/commands/paragraphSuppressAutoHyphens.d.ts +7 -0
- package/dist/core/commands/paragraphSuppressLineNumbers.d.ts +7 -0
- package/dist/core/commands/paragraphTabs.d.ts +28 -0
- package/dist/core/commands/paragraphTextDirection.d.ts +9 -0
- package/dist/core/commands/paragraphTopLinePunct.d.ts +7 -0
- package/dist/core/commands/paragraphWidowControl.d.ts +8 -0
- package/dist/core/commands/paragraphWordWrap.d.ts +8 -0
- package/dist/core/commands/publicCommandTypes.d.ts +189 -3
- package/dist/core/commands/selectUnit.d.ts +43 -0
- package/dist/core/commands/shape.d.ts +4 -0
- package/dist/core/commands/shapeFillCommands.d.ts +31 -0
- package/dist/core/commands/specialChar.d.ts +18 -0
- package/dist/core/commands/table/tableAlignmentCommands.d.ts +10 -0
- package/dist/core/commands/table/tableAutoFitCommands.d.ts +16 -0
- package/dist/core/commands/table/tableCellFitTextCommands.d.ts +7 -0
- package/dist/core/commands/table/tableCellMarginsCommands.d.ts +20 -0
- package/dist/core/commands/table/tableCellNoWrapCommands.d.ts +7 -0
- package/dist/core/commands/table/tableCellSpacingCommands.d.ts +9 -0
- package/dist/core/commands/table/tableColumnCommands.d.ts +10 -0
- package/dist/core/commands/table/tableDeleteCellsCommands.d.ts +16 -0
- package/dist/core/commands/table/tableDeleteCommands.d.ts +11 -0
- package/dist/core/commands/table/tableFormulaCommands.d.ts +34 -0
- package/dist/core/commands/table/tableIndentCommands.d.ts +9 -0
- package/dist/core/commands/table/tableRepeatHeaderCommands.d.ts +15 -0
- package/dist/core/commands/table/tableRowBreakAcrossPagesCommands.d.ts +9 -0
- package/dist/core/commands/table/tableRowCommands.d.ts +2 -0
- package/dist/core/commands/table/tableRowHeightCommands.d.ts +21 -0
- package/dist/core/commands/table/tableSelectionCommands.d.ts +18 -0
- package/dist/core/commands/table/tableSortCommands.d.ts +16 -0
- package/dist/core/commands/table/tableStyleCommands.d.ts +9 -0
- package/dist/core/commands/table.d.ts +15 -0
- package/dist/core/commands/text.d.ts +1 -1
- package/dist/core/commands/textBoxBodyCommands.d.ts +43 -0
- package/dist/core/commands/textFormatting.d.ts +15 -0
- package/dist/core/commands/zoneBlocks.d.ts +10 -0
- package/dist/core/engine.d.ts +3 -0
- package/dist/core/model/types/primitives.d.ts +10 -0
- package/dist/core/plugin.d.ts +4 -1
- package/dist/core/pluginUiTypes.d.ts +4 -1
- package/dist/core/textStyle/textStyleKeys.d.ts +3 -3
- package/dist/core/transactionMergeKeys.d.ts +34 -0
- package/dist/defaultToolbar-6IjbWowg.js +1 -0
- package/dist/export/docx/docxTypes.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts +20 -0
- package/dist/i18n/locales/pt-BR.d.ts +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/layoutProjection/floatingObjects.d.ts +3 -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 +310 -2
- package/dist/plugins/internal/essentialsCommandBuilders.d.ts +2 -0
- package/dist/plugins/internal/essentialsCommandGroups/table.d.ts +3 -2
- package/dist/ui/app/createAppCommandsController.d.ts +12 -2
- package/dist/ui/app/createEditorCommandRuntime.d.ts +11 -1
- package/dist/ui/app/essentials/types.d.ts +2 -0
- package/dist/ui/components/Toolbar/marginPresets.d.ts +5 -9
- package/dist/ui/components/Toolbar/primitives/SplitButton.d.ts +1 -0
- package/dist/ui/components/Toolbar/primitives/popoverBranch.d.ts +7 -0
- package/dist/ui/components/Toolbar/primitives/useDismiss.d.ts +3 -1
- package/dist/ui/components/Toolbar/ribbon/RibbonGroup.d.ts +2 -1
- package/dist/ui/components/Toolbar/ribbon/measureRibbonGroups.d.ts +8 -0
- package/dist/ui/components/Toolbar/ribbon/ribbonModel.d.ts +14 -1
- package/dist/ui/components/Toolbar/schema/items.d.ts +13 -4
- package/dist/ui/toolbarStyleState.d.ts +22 -3
- package/dist/ui/utils/IconManager.d.ts +3 -1
- package/package.json +7 -2
- package/dist/OasisEditorApp-DyqrRigM.js +0 -1
- package/dist/defaultToolbar-Dq0iVC5E.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EditorState } from '../../model.js';
|
|
2
|
+
/** True when the caret sits inside a table whose header row can be repeated. */
|
|
3
|
+
export declare function canToggleRepeatHeaderRows(state: EditorState): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* True when the active table repeats its first row as a header across page
|
|
6
|
+
* breaks (Word's "Repeat Header Rows" active state).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isRepeatHeaderRowsActive(state: EditorState): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Word's "Repeat Header Rows": toggles whether the active table's first row is a
|
|
11
|
+
* header that repeats at the top of each page. Setting it marks the first row as
|
|
12
|
+
* a header; clearing it removes that mark. A no-op when the caret is outside a
|
|
13
|
+
* table, or when the active table has no rows.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toggleRepeatHeaderRows(state: EditorState): EditorState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorState } from '../../model.js';
|
|
2
|
+
/** True when the caret sits in a table row whose break setting can change. */
|
|
3
|
+
export declare function canSetActiveTableRowBreakAcrossPages(state: EditorState): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Set whether the active row may break across pages. Pass `true`/`false` for
|
|
6
|
+
* the "allow" state (stored as the inverse on `cantSplit`), or `null` to clear
|
|
7
|
+
* the key. Returns the same state when the caret is outside a table.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setActiveTableRowBreakAcrossPages(state: EditorState, allow: boolean | null): EditorState;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EditorState, EditorTableRowStyle } from '../../model.js';
|
|
2
2
|
export declare function setSelectedTableRowStyleValue<K extends keyof EditorTableRowStyle>(state: EditorState, key: K, value: EditorTableRowStyle[K] | null): EditorState;
|
|
3
|
+
/** True when the caret sits in a table row whose header flag can change. */
|
|
4
|
+
export declare function canSetActiveTableRowHeader(state: EditorState): boolean;
|
|
3
5
|
export declare function setSelectedTableRowHeader(state: EditorState, value: boolean | null): EditorState;
|
|
4
6
|
export declare function setTableRowHeight(state: EditorState, tableId: string, rowIndex: number, height: number | string | null): EditorState;
|
|
5
7
|
export declare function setTableRowHeights(state: EditorState, tableId: string, rowHeights: Readonly<Record<number, number | string | null>>): EditorState;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EditorState } from '../../model.js';
|
|
2
|
+
/**
|
|
3
|
+
* Word's table row height (Table Layout › Cell Size). Sets the height (and
|
|
4
|
+
* optional rule) of the active row, mirroring the cell-width payload command.
|
|
5
|
+
* `heightRule` follows Word's "exact"/"atLeast" semantics; omit it to leave the
|
|
6
|
+
* current rule untouched.
|
|
7
|
+
*/
|
|
8
|
+
export interface TableRowHeight {
|
|
9
|
+
/** Row height in points. `null` clears the explicit height. */
|
|
10
|
+
height: number | string | null;
|
|
11
|
+
/** Optional trHeightRule; omitted leaves the current rule. */
|
|
12
|
+
heightRule?: "exact" | "atLeast";
|
|
13
|
+
}
|
|
14
|
+
/** True when the caret sits inside a table row whose height can be changed. */
|
|
15
|
+
export declare function canSetActiveTableRowHeight(state: EditorState): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Word's row height: apply the requested height (and optional rule) to the row
|
|
18
|
+
* containing the caret. A single transactional merge key keeps the whole change
|
|
19
|
+
* one undo step.
|
|
20
|
+
*/
|
|
21
|
+
export declare function setActiveTableRowHeight(state: EditorState, value: TableRowHeight): EditorState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from '../../model.js';
|
|
2
|
+
/** The granularity of a table selection expansion. */
|
|
3
|
+
export type TableSelectionKind = "cell" | "row" | "column" | "table";
|
|
4
|
+
/**
|
|
5
|
+
* Word's table Select commands: expand the current caret selection to cover the
|
|
6
|
+
* active cell, row, column, or the whole table. Returns a new `EditorState`
|
|
7
|
+
* whose selection spans the first paragraph of the first target cell to the end
|
|
8
|
+
* of the last target cell (in document/visual order). A no-op when the caret is
|
|
9
|
+
* outside a table.
|
|
10
|
+
*/
|
|
11
|
+
export declare function selectActiveTable(state: EditorState, kind: TableSelectionKind): EditorState;
|
|
12
|
+
/** True when the caret sits inside a table that can be selected. */
|
|
13
|
+
export declare function canSelectActiveTable(state: EditorState): boolean;
|
|
14
|
+
/** Convenience wrappers matching the per-kind command surface. */
|
|
15
|
+
export declare function selectActiveTableCell(state: EditorState): EditorState;
|
|
16
|
+
export declare function selectActiveTableRow(state: EditorState): EditorState;
|
|
17
|
+
export declare function selectActiveTableColumn(state: EditorState): EditorState;
|
|
18
|
+
export declare function selectActiveTableWholeTable(state: EditorState): EditorState;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorState, EditorTableNode, EditorTableRowNode } from '../../model.js';
|
|
2
|
+
export type TableSortDirection = "ascending" | "descending";
|
|
3
|
+
/** True when the active table has at least two body rows that can be reordered. */
|
|
4
|
+
export declare function canSortActiveTable(state: EditorState): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Word's "Sort": reorders the active table's body rows by the text in the
|
|
7
|
+
* column under the caret, ascending or descending. A header row (row.isHeader)
|
|
8
|
+
* stays pinned at the top. A no-op when the caret is outside a table.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sortActiveTable(state: EditorState, direction: TableSortDirection): EditorState;
|
|
11
|
+
/**
|
|
12
|
+
* Sorts the body rows of a table by the text in `columnIndex`. Rows flagged as
|
|
13
|
+
* headers stay in place; all other rows are reordered by their cell's flattened
|
|
14
|
+
* text. Returns the original rows array when nothing changes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function sortTableRows(table: EditorTableNode, columnIndex: number, direction: TableSortDirection): EditorTableRowNode[];
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { EditorState, EditorTableStyle } from '../../model.js';
|
|
2
2
|
export declare function setTableStyleValue<K extends keyof EditorTableStyle>(state: EditorState, key: K, value: EditorTableStyle[K] | null): EditorState;
|
|
3
3
|
export declare function setActiveTableStyleValue<K extends keyof EditorTableStyle>(state: EditorState, tableId: string, key: K, value: EditorTableStyle[K] | null): EditorState;
|
|
4
|
+
/** True when the caret sits in a table whose preferred width can change. */
|
|
5
|
+
export declare function canSetActiveTableWidth(state: EditorState): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Word's table preferred width (Table Properties › Preferred width, w:tblW).
|
|
8
|
+
* Resolves the innermost table under the caret and applies the requested
|
|
9
|
+
* width to its style through `setActiveTableStyleValue`. A no-op when the
|
|
10
|
+
* caret is not inside a table; a null payload clears the explicit width.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setActiveTableWidth(state: EditorState, width: number | string | null): EditorState;
|
|
@@ -7,3 +7,18 @@ export * from './table/tableFloatingCommands.js';
|
|
|
7
7
|
export * from './table/tableConvertCommands.js';
|
|
8
8
|
export * from './table/tableTextToTableCommands.js';
|
|
9
9
|
export * from './table/tableSplitCommands.js';
|
|
10
|
+
export * from './table/tableSortCommands.js';
|
|
11
|
+
export * from './table/tableDeleteCommands.js';
|
|
12
|
+
export * from './table/tableRepeatHeaderCommands.js';
|
|
13
|
+
export * from './table/tableCellMarginsCommands.js';
|
|
14
|
+
export * from './table/tableCellSpacingCommands.js';
|
|
15
|
+
export * from './table/tableIndentCommands.js';
|
|
16
|
+
export * from './table/tableAlignmentCommands.js';
|
|
17
|
+
export * from './table/tableRowBreakAcrossPagesCommands.js';
|
|
18
|
+
export * from './table/tableCellNoWrapCommands.js';
|
|
19
|
+
export * from './table/tableCellFitTextCommands.js';
|
|
20
|
+
export * from './table/tableFormulaCommands.js';
|
|
21
|
+
export * from './table/tableSelectionCommands.js';
|
|
22
|
+
export * from './table/tableRowHeightCommands.js';
|
|
23
|
+
export * from './table/tableDeleteCellsCommands.js';
|
|
24
|
+
export * from './table/tableAutoFitCommands.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { moveOrCopySelectionToPosition, insertTextAtSelection, insertPlainTextAtSelection, insertMathAtSelection, insertColumnBreakAtSelection, updateMathRun, } from './textEditing.js';
|
|
2
2
|
export { deleteBackward, deleteForward, deleteCharsBackwardRaw, } from './textDeletion.js';
|
|
3
|
-
export { toggleTextStyle, clearSelectedTextFormatting, setTextStyleValue, } from './textFormatting.js';
|
|
3
|
+
export { toggleTextStyle, toggleCharacterBorder, clearSelectedTextFormatting, setTextStyleValue, nudgeFontSize, } from './textFormatting.js';
|
|
4
4
|
export { type TextCaseMode, transformSelectedText, changeSelectedTextCase, } from './textCase.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EditorState } from '../model.js';
|
|
2
|
+
/** The text-direction (flow) values WordCraft's `shape.textDirection` accepts. */
|
|
3
|
+
export type TextBoxTextDirection = "horz" | "vert" | "vert270" | "wordArtVert";
|
|
4
|
+
/** The vertical-alignment values WordCraft's `shape.alignText` accepts. */
|
|
5
|
+
export type TextBoxVerticalAlign = "t" | "ctr" | "b";
|
|
6
|
+
/** True when a text box is selected and its body can be styled. */
|
|
7
|
+
export declare function canStyleSelectedTextBox(state: EditorState): boolean;
|
|
8
|
+
/** The displayed size of the selected text box in centimetres, or `null`. */
|
|
9
|
+
export declare function getSelectedTextBoxSizeCm(state: EditorState): {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
} | null;
|
|
13
|
+
/** Set the selected text box width (cm), keeping its height. */
|
|
14
|
+
export declare function setSelectedTextBoxWidthCm(state: EditorState, cm: number): EditorState;
|
|
15
|
+
/** Set the selected text box height (cm), keeping its width. */
|
|
16
|
+
export declare function setSelectedTextBoxHeightCm(state: EditorState, cm: number): EditorState;
|
|
17
|
+
/** The current alt text of the selected text box, or `null` when none. */
|
|
18
|
+
export declare function getSelectedTextBoxAlt(state: EditorState): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Word's "Alt Text" (WordCraft `object.altText`): sets the accessibility
|
|
21
|
+
* description of the selected text box. `null` clears it. A no-op when no text
|
|
22
|
+
* box is selected.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setSelectedTextBoxAlt(state: EditorState, alt: string | null): EditorState;
|
|
25
|
+
/**
|
|
26
|
+
* Word's "Text Direction" (WordCraft `shape.textDirection`): sets the flow of
|
|
27
|
+
* the selected text box's text (horizontal, 90° up, 270°, or stacked
|
|
28
|
+
* word-art). A no-op when no text box is selected.
|
|
29
|
+
*/
|
|
30
|
+
export declare function setSelectedTextBoxTextDirection(state: EditorState, dir: TextBoxTextDirection): EditorState;
|
|
31
|
+
/**
|
|
32
|
+
* Word's "Align Text" (WordCraft `shape.alignText`): sets the vertical anchor
|
|
33
|
+
* of the selected text box's text (top, middle, or bottom). A no-op when no
|
|
34
|
+
* text box is selected.
|
|
35
|
+
*/
|
|
36
|
+
export declare function setSelectedTextBoxVerticalAlign(state: EditorState, anchor: TextBoxVerticalAlign): EditorState;
|
|
37
|
+
/**
|
|
38
|
+
* Word's "Rotate Left/Right" (WordCraft `arrange.rotate`): rotates the selected
|
|
39
|
+
* text box by a fixed clockwise/counter-clockwise step, using the same
|
|
40
|
+
* counter-clockwise-positive rotation convention as the shape model. A no-op
|
|
41
|
+
* when no text box is selected.
|
|
42
|
+
*/
|
|
43
|
+
export declare function rotateSelectedTextBoxByStep(state: EditorState, direction: "left" | "right", stepDegrees?: number): EditorState;
|
|
@@ -7,3 +7,18 @@ export declare function toggleTextStyle(state: EditorState, key: ToggleableTextS
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function clearSelectedTextFormatting(state: EditorState): EditorState;
|
|
9
9
|
export declare function setTextStyleValue<K extends ValueTextStyleKey>(state: EditorState, key: K, value: EditorTextStyle[K] | null): EditorState;
|
|
10
|
+
/**
|
|
11
|
+
* Nudge the font size of the selected runs by a fixed delta in points
|
|
12
|
+
* (WordCraft's `format.growFont1` / `format.shrinkFont1`, Word's Ctrl+]
|
|
13
|
+
* / Ctrl+[). Unlike the stepping grow/shrink commands these change each
|
|
14
|
+
* run's effective size by exactly `deltaPt`, clamped to Word's 1-1638 pt
|
|
15
|
+
* range. A no-op on a collapsed selection.
|
|
16
|
+
*/
|
|
17
|
+
export declare function nudgeFontSize(state: EditorState, deltaPt: number): EditorState;
|
|
18
|
+
/**
|
|
19
|
+
* Toggle a character border (WordCraft's `format.border`, Word's Character
|
|
20
|
+
* Border in Home > Font) over the selection. Mirrors WordCraft: when no
|
|
21
|
+
* run has a border, apply Word's default (black, solid, 0.5 pt); when every
|
|
22
|
+
* run already has one, clear it. A no-op on a collapsed selection.
|
|
23
|
+
*/
|
|
24
|
+
export declare function toggleCharacterBorder(state: EditorState): EditorState;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EditorBlockNode, EditorState } from '../model.js';
|
|
2
|
+
/**
|
|
3
|
+
* Return a copy of `state` whose active zone's block stream is `blocks`.
|
|
4
|
+
* Moves within a zone keep the section index and header/footer story fixed.
|
|
5
|
+
* The selection is left untouched (callers remap it as needed).
|
|
6
|
+
*
|
|
7
|
+
* No-op when the zone cannot be resolved (footnote blocks are not reordered
|
|
8
|
+
* by the paragraph-move commands, which refuse them up front).
|
|
9
|
+
*/
|
|
10
|
+
export declare function withZoneBlocks(state: EditorState, blocks: EditorBlockNode[]): EditorState;
|
package/dist/core/engine.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export interface FloatingExclusionRect {
|
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
wrap: "none" | "square" | "tight" | "through" | "topAndBottom";
|
|
8
|
+
/** Which side(s) of the wrapped object text may flow on. Absent/bothSides
|
|
9
|
+
* leaves both sides open; "left"/"right" restrict flow to that side. */
|
|
10
|
+
wrapText?: "bothSides" | "left" | "right" | "largest";
|
|
8
11
|
sourceRunId: string;
|
|
9
12
|
/** Absolute-layout-coordinate tight/through contour. When present, the
|
|
10
13
|
* composer carves per-line intervals from this outline instead of the rect. */
|
|
@@ -159,6 +159,13 @@ export interface EditorImageFloatingLayout {
|
|
|
159
159
|
positionH?: EditorImageFloatingPosition;
|
|
160
160
|
positionV?: EditorImageFloatingPosition;
|
|
161
161
|
wrap?: "none" | "square" | "tight" | "through" | "topAndBottom";
|
|
162
|
+
/**
|
|
163
|
+
* Which side(s) of a Square/Tight/Through wrapped object text flows on,
|
|
164
|
+
* mapped from OOXML `<wp:wrapSquare|Tight|Through @wrapText>`. Absent (or
|
|
165
|
+
* `bothSides`) wraps on both sides; `left`/`right` restrict flow to that
|
|
166
|
+
* side only; `largest` flows text on the side with more room.
|
|
167
|
+
*/
|
|
168
|
+
wrapText?: "bothSides" | "left" | "right" | "largest";
|
|
162
169
|
}
|
|
163
170
|
/** A point on the tight/through wrap contour, fractional (0..1) relative to the
|
|
164
171
|
* image bounding box with origin at the top-left corner. */
|
|
@@ -183,6 +190,9 @@ export interface EditorImageRunData {
|
|
|
183
190
|
rotation?: number;
|
|
184
191
|
flipH?: boolean;
|
|
185
192
|
flipV?: boolean;
|
|
193
|
+
/** Picture transparency (0..1), the inverse of opacity. Mirrors WordCraft's
|
|
194
|
+
* `picture.transparency` and OOXML `<a:alphaModFix>` on the blip. */
|
|
195
|
+
transparency?: number;
|
|
186
196
|
floating?: EditorImageFloatingLayout;
|
|
187
197
|
/** Tight/through wrap outline (fractional 0..1). Auto-traced from the image
|
|
188
198
|
* alpha or round-tripped from OOXML <wp:wrapPolygon>. Absent ⇒ rectangular. */
|
package/dist/core/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
2
|
import { EditorState } from './model.js';
|
|
3
3
|
import { CommandRef } from './commands/CommandRef.js';
|
|
4
|
-
import { RibbonGroupResizePolicy, RibbonRow, RibbonSize, RibbonTabId } from './pluginUiTypes.js';
|
|
4
|
+
import { RibbonGroupResizePolicy, RibbonGroupLayout, RibbonRow, RibbonSize, RibbonTabId } from './pluginUiTypes.js';
|
|
5
5
|
/** Function signature for unsubscribing from a subscription. */
|
|
6
6
|
export type Unsubscribe = () => void;
|
|
7
7
|
/** Context passed to command execution and refresh callbacks. */
|
|
@@ -90,9 +90,12 @@ export interface PluginAction {
|
|
|
90
90
|
icon?: string;
|
|
91
91
|
tab?: RibbonTabId;
|
|
92
92
|
group?: string;
|
|
93
|
+
/** Human-readable group label, localized by the contributing plugin. */
|
|
94
|
+
groupLabel?: string;
|
|
93
95
|
row?: RibbonRow;
|
|
94
96
|
ribbonSize?: RibbonSize;
|
|
95
97
|
ribbonGroupResize?: RibbonGroupResizePolicy;
|
|
98
|
+
ribbonGroupLayout?: RibbonGroupLayout;
|
|
96
99
|
order?: number;
|
|
97
100
|
}
|
|
98
101
|
/** Menu item contribution extending {@link PluginAction} with path, shortcut, and separator. */
|
|
@@ -7,11 +7,14 @@ export type RibbonTabId = (typeof RIBBON_TABS)[number];
|
|
|
7
7
|
* UI-agnostic: the value is the command id whose `isActive` state gates the tab.
|
|
8
8
|
*/
|
|
9
9
|
export declare const CONTEXTUAL_TABS: Partial<Record<RibbonTabId, string>>;
|
|
10
|
-
export type RibbonRow = 1 | 2;
|
|
10
|
+
export type RibbonRow = 1 | 2 | 3;
|
|
11
|
+
/** Three rows are opt-in; existing two-row contributions retain their layout. */
|
|
12
|
+
export type RibbonGroupLayout = "two-rows" | "three-rows";
|
|
11
13
|
export type RibbonSize = "normal" | "large";
|
|
12
14
|
export type RibbonGroupResizeState = "full" | "compact" | "collapsed";
|
|
13
15
|
export interface RibbonGroupResizePolicy {
|
|
14
16
|
states?: RibbonGroupResizeState[];
|
|
17
|
+
/** Lower priorities reduce first; compact states precede group collapse. */
|
|
15
18
|
priority?: number;
|
|
16
19
|
compactMinWidth?: number;
|
|
17
20
|
collapsedMinWidth?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorParagraphListStyle } from '../model.js';
|
|
2
|
-
export type ToggleableTextStyleKey = "bold" | "italic" | "underline" | "strike" | "doubleStrike" | "superscript" | "subscript" | "smallCaps" | "allCaps" | "hidden" | "noProof" | "webHidden" | "specVanish" | "contextualAlternates";
|
|
3
|
-
export type ValueTextStyleKey = "styleId" | "fontFamily" | "fontSize" | "color" | "highlight" | "shading" | "language" | "textEffect" | "link" | "underlineStyle" | "underlineColor" | "characterScale" | "characterSpacing" | "baselineShift" | "kerningThreshold" | "ligatures" | "numberSpacing" | "numberForm" | "stylisticSet";
|
|
4
|
-
export type ValueParagraphStyleKey = "styleId" | "align" | "spacingBefore" | "spacingAfter" | "lineHeight" | "indentLeft" | "indentRight" | "indentFirstLine" | "indentHanging" | "mirrorIndents" | "lineRule" | "contextualSpacing" | "outlineLevel" | "shading" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "tabs" | "pageBreakBefore" | "keepWithNext" | "keepLinesTogether" | "widowControl";
|
|
2
|
+
export type ToggleableTextStyleKey = "bold" | "italic" | "underline" | "strike" | "doubleStrike" | "superscript" | "subscript" | "smallCaps" | "allCaps" | "hidden" | "shadow" | "emboss" | "imprint" | "outline" | "noProof" | "webHidden" | "specVanish" | "contextualAlternates";
|
|
3
|
+
export type ValueTextStyleKey = "styleId" | "fontFamily" | "fontSize" | "color" | "highlight" | "shading" | "language" | "textEffect" | "link" | "underlineStyle" | "underlineColor" | "characterScale" | "characterSpacing" | "baselineShift" | "emphasisMark" | "kerningThreshold" | "ligatures" | "numberSpacing" | "numberForm" | "stylisticSet" | "snapToGrid" | "fitText";
|
|
4
|
+
export type ValueParagraphStyleKey = "styleId" | "align" | "spacingBefore" | "spacingAfter" | "lineHeight" | "indentLeft" | "indentRight" | "indentFirstLine" | "indentHanging" | "mirrorIndents" | "lineRule" | "contextualSpacing" | "outlineLevel" | "shading" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "tabs" | "pageBreakBefore" | "keepWithNext" | "keepLinesTogether" | "widowControl" | "bidi";
|
|
5
5
|
export type ParagraphListKind = EditorParagraphListStyle["kind"];
|
|
@@ -10,9 +10,15 @@ export declare const MERGE_KEYS: {
|
|
|
10
10
|
readonly imageCaption: "imageCaption";
|
|
11
11
|
readonly imageResize: "imageResize";
|
|
12
12
|
readonly imageCrop: "imageCrop";
|
|
13
|
+
readonly imageFlip: "imageFlip";
|
|
14
|
+
readonly imageRotate: "imageRotate";
|
|
15
|
+
readonly imageTransparency: "imageTransparency";
|
|
16
|
+
readonly imageReset: "imageReset";
|
|
13
17
|
readonly layoutWrapPolygon: "layoutWrapPolygon";
|
|
14
18
|
readonly specialIndent: "specialIndent";
|
|
15
19
|
readonly paraBorders: "paraBorders";
|
|
20
|
+
readonly paragraphMoveUp: "paragraphMoveUp";
|
|
21
|
+
readonly paragraphMoveDown: "paragraphMoveDown";
|
|
16
22
|
readonly findReplace: "findReplace";
|
|
17
23
|
readonly findReplaceAll: "findReplaceAll";
|
|
18
24
|
readonly tableProperties: "tableProperties";
|
|
@@ -34,13 +40,41 @@ export declare const MERGE_KEYS: {
|
|
|
34
40
|
readonly tableCellVerticalAlign: "tableCellVerticalAlign";
|
|
35
41
|
readonly tableCellTextDirection: "tableCellTextDirection";
|
|
36
42
|
readonly tableCellWidth: "tableCellWidth";
|
|
43
|
+
readonly tableColumnWidth: "tableColumnWidth";
|
|
37
44
|
readonly tableToText: "tableToText";
|
|
38
45
|
readonly textToTable: "textToTable";
|
|
39
46
|
readonly tableSplitAtRow: "tableSplitAtRow";
|
|
47
|
+
readonly tableSortAscending: "tableSortAscending";
|
|
48
|
+
readonly tableSortDescending: "tableSortDescending";
|
|
49
|
+
readonly tableDelete: "tableDelete";
|
|
50
|
+
readonly deleteTableCell: "deleteTableCell";
|
|
51
|
+
readonly tableAutoFit: "tableAutoFit";
|
|
52
|
+
readonly tableRepeatHeaderRows: "tableRepeatHeaderRows";
|
|
53
|
+
readonly tableCellMargins: "tableCellMargins";
|
|
54
|
+
readonly tableFormula: "tableFormula";
|
|
55
|
+
readonly tableRowHeight: "tableRowHeight";
|
|
40
56
|
readonly tableStyleOptions: "tableStyleOptions";
|
|
41
57
|
readonly tableStyleGallery: "tableStyleGallery";
|
|
42
58
|
readonly tableDistribute: "tableDistribute";
|
|
43
59
|
readonly layoutWrapPreset: "layoutWrapPreset";
|
|
44
60
|
readonly layoutFixedPosition: "layoutFixedPosition";
|
|
61
|
+
readonly shapeFill: "shapeFill";
|
|
62
|
+
readonly shapeOutline: "shapeOutline";
|
|
63
|
+
readonly shapeOutlineWidth: "shapeOutlineWidth";
|
|
64
|
+
readonly floatingAlign: "floatingAlign";
|
|
65
|
+
readonly floatingReorder: "floatingReorder";
|
|
66
|
+
readonly floatingNudge: "floatingNudge";
|
|
67
|
+
readonly floatingFixedPosition: "floatingFixedPosition";
|
|
68
|
+
readonly floatingRotation: "floatingRotation";
|
|
69
|
+
readonly floatingWrap: "floatingWrap";
|
|
70
|
+
readonly floatingWrapText: "floatingWrapText";
|
|
71
|
+
readonly floatingPositionPreset: "floatingPositionPreset";
|
|
72
|
+
readonly shapePreset: "shapePreset";
|
|
73
|
+
readonly textBoxTextDirection: "textBoxTextDirection";
|
|
74
|
+
readonly textBoxVerticalAlign: "textBoxVerticalAlign";
|
|
75
|
+
readonly textBoxAlt: "textBoxAlt";
|
|
76
|
+
readonly textBoxRotate: "textBoxRotate";
|
|
77
|
+
readonly textBoxWidthCm: "textBoxWidthCm";
|
|
78
|
+
readonly textBoxHeightCm: "textBoxHeightCm";
|
|
45
79
|
};
|
|
46
80
|
export type MergeKey = (typeof MERGE_KEYS)[keyof typeof MERGE_KEYS];
|