diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index b80be3202ed379..98f16e074061c5 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -186771,6 +186771,16 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.0] */ readonly title: string; + /** + * Returns the current active {@link PowerPoint.Slide} that is visible in the editing area. + If there's no active slide, an object with an `isNullObject` property set to `true` is returned. + For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + getActiveSlideOrNullObject(): PowerPoint.Slide; /** * Returns the selected shapes in the current slide of the presentation. If no shapes are selected, an empty collection is returned. @@ -194782,6 +194792,29 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.4] */ readonly textFrame: PowerPoint.TextFrame; + /** + * The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription: string; + /** + * The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle: string; /** * Gets the creation ID of the shape. Returns `null` if the shape has no creation ID. * @@ -194804,6 +194837,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.3] */ readonly id: string; + /** + * Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative: boolean; /** * The distance, in points, from the left side of the shape to the left side of the slide. * @@ -196551,6 +196595,29 @@ declare namespace PowerPoint { } /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ interface ShapeUpdateData { + /** + * The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: string; + /** + * The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: string; /** * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. * @@ -196558,6 +196625,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.4] */ height?: number; + /** + * Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative?: boolean; /** * The distance, in points, from the left side of the shape to the left side of the slide. * @@ -197653,6 +197731,29 @@ declare namespace PowerPoint { } /** An interface describing the data returned by calling `shape.toJSON()`. */ interface ShapeData { + /** + * The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: string; + /** + * The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: string; /** * Gets the creation ID of the shape. Returns `null` if the shape has no creation ID. * @@ -197675,6 +197776,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.3] */ id?: string; + /** + * Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative?: boolean; /** * The distance, in points, from the left side of the shape to the left side of the slide. * @@ -199185,6 +199297,29 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.4] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; /** * For EACH ITEM in the collection: Gets the creation ID of the shape. Returns `null` if the shape has no creation ID. * @@ -199207,6 +199342,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.3] */ id?: boolean; + /** + * For EACH ITEM in the collection: Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. * @@ -199785,6 +199931,29 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.5] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; /** * For EACH ITEM in the collection: Gets the creation ID of the shape. Returns `null` if the shape has no creation ID. * @@ -199807,6 +199976,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.3] */ id?: boolean; + /** + * For EACH ITEM in the collection: Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. * @@ -200033,6 +200213,29 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.4] */ textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * The alt text description of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * The alt text title of the Shape. + + Alt text provides alternative, text-based representations of the information contained in the Shape. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; /** * Gets the creation ID of the shape. Returns `null` if the shape has no creation ID. * @@ -200055,6 +200258,17 @@ declare namespace PowerPoint { * [Api set: PowerPointApi 1.3] */ id?: boolean; + /** + * Represents whether the shape is decorative or not. + + Decorative objects add visual interest but aren't informative (e.g. stylistic borders). + People using screen readers will hear these are decorative so they know they aren't missing any important information. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @beta + */ + isDecorative?: boolean; /** * The distance, in points, from the left side of the shape to the left side of the slide. * diff --git a/types/wordpress__block-editor/components/index.d.ts b/types/wordpress__block-editor/components/index.d.ts index c81417e8934cb0..8cf271d6b51b72 100644 --- a/types/wordpress__block-editor/components/index.d.ts +++ b/types/wordpress__block-editor/components/index.d.ts @@ -19,6 +19,7 @@ export * from "./font-sizes"; export { default as InnerBlocks, useInnerBlocksProps } from "./inner-blocks"; export { default as InspectorAdvancedControls } from "./inspector-advanced-controls"; export { default as InspectorControls } from "./inspector-controls"; +export { default as LinkControl } from "./link-control"; export { default as MediaPlaceholder } from "./media-placeholder"; export { default as MediaUpload } from "./media-upload"; export { default as MediaUploadCheck } from "./media-upload/check"; diff --git a/types/wordpress__block-editor/components/link-control.d.ts b/types/wordpress__block-editor/components/link-control.d.ts new file mode 100644 index 00000000000000..7eed019450c8e4 --- /dev/null +++ b/types/wordpress__block-editor/components/link-control.d.ts @@ -0,0 +1,52 @@ +import { ComponentType, ReactNode } from "react"; + +interface WPLinkControlDefaultValue { + url?: string; + title?: string; + opensInNewTab?: boolean; +} + +interface WPLinkControlSettingsValue { + [setting: string]: any; +} + +declare namespace LinkControl { + interface Props { + settings?: Setting[]; + forceIsEditingLink?: boolean; + value?: Value; + onChange?: (nextValue?: Value) => void; + onRemove?: () => void; + onCancel?: () => void; + + noDirectEntry?: boolean; + showSuggestions?: boolean; + showInitialSuggestions?: boolean; + withCreateSuggestion?: boolean; + suggestionsQuery?: any; + noURLSuggestion?: boolean; + hasTextControl?: boolean; + createSuggestion?: ((title: string) => Suggestion) | undefined; + createSuggestionButtonText?: string | ((searchTerm: string | undefined) => ReactNode); + renderControlBottom?: () => ReactNode; + handleEntities?: boolean; + hasRichPreviews?: boolean; + } + + interface Setting { + id: string; + title: string; + } + + interface Suggestion { + id: string; + type: string; + title: string; + url: string; + } + + interface Value extends WPLinkControlDefaultValue, WPLinkControlSettingsValue {} +} +declare const LinkControl: ComponentType & { DEFAULT_LINK_SETTINGS: LinkControl.Setting[] }; + +export default LinkControl; diff --git a/types/wordpress__block-editor/wordpress__block-editor-tests.tsx b/types/wordpress__block-editor/wordpress__block-editor-tests.tsx index 1f440d33a701f0..da5911c78298ff 100644 --- a/types/wordpress__block-editor/wordpress__block-editor-tests.tsx +++ b/types/wordpress__block-editor/wordpress__block-editor-tests.tsx @@ -246,6 +246,15 @@ be.withFontSizes("fontSize")(() =>

Hello World

); Hello World; ; +// +// link-control +// + console.log(item)} + onRemove={() => console.log("removed")} + settings={be.LinkControl.DEFAULT_LINK_SETTINGS} +/>; + // // media-placeholder //