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