roosterjs 9.44.0 → 9.45.1
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 +79 -8
- package/dist/rooster-amd.js +855 -248
- 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-min.js +1 -1
- package/dist/rooster-react-amd-min.js.map +1 -1
- package/dist/rooster-react-amd.d.ts +1 -1
- package/dist/rooster-react-amd.js +10 -1
- package/dist/rooster-react-amd.js.map +1 -1
- package/dist/rooster-react-min.js +1 -1
- package/dist/rooster-react-min.js.map +1 -1
- package/dist/rooster-react.d.ts +1 -1
- package/dist/rooster-react.js +10 -1
- package/dist/rooster-react.js.map +1 -1
- package/dist/rooster.d.ts +79 -8
- package/dist/rooster.js +855 -248
- package/dist/rooster.js.map +1 -1
- package/package.json +8 -8
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.45.1)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -40,7 +40,7 @@ export interface ReadonlyContentModelWithFormat<T extends ContentModelFormatBase
|
|
|
40
40
|
/**
|
|
41
41
|
* Format of Table
|
|
42
42
|
*/
|
|
43
|
-
export type ContentModelTableFormat = ContentModelBlockFormat & IdFormat & AriaFormat & BorderFormat & BorderBoxFormat & DirectionFormat & SpacingFormat & MarginFormat & DisplayFormat & TableLayoutFormat & SizeFormat & RoleFormat;
|
|
43
|
+
export type ContentModelTableFormat = ContentModelBlockFormat & IdFormat & AriaFormat & BorderFormat & BorderBoxFormat & DirectionFormat & SpacingFormat & MarginFormat & DisplayFormat & TableLayoutFormat & SizeFormat & RoleFormat & LegacyTableBorderFormat;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Represents base format of an element that supports dataset and/or metadata
|
|
@@ -266,6 +266,10 @@ export interface FormatHandlerTypeMap {
|
|
|
266
266
|
* Format for BorderBoxFormat
|
|
267
267
|
*/
|
|
268
268
|
borderBox: BorderBoxFormat;
|
|
269
|
+
/**
|
|
270
|
+
* Format for the Border Colors
|
|
271
|
+
*/
|
|
272
|
+
borderColor: BorderFormat;
|
|
269
273
|
/**
|
|
270
274
|
* Format for BoxShadowFormat
|
|
271
275
|
*/
|
|
@@ -314,6 +318,10 @@ export interface FormatHandlerTypeMap {
|
|
|
314
318
|
* Format for ItalicFormat
|
|
315
319
|
*/
|
|
316
320
|
italic: ItalicFormat;
|
|
321
|
+
/**
|
|
322
|
+
* Format for LegacyTableBorderFormat
|
|
323
|
+
*/
|
|
324
|
+
legacyTableBorder: LegacyTableBorderFormat;
|
|
317
325
|
/**
|
|
318
326
|
* Format for LetterSpacingFormat
|
|
319
327
|
*/
|
|
@@ -326,6 +334,10 @@ export interface FormatHandlerTypeMap {
|
|
|
326
334
|
* Format for LinkFormat
|
|
327
335
|
*/
|
|
328
336
|
link: LinkFormat;
|
|
337
|
+
/**
|
|
338
|
+
* Format for TextAlignFormat under list item
|
|
339
|
+
*/
|
|
340
|
+
listItemAlign: TextAlignFormat;
|
|
329
341
|
/**
|
|
330
342
|
* Format for ListThreadFormat (used by list item)
|
|
331
343
|
*/
|
|
@@ -918,6 +930,31 @@ export type RoleFormat = {
|
|
|
918
930
|
role?: string;
|
|
919
931
|
};
|
|
920
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Format for legacy table border.
|
|
935
|
+
* This is used for supporting legacy table border rendering in some scenarios.
|
|
936
|
+
*/
|
|
937
|
+
export type LegacyTableBorderFormat = {
|
|
938
|
+
/**
|
|
939
|
+
* The value of border attribute on table element.
|
|
940
|
+
* Although this attribute is deprecated in HTML5, some email clients still rely on it.
|
|
941
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement/border
|
|
942
|
+
*/
|
|
943
|
+
legacyTableBorder?: string;
|
|
944
|
+
/**
|
|
945
|
+
* The value of cellspacing attribute on table element.
|
|
946
|
+
* This attribute is deprecated in HTML5, but still used in some legacy scenarios.
|
|
947
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement/cellSpacing
|
|
948
|
+
*/
|
|
949
|
+
cellSpacing?: string;
|
|
950
|
+
/**
|
|
951
|
+
* The value of cellpadding attribute on table element.
|
|
952
|
+
* This attribute is deprecated in HTML5, but still used in some legacy scenarios.
|
|
953
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement/cellPadding
|
|
954
|
+
*/
|
|
955
|
+
cellPadding?: string;
|
|
956
|
+
};
|
|
957
|
+
|
|
921
958
|
/**
|
|
922
959
|
* Represents dataset format of Content Model
|
|
923
960
|
*/
|
|
@@ -3713,7 +3750,11 @@ export type ExperimentalFeature = GraduatedExperimentalFeature
|
|
|
3713
3750
|
/**
|
|
3714
3751
|
* Allow caching list item elements.
|
|
3715
3752
|
*/
|
|
3716
|
-
| 'CacheList'
|
|
3753
|
+
| 'CacheList'
|
|
3754
|
+
/**
|
|
3755
|
+
* Transform the table border colors when switching from light to dark mode
|
|
3756
|
+
*/
|
|
3757
|
+
| 'TransformTableBorderColors';
|
|
3717
3758
|
|
|
3718
3759
|
/**
|
|
3719
3760
|
* Predefined experiment features (Graduated, only keep them for backward compatibility)
|
|
@@ -4674,6 +4715,10 @@ export interface AutoLinkOptions {
|
|
|
4674
4715
|
* Current running environment
|
|
4675
4716
|
*/
|
|
4676
4717
|
export interface EditorEnvironment {
|
|
4718
|
+
/**
|
|
4719
|
+
* Document object of the editor
|
|
4720
|
+
*/
|
|
4721
|
+
readonly document: Document;
|
|
4677
4722
|
/**
|
|
4678
4723
|
* Whether editor is running on Mac
|
|
4679
4724
|
*/
|
|
@@ -6062,6 +6107,11 @@ export interface PromotedLink {
|
|
|
6062
6107
|
href: string;
|
|
6063
6108
|
}
|
|
6064
6109
|
|
|
6110
|
+
/**
|
|
6111
|
+
* The keyfor BorderFormat
|
|
6112
|
+
*/
|
|
6113
|
+
export type BorderKey = 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft';
|
|
6114
|
+
|
|
6065
6115
|
/**
|
|
6066
6116
|
* Editor plugin event interface
|
|
6067
6117
|
*/
|
|
@@ -6801,6 +6851,16 @@ export const entityProcessor: ElementProcessor<HTMLElement>;
|
|
|
6801
6851
|
*/
|
|
6802
6852
|
export const tableProcessor: ElementProcessor<HTMLTableElement>;
|
|
6803
6853
|
|
|
6854
|
+
/**
|
|
6855
|
+
* Content Model Element Processor for format container elements (e.g., blockquote, div)
|
|
6856
|
+
* Processes elements that create FormatContainer blocks in the content model.
|
|
6857
|
+
* This processor can be used in processorOverride to customize how specific elements are processed.
|
|
6858
|
+
* @param group The parent block group
|
|
6859
|
+
* @param element The DOM element to process
|
|
6860
|
+
* @param context DOM to Content Model context
|
|
6861
|
+
*/
|
|
6862
|
+
export const formatContainerProcessor: ElementProcessor<HTMLElement>;
|
|
6863
|
+
|
|
6804
6864
|
/**
|
|
6805
6865
|
* Get offset numbers of a regular (range based) selection.
|
|
6806
6866
|
* If the selection start/end position is not in the given node, it will return -1 for the related value
|
|
@@ -7408,7 +7468,7 @@ export function parseValueWithUnit(value?: string, currentSizePxOrElement?: numb
|
|
|
7408
7468
|
/**
|
|
7409
7469
|
* Keys of border items
|
|
7410
7470
|
*/
|
|
7411
|
-
export const BorderKeys: (keyof BorderFormat & keyof CSSStyleDeclaration)[];
|
|
7471
|
+
export const BorderKeys: (BorderKey & keyof BorderFormat & keyof CSSStyleDeclaration)[];
|
|
7412
7472
|
|
|
7413
7473
|
/**
|
|
7414
7474
|
* List of deprecated colors
|
|
@@ -7593,12 +7653,22 @@ export function retrieveDocumentMetadata(doc: Document): Record<string, string>;
|
|
|
7593
7653
|
|
|
7594
7654
|
/**
|
|
7595
7655
|
* Edit and transform color of elements between light mode and dark mode
|
|
7656
|
+
* By default, text and background colors are transformed for all elements.
|
|
7596
7657
|
* @param rootNode The root DOM node to transform
|
|
7597
7658
|
* @param includeSelf True to transform the root node as well, otherwise false
|
|
7598
7659
|
* @param direction To specify the transform direction, light to dark, or dark to light
|
|
7599
7660
|
* @param darkColorHandler The dark color handler object to help do color transformation
|
|
7661
|
+
* @param transformColorOptions Configuration options for controlling which elements and styles undergo color transformation.
|
|
7600
7662
|
*/
|
|
7601
|
-
export function transformColor(rootNode: Node, includeSelf: boolean, direction: 'lightToDark' | 'darkToLight', darkColorHandler?: DarkColorHandler): void;
|
|
7663
|
+
export function transformColor(rootNode: Node, includeSelf: boolean, direction: 'lightToDark' | 'darkToLight', darkColorHandler?: DarkColorHandler, transformColorOptions?: TransformColorOptions): void;
|
|
7664
|
+
|
|
7665
|
+
/**
|
|
7666
|
+
* Configuration options for controlling which elements and styles undergo color transformation.
|
|
7667
|
+
* By default, text and background colors are transformed for all elements.
|
|
7668
|
+
*/
|
|
7669
|
+
export interface TransformColorOptions {
|
|
7670
|
+
tableBorders: boolean;
|
|
7671
|
+
}
|
|
7602
7672
|
|
|
7603
7673
|
/**
|
|
7604
7674
|
* Normalize font family string to a standard format
|
|
@@ -7903,7 +7973,7 @@ export function setFirstColumnFormatBorders(rows: ShallowMutableContentModelTabl
|
|
|
7903
7973
|
* Normalize a Content Model table, make sure:
|
|
7904
7974
|
* 1. Fist cells are not spanned
|
|
7905
7975
|
* 2. Only first column and row can have headers
|
|
7906
|
-
* 3. All cells have content
|
|
7976
|
+
* 3. All cells have content
|
|
7907
7977
|
* 4. Table and table row have correct width/height
|
|
7908
7978
|
* 5. Spanned cell has no child blocks
|
|
7909
7979
|
* 6. default format is correctly applied
|
|
@@ -8620,8 +8690,9 @@ export function getContentForCopy(editor: IEditor, isCut: boolean, event: Clipbo
|
|
|
8620
8690
|
* @param rows Number of rows in table
|
|
8621
8691
|
* @param tableMetadataFormat (Optional) The table format that are stored as metadata. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB
|
|
8622
8692
|
* @param format (Optional) The table format used for style attributes
|
|
8693
|
+
* @param cellFormat (Optional) custom format for table cells, except for borders styles, for borders use tableMetadataFormat
|
|
8623
8694
|
*/
|
|
8624
|
-
export function insertTable(editor: IEditor, columns: number, rows: number, tableMetadataFormat?: Partial<TableMetadataFormat>, format?: ContentModelTableFormat): void;
|
|
8695
|
+
export function insertTable(editor: IEditor, columns: number, rows: number, tableMetadataFormat?: Partial<TableMetadataFormat>, format?: ContentModelTableFormat, customCellFormat?: ContentModelTableCellFormat): void;
|
|
8625
8696
|
|
|
8626
8697
|
/**
|
|
8627
8698
|
* Format current focused table with the given format
|
|
@@ -9202,7 +9273,7 @@ export type OnTableEditorCreatedCallback = (featureType: TableEditFeatureName, e
|
|
|
9202
9273
|
/**
|
|
9203
9274
|
* Names of table edit features
|
|
9204
9275
|
*/
|
|
9205
|
-
export type TableEditFeatureName = 'HorizontalTableInserter' | 'VerticalTableInserter' | 'TableMover' | 'TableResizer' | 'TableSelector' | 'CellResizer';
|
|
9276
|
+
export type TableEditFeatureName = 'HorizontalTableInserter' | 'VerticalTableInserter' | 'TableMover' | 'TableResizer' | 'TableSelector' | 'CellResizer' | 'TableRowSelector' | 'TableColumnSelector';
|
|
9206
9277
|
|
|
9207
9278
|
/**
|
|
9208
9279
|
* Represents a table and its container (logical root)
|