@wordpress/rich-text
Advanced tools
Comparing version 7.13.1-next.cd6172eb0.0 to 7.14.0
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * WordPress dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * WordPress dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -122,2 +123,9 @@ * WordPress dependencies | ||
} | ||
/** | ||
* Create a RichTextData instance from an HTML element. | ||
* | ||
* @param {HTMLElement} htmlElement The HTML element to create the instance from. | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {RichTextData} The RichTextData instance. | ||
*/ | ||
static fromHTMLElement(htmlElement, options = {}) { | ||
@@ -144,2 +152,8 @@ const { | ||
// it internally. | ||
/** | ||
* Convert the rich text value to an HTML string. | ||
* | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {string} The HTML string. | ||
*/ | ||
toHTMLString({ | ||
@@ -146,0 +160,0 @@ preserveWhiteSpace |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
@@ -2,0 +3,0 @@ /** @typedef {import('./types').RichTextFormatList} RichTextFormatList */ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * WordPress dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * WordPress dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * WordPress dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
/** | ||
@@ -2,0 +3,0 @@ * Internal dependencies |
@@ -13,5 +13,5 @@ /** | ||
*/ | ||
export function applyFormat(value: RichTextValue, format: RichTextFormat, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function applyFormat(value: RichTextValue, format: RichTextFormat, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
export type RichTextFormat = import("./types").RichTextFormat; | ||
//# sourceMappingURL=apply-format.d.ts.map |
@@ -11,3 +11,3 @@ export function useRichText({ value, selectionStart, selectionEnd, placeholder, onSelectionChange, preserveWhiteSpace, onChange, __unstableDisableFormats: disableFormats, __unstableIsSelected: isSelected, __unstableDependencies, __unstableAfterParse, __unstableBeforeSerialize, __unstableAddInvisibleFormats, }: { | ||
__unstableIsSelected: any; | ||
__unstableDependencies?: any[] | undefined; | ||
__unstableDependencies?: never[] | undefined; | ||
__unstableAfterParse: any; | ||
@@ -14,0 +14,0 @@ __unstableBeforeSerialize: any; |
@@ -41,3 +41,3 @@ /** | ||
__unstableIsEditableTree?: boolean | undefined; | ||
} | undefined): RichTextValue; | ||
}): RichTextValue; | ||
/** | ||
@@ -69,3 +69,12 @@ * Removes reserved characters used by rich-text (zero width non breaking spaces | ||
static fromHTMLString(html: any): RichTextData; | ||
static fromHTMLElement(htmlElement: any, options?: {}): RichTextData; | ||
/** | ||
* Create a RichTextData instance from an HTML element. | ||
* | ||
* @param {HTMLElement} htmlElement The HTML element to create the instance from. | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {RichTextData} The RichTextData instance. | ||
*/ | ||
static fromHTMLElement(htmlElement: HTMLElement, options?: { | ||
preserveWhiteSpace?: boolean; | ||
}): RichTextData; | ||
constructor(init?: { | ||
@@ -77,8 +86,14 @@ formats: never[]; | ||
toPlainText(): string; | ||
/** | ||
* Convert the rich text value to an HTML string. | ||
* | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {string} The HTML string. | ||
*/ | ||
toHTMLString({ preserveWhiteSpace }?: { | ||
preserveWhiteSpace: any; | ||
}): any; | ||
valueOf(): any; | ||
toString(): any; | ||
toJSON(): any; | ||
preserveWhiteSpace?: boolean; | ||
}): string; | ||
valueOf(): string; | ||
toString(): string; | ||
toJSON(): string; | ||
get length(): number; | ||
@@ -85,0 +100,0 @@ get formats(): never[]; |
@@ -15,5 +15,5 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function insertObject(value: RichTextValue, formatToInsert: RichTextFormat, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function insertObject(value: RichTextValue, formatToInsert: RichTextFormat, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
export type RichTextFormat = import("./types").RichTextFormat; | ||
//# sourceMappingURL=insert-object.d.ts.map |
@@ -15,4 +15,4 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function insert(value: RichTextValue, valueToInsert: RichTextValue | string, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function insert(value: RichTextValue, valueToInsert: RichTextValue | string, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=insert.d.ts.map |
@@ -12,4 +12,4 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function join(values: Array<RichTextValue>, separator?: string | import("./types").RichTextValue | undefined): RichTextValue; | ||
export function join(values: Array<RichTextValue>, separator?: string | RichTextValue): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=join.d.ts.map |
@@ -14,4 +14,4 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function removeFormat(value: RichTextValue, formatType: string, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function removeFormat(value: RichTextValue, formatType: string, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=remove-format.d.ts.map |
@@ -12,4 +12,4 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function remove(value: RichTextValue, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function remove(value: RichTextValue, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=remove.d.ts.map |
@@ -13,4 +13,4 @@ /** @typedef {import('./types').RichTextValue} RichTextValue */ | ||
*/ | ||
export function slice(value: RichTextValue, startIndex?: number | undefined, endIndex?: number | undefined): RichTextValue; | ||
export function slice(value: RichTextValue, startIndex?: number, endIndex?: number): RichTextValue; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=slice.d.ts.map |
/** | ||
* Object replacement character, used as a placeholder for objects. | ||
*/ | ||
export const OBJECT_REPLACEMENT_CHARACTER: ""; | ||
export const OBJECT_REPLACEMENT_CHARACTER: "\uFFFC"; | ||
/** | ||
@@ -9,3 +9,3 @@ * Zero width non-breaking space, used as padding in the editable DOM tree when | ||
*/ | ||
export const ZWNBSP: ""; | ||
export const ZWNBSP: "\uFEFF"; | ||
//# sourceMappingURL=special-characters.d.ts.map |
@@ -15,4 +15,4 @@ /** | ||
*/ | ||
export function split({ formats, replacements, text, start, end }: RichTextValue, string?: string | number | undefined, ...args: any[]): Array<RichTextValue> | undefined; | ||
export function split({ formats, replacements, text, start, end }: RichTextValue, string?: number | string, ...args: any[]): Array<RichTextValue> | undefined; | ||
export type RichTextValue = import("./types").RichTextValue; | ||
//# sourceMappingURL=split.d.ts.map |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -130,2 +131,9 @@ | ||
} | ||
/** | ||
* Create a RichTextData instance from an HTML element. | ||
* | ||
* @param {HTMLElement} htmlElement The HTML element to create the instance from. | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {RichTextData} The RichTextData instance. | ||
*/ | ||
static fromHTMLElement(htmlElement, options = {}) { | ||
@@ -152,2 +160,8 @@ const { | ||
// it internally. | ||
/** | ||
* Convert the rich text value to an HTML string. | ||
* | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {string} The HTML string. | ||
*/ | ||
toHTMLString({ | ||
@@ -154,0 +168,0 @@ preserveWhiteSpace |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
/* wp:polyfill */ | ||
"use strict"; | ||
@@ -2,0 +3,0 @@ |
@@ -5,2 +5,4 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
## 7.14.0 (2024-12-11) | ||
## 7.13.0 (2024-11-27) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "@wordpress/rich-text", | ||
"version": "7.13.1-next.cd6172eb0.0", | ||
"version": "7.14.0", | ||
"description": "Rich text value and manipulation API.", | ||
@@ -36,10 +36,10 @@ "author": "The WordPress Contributors", | ||
"@babel/runtime": "7.25.7", | ||
"@wordpress/a11y": "^4.13.1-next.cd6172eb0.0", | ||
"@wordpress/compose": "^7.13.1-next.cd6172eb0.0", | ||
"@wordpress/data": "^10.13.1-next.cd6172eb0.0", | ||
"@wordpress/deprecated": "^4.13.1-next.cd6172eb0.0", | ||
"@wordpress/element": "^6.13.1-next.cd6172eb0.0", | ||
"@wordpress/escape-html": "^3.13.1-next.cd6172eb0.0", | ||
"@wordpress/i18n": "^5.13.1-next.cd6172eb0.0", | ||
"@wordpress/keycodes": "^4.13.1-next.cd6172eb0.0", | ||
"@wordpress/a11y": "*", | ||
"@wordpress/compose": "*", | ||
"@wordpress/data": "*", | ||
"@wordpress/deprecated": "*", | ||
"@wordpress/element": "*", | ||
"@wordpress/escape-html": "*", | ||
"@wordpress/i18n": "*", | ||
"@wordpress/keycodes": "*", | ||
"memize": "^2.1.0" | ||
@@ -53,3 +53,3 @@ }, | ||
}, | ||
"gitHead": "4cc93dc1781d8a7bc2bbde265913917920e2bd45" | ||
"gitHead": "b432c18934c9db866b6dba7d37517a4e97d642e3" | ||
} |
@@ -128,2 +128,9 @@ /** | ||
} | ||
/** | ||
* Create a RichTextData instance from an HTML element. | ||
* | ||
* @param {HTMLElement} htmlElement The HTML element to create the instance from. | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {RichTextData} The RichTextData instance. | ||
*/ | ||
static fromHTMLElement( htmlElement, options = {} ) { | ||
@@ -148,2 +155,8 @@ const { preserveWhiteSpace = false } = options; | ||
// it internally. | ||
/** | ||
* Convert the rich text value to an HTML string. | ||
* | ||
* @param {{preserveWhiteSpace?: boolean}} options Options. | ||
* @return {string} The HTML string. | ||
*/ | ||
toHTMLString( { preserveWhiteSpace } = {} ) { | ||
@@ -150,0 +163,0 @@ return ( |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 8 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1038998
83083
15138
0
2
42
8
Updated@wordpress/a11y@*
Updated@wordpress/compose@*
Updated@wordpress/data@*
Updated@wordpress/deprecated@*
Updated@wordpress/element@*
Updated@wordpress/escape-html@*
Updated@wordpress/i18n@*
Updated@wordpress/keycodes@*