@types/wordpress__block-editor 14.21.0 → 14.21.2
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.
|
@@ -8,7 +8,7 @@ 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: Fri,
|
|
11
|
+
* Last updated: Fri, 07 Nov 2025 22:34:48 GMT
|
|
12
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
|
|
@@ -19,6 +19,7 @@ export * from "./font-sizes";
|
|
|
19
19
|
export { default as InnerBlocks, useInnerBlocksProps } from "./inner-blocks";
|
|
20
20
|
export { default as InspectorAdvancedControls } from "./inspector-advanced-controls";
|
|
21
21
|
export { default as InspectorControls } from "./inspector-controls";
|
|
22
|
+
export { default as LinkControl } from "./link-control";
|
|
22
23
|
export { default as MediaPlaceholder } from "./media-placeholder";
|
|
23
24
|
export { default as MediaUpload } from "./media-upload";
|
|
24
25
|
export { default as MediaUploadCheck } from "./media-upload/check";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
interface WPLinkControlDefaultValue {
|
|
4
|
+
url?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
opensInNewTab?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface WPLinkControlSettingsValue {
|
|
10
|
+
[setting: string]: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare namespace LinkControl {
|
|
14
|
+
interface Props {
|
|
15
|
+
settings?: Setting[];
|
|
16
|
+
forceIsEditingLink?: boolean;
|
|
17
|
+
value?: Value;
|
|
18
|
+
onChange?: (nextValue?: Value) => void;
|
|
19
|
+
onRemove?: () => void;
|
|
20
|
+
onCancel?: () => void;
|
|
21
|
+
|
|
22
|
+
noDirectEntry?: boolean;
|
|
23
|
+
showSuggestions?: boolean;
|
|
24
|
+
showInitialSuggestions?: boolean;
|
|
25
|
+
withCreateSuggestion?: boolean;
|
|
26
|
+
suggestionsQuery?: any;
|
|
27
|
+
noURLSuggestion?: boolean;
|
|
28
|
+
hasTextControl?: boolean;
|
|
29
|
+
createSuggestion?: ((title: string) => Suggestion) | undefined;
|
|
30
|
+
createSuggestionButtonText?: string | ((searchTerm: string | undefined) => ReactNode);
|
|
31
|
+
renderControlBottom?: () => ReactNode;
|
|
32
|
+
handleEntities?: boolean;
|
|
33
|
+
hasRichPreviews?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface Setting {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface Suggestion {
|
|
42
|
+
id: string;
|
|
43
|
+
type: string;
|
|
44
|
+
title: string;
|
|
45
|
+
url: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface Value extends WPLinkControlDefaultValue, WPLinkControlSettingsValue {}
|
|
49
|
+
}
|
|
50
|
+
declare const LinkControl: ComponentType<LinkControl.Props> & { DEFAULT_LINK_SETTINGS: LinkControl.Setting[] };
|
|
51
|
+
|
|
52
|
+
export default LinkControl;
|
|
@@ -1,14 +1,44 @@
|
|
|
1
|
-
import { ColorPalette,
|
|
2
|
-
import { ComponentProps, ComponentType } from "react";
|
|
1
|
+
import { ColorPalette, GradientPicker } from "@wordpress/components";
|
|
2
|
+
import type { ComponentProps, ComponentType, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
declare namespace PanelColorSettings {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
interface ColorSetting {
|
|
6
|
+
/** The current color of the setting. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Callback on change of the setting. */
|
|
9
|
+
onChange: (value: string | undefined) => void;
|
|
10
|
+
/** Label of the setting. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Colors palette for this specific setting. */
|
|
13
|
+
colors?: ComponentProps<typeof ColorPalette>["colors"];
|
|
14
|
+
/** Whether to disable custom colors for this specific setting. */
|
|
15
|
+
disableCustomColors?: boolean;
|
|
16
|
+
/** Whether to disable custom gradients for this specific setting. */
|
|
17
|
+
disableCustomGradients?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface Props {
|
|
20
|
+
/** A user-provided set of color settings. */
|
|
21
|
+
colorSettings?: ColorSetting[];
|
|
22
|
+
/** Added to the underlying ToolsPanel instance. */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Array of colors to be used. */
|
|
25
|
+
colors?: ComponentProps<typeof ColorPalette>["colors"];
|
|
26
|
+
/** Not recommended to be used since `PanelColorSettings` resets it. */
|
|
27
|
+
gradients?: ComponentProps<typeof GradientPicker>["gradients"];
|
|
28
|
+
/** Whether the addition of custom colors is enabled. */
|
|
29
|
+
disableCustomColors?: boolean;
|
|
30
|
+
/** Not recommended to be used since `PanelColorSettings` sets it. */
|
|
31
|
+
disableCustomGradients?: boolean;
|
|
32
|
+
/** Displayed below the underlying `PanelColorGradientSettings` instance. */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Title of the underlying `ToolsPanel`. */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** Whether to show the title of the `ToolsPanel`. */
|
|
37
|
+
showTitle?: boolean;
|
|
38
|
+
/** Whether this is rendered in the sidebar. */
|
|
39
|
+
__experimentalIsRenderedInSidebar?: boolean;
|
|
40
|
+
/** Whether to enable setting opacity when specifying a color. */
|
|
41
|
+
enableAlpha?: boolean;
|
|
12
42
|
}
|
|
13
43
|
}
|
|
14
44
|
declare const PanelColorSettings: ComponentType<PanelColorSettings.Props>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/wordpress__block-editor",
|
|
3
|
-
"version": "14.21.
|
|
3
|
+
"version": "14.21.2",
|
|
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",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"react-autosize-textarea": "^7.1.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {},
|
|
47
|
-
"typesPublisherContentHash": "
|
|
47
|
+
"typesPublisherContentHash": "4253c539a0d359ac12ad214e94c030ac70c1652cdd3608ee4a8df7f6c5d528db",
|
|
48
48
|
"typeScriptVersion": "5.2"
|
|
49
49
|
}
|