@types/wordpress__block-editor 11.5.13 → 11.5.14
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.
- wordpress__block-editor/README.md +2 -2
- wordpress__block-editor/components/alignment-toolbar.d.ts +3 -3
- wordpress__block-editor/components/block-controls.d.ts +11 -4
- wordpress__block-editor/components/block-format-controls.d.ts +2 -2
- wordpress__block-editor/components/block-icon.d.ts +2 -2
- wordpress__block-editor/components/font-sizes.d.ts +3 -3
- wordpress__block-editor/components/inserter.d.ts +2 -2
- wordpress__block-editor/components/inspector-advanced-controls.d.ts +2 -2
- wordpress__block-editor/components/inspector-controls.d.ts +2 -2
- wordpress__block-editor/components/media-placeholder.d.ts +4 -4
- wordpress__block-editor/components/navigable-toolbar.d.ts +2 -2
- wordpress__block-editor/components/panel-color-settings.d.ts +4 -4
- wordpress__block-editor/components/rich-text.d.ts +3 -3
- wordpress__block-editor/components/url-popover.d.ts +3 -3
- wordpress__block-editor/package.json +4 -4
|
@@ -8,8 +8,8 @@ This package contains type definitions for @wordpress/block-editor (https://gith
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wordpress__block-editor.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
12
|
-
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/wordpress__blocks](https://npmjs.com/package/@types/wordpress__blocks), [@
|
|
11
|
+
* Last updated: Wed, 03 Apr 2024 18:35:48 GMT
|
|
12
|
+
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/wordpress__blocks](https://npmjs.com/package/@types/wordpress__blocks), [@wordpress/components](https://npmjs.com/package/@wordpress/components), [@wordpress/data](https://npmjs.com/package/@wordpress/data), [@wordpress/element](https://npmjs.com/package/@wordpress/element), [@wordpress/keycodes](https://npmjs.com/package/@wordpress/keycodes), [react-autosize-textarea](https://npmjs.com/package/react-autosize-textarea)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
15
|
These definitions were written by [Derek Sifford](https://github.com/dsifford), [Jon Surrell](https://github.com/sirreal), and [Dennis Snell](https://github.com/dmsnell).
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ComponentType
|
|
1
|
+
import { IconType } from "@wordpress/components";
|
|
2
|
+
import { ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace AlignmentToolbar {
|
|
5
5
|
interface Props {
|
|
6
6
|
alignmentControls?:
|
|
7
7
|
| Array<{
|
|
8
8
|
align: string;
|
|
9
|
-
icon:
|
|
9
|
+
icon: IconType;
|
|
10
10
|
title: string;
|
|
11
11
|
}>
|
|
12
12
|
| undefined;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { Slot,
|
|
2
|
-
import { FC, JSX, ReactNode } from "react";
|
|
1
|
+
import { Slot, ToolbarGroup } from "@wordpress/components";
|
|
2
|
+
import { ComponentProps, FC, JSX, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
type GetArrayTypeFromPossibleNestedArray<TestType extends Record<string, unknown> | Array<Record<string, unknown>>> =
|
|
5
|
+
TestType extends Array<Record<string, unknown>> ? TestType[number] : TestType;
|
|
6
|
+
type BlockControlControlsType = GetArrayTypeFromPossibleNestedArray<
|
|
7
|
+
NonNullable<Parameters<typeof ToolbarGroup>[0]["controls"]>[number]
|
|
8
|
+
>;
|
|
3
9
|
|
|
4
10
|
declare namespace BlockControls {
|
|
5
11
|
type BlockControlGroup =
|
|
@@ -9,14 +15,15 @@ declare namespace BlockControls {
|
|
|
9
15
|
| "other"
|
|
10
16
|
| "parent";
|
|
11
17
|
|
|
12
|
-
interface Props
|
|
18
|
+
interface Props {
|
|
19
|
+
controls?: Array<BlockControlControlsType | BlockControlControlsType[]>;
|
|
13
20
|
children: ReactNode;
|
|
14
21
|
group?: BlockControlGroup | undefined;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
17
24
|
declare const BlockControls: {
|
|
18
25
|
(props: BlockControls.Props): JSX.Element;
|
|
19
|
-
Slot: FC<Omit<Slot
|
|
26
|
+
Slot: FC<Omit<ComponentProps<typeof Slot>, "name">>;
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
export default BlockControls;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slot } from "@wordpress/components";
|
|
2
|
-
import { FC, JSX, ReactNode } from "react";
|
|
2
|
+
import { ComponentProps, FC, JSX, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace BlockFormatControls {
|
|
5
5
|
interface Props {
|
|
@@ -8,7 +8,7 @@ declare namespace BlockFormatControls {
|
|
|
8
8
|
}
|
|
9
9
|
declare const BlockFormatControls: {
|
|
10
10
|
(props: BlockFormatControls.Props): JSX.Element;
|
|
11
|
-
Slot: FC<Omit<Slot
|
|
11
|
+
Slot: FC<Omit<ComponentProps<typeof Slot>, "name">>;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export default BlockFormatControls;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconType } from "@wordpress/components";
|
|
2
2
|
import { ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace BlockIcon {
|
|
5
5
|
interface Props {
|
|
6
6
|
className?: string | undefined;
|
|
7
|
-
icon:
|
|
7
|
+
icon: IconType | null;
|
|
8
8
|
showColors?: boolean | undefined;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FontSizePicker as FSP } from "@wordpress/components";
|
|
2
|
-
import { ComponentType } from "react";
|
|
1
|
+
import { FontSizePicker as FSP } from "@wordpress/components/";
|
|
2
|
+
import { ComponentProps, ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
import { EditorFontSize } from "../";
|
|
5
5
|
|
|
6
6
|
export namespace FontSizePicker {
|
|
7
|
-
type Props = Omit<FSP
|
|
7
|
+
type Props = Omit<ComponentProps<typeof FSP>, "disableCustomFontSizes" | "fontSizes">;
|
|
8
8
|
}
|
|
9
9
|
export const FontSizePicker: ComponentType<FontSizePicker.Props>;
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dropdown } from "@wordpress/components";
|
|
2
|
-
import { ComponentType } from "react";
|
|
2
|
+
import { ComponentProps, ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace Inserter {
|
|
5
|
-
interface Props extends Partial<Pick<Dropdown
|
|
5
|
+
interface Props extends Partial<Pick<ComponentProps<typeof Dropdown>, "position" | "renderToggle">> {
|
|
6
6
|
clientId?: string | undefined;
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
8
|
isAppender?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slot } from "@wordpress/components";
|
|
2
|
-
import { FC, JSX, ReactNode } from "react";
|
|
2
|
+
import { ComponentProps, FC, JSX, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace InspectorAdvancedControls {
|
|
5
5
|
interface Props {
|
|
@@ -8,7 +8,7 @@ declare namespace InspectorAdvancedControls {
|
|
|
8
8
|
}
|
|
9
9
|
declare const InspectorAdvancedControls: {
|
|
10
10
|
(props: InspectorAdvancedControls.Props): JSX.Element;
|
|
11
|
-
Slot: FC<Omit<Slot
|
|
11
|
+
Slot: FC<Omit<ComponentProps<typeof Slot>, "name">>;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export default InspectorAdvancedControls;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slot } from "@wordpress/components";
|
|
2
|
-
import { FC, JSX, ReactNode } from "react";
|
|
2
|
+
import { ComponentProps, FC, JSX, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace InspectorControls {
|
|
5
5
|
interface Props {
|
|
@@ -9,7 +9,7 @@ declare namespace InspectorControls {
|
|
|
9
9
|
}
|
|
10
10
|
declare const InspectorControls: {
|
|
11
11
|
(props: InspectorControls.Props): JSX.Element;
|
|
12
|
-
Slot: FC<Omit<Slot
|
|
12
|
+
Slot: FC<Omit<ComponentProps<typeof Slot>, "name">>;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export default InspectorControls;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { DropZone, IconType } from "@wordpress/components";
|
|
3
|
+
import { ComponentProps, JSX, MouseEventHandler } from "react";
|
|
4
4
|
|
|
5
5
|
declare namespace MediaPlaceholder {
|
|
6
6
|
type MediaPlaceholderMultipleAction = "add";
|
|
7
7
|
|
|
8
|
-
interface Props<T extends boolean> extends Pick<DropZone
|
|
8
|
+
interface Props<T extends boolean> extends Pick<ComponentProps<typeof DropZone>, "onHTMLDrop"> {
|
|
9
9
|
/**
|
|
10
10
|
* A string passed to `FormFileUpload` that tells the browser which file types can be uploaded
|
|
11
11
|
* to the upload window the browser use e.g: `image#<{(|,video#<{(|`.
|
|
@@ -47,7 +47,7 @@ declare namespace MediaPlaceholder {
|
|
|
47
47
|
/**
|
|
48
48
|
* Icon to display left of the title.
|
|
49
49
|
*/
|
|
50
|
-
icon?:
|
|
50
|
+
icon?: IconType | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* If `true`, the property changes the look of the placeholder to be adequate to scenarios
|
|
53
53
|
* where new files are added to an already existing set of files, e.g., adding files to a
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NavigableMenu } from "@wordpress/components";
|
|
2
|
-
import { ComponentType } from "react";
|
|
2
|
+
import { ComponentProps, ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace NavigableToolbar {
|
|
5
|
-
interface Props extends NavigableMenu
|
|
5
|
+
interface Props extends ComponentProps<typeof NavigableMenu> {
|
|
6
6
|
focusOnMount?: boolean | undefined;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ColorPalette, PanelBody } from "@wordpress/components";
|
|
2
|
-
import { ComponentType } from "react";
|
|
2
|
+
import { ComponentProps, ComponentType } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace PanelColorSettings {
|
|
5
5
|
type ColorSetting =
|
|
6
|
-
& Partial<ColorPalette
|
|
7
|
-
& Pick<ColorPalette
|
|
6
|
+
& Partial<ComponentProps<typeof ColorPalette>>
|
|
7
|
+
& Pick<ComponentProps<typeof ColorPalette>, "onChange" | "value">
|
|
8
8
|
& { label: string };
|
|
9
|
-
interface Props extends Omit<PanelBody
|
|
9
|
+
interface Props extends Omit<ComponentProps<typeof PanelBody>, "children"> {
|
|
10
10
|
colorSettings: ColorSetting[];
|
|
11
11
|
disableCustomColors?: boolean | undefined;
|
|
12
12
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { BlockInstance } from "@wordpress/blocks";
|
|
3
3
|
import { Autocomplete, ToolbarButton } from "@wordpress/components";
|
|
4
4
|
import { displayShortcut, rawShortcut } from "@wordpress/keycodes";
|
|
5
|
-
import { ComponentType, HTMLProps, JSX
|
|
5
|
+
import { ComponentProps, ComponentType, HTMLProps, JSX } from "react";
|
|
6
6
|
|
|
7
7
|
declare namespace RichText {
|
|
8
8
|
interface Props<T extends keyof HTMLElementTagNameMap> extends Omit<HTMLProps<T>, "onChange"> {
|
|
@@ -14,7 +14,7 @@ declare namespace RichText {
|
|
|
14
14
|
/**
|
|
15
15
|
* A list of autocompleters to use instead of the default.
|
|
16
16
|
*/
|
|
17
|
-
autocompleters?:
|
|
17
|
+
autocompleters?: ComponentProps<typeof Autocomplete>["completers"] | undefined;
|
|
18
18
|
children?: never | undefined;
|
|
19
19
|
className?: string | undefined;
|
|
20
20
|
identifier?: string | undefined;
|
|
@@ -94,7 +94,7 @@ export namespace RichTextShortcut {
|
|
|
94
94
|
export const RichTextShortcut: ComponentType<RichTextShortcut.Props>;
|
|
95
95
|
|
|
96
96
|
export namespace RichTextToolbarButton {
|
|
97
|
-
interface Props extends ToolbarButton
|
|
97
|
+
interface Props extends ComponentProps<typeof ToolbarButton> {
|
|
98
98
|
name?: string | undefined;
|
|
99
99
|
shortcutType?: keyof typeof displayShortcut | undefined;
|
|
100
100
|
shortcutCharacter?: string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Popover } from "@wordpress/components";
|
|
2
|
-
import { ComponentType, JSX, ReactNode } from "react";
|
|
2
|
+
import { ComponentProps, ComponentType, JSX, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace URLPopover {
|
|
5
|
-
|
|
5
|
+
type Props = ComponentProps<typeof Popover> & {
|
|
6
6
|
additionalControls?: ReactNode | undefined;
|
|
7
7
|
/**
|
|
8
8
|
* Callback used to return the React Elements that will be rendered inside the settings
|
|
@@ -10,7 +10,7 @@ declare namespace URLPopover {
|
|
|
10
10
|
* that allows the user to open and close the settings drawer.
|
|
11
11
|
*/
|
|
12
12
|
renderSettings?(): JSX.Element;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
}
|
|
15
15
|
declare const URLPopover: ComponentType<URLPopover.Props>;
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/wordpress__block-editor",
|
|
3
|
-
"version": "11.5.
|
|
3
|
+
"version": "11.5.14",
|
|
4
4
|
"description": "TypeScript definitions for @wordpress/block-editor",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wordpress__block-editor",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/react": "*",
|
|
34
34
|
"@types/wordpress__blocks": "*",
|
|
35
|
-
"@types/wordpress__components": "*",
|
|
36
|
-
"@types/wordpress__keycodes": "*",
|
|
37
35
|
"@wordpress/data": "^9.13.0",
|
|
36
|
+
"@wordpress/components": "^27.2.0",
|
|
38
37
|
"@wordpress/element": "^5.0.0",
|
|
38
|
+
"@wordpress/keycodes": "^3.54.0",
|
|
39
39
|
"react-autosize-textarea": "^7.1.0"
|
|
40
40
|
},
|
|
41
|
-
"typesPublisherContentHash": "
|
|
41
|
+
"typesPublisherContentHash": "19c44a95a4e9d75add8b0f3743db26b18e6f783247a17a26ea40252a0cfe4c27",
|
|
42
42
|
"typeScriptVersion": "4.7"
|
|
43
43
|
}
|