@types/wordpress__block-editor 14.21.6 → 14.21.8
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-control.d.ts +24 -0
- wordpress__block-editor/components/alignment-toolbar.d.ts +4 -1
- wordpress__block-editor/components/block-context.d.ts +24 -0
- wordpress__block-editor/components/index.d.ts +2 -0
- wordpress__block-editor/hooks/use-typography-props.d.ts +3 -2
- wordpress__block-editor/package.json +3 -2
|
@@ -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:
|
|
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)
|
|
11
|
+
* Last updated: Wed, 31 Dec 2025 18:41:46 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/global-styles-engine](https://npmjs.com/package/@wordpress/global-styles-engine), [@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), [Dennis Snell](https://github.com/dmsnell), and [Joshua Lipstone](https://github.com/joshualip-plaudit).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconType } from "@wordpress/components";
|
|
2
|
+
import { ComponentType } from "react";
|
|
3
|
+
|
|
4
|
+
declare namespace AlignmentControl {
|
|
5
|
+
interface Props {
|
|
6
|
+
alignmentControls?:
|
|
7
|
+
| Array<{
|
|
8
|
+
align: string;
|
|
9
|
+
icon: IconType;
|
|
10
|
+
title: string;
|
|
11
|
+
}>
|
|
12
|
+
| undefined;
|
|
13
|
+
children?: never | undefined;
|
|
14
|
+
value?: string | undefined;
|
|
15
|
+
onChange(newValue: string | undefined): void;
|
|
16
|
+
label?: string | undefined;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
isCollapsed?: boolean | undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const AlignmentControl: ComponentType<AlignmentControl.Props>;
|
|
23
|
+
|
|
24
|
+
export default AlignmentControl;
|
|
@@ -11,8 +11,11 @@ declare namespace AlignmentToolbar {
|
|
|
11
11
|
}>
|
|
12
12
|
| undefined;
|
|
13
13
|
children?: never | undefined;
|
|
14
|
-
value
|
|
14
|
+
value?: string | undefined;
|
|
15
15
|
onChange(newValue: string | undefined): void;
|
|
16
|
+
label?: string | undefined;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
isCollapsed?: boolean | undefined;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
declare namespace BlockContextProvider {
|
|
4
|
+
/**
|
|
5
|
+
* Component which merges passed value with current consumed block context.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-context/README.md
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
/**
|
|
11
|
+
* Context value to merge with current value.
|
|
12
|
+
*/
|
|
13
|
+
value?: Record<string, any> | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Component children.
|
|
16
|
+
*/
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const BlockContextProvider: {
|
|
21
|
+
(props: BlockContextProvider.Props): JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default BlockContextProvider;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Block Creation Components
|
|
3
3
|
*/
|
|
4
|
+
export { default as AlignmentControl } from "./alignment-control";
|
|
4
5
|
export { default as AlignmentToolbar } from "./alignment-toolbar";
|
|
5
6
|
export { default as Autocomplete } from "./autocomplete";
|
|
6
7
|
export { default as BlockAlignmentToolbar } from "./block-alignment-toolbar";
|
|
8
|
+
export { default as BlockContextProvider } from "./block-context";
|
|
7
9
|
export { default as BlockControls } from "./block-controls";
|
|
8
10
|
export { default as BlockEdit } from "./block-edit";
|
|
9
11
|
export { default as BlockFormatControls } from "./block-format-controls";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BlockAttributes } from "@wordpress/blocks";
|
|
2
|
+
import { GlobalStylesSettings } from "@wordpress/global-styles-engine";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Provides the CSS class names and inline styles for a block's typography support
|
|
@@ -6,11 +7,11 @@ import { BlockAttributes } from "@wordpress/blocks";
|
|
|
6
7
|
*
|
|
7
8
|
* @param attributes Block attributes.
|
|
8
9
|
* @param fluidTypographySettings If boolean, whether the function should try to convert font sizes to fluid values,
|
|
9
|
-
* otherwise an object containing theme
|
|
10
|
+
* otherwise an object containing theme (typography) settings.
|
|
10
11
|
*
|
|
11
12
|
* @return Typography block support derived CSS classes & styles.
|
|
12
13
|
*/
|
|
13
14
|
export function getTypographyClassesAndStyles(
|
|
14
15
|
attributes: BlockAttributes,
|
|
15
|
-
fluidTypographySettings
|
|
16
|
+
fluidTypographySettings?: { minFontSize?: string } | GlobalStylesSettings | boolean,
|
|
16
17
|
): { className: string; style: Record<string, string> };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/wordpress__block-editor",
|
|
3
|
-
"version": "14.21.
|
|
3
|
+
"version": "14.21.8",
|
|
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",
|
|
@@ -40,10 +40,11 @@
|
|
|
40
40
|
"@wordpress/components": "^29.12.0",
|
|
41
41
|
"@wordpress/data": "^10.26.0",
|
|
42
42
|
"@wordpress/element": "^6.26.0",
|
|
43
|
+
"@wordpress/global-styles-engine": "^1.4.0",
|
|
43
44
|
"@wordpress/keycodes": "^4.26.0",
|
|
44
45
|
"react-autosize-textarea": "^7.1.0"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {},
|
|
47
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "ed0bee9dca4cb04fed8986ee21205a64f58023c2af89db14366f17712c332203",
|
|
48
49
|
"typeScriptVersion": "5.2"
|
|
49
50
|
}
|