@types/wordpress__block-editor 11.5.17 → 14.21.0

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,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: Thu, 03 Jul 2025 19:32:44 GMT
11
+ * Last updated: Fri, 17 Oct 2025 22:34:26 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
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).
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).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/wordpress__block-editor",
3
- "version": "11.5.17",
3
+ "version": "14.21.0",
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",
@@ -19,6 +19,11 @@
19
19
  "name": "Dennis Snell",
20
20
  "githubUsername": "dmsnell",
21
21
  "url": "https://github.com/dmsnell"
22
+ },
23
+ {
24
+ "name": "Joshua Lipstone",
25
+ "githubUsername": "joshualip-plaudit",
26
+ "url": "https://github.com/joshualip-plaudit"
22
27
  }
23
28
  ],
24
29
  "main": "",
@@ -32,13 +37,13 @@
32
37
  "dependencies": {
33
38
  "@types/react": "^18",
34
39
  "@types/wordpress__blocks": "*",
35
- "@wordpress/components": "^27.2.0",
36
- "@wordpress/data": "^9.13.0",
37
- "@wordpress/element": "^5.0.0",
38
- "@wordpress/keycodes": "^3.54.0",
40
+ "@wordpress/components": "^29.12.0",
41
+ "@wordpress/data": "^10.26.0",
42
+ "@wordpress/element": "^6.26.0",
43
+ "@wordpress/keycodes": "^4.26.0",
39
44
  "react-autosize-textarea": "^7.1.0"
40
45
  },
41
46
  "peerDependencies": {},
42
- "typesPublisherContentHash": "3d0d7ff1be38c6ab388284ed422581dbee8d55560951b514b0ff6ee946592947",
43
- "typeScriptVersion": "5.1"
47
+ "typesPublisherContentHash": "ba2fcfc4691f22cbd5523bc083ea777ac509bb6178acca2069aaeb38b632f679",
48
+ "typeScriptVersion": "5.2"
44
49
  }
@@ -118,6 +118,31 @@ export function getBlockName(clientId: string): string | null;
118
118
  */
119
119
  export function getBlockOrder(rootClientId?: string): string[];
120
120
 
121
+ /**
122
+ * Returns a block's parents' client IDs given its client ID
123
+ *
124
+ * @param clientId - Block client ID.
125
+ * @param ascending - If true, the client ids will be returned from closest to farthest instead of the default of farthest to closest
126
+ *
127
+ * @returns The client IDs of all parent blocks
128
+ */
129
+ export function getBlockParents(clientId: string, ascending?: boolean): string[];
130
+
131
+ /**
132
+ * Returns a block's parents' client IDs given its client ID pre-filtered to only include blocks with the passed blockNames
133
+ *
134
+ * @param clientId - Block client ID.
135
+ * @param blockName - the name or names of the block types to which the parents list should be filtered
136
+ * @param ascending - If true, the client ids will be returned from closest to farthest instead of the default of farthest to closest
137
+ *
138
+ * @returns The client IDs of all parent blocks filtered by the passed block name or names
139
+ */
140
+ export function getBlockParentsByBlockName(
141
+ clientId: string,
142
+ blockName: string | string[],
143
+ ascending?: boolean,
144
+ ): string[];
145
+
121
146
  /**
122
147
  * Given a block client ID, returns the root block from which the block is nested, an empty string
123
148
  * for top-level blocks, or `null` if the block does not exist.