roosterjs 9.54.0 → 9.56.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 +8 -8
- 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 +8 -8
- 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 +74 -6
- package/dist/rooster-amd.js +285 -47
- 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 +60 -58
- 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 +97 -95
- package/dist/rooster-react.js.map +1 -1
- package/dist/rooster.d.ts +74 -6
- package/dist/rooster.js +285 -47
- 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.56.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -103,6 +103,11 @@ type ContentModelHyperLinkFormat = LinkFormat & TextColorFormat & BackgroundColo
|
|
|
103
103
|
*/
|
|
104
104
|
type ContentModelCodeFormat = FontFamilyFormat & DisplayFormat;
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The format object for a data element (<data>) in Content Model
|
|
108
|
+
*/
|
|
109
|
+
type ContentModelDataFormat = DataValueFormat;
|
|
110
|
+
|
|
106
111
|
/**
|
|
107
112
|
* Type for FormatContainer
|
|
108
113
|
*/
|
|
@@ -217,6 +222,10 @@ interface ContentModelFormatMap {
|
|
|
217
222
|
* Format type for code
|
|
218
223
|
*/
|
|
219
224
|
code: FontFamilyFormat;
|
|
225
|
+
/**
|
|
226
|
+
* Format type for data, used by HTML <data> element
|
|
227
|
+
*/
|
|
228
|
+
data: ContentModelDataFormat;
|
|
220
229
|
/**
|
|
221
230
|
* Format type for dataset
|
|
222
231
|
*/
|
|
@@ -285,6 +294,10 @@ interface FormatHandlerTypeMap {
|
|
|
285
294
|
* Format for DatasetFormat
|
|
286
295
|
*/
|
|
287
296
|
dataset: DatasetFormat;
|
|
297
|
+
/**
|
|
298
|
+
* Format for DataValueFormat, used by HTML <data> element
|
|
299
|
+
*/
|
|
300
|
+
dataValue: DataValueFormat;
|
|
288
301
|
/**
|
|
289
302
|
* Format for DirectionFormat
|
|
290
303
|
*/
|
|
@@ -506,6 +519,16 @@ type LetterSpacingFormat = {
|
|
|
506
519
|
letterSpacing?: string;
|
|
507
520
|
};
|
|
508
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Format of the value of a HTML "data" element
|
|
524
|
+
*/
|
|
525
|
+
type DataValueFormat = {
|
|
526
|
+
/**
|
|
527
|
+
* The machine-readable value, represented by the "value" attribute of a HTML "data" element
|
|
528
|
+
*/
|
|
529
|
+
dataValue?: string;
|
|
530
|
+
};
|
|
531
|
+
|
|
509
532
|
/**
|
|
510
533
|
* Format of line height
|
|
511
534
|
*/
|
|
@@ -2171,6 +2194,10 @@ interface ContentModelSegmentBase<T extends ContentModelSegmentType, TFormat ext
|
|
|
2171
2194
|
* Code info
|
|
2172
2195
|
*/
|
|
2173
2196
|
code?: ContentModelCode;
|
|
2197
|
+
/**
|
|
2198
|
+
* Data info, used by HTML <data> element
|
|
2199
|
+
*/
|
|
2200
|
+
data?: ContentModelData;
|
|
2174
2201
|
}
|
|
2175
2202
|
|
|
2176
2203
|
/**
|
|
@@ -2195,6 +2222,10 @@ interface ReadonlyContentModelSegmentBase<T extends ContentModelSegmentType, TFo
|
|
|
2195
2222
|
* Code info
|
|
2196
2223
|
*/
|
|
2197
2224
|
readonly code?: ReadonlyContentModelCode;
|
|
2225
|
+
/**
|
|
2226
|
+
* Data info, used by HTML <data> element
|
|
2227
|
+
*/
|
|
2228
|
+
readonly data?: ReadonlyContentModelData;
|
|
2198
2229
|
}
|
|
2199
2230
|
|
|
2200
2231
|
/**
|
|
@@ -2209,6 +2240,10 @@ interface ShallowMutableContentModelSegmentBase<T extends ContentModelSegmentTyp
|
|
|
2209
2240
|
* Code info
|
|
2210
2241
|
*/
|
|
2211
2242
|
code?: ContentModelCode;
|
|
2243
|
+
/**
|
|
2244
|
+
* Data info, used by HTML <data> element
|
|
2245
|
+
*/
|
|
2246
|
+
data?: ContentModelData;
|
|
2212
2247
|
}
|
|
2213
2248
|
|
|
2214
2249
|
/**
|
|
@@ -2240,6 +2275,22 @@ interface ContentModelCode extends MutableMark, ContentModelWithFormat<ContentMo
|
|
|
2240
2275
|
* since code is also a kind of segment, with some extra information
|
|
2241
2276
|
*/
|
|
2242
2277
|
interface ReadonlyContentModelCode extends ReadonlyMark, ReadonlyContentModelWithFormat<ContentModelCodeFormat> {
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Represent data info of Content Model, used by HTML <data> element.
|
|
2282
|
+
* ContentModelData is a decorator but not a standalone model type, instead it need to be put inside a ContentModelSegment
|
|
2283
|
+
* since the <data> element is also a kind of segment, with some extra information
|
|
2284
|
+
*/
|
|
2285
|
+
interface ContentModelData extends MutableMark, ContentModelWithFormat<ContentModelDataFormat> {
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Represent data info of Content Model, used by HTML <data> element. (Readonly)
|
|
2290
|
+
* ContentModelData is a decorator but not a standalone model type, instead it need to be put inside a ContentModelSegment
|
|
2291
|
+
* since the <data> element is also a kind of segment, with some extra information
|
|
2292
|
+
*/
|
|
2293
|
+
interface ReadonlyContentModelData extends ReadonlyMark, ReadonlyContentModelWithFormat<ContentModelDataFormat> {
|
|
2243
2294
|
}
|
|
2244
2295
|
|
|
2245
2296
|
/**
|
|
@@ -2287,12 +2338,12 @@ interface ReadonlyContentModelParagraphDecorator extends ReadonlyMark, ReadonlyC
|
|
|
2287
2338
|
/**
|
|
2288
2339
|
* Union type for segment decorators
|
|
2289
2340
|
*/
|
|
2290
|
-
type ContentModelDecorator = ContentModelLink | ContentModelCode | ContentModelListLevel;
|
|
2341
|
+
type ContentModelDecorator = ContentModelLink | ContentModelCode | ContentModelData | ContentModelListLevel;
|
|
2291
2342
|
|
|
2292
2343
|
/**
|
|
2293
2344
|
* Union type for segment decorators (Readonly)
|
|
2294
2345
|
*/
|
|
2295
|
-
type ReadonlyContentModelDecorator = ReadonlyContentModelLink | ReadonlyContentModelCode | ReadonlyContentModelListLevel;
|
|
2346
|
+
type ReadonlyContentModelDecorator = ReadonlyContentModelLink | ReadonlyContentModelCode | ReadonlyContentModelData | ReadonlyContentModelListLevel;
|
|
2296
2347
|
|
|
2297
2348
|
/**
|
|
2298
2349
|
* Content Model of List Level
|
|
@@ -3048,6 +3099,10 @@ interface DomToModelDecoratorContext {
|
|
|
3048
3099
|
* Context of code info
|
|
3049
3100
|
*/
|
|
3050
3101
|
code: ContentModelCode;
|
|
3102
|
+
/**
|
|
3103
|
+
* Context of data info, used by HTML <data> element
|
|
3104
|
+
*/
|
|
3105
|
+
data: ContentModelData;
|
|
3051
3106
|
/**
|
|
3052
3107
|
* Context for paragraph decorator
|
|
3053
3108
|
*/
|
|
@@ -7363,9 +7418,10 @@ function createTableCell(spanLeftOrColSpan?: boolean | number, spanAboveOrRowSpa
|
|
|
7363
7418
|
* @param text Text of this model
|
|
7364
7419
|
* @param format @optional The format of this model
|
|
7365
7420
|
* @param link @optional The link decorator
|
|
7366
|
-
* @param code @
|
|
7421
|
+
* @param code @optional The code decorator
|
|
7422
|
+
* @param data @optional The data decorator
|
|
7367
7423
|
*/
|
|
7368
|
-
function createText(text: string, format?: Readonly<ContentModelSegmentFormat>, link?: ReadonlyContentModelLink, code?: ReadonlyContentModelCode): ContentModelText;
|
|
7424
|
+
function createText(text: string, format?: Readonly<ContentModelSegmentFormat>, link?: ReadonlyContentModelLink, code?: ReadonlyContentModelCode, data?: ReadonlyContentModelData): ContentModelText;
|
|
7369
7425
|
|
|
7370
7426
|
/**
|
|
7371
7427
|
* Create a ContentModelImage model
|
|
@@ -7872,7 +7928,7 @@ function normalizeFontFamily(fontFamily: string): string;
|
|
|
7872
7928
|
* @param allowedCustomPasteType Allowed custom content type when paste besides text/plain, text/html and images
|
|
7873
7929
|
Only text types are supported, and do not add "text/" prefix to the type values
|
|
7874
7930
|
*/
|
|
7875
|
-
function extractClipboardItems(items: DataTransferItem[], allowedCustomPasteType?: string[]): Promise<ClipboardData>;
|
|
7931
|
+
function extractClipboardItems(items: DataTransferItem[], allowedCustomPasteType?: string[], isPasteNative?: boolean): Promise<ClipboardData>;
|
|
7876
7932
|
|
|
7877
7933
|
/**
|
|
7878
7934
|
* Gets the cached event data by cache key from event object if there is already one.
|
|
@@ -8109,6 +8165,13 @@ function setSelection(group: ReadonlyContentModelBlockGroup, start?: ReadonlySel
|
|
|
8109
8165
|
*/
|
|
8110
8166
|
function cloneModel(model: ReadonlyContentModelDocument, options?: CloneModelOptions): ContentModelDocument;
|
|
8111
8167
|
|
|
8168
|
+
/**
|
|
8169
|
+
* Clone a content model for paste operations, ensuring that cached elements are handled appropriately.
|
|
8170
|
+
* @param model The content model to clone
|
|
8171
|
+
* @returns A cloned content model suitable for paste operations
|
|
8172
|
+
*/
|
|
8173
|
+
function cloneModelForPaste(model: ReadonlyContentModelDocument): ContentModelDocument;
|
|
8174
|
+
|
|
8112
8175
|
/**
|
|
8113
8176
|
* Merge source model into target mode
|
|
8114
8177
|
* @param target Target Content Model that will merge content into
|
|
@@ -11043,6 +11106,11 @@ interface MarkdownPasteOptions {
|
|
|
11043
11106
|
* @default false
|
|
11044
11107
|
*/
|
|
11045
11108
|
autoConversion: boolean;
|
|
11109
|
+
/**
|
|
11110
|
+
* When true, the plugin will undo the markdown conversion when the user undoes the action.
|
|
11111
|
+
* @default false
|
|
11112
|
+
*/
|
|
11113
|
+
undoConversion: boolean;
|
|
11046
11114
|
}
|
|
11047
11115
|
|
|
11048
11116
|
}
|