roosterjs 9.45.2 → 9.46.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-adapter-amd-min.js +1 -1
- package/dist/rooster-adapter-amd-min.js.map +1 -1
- package/dist/rooster-adapter-amd.js +804 -796
- package/dist/rooster-adapter-amd.js.map +1 -1
- package/dist/rooster-adapter-min.js +1 -1
- package/dist/rooster-adapter-min.js.map +1 -1
- package/dist/rooster-adapter.js +804 -796
- package/dist/rooster-adapter.js.map +1 -1
- package/dist/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.d.ts +26 -5
- package/dist/rooster-amd.js +2870 -2400
- 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.js +5992 -5986
- 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.js +5992 -5986
- package/dist/rooster-react.js.map +1 -1
- package/dist/rooster.d.ts +26 -5
- package/dist/rooster.js +2870 -2400
- package/dist/rooster.js.map +1 -1
- package/package.json +7 -7
package/dist/rooster.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for roosterjs (Version 9.
|
|
1
|
+
// Type definitions for roosterjs (Version 9.46.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -1294,7 +1294,7 @@ type EntityFormatOperation = /**
|
|
|
1294
1294
|
/**
|
|
1295
1295
|
* Operations used by editTable() API
|
|
1296
1296
|
*/
|
|
1297
|
-
type TableOperation = TableVerticalInsertOperation | TableHorizontalInsertOperation | TableDeleteOperation | TableVerticalMergeOperation | TableHorizontalMergeOperation | TableCellMergeOperation | TableSplitOperation | TableAlignOperation | TableCellHorizontalAlignOperation | TableCellVerticalAlignOperation;
|
|
1297
|
+
type TableOperation = TableVerticalInsertOperation | TableHorizontalInsertOperation | TableDeleteOperation | TableVerticalMergeOperation | TableHorizontalMergeOperation | TableCellMergeOperation | TableSplitOperation | TableAlignOperation | TableCellHorizontalAlignOperation | TableCellVerticalAlignOperation | TableCellShiftOperation;
|
|
1298
1298
|
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Operations used by editTable() API for insert table cell vertically
|
|
@@ -1428,6 +1428,18 @@ type TableCellVerticalAlignOperation = /**
|
|
|
1428
1428
|
*/
|
|
1429
1429
|
| 'alignCellBottom';
|
|
1430
1430
|
|
|
1431
|
+
/**
|
|
1432
|
+
* Operations used by editTable() API to shift table cell content up or left
|
|
1433
|
+
*/
|
|
1434
|
+
type TableCellShiftOperation = /**
|
|
1435
|
+
* Move the table cell content to the cell on the left
|
|
1436
|
+
*/
|
|
1437
|
+
'shiftCellsLeft'
|
|
1438
|
+
/**
|
|
1439
|
+
* Move the table cell content to the cell above
|
|
1440
|
+
*/
|
|
1441
|
+
| 'shiftCellsUp';
|
|
1442
|
+
|
|
1431
1443
|
/**
|
|
1432
1444
|
* Specify what type of content to paste
|
|
1433
1445
|
*/
|
|
@@ -3536,8 +3548,9 @@ interface Colors {
|
|
|
3536
3548
|
* @param baseLValue Base value of light used for dark value calculation
|
|
3537
3549
|
* @param colorType @optional Type of color, can be text, background, or border
|
|
3538
3550
|
* @param element @optional Source HTML element of the color
|
|
3551
|
+
* @param comparingColor @optional When generating dark color for background color, we can provide text color as comparingColor to make sure the generated dark border color has enough contrast with text color in dark mode
|
|
3539
3552
|
*/
|
|
3540
|
-
type ColorTransformFunction = (lightColor: string, baseLValue?: number, colorType?: 'text' | 'background' | 'border', element?: HTMLElement) => string;
|
|
3553
|
+
type ColorTransformFunction = (lightColor: string, baseLValue?: number, colorType?: 'text' | 'background' | 'border', element?: HTMLElement, comparingColor?: string) => string;
|
|
3541
3554
|
|
|
3542
3555
|
/**
|
|
3543
3556
|
* An interface of Editor, built on top of Content Model
|
|
@@ -7493,8 +7506,9 @@ function getColor(element: HTMLElement, isBackground: boolean, isDarkMode: boole
|
|
|
7493
7506
|
* @param isBackground True to set background color, false to set text color
|
|
7494
7507
|
* @param isDarkMode Whether element is in dark mode now
|
|
7495
7508
|
* @param darkColorHandler @optional The dark color handler object to help manager dark mode color
|
|
7509
|
+
* @param comparingColor @optional When generating dark color for background color, we can provide text color as comparingColor to make sure the generated dark border color has enough contrast with text color in dark mode
|
|
7496
7510
|
*/
|
|
7497
|
-
function setColor(element: HTMLElement, color: string | null | undefined, isBackground: boolean, isDarkMode: boolean, darkColorHandler?: DarkColorHandler): void;
|
|
7511
|
+
function setColor(element: HTMLElement, color: string | null | undefined, isBackground: boolean, isDarkMode: boolean, darkColorHandler?: DarkColorHandler, comparingColor?: string): void;
|
|
7498
7512
|
|
|
7499
7513
|
/**
|
|
7500
7514
|
* Parse color string to r/g/b value.
|
|
@@ -7573,6 +7587,13 @@ function getSelectionRootNode(selection: DOMSelection | undefined): Node | undef
|
|
|
7573
7587
|
*/
|
|
7574
7588
|
function getDOMInsertPointRect(doc: Document, pos: DOMInsertPoint): Rect | null;
|
|
7575
7589
|
|
|
7590
|
+
/**
|
|
7591
|
+
* Remove the unselected content from the model
|
|
7592
|
+
* @param model the model document
|
|
7593
|
+
* @param selection The editor selection
|
|
7594
|
+
* */
|
|
7595
|
+
function trimModelForSelection(model: ContentModelDocument, selection: DOMSelection): void;
|
|
7596
|
+
|
|
7576
7597
|
/**
|
|
7577
7598
|
* Returns true when the event was fired from a key that produces a character value, otherwise false
|
|
7578
7599
|
* This detection is not 100% accurate. event.key is not fully supported by all browsers, and in some browsers (e.g. IE),
|
|
@@ -7661,7 +7682,7 @@ function retrieveDocumentMetadata(doc: Document): Record<string, string>;
|
|
|
7661
7682
|
* @param darkColorHandler The dark color handler object to help do color transformation
|
|
7662
7683
|
* @param transformColorOptions Configuration options for controlling which elements and styles undergo color transformation.
|
|
7663
7684
|
*/
|
|
7664
|
-
function transformColor(rootNode: Node, includeSelf: boolean, direction: 'lightToDark' | 'darkToLight', darkColorHandler?: DarkColorHandler, transformColorOptions?: TransformColorOptions): void;
|
|
7685
|
+
function transformColor(rootNode: Node, includeSelf: boolean, direction: 'lightToDark' | 'darkToLight', darkColorHandler?: DarkColorHandler, transformColorOptions?: TransformColorOptions, defaultTextColor?: string): void;
|
|
7665
7686
|
|
|
7666
7687
|
/**
|
|
7667
7688
|
* Configuration options for controlling which elements and styles undergo color transformation.
|