Socket
Socket
Sign inDemoInstall

roosterjs-content-model-types

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roosterjs-content-model-types - npm Package Compare versions

Comparing version 9.1.0 to 9.2.0

13

lib-amd/editor/EditorCore.d.ts

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DOMHelper } from '../parameter/DOMHelper';

@@ -125,2 +126,8 @@ import type { PluginEvent } from '../event/PluginEvent';

/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
export declare type Announce = (core: EditorCore, announceData: AnnounceData) => void;
/**
* The interface for the map of core API for Editor.

@@ -232,2 +239,8 @@ * Editor can call call API from this map under EditorCore object

setEditorStyle: SetEditorStyle;
/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
announce: Announce;
}

@@ -234,0 +247,0 @@ /**

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
import type { PasteType } from '../enum/PasteType';

@@ -102,2 +103,8 @@ import type { Colors, ColorTransformFunction } from '../context/DarkColorHandler';

defaultPasteType?: PasteType;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
announcerStringGetter?: (key: KnownAnnounceStrings) => string;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DomToModelOptionForCreateModel } from '../context/DomToModelOption';

@@ -178,2 +179,7 @@ import type { DOMHelper } from '../parameter/DOMHelper';

setEditorStyle(key: string, cssRule: string | null, subSelectors?: 'before' | 'after' | string[]): void;
/**
* Announce the given data
* @param announceData Data to announce
*/
announce(announceData: AnnounceData): void;
}

2

lib-amd/event/ContentChangedEvent.d.ts

@@ -58,5 +58,5 @@ import type { AnnounceData } from '../parameter/AnnounceData';

/**
* @optional Announce data from this content changed event.
* @deprecated Call editor.announce(announceData) directly insteaad
*/
readonly announceData?: AnnounceData;
}

@@ -8,2 +8,6 @@ import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';

export interface ContentModelDocument extends ContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
/**
* Whether the selection in model (if any) is a revert selection (end is before start)
*/
hasRevertedRangeSelection?: boolean;
}

@@ -118,3 +118,3 @@ export { ContentModelSegmentFormat } from './format/ContentModelSegmentFormat';

export { EditorOptions } from './editor/EditorOptions';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, } from './editor/EditorCore';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, Announce, } from './editor/EditorCore';
export { EditorCorePlugins } from './editor/EditorCorePlugins';

@@ -121,0 +121,0 @@ export { EditorPlugin } from './editor/EditorPlugin';

@@ -69,2 +69,10 @@ /**

hasFocus(): boolean;
/**
* Check if the root element is in RTL mode
*/
isRightToLeft(): boolean;
/**
* Get the width of the editable area of the editor content div
*/
getClientWidth(): number;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from './AnnounceData';
import type { ContentModelEntity } from '../entity/ContentModelEntity';

@@ -86,2 +87,6 @@ import type { ContentModelImage } from '../segment/ContentModelImage';

canUndoByBackspace?: boolean;
/**
* @optional Set this value to tell AnnouncePlugin to announce the given information
*/
announceData?: AnnounceData | null;
}

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
/**

@@ -14,2 +15,12 @@ * The state object for LifecyclePlugin

/**
* The HTML container for announced string
*/
announceContainer?: HTMLElement;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
readonly announcerStringGetter?: (key: KnownAnnounceStrings) => string;
/**
* Style elements used for adding CSS rules for editor

@@ -16,0 +27,0 @@ */

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DOMHelper } from '../parameter/DOMHelper';

@@ -125,2 +126,8 @@ import type { PluginEvent } from '../event/PluginEvent';

/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
export declare type Announce = (core: EditorCore, announceData: AnnounceData) => void;
/**
* The interface for the map of core API for Editor.

@@ -232,2 +239,8 @@ * Editor can call call API from this map under EditorCore object

setEditorStyle: SetEditorStyle;
/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
announce: Announce;
}

@@ -234,0 +247,0 @@ /**

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
import type { PasteType } from '../enum/PasteType';

@@ -102,2 +103,8 @@ import type { Colors, ColorTransformFunction } from '../context/DarkColorHandler';

defaultPasteType?: PasteType;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
announcerStringGetter?: (key: KnownAnnounceStrings) => string;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DomToModelOptionForCreateModel } from '../context/DomToModelOption';

@@ -178,2 +179,7 @@ import type { DOMHelper } from '../parameter/DOMHelper';

setEditorStyle(key: string, cssRule: string | null, subSelectors?: 'before' | 'after' | string[]): void;
/**
* Announce the given data
* @param announceData Data to announce
*/
announce(announceData: AnnounceData): void;
}

@@ -58,5 +58,5 @@ import type { AnnounceData } from '../parameter/AnnounceData';

/**
* @optional Announce data from this content changed event.
* @deprecated Call editor.announce(announceData) directly insteaad
*/
readonly announceData?: AnnounceData;
}

@@ -8,2 +8,6 @@ import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';

export interface ContentModelDocument extends ContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
/**
* Whether the selection in model (if any) is a revert selection (end is before start)
*/
hasRevertedRangeSelection?: boolean;
}

@@ -118,3 +118,3 @@ export { ContentModelSegmentFormat } from './format/ContentModelSegmentFormat';

export { EditorOptions } from './editor/EditorOptions';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, } from './editor/EditorCore';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, Announce, } from './editor/EditorCore';
export { EditorCorePlugins } from './editor/EditorCorePlugins';

@@ -121,0 +121,0 @@ export { EditorPlugin } from './editor/EditorPlugin';

@@ -69,2 +69,10 @@ /**

hasFocus(): boolean;
/**
* Check if the root element is in RTL mode
*/
isRightToLeft(): boolean;
/**
* Get the width of the editable area of the editor content div
*/
getClientWidth(): number;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from './AnnounceData';
import type { ContentModelEntity } from '../entity/ContentModelEntity';

@@ -86,2 +87,6 @@ import type { ContentModelImage } from '../segment/ContentModelImage';

canUndoByBackspace?: boolean;
/**
* @optional Set this value to tell AnnouncePlugin to announce the given information
*/
announceData?: AnnounceData | null;
}

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
/**

@@ -14,2 +15,12 @@ * The state object for LifecyclePlugin

/**
* The HTML container for announced string
*/
announceContainer?: HTMLElement;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
readonly announcerStringGetter?: (key: KnownAnnounceStrings) => string;
/**
* Style elements used for adding CSS rules for editor

@@ -16,0 +27,0 @@ */

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DOMHelper } from '../parameter/DOMHelper';

@@ -125,2 +126,8 @@ import type { PluginEvent } from '../event/PluginEvent';

/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
export declare type Announce = (core: EditorCore, announceData: AnnounceData) => void;
/**
* The interface for the map of core API for Editor.

@@ -232,2 +239,8 @@ * Editor can call call API from this map under EditorCore object

setEditorStyle: SetEditorStyle;
/**
* Announce the given data
* @param core The EditorCore object
* @param announceData Data to announce
*/
announce: Announce;
}

@@ -234,0 +247,0 @@ /**

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
import type { PasteType } from '../enum/PasteType';

@@ -102,2 +103,8 @@ import type { Colors, ColorTransformFunction } from '../context/DarkColorHandler';

defaultPasteType?: PasteType;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
announcerStringGetter?: (key: KnownAnnounceStrings) => string;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from '../parameter/AnnounceData';
import type { DomToModelOptionForCreateModel } from '../context/DomToModelOption';

@@ -178,2 +179,7 @@ import type { DOMHelper } from '../parameter/DOMHelper';

setEditorStyle(key: string, cssRule: string | null, subSelectors?: 'before' | 'after' | string[]): void;
/**
* Announce the given data
* @param announceData Data to announce
*/
announce(announceData: AnnounceData): void;
}

@@ -58,5 +58,5 @@ import type { AnnounceData } from '../parameter/AnnounceData';

/**
* @optional Announce data from this content changed event.
* @deprecated Call editor.announce(announceData) directly insteaad
*/
readonly announceData?: AnnounceData;
}

@@ -8,2 +8,6 @@ import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';

export interface ContentModelDocument extends ContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
/**
* Whether the selection in model (if any) is a revert selection (end is before start)
*/
hasRevertedRangeSelection?: boolean;
}

@@ -118,3 +118,3 @@ export { ContentModelSegmentFormat } from './format/ContentModelSegmentFormat';

export { EditorOptions } from './editor/EditorOptions';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, } from './editor/EditorCore';
export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, Announce, } from './editor/EditorCore';
export { EditorCorePlugins } from './editor/EditorCorePlugins';

@@ -121,0 +121,0 @@ export { EditorPlugin } from './editor/EditorPlugin';

@@ -69,2 +69,10 @@ /**

hasFocus(): boolean;
/**
* Check if the root element is in RTL mode
*/
isRightToLeft(): boolean;
/**
* Get the width of the editable area of the editor content div
*/
getClientWidth(): number;
}

@@ -0,1 +1,2 @@

import type { AnnounceData } from './AnnounceData';
import type { ContentModelEntity } from '../entity/ContentModelEntity';

@@ -86,2 +87,6 @@ import type { ContentModelImage } from '../segment/ContentModelImage';

canUndoByBackspace?: boolean;
/**
* @optional Set this value to tell AnnouncePlugin to announce the given information
*/
announceData?: AnnounceData | null;
}

@@ -0,1 +1,2 @@

import type { KnownAnnounceStrings } from '../parameter/AnnounceData';
/**

@@ -14,2 +15,12 @@ * The state object for LifecyclePlugin

/**
* The HTML container for announced string
*/
announceContainer?: HTMLElement;
/**
* A callback to help get string template to announce, used for accessibility
* @param key The key of known announce data
* @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
*/
readonly announcerStringGetter?: (key: KnownAnnounceStrings) => string;
/**
* Style elements used for adding CSS rules for editor

@@ -16,0 +27,0 @@ */

@@ -5,3 +5,3 @@ {

"dependencies": {},
"version": "9.1.0",
"version": "9.2.0",
"main": "./lib/index.js",

@@ -8,0 +8,0 @@ "typings": "./lib/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc