roosterjs-content-model-types 9.17.0 → 9.19.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/lib/contentModel/format/ContentModelTableCellFormat.d.ts +2 -1
- package/lib/contentModel/format/ContentModelTableCellFormat.js.map +1 -1
- package/lib/editor/ExperimentalFeature.d.ts +1 -0
- package/lib/editor/ExperimentalFeature.js.map +1 -1
- package/lib/parameter/FormatContentModelContext.d.ts +6 -1
- package/lib/parameter/FormatContentModelContext.js.map +1 -1
- package/lib-amd/contentModel/format/ContentModelTableCellFormat.d.ts +2 -1
- package/lib-amd/contentModel/format/ContentModelTableCellFormat.js.map +1 -1
- package/lib-amd/editor/ExperimentalFeature.d.ts +1 -0
- package/lib-amd/editor/ExperimentalFeature.js.map +1 -1
- package/lib-amd/parameter/FormatContentModelContext.d.ts +6 -1
- package/lib-amd/parameter/FormatContentModelContext.js.map +1 -1
- package/lib-mjs/contentModel/format/ContentModelTableCellFormat.d.ts +2 -1
- package/lib-mjs/contentModel/format/ContentModelTableCellFormat.js.map +1 -1
- package/lib-mjs/editor/ExperimentalFeature.d.ts +1 -0
- package/lib-mjs/editor/ExperimentalFeature.js.map +1 -1
- package/lib-mjs/parameter/FormatContentModelContext.d.ts +6 -1
- package/lib-mjs/parameter/FormatContentModelContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BoldFormat } from './formatParts/BoldFormat';
|
|
1
2
|
import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';
|
|
2
3
|
import type { ContentModelBlockFormat } from './ContentModelBlockFormat';
|
|
3
4
|
import type { SizeFormat } from './formatParts/SizeFormat';
|
|
@@ -7,4 +8,4 @@ import type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';
|
|
|
7
8
|
/**
|
|
8
9
|
* Format of table cell
|
|
9
10
|
*/
|
|
10
|
-
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat;
|
|
11
|
+
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat & BoldFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat;\n"]}
|
|
1
|
+
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat &\n BoldFormat;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
1
|
+
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
@@ -61,8 +61,13 @@ export interface FormatContentModelContext {
|
|
|
61
61
|
* @optional
|
|
62
62
|
* When pass true, skip adding undo snapshot when write Content Model back to DOM.
|
|
63
63
|
* Need to be set by the formatter function
|
|
64
|
+
* Default value is false, which means add undo snapshot
|
|
65
|
+
* When set to true, it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added, this is same with "MarkNewContent"
|
|
66
|
+
* When set to 'DoNotSkip', it will add undo snapshot (default behavior)
|
|
67
|
+
* When set to 'MarkNewContent', it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added
|
|
68
|
+
* When set to 'SkipAll', it will skip adding undo snapshot and not mark "hasNewContent", as if no change is made
|
|
64
69
|
*/
|
|
65
|
-
skipUndoSnapshot?: boolean;
|
|
70
|
+
skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';
|
|
66
71
|
/**
|
|
67
72
|
* @optional
|
|
68
73
|
* When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n */\n skipUndoSnapshot?: boolean;\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n * Default value is false, which means add undo snapshot\n * When set to true, it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added, this is same with \"MarkNewContent\"\n * When set to 'DoNotSkip', it will add undo snapshot (default behavior)\n * When set to 'MarkNewContent', it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added\n * When set to 'SkipAll', it will skip adding undo snapshot and not mark \"hasNewContent\", as if no change is made\n */\n skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BoldFormat } from './formatParts/BoldFormat';
|
|
1
2
|
import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';
|
|
2
3
|
import type { ContentModelBlockFormat } from './ContentModelBlockFormat';
|
|
3
4
|
import type { SizeFormat } from './formatParts/SizeFormat';
|
|
@@ -7,4 +8,4 @@ import type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';
|
|
|
7
8
|
/**
|
|
8
9
|
* Format of table cell
|
|
9
10
|
*/
|
|
10
|
-
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat;
|
|
11
|
+
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat & BoldFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat;\n"]}
|
|
1
|
+
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat &\n BoldFormat;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
1
|
+
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
@@ -61,8 +61,13 @@ export interface FormatContentModelContext {
|
|
|
61
61
|
* @optional
|
|
62
62
|
* When pass true, skip adding undo snapshot when write Content Model back to DOM.
|
|
63
63
|
* Need to be set by the formatter function
|
|
64
|
+
* Default value is false, which means add undo snapshot
|
|
65
|
+
* When set to true, it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added, this is same with "MarkNewContent"
|
|
66
|
+
* When set to 'DoNotSkip', it will add undo snapshot (default behavior)
|
|
67
|
+
* When set to 'MarkNewContent', it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added
|
|
68
|
+
* When set to 'SkipAll', it will skip adding undo snapshot and not mark "hasNewContent", as if no change is made
|
|
64
69
|
*/
|
|
65
|
-
skipUndoSnapshot?: boolean;
|
|
70
|
+
skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';
|
|
66
71
|
/**
|
|
67
72
|
* @optional
|
|
68
73
|
* When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n */\n skipUndoSnapshot?: boolean;\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n * Default value is false, which means add undo snapshot\n * When set to true, it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added, this is same with \"MarkNewContent\"\n * When set to 'DoNotSkip', it will add undo snapshot (default behavior)\n * When set to 'MarkNewContent', it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added\n * When set to 'SkipAll', it will skip adding undo snapshot and not mark \"hasNewContent\", as if no change is made\n */\n skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BoldFormat } from './formatParts/BoldFormat';
|
|
1
2
|
import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';
|
|
2
3
|
import type { ContentModelBlockFormat } from './ContentModelBlockFormat';
|
|
3
4
|
import type { SizeFormat } from './formatParts/SizeFormat';
|
|
@@ -7,4 +8,4 @@ import type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';
|
|
|
7
8
|
/**
|
|
8
9
|
* Format of table cell
|
|
9
10
|
*/
|
|
10
|
-
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat;
|
|
11
|
+
export declare type ContentModelTableCellFormat = ContentModelBlockFormat & BorderBoxFormat & VerticalAlignFormat & WordBreakFormat & TextColorFormat & SizeFormat & BoldFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat;\n"]}
|
|
1
|
+
{"version":3,"file":"ContentModelTableCellFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelTableCellFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { ContentModelBlockFormat } from './ContentModelBlockFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WordBreakFormat } from '../format/formatParts/WordBreakFormat';\n\n/**\n * Format of table cell\n */\nexport type ContentModelTableCellFormat = ContentModelBlockFormat &\n BorderBoxFormat &\n VerticalAlignFormat &\n WordBreakFormat &\n TextColorFormat &\n SizeFormat &\n BoldFormat;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
1
|
+
{"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
|
|
@@ -61,8 +61,13 @@ export interface FormatContentModelContext {
|
|
|
61
61
|
* @optional
|
|
62
62
|
* When pass true, skip adding undo snapshot when write Content Model back to DOM.
|
|
63
63
|
* Need to be set by the formatter function
|
|
64
|
+
* Default value is false, which means add undo snapshot
|
|
65
|
+
* When set to true, it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added, this is same with "MarkNewContent"
|
|
66
|
+
* When set to 'DoNotSkip', it will add undo snapshot (default behavior)
|
|
67
|
+
* When set to 'MarkNewContent', it will skip adding undo snapshot but mark "hasNewContent" so that next undo snapshot will be added
|
|
68
|
+
* When set to 'SkipAll', it will skip adding undo snapshot and not mark "hasNewContent", as if no change is made
|
|
64
69
|
*/
|
|
65
|
-
skipUndoSnapshot?: boolean;
|
|
70
|
+
skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';
|
|
66
71
|
/**
|
|
67
72
|
* @optional
|
|
68
73
|
* When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n */\n skipUndoSnapshot?: boolean;\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n * Default value is false, which means add undo snapshot\n * When set to true, it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added, this is same with \"MarkNewContent\"\n * When set to 'DoNotSkip', it will add undo snapshot (default behavior)\n * When set to 'MarkNewContent', it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added\n * When set to 'SkipAll', it will skip adding undo snapshot and not mark \"hasNewContent\", as if no change is made\n */\n skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
|
package/package.json
CHANGED