roosterjs 9.6.0 → 9.7.0
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/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.d.ts +45 -9
- package/dist/rooster-amd.js +601 -417
- package/dist/rooster-amd.js.map +1 -1
- package/dist/rooster-min.js +1 -1
- package/dist/rooster-min.js.map +1 -1
- package/dist/rooster-react-amd.js +40 -40
- package/dist/rooster-react-amd.js.map +1 -1
- package/dist/rooster-react.js +53 -53
- package/dist/rooster-react.js.map +1 -1
- package/dist/rooster.d.ts +45 -9
- package/dist/rooster.js +601 -417
- package/dist/rooster.js.map +1 -1
- package/package.json +6 -6
package/dist/rooster-amd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for roosterjs (Version 9.
|
|
1
|
+
// Type definitions for roosterjs (Version 9.7.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -3092,9 +3092,11 @@ export interface TextMutationObserver {
|
|
|
3092
3092
|
*/
|
|
3093
3093
|
stopObserving(): void;
|
|
3094
3094
|
/**
|
|
3095
|
-
* Flush all pending mutations
|
|
3095
|
+
* Flush all pending mutations and update cached model if need
|
|
3096
|
+
* @param ignoreMutations When pass true, all mutations will be ignored and do not update content model.
|
|
3097
|
+
* This should only be used when we already have a up-to-date content model and will set it as latest cache
|
|
3096
3098
|
*/
|
|
3097
|
-
flushMutations(
|
|
3099
|
+
flushMutations(ignoreMutations?: boolean): void;
|
|
3098
3100
|
}
|
|
3099
3101
|
|
|
3100
3102
|
/**
|
|
@@ -7888,6 +7890,16 @@ export function applySegmentFormat(editor: IEditor, newFormat: Readonly<ContentM
|
|
|
7888
7890
|
*/
|
|
7889
7891
|
export function changeCapitalization(editor: IEditor, capitalization: 'sentence' | 'lowerCase' | 'upperCase' | 'capitalize', language?: string): void;
|
|
7890
7892
|
|
|
7893
|
+
/**
|
|
7894
|
+
* Split given text segments from the given range
|
|
7895
|
+
* @param textSegment segment to split
|
|
7896
|
+
* @param parent parent paragraph the text segment exist in
|
|
7897
|
+
* @param start starting point of the split
|
|
7898
|
+
* @param end ending point of the split
|
|
7899
|
+
* @returns text segment from the indicated split.
|
|
7900
|
+
*/
|
|
7901
|
+
export function splitTextSegment(textSegment: ContentModelText, parent: ShallowMutableContentModelParagraph, start: number, end: number): ContentModelText;
|
|
7902
|
+
|
|
7891
7903
|
/**
|
|
7892
7904
|
* Insert an image into current selected position
|
|
7893
7905
|
* @param editor The editor to operate on
|
|
@@ -8324,11 +8336,17 @@ export class PastePlugin implements EditorPlugin {
|
|
|
8324
8336
|
* 3. Tab Key
|
|
8325
8337
|
*/
|
|
8326
8338
|
export class EditPlugin implements EditorPlugin {
|
|
8339
|
+
private options;
|
|
8327
8340
|
private editor;
|
|
8328
8341
|
private disposer;
|
|
8329
8342
|
private shouldHandleNextInputEvent;
|
|
8330
8343
|
private selectionAfterDelete;
|
|
8331
8344
|
private handleNormalEnter;
|
|
8345
|
+
/**
|
|
8346
|
+
* @param options An optional parameter that takes in an object of type EditOptions, which includes the following properties:
|
|
8347
|
+
* handleTabKey: A boolean that enables or disables Tab key handling. Defaults to true.
|
|
8348
|
+
*/
|
|
8349
|
+
constructor(options?: EditOptions);
|
|
8332
8350
|
/**
|
|
8333
8351
|
* Get name of this plugin
|
|
8334
8352
|
*/
|
|
@@ -8366,6 +8384,16 @@ export class EditPlugin implements EditorPlugin {
|
|
|
8366
8384
|
private handleBeforeInputEvent;
|
|
8367
8385
|
}
|
|
8368
8386
|
|
|
8387
|
+
/**
|
|
8388
|
+
* Options to customize the keyboard handling behavior of Edit plugin
|
|
8389
|
+
*/
|
|
8390
|
+
export type EditOptions = {
|
|
8391
|
+
/**
|
|
8392
|
+
* Whether to handle Tab key in keyboard. @default true
|
|
8393
|
+
*/
|
|
8394
|
+
handleTabKey?: boolean;
|
|
8395
|
+
};
|
|
8396
|
+
|
|
8369
8397
|
/**
|
|
8370
8398
|
* Auto Format plugin handles auto formatting, such as transforming * characters into a bullet list.
|
|
8371
8399
|
* It can be customized with options to enable or disable auto list features.
|
|
@@ -8715,6 +8743,7 @@ export class WatermarkPlugin implements EditorPlugin {
|
|
|
8715
8743
|
private editor;
|
|
8716
8744
|
private format;
|
|
8717
8745
|
private isShowing;
|
|
8746
|
+
private darkTextColor;
|
|
8718
8747
|
/**
|
|
8719
8748
|
* Create an instance of Watermark plugin
|
|
8720
8749
|
* @param watermark The watermark string
|
|
@@ -8740,6 +8769,7 @@ export class WatermarkPlugin implements EditorPlugin {
|
|
|
8740
8769
|
onPluginEvent(event: PluginEvent): void;
|
|
8741
8770
|
private showHide;
|
|
8742
8771
|
protected show(editor: IEditor): void;
|
|
8772
|
+
private applyWatermarkStyle;
|
|
8743
8773
|
protected hide(editor: IEditor): void;
|
|
8744
8774
|
}
|
|
8745
8775
|
|
|
@@ -9128,7 +9158,7 @@ export class ImageEditPlugin implements ImageEditor, EditorPlugin {
|
|
|
9128
9158
|
protected editor: IEditor | null;
|
|
9129
9159
|
private shadowSpan;
|
|
9130
9160
|
private selectedImage;
|
|
9131
|
-
wrapper: HTMLSpanElement | null;
|
|
9161
|
+
protected wrapper: HTMLSpanElement | null;
|
|
9132
9162
|
private imageEditInfo;
|
|
9133
9163
|
private imageHTMLOptions;
|
|
9134
9164
|
private dndHelpers;
|
|
@@ -9141,6 +9171,7 @@ export class ImageEditPlugin implements ImageEditor, EditorPlugin {
|
|
|
9141
9171
|
private croppers;
|
|
9142
9172
|
private zoomScale;
|
|
9143
9173
|
private disposer;
|
|
9174
|
+
protected isEditing: boolean;
|
|
9144
9175
|
constructor(options?: ImageEditOptions);
|
|
9145
9176
|
/**
|
|
9146
9177
|
* Get name of this plugin
|
|
@@ -9165,20 +9196,25 @@ export class ImageEditPlugin implements ImageEditor, EditorPlugin {
|
|
|
9165
9196
|
* exclusively by another plugin.
|
|
9166
9197
|
* @param event The event to handle:
|
|
9167
9198
|
*/
|
|
9168
|
-
onPluginEvent(
|
|
9199
|
+
onPluginEvent(event: PluginEvent): void;
|
|
9200
|
+
private isImageSelection;
|
|
9201
|
+
private mouseUpHandler;
|
|
9202
|
+
private selectBeforeEditingImage;
|
|
9203
|
+
private keyDownHandler;
|
|
9204
|
+
private applyFormatWithContentModel;
|
|
9169
9205
|
private startEditing;
|
|
9170
|
-
startRotateAndResize(editor: IEditor, image: HTMLImageElement
|
|
9206
|
+
startRotateAndResize(editor: IEditor, image: HTMLImageElement): void;
|
|
9171
9207
|
private updateRotateHandleState;
|
|
9172
9208
|
isOperationAllowed(operation: ImageEditOperation): boolean;
|
|
9173
9209
|
canRegenerateImage(image: HTMLImageElement): boolean;
|
|
9210
|
+
private startCropMode;
|
|
9174
9211
|
cropImage(): void;
|
|
9175
9212
|
private editImage;
|
|
9176
9213
|
private cleanInfo;
|
|
9177
|
-
private formatImageWithContentModel;
|
|
9178
9214
|
private removeImageWrapper;
|
|
9179
9215
|
flipImage(direction: 'horizontal' | 'vertical'): void;
|
|
9180
9216
|
rotateImage(angleRad: number): void;
|
|
9181
|
-
|
|
9217
|
+
get isEditingImage(): boolean;
|
|
9182
9218
|
}
|
|
9183
9219
|
|
|
9184
9220
|
/**
|
|
@@ -9233,7 +9269,7 @@ export interface ImageEditOptions {
|
|
|
9233
9269
|
* Which operations will be executed when image is selected
|
|
9234
9270
|
* @default resizeAndRotate
|
|
9235
9271
|
*/
|
|
9236
|
-
onSelectState?: ImageEditOperation;
|
|
9272
|
+
onSelectState?: ImageEditOperation[];
|
|
9237
9273
|
}
|
|
9238
9274
|
|
|
9239
9275
|
/**
|