@wordpress/commands 1.11.0 → 1.12.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.
- package/CHANGELOG.md +2 -0
- package/README.md +5 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -26,11 +26,13 @@ For example, when a user types "contact", the Command Palette needs to filter th
|
|
|
26
26
|
|
|
27
27
|
Static and dynamic commands can be contextual. This means that in a given context (for example, when navigating the Site Editor or editing a template), some specific commands are given more priority and are visible as soon as you open the Command Palette. Also, when typing the Command Palette, these contextual commands are shown above the rest of the commands.
|
|
28
28
|
|
|
29
|
-
At the moment,
|
|
29
|
+
At the moment, three contexts have been implemented:
|
|
30
30
|
|
|
31
31
|
- `site-editor`: This is the context that is set when you are navigating in the site editor (sidebar visible).
|
|
32
|
-
- `
|
|
33
|
-
|
|
32
|
+
- `entity-edit`: This is the context that is set when you are editing a document (template, template part or page).
|
|
33
|
+
- `block-selection-edit`: This is the context that is set when a block is selected.
|
|
34
|
+
|
|
35
|
+
As the usage of the Command Palette expands, more contexts will be added.
|
|
34
36
|
|
|
35
37
|
Attaching a command or command loader to a given context is as simple as adding the `context` property (with the right context value from the available contexts above) to the `useCommand` or `useCommandLoader` calls.
|
|
36
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/commands",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Handles the commands menu.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"main": "build/index.js",
|
|
27
27
|
"module": "build-module/index.js",
|
|
28
28
|
"react-native": "src/index",
|
|
29
|
+
"wpScript": true,
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@babel/runtime": "7.25.7",
|
|
31
32
|
"@wordpress/components": "*",
|
|
@@ -45,6 +46,5 @@
|
|
|
45
46
|
"publishConfig": {
|
|
46
47
|
"access": "public"
|
|
47
48
|
},
|
|
48
|
-
"
|
|
49
|
-
"gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
|
|
49
|
+
"gitHead": "510540d99f3d222a96f08d3d7b66c9e7a726f705"
|
|
50
50
|
}
|