@wordpress/edit-widgets 6.50.1-next.v.202607070741.0 → 6.52.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 +8 -0
- package/build/components/keyboard-shortcuts/index.cjs +9 -0
- package/build/components/keyboard-shortcuts/index.cjs.map +3 -3
- package/build/components/notices/index.cjs +3 -1
- package/build/components/notices/index.cjs.map +2 -2
- package/build-module/components/keyboard-shortcuts/index.mjs +9 -0
- package/build-module/components/keyboard-shortcuts/index.mjs.map +2 -2
- package/build-module/components/notices/index.mjs +4 -2
- package/build-module/components/notices/index.mjs.map +2 -2
- package/build-style/style-rtl.css +18 -8
- package/build-style/style.css +18 -8
- package/package.json +33 -32
- package/src/components/keyboard-shortcut-help-modal/style.scss +2 -2
- package/src/components/keyboard-shortcuts/index.js +10 -0
- package/src/components/notices/index.js +4 -2
- package/src/components/notices/style.scss +9 -0
- package/src/style.scss +2 -0
- package/src/components/customizer-edit-widgets-initializer/style.scss +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 6.52.0 (2026-07-29)
|
|
6
|
+
|
|
7
|
+
## 6.51.0 (2026-07-14)
|
|
8
|
+
|
|
9
|
+
### Enhancements
|
|
10
|
+
|
|
11
|
+
- Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
|
|
12
|
+
|
|
5
13
|
## 6.50.0 (2026-07-01)
|
|
6
14
|
|
|
7
15
|
## 6.49.0 (2026-06-24)
|
|
@@ -28,15 +28,24 @@ var import_keycodes = require("@wordpress/keycodes");
|
|
|
28
28
|
var import_data = require("@wordpress/data");
|
|
29
29
|
var import_i18n = require("@wordpress/i18n");
|
|
30
30
|
var import_core_data = require("@wordpress/core-data");
|
|
31
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
31
32
|
var import_store = require("../../store/index.cjs");
|
|
33
|
+
var import_lock_unlock = require("../../lock-unlock.cjs");
|
|
34
|
+
var { usesNativeUndo } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
|
|
32
35
|
function KeyboardShortcuts() {
|
|
33
36
|
const { redo, undo } = (0, import_data.useDispatch)(import_core_data.store);
|
|
34
37
|
const { saveEditedWidgetAreas } = (0, import_data.useDispatch)(import_store.store);
|
|
35
38
|
(0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
|
|
39
|
+
if (usesNativeUndo(event)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
36
42
|
undo();
|
|
37
43
|
event.preventDefault();
|
|
38
44
|
});
|
|
39
45
|
(0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
|
|
46
|
+
if (usesNativeUndo(event)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
40
49
|
redo();
|
|
41
50
|
event.preventDefault();
|
|
42
51
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/keyboard-shortcuts/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0B;AAC1B,gCAGO;AACP,sBAA0B;AAC1B,kBAA4B;AAC5B,kBAAmB;AACnB,uBAAmC;
|
|
6
|
-
"names": ["coreStore", "editWidgetsStore", "keyboardShortcutsStore"]
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { usesNativeUndo } = unlock( blockEditorPrivateApis );\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0B;AAC1B,gCAGO;AACP,sBAA0B;AAC1B,kBAA4B;AAC5B,kBAAmB;AACnB,uBAAmC;AACnC,0BAAsD;AAKtD,mBAA0C;AAC1C,yBAAuB;AAEvB,IAAM,EAAE,eAAe,QAAI,2BAAQ,oBAAAA,WAAuB;AAE1D,SAAS,oBAAoB;AAC5B,QAAM,EAAE,MAAM,KAAK,QAAI,yBAAa,iBAAAC,KAAU;AAC9C,QAAM,EAAE,sBAAsB,QAAI,yBAAa,aAAAC,KAAiB;AAEhE,6CAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,6CAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,6CAAa,0BAA0B,CAAE,UAAW;AACnD,UAAM,eAAe;AACrB,0BAAsB;AAAA,EACvB,CAAE;AAEF,SAAO;AACR;AAEA,SAAS,4BAA4B;AAEpC,QAAM,EAAE,iBAAiB,QAAI,yBAAa,0BAAAC,KAAuB;AACjE,gCAAW,MAAM;AAChB,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,yBAA0B;AAAA,MAC3C,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,sBAAuB;AAAA,MACxC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,aAAS,2BAAU,IAChB,CAAC,IACD;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACA;AAAA,IACJ,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,oBAAqB;AAAA,MACtC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,mCAAoC;AAAA,MACrD,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,0CAA2C;AAAA,MAC5D,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,8CAA+C;AAAA,MAChE,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,gBAAiB,CAAE;AAExB,SAAO;AACR;AAEA,kBAAkB,WAAW;AAC7B,IAAO,6BAAQ;",
|
|
6
|
+
"names": ["blockEditorPrivateApis", "coreStore", "editWidgetsStore", "keyboardShortcutsStore"]
|
|
7
7
|
}
|
|
@@ -23,12 +23,14 @@ __export(notices_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(notices_exports);
|
|
25
25
|
var import_notices = require("@wordpress/notices");
|
|
26
|
+
var import_theme = require("@wordpress/theme");
|
|
26
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
28
|
function Notices() {
|
|
28
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_theme.ThemeProvider, { cornerRadius: "none", children: [
|
|
29
30
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
31
|
import_notices.InlineNotices,
|
|
31
32
|
{
|
|
33
|
+
className: "edit-widgets-notices",
|
|
32
34
|
pinnedNoticesClassName: "edit-widgets-notices__pinned",
|
|
33
35
|
dismissibleNoticesClassName: "edit-widgets-notices__dismissible"
|
|
34
36
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notices/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { InlineNotices, SnackbarNotices } from '@wordpress/notices';\n\nfunction Notices() {\n\treturn (\n\t\t
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA+C;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { InlineNotices, SnackbarNotices } from '@wordpress/notices';\nimport { ThemeProvider } from '@wordpress/theme';\n\nfunction Notices() {\n\treturn (\n\t\t<ThemeProvider cornerRadius=\"none\">\n\t\t\t<InlineNotices\n\t\t\t\tclassName=\"edit-widgets-notices\"\n\t\t\t\tpinnedNoticesClassName=\"edit-widgets-notices__pinned\"\n\t\t\t\tdismissibleNoticesClassName=\"edit-widgets-notices__dismissible\"\n\t\t\t/>\n\t\t\t<SnackbarNotices className=\"edit-widgets-notices__snackbar\" />\n\t\t</ThemeProvider>\n\t);\n}\n\nexport default Notices;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA+C;AAC/C,mBAA8B;AAI5B;AAFF,SAAS,UAAU;AAClB,SACC,6CAAC,8BAAc,cAAa,QAC3B;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,wBAAuB;AAAA,QACvB,6BAA4B;AAAA;AAAA,IAC7B;AAAA,IACA,4CAAC,kCAAgB,WAAU,kCAAiC;AAAA,KAC7D;AAEF;AAEA,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,15 +8,24 @@ import { isAppleOS } from "@wordpress/keycodes";
|
|
|
8
8
|
import { useDispatch } from "@wordpress/data";
|
|
9
9
|
import { __ } from "@wordpress/i18n";
|
|
10
10
|
import { store as coreStore } from "@wordpress/core-data";
|
|
11
|
+
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
11
12
|
import { store as editWidgetsStore } from "../../store/index.mjs";
|
|
13
|
+
import { unlock } from "../../lock-unlock.mjs";
|
|
14
|
+
var { usesNativeUndo } = unlock(blockEditorPrivateApis);
|
|
12
15
|
function KeyboardShortcuts() {
|
|
13
16
|
const { redo, undo } = useDispatch(coreStore);
|
|
14
17
|
const { saveEditedWidgetAreas } = useDispatch(editWidgetsStore);
|
|
15
18
|
useShortcut("core/edit-widgets/undo", (event) => {
|
|
19
|
+
if (usesNativeUndo(event)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
16
22
|
undo();
|
|
17
23
|
event.preventDefault();
|
|
18
24
|
});
|
|
19
25
|
useShortcut("core/edit-widgets/redo", (event) => {
|
|
26
|
+
if (usesNativeUndo(event)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
20
29
|
redo();
|
|
21
30
|
event.preventDefault();
|
|
22
31
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/keyboard-shortcuts/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { usesNativeUndo } = unlock( blockEditorPrivateApis );\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,SAAS,iBAAiB;AACnC,SAAS,eAAe,8BAA8B;AAKtD,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAEvB,IAAM,EAAE,eAAe,IAAI,OAAQ,sBAAuB;AAE1D,SAAS,oBAAoB;AAC5B,QAAM,EAAE,MAAM,KAAK,IAAI,YAAa,SAAU;AAC9C,QAAM,EAAE,sBAAsB,IAAI,YAAa,gBAAiB;AAEhE,cAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,cAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,cAAa,0BAA0B,CAAE,UAAW;AACnD,UAAM,eAAe;AACrB,0BAAsB;AAAA,EACvB,CAAE;AAEF,SAAO;AACR;AAEA,SAAS,4BAA4B;AAEpC,QAAM,EAAE,iBAAiB,IAAI,YAAa,sBAAuB;AACjE,YAAW,MAAM;AAChB,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,yBAA0B;AAAA,MAC3C,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,sBAAuB;AAAA,MACxC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,SAAS,UAAU,IAChB,CAAC,IACD;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACA;AAAA,IACJ,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,oBAAqB;AAAA,MACtC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,mCAAoC;AAAA,MACrD,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,0CAA2C;AAAA,MAC5D,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,8CAA+C;AAAA,MAChE,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,gBAAiB,CAAE;AAExB,SAAO;AACR;AAEA,kBAAkB,WAAW;AAC7B,IAAO,6BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// packages/edit-widgets/src/components/notices/index.js
|
|
2
2
|
import { InlineNotices, SnackbarNotices } from "@wordpress/notices";
|
|
3
|
-
import {
|
|
3
|
+
import { ThemeProvider } from "@wordpress/theme";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
function Notices() {
|
|
5
|
-
return /* @__PURE__ */ jsxs(
|
|
6
|
+
return /* @__PURE__ */ jsxs(ThemeProvider, { cornerRadius: "none", children: [
|
|
6
7
|
/* @__PURE__ */ jsx(
|
|
7
8
|
InlineNotices,
|
|
8
9
|
{
|
|
10
|
+
className: "edit-widgets-notices",
|
|
9
11
|
pinnedNoticesClassName: "edit-widgets-notices__pinned",
|
|
10
12
|
dismissibleNoticesClassName: "edit-widgets-notices__dismissible"
|
|
11
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notices/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { InlineNotices, SnackbarNotices } from '@wordpress/notices';\n\nfunction Notices() {\n\treturn (\n\t\t
|
|
5
|
-
"mappings": ";AAGA,SAAS,eAAe,uBAAuB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { InlineNotices, SnackbarNotices } from '@wordpress/notices';\nimport { ThemeProvider } from '@wordpress/theme';\n\nfunction Notices() {\n\treturn (\n\t\t<ThemeProvider cornerRadius=\"none\">\n\t\t\t<InlineNotices\n\t\t\t\tclassName=\"edit-widgets-notices\"\n\t\t\t\tpinnedNoticesClassName=\"edit-widgets-notices__pinned\"\n\t\t\t\tdismissibleNoticesClassName=\"edit-widgets-notices__dismissible\"\n\t\t\t/>\n\t\t\t<SnackbarNotices className=\"edit-widgets-notices__snackbar\" />\n\t\t</ThemeProvider>\n\t);\n}\n\nexport default Notices;\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe,uBAAuB;AAC/C,SAAS,qBAAqB;AAI5B,SACC,KADD;AAFF,SAAS,UAAU;AAClB,SACC,qBAAC,iBAAc,cAAa,QAC3B;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,wBAAuB;AAAA,QACvB,6BAA4B;AAAA;AAAA,IAC7B;AAAA,IACA,oBAAC,mBAAgB,WAAU,kCAAiC;AAAA,KAC7D;AAEF;AAEA,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
|
|
252
252
|
.interface-complementary-area h2 {
|
|
253
253
|
font-size: 13px;
|
|
254
|
-
font-weight:
|
|
254
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
255
255
|
color: #1e1e1e;
|
|
256
256
|
margin-bottom: 1.5em;
|
|
257
257
|
}
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
.interface-complementary-area h3 {
|
|
260
260
|
font-size: 11px;
|
|
261
261
|
text-transform: uppercase;
|
|
262
|
-
font-weight:
|
|
262
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
263
263
|
color: #1e1e1e;
|
|
264
264
|
margin-bottom: 1.5em;
|
|
265
265
|
}
|
|
@@ -547,7 +547,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
547
547
|
margin-left: auto;
|
|
548
548
|
}
|
|
549
549
|
.wp-block[data-type="core/widget-area"] .components-panel__body > .components-panel__body-title {
|
|
550
|
-
font-family: -apple-system,
|
|
550
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
551
551
|
margin: 0;
|
|
552
552
|
height: 48px;
|
|
553
553
|
position: relative;
|
|
@@ -736,7 +736,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
736
736
|
}
|
|
737
737
|
.edit-widgets-keyboard-shortcut-help-modal__section-title {
|
|
738
738
|
font-size: 0.9rem;
|
|
739
|
-
font-weight: 600;
|
|
739
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
740
740
|
}
|
|
741
741
|
.edit-widgets-keyboard-shortcut-help-modal__shortcut {
|
|
742
742
|
display: flex;
|
|
@@ -752,7 +752,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
752
752
|
display: none;
|
|
753
753
|
}
|
|
754
754
|
.edit-widgets-keyboard-shortcut-help-modal__shortcut-term {
|
|
755
|
-
font-weight: 600;
|
|
755
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
756
756
|
margin: 0 1rem 0 0;
|
|
757
757
|
text-align: left;
|
|
758
758
|
}
|
|
@@ -805,6 +805,16 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
805
805
|
margin-inline: auto;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
809
|
+
.edit-widgets-notices .components-notice-list {
|
|
810
|
+
gap: 0;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.edit-widgets-notices .components-notice {
|
|
814
|
+
border-top-width: 0;
|
|
815
|
+
border-inline-width: 0;
|
|
816
|
+
}
|
|
817
|
+
|
|
808
818
|
.edit-widgets-layout__inserter-panel {
|
|
809
819
|
height: 100%;
|
|
810
820
|
display: flex;
|
|
@@ -844,7 +854,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
844
854
|
object-fit: cover;
|
|
845
855
|
}
|
|
846
856
|
.edit-widgets-welcome-guide__heading {
|
|
847
|
-
font-family: -apple-system,
|
|
857
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
848
858
|
font-size: 24px;
|
|
849
859
|
line-height: 1.4;
|
|
850
860
|
margin: 16px 0 16px 0;
|
|
@@ -866,7 +876,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
866
876
|
|
|
867
877
|
.edit-widgets-block-editor {
|
|
868
878
|
position: relative;
|
|
869
|
-
font-family: -apple-system,
|
|
879
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
870
880
|
display: flex;
|
|
871
881
|
flex-direction: column;
|
|
872
882
|
flex-grow: 1;
|
|
@@ -881,7 +891,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
881
891
|
height: 100%;
|
|
882
892
|
}
|
|
883
893
|
.edit-widgets-block-editor .components-button {
|
|
884
|
-
font-family: -apple-system,
|
|
894
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
885
895
|
font-size: 13px;
|
|
886
896
|
}
|
|
887
897
|
.edit-widgets-block-editor .components-button.is-tertiary, .edit-widgets-block-editor .components-button.has-icon {
|
package/build-style/style.css
CHANGED
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
|
|
252
252
|
.interface-complementary-area h2 {
|
|
253
253
|
font-size: 13px;
|
|
254
|
-
font-weight:
|
|
254
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
255
255
|
color: #1e1e1e;
|
|
256
256
|
margin-bottom: 1.5em;
|
|
257
257
|
}
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
.interface-complementary-area h3 {
|
|
260
260
|
font-size: 11px;
|
|
261
261
|
text-transform: uppercase;
|
|
262
|
-
font-weight:
|
|
262
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
263
263
|
color: #1e1e1e;
|
|
264
264
|
margin-bottom: 1.5em;
|
|
265
265
|
}
|
|
@@ -547,7 +547,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
547
547
|
margin-right: auto;
|
|
548
548
|
}
|
|
549
549
|
.wp-block[data-type="core/widget-area"] .components-panel__body > .components-panel__body-title {
|
|
550
|
-
font-family: -apple-system,
|
|
550
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
551
551
|
margin: 0;
|
|
552
552
|
height: 48px;
|
|
553
553
|
position: relative;
|
|
@@ -736,7 +736,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
736
736
|
}
|
|
737
737
|
.edit-widgets-keyboard-shortcut-help-modal__section-title {
|
|
738
738
|
font-size: 0.9rem;
|
|
739
|
-
font-weight: 600;
|
|
739
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
740
740
|
}
|
|
741
741
|
.edit-widgets-keyboard-shortcut-help-modal__shortcut {
|
|
742
742
|
display: flex;
|
|
@@ -752,7 +752,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
752
752
|
display: none;
|
|
753
753
|
}
|
|
754
754
|
.edit-widgets-keyboard-shortcut-help-modal__shortcut-term {
|
|
755
|
-
font-weight: 600;
|
|
755
|
+
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
756
756
|
margin: 0 0 0 1rem;
|
|
757
757
|
text-align: right;
|
|
758
758
|
}
|
|
@@ -805,6 +805,16 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
805
805
|
margin-inline: auto;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
809
|
+
.edit-widgets-notices .components-notice-list {
|
|
810
|
+
gap: 0;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.edit-widgets-notices .components-notice {
|
|
814
|
+
border-top-width: 0;
|
|
815
|
+
border-inline-width: 0;
|
|
816
|
+
}
|
|
817
|
+
|
|
808
818
|
.edit-widgets-layout__inserter-panel {
|
|
809
819
|
height: 100%;
|
|
810
820
|
display: flex;
|
|
@@ -844,7 +854,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
844
854
|
object-fit: cover;
|
|
845
855
|
}
|
|
846
856
|
.edit-widgets-welcome-guide__heading {
|
|
847
|
-
font-family: -apple-system,
|
|
857
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
848
858
|
font-size: 24px;
|
|
849
859
|
line-height: 1.4;
|
|
850
860
|
margin: 16px 0 16px 0;
|
|
@@ -866,7 +876,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
866
876
|
|
|
867
877
|
.edit-widgets-block-editor {
|
|
868
878
|
position: relative;
|
|
869
|
-
font-family: -apple-system,
|
|
879
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
870
880
|
display: flex;
|
|
871
881
|
flex-direction: column;
|
|
872
882
|
flex-grow: 1;
|
|
@@ -881,7 +891,7 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
881
891
|
height: 100%;
|
|
882
892
|
}
|
|
883
893
|
.edit-widgets-block-editor .components-button {
|
|
884
|
-
font-family: -apple-system,
|
|
894
|
+
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
885
895
|
font-size: 13px;
|
|
886
896
|
}
|
|
887
897
|
.edit-widgets-block-editor .components-button.is-tertiary, .edit-widgets-block-editor .components-button.has-icon {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.52.0",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -47,34 +47,35 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@wordpress/api-fetch": "^7.
|
|
51
|
-
"@wordpress/base-styles": "^
|
|
52
|
-
"@wordpress/block-editor": "^16.
|
|
53
|
-
"@wordpress/block-library": "^10.
|
|
54
|
-
"@wordpress/blocks": "^15.
|
|
55
|
-
"@wordpress/components": "^
|
|
56
|
-
"@wordpress/compose": "^8.
|
|
57
|
-
"@wordpress/core-data": "^7.
|
|
58
|
-
"@wordpress/data": "^10.
|
|
59
|
-
"@wordpress/deprecated": "^4.
|
|
60
|
-
"@wordpress/dom": "^4.
|
|
61
|
-
"@wordpress/element": "^8.
|
|
62
|
-
"@wordpress/hooks": "^4.
|
|
63
|
-
"@wordpress/i18n": "^6.
|
|
64
|
-
"@wordpress/icons": "^15.
|
|
65
|
-
"@wordpress/interface": "^9.
|
|
66
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
67
|
-
"@wordpress/keycodes": "^4.
|
|
68
|
-
"@wordpress/media-utils": "^5.
|
|
69
|
-
"@wordpress/notices": "^5.
|
|
70
|
-
"@wordpress/patterns": "^2.
|
|
71
|
-
"@wordpress/plugins": "^7.
|
|
72
|
-
"@wordpress/preferences": "^4.
|
|
73
|
-
"@wordpress/private-apis": "^1.
|
|
74
|
-
"@wordpress/reusable-blocks": "^5.
|
|
75
|
-
"@wordpress/
|
|
76
|
-
"@wordpress/
|
|
77
|
-
"@wordpress/
|
|
50
|
+
"@wordpress/api-fetch": "^7.52.0",
|
|
51
|
+
"@wordpress/base-styles": "^12.0.0",
|
|
52
|
+
"@wordpress/block-editor": "^16.1.0",
|
|
53
|
+
"@wordpress/block-library": "^10.3.0",
|
|
54
|
+
"@wordpress/blocks": "^15.25.0",
|
|
55
|
+
"@wordpress/components": "^38.0.0",
|
|
56
|
+
"@wordpress/compose": "^8.5.0",
|
|
57
|
+
"@wordpress/core-data": "^7.52.0",
|
|
58
|
+
"@wordpress/data": "^10.52.0",
|
|
59
|
+
"@wordpress/deprecated": "^4.52.0",
|
|
60
|
+
"@wordpress/dom": "^4.52.0",
|
|
61
|
+
"@wordpress/element": "^8.4.0",
|
|
62
|
+
"@wordpress/hooks": "^4.52.0",
|
|
63
|
+
"@wordpress/i18n": "^6.25.0",
|
|
64
|
+
"@wordpress/icons": "^15.3.0",
|
|
65
|
+
"@wordpress/interface": "^9.37.0",
|
|
66
|
+
"@wordpress/keyboard-shortcuts": "^5.52.0",
|
|
67
|
+
"@wordpress/keycodes": "^4.52.0",
|
|
68
|
+
"@wordpress/media-utils": "^5.52.0",
|
|
69
|
+
"@wordpress/notices": "^5.52.0",
|
|
70
|
+
"@wordpress/patterns": "^2.52.0",
|
|
71
|
+
"@wordpress/plugins": "^7.52.0",
|
|
72
|
+
"@wordpress/preferences": "^4.52.0",
|
|
73
|
+
"@wordpress/private-apis": "^1.52.0",
|
|
74
|
+
"@wordpress/reusable-blocks": "^5.52.0",
|
|
75
|
+
"@wordpress/theme": "^1.1.0",
|
|
76
|
+
"@wordpress/ui": "^0.19.0",
|
|
77
|
+
"@wordpress/url": "^4.52.0",
|
|
78
|
+
"@wordpress/widgets": "^4.52.0",
|
|
78
79
|
"clsx": "^2.1.1"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
@@ -83,11 +84,11 @@
|
|
|
83
84
|
"deep-freeze": "^0.0.1"
|
|
84
85
|
},
|
|
85
86
|
"peerDependencies": {
|
|
86
|
-
"react": "^18
|
|
87
|
-
"react-dom": "^18
|
|
87
|
+
"react": "^18 || ^19",
|
|
88
|
+
"react-dom": "^18 || ^19"
|
|
88
89
|
},
|
|
89
90
|
"publishConfig": {
|
|
90
91
|
"access": "public"
|
|
91
92
|
},
|
|
92
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
|
|
93
94
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
&__section-title {
|
|
9
9
|
font-size: 0.9rem;
|
|
10
|
-
font-weight:
|
|
10
|
+
font-weight: var(--wpds-typography-font-weight-emphasis);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&__shortcut {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&__shortcut-term {
|
|
30
|
-
font-weight:
|
|
30
|
+
font-weight: var(--wpds-typography-font-weight-emphasis);
|
|
31
31
|
margin: 0 0 0 1rem;
|
|
32
32
|
text-align: right;
|
|
33
33
|
}
|
|
@@ -10,22 +10,32 @@ import { isAppleOS } from '@wordpress/keycodes';
|
|
|
10
10
|
import { useDispatch } from '@wordpress/data';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Internal dependencies
|
|
16
17
|
*/
|
|
17
18
|
import { store as editWidgetsStore } from '../../store';
|
|
19
|
+
import { unlock } from '../../lock-unlock';
|
|
20
|
+
|
|
21
|
+
const { usesNativeUndo } = unlock( blockEditorPrivateApis );
|
|
18
22
|
|
|
19
23
|
function KeyboardShortcuts() {
|
|
20
24
|
const { redo, undo } = useDispatch( coreStore );
|
|
21
25
|
const { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );
|
|
22
26
|
|
|
23
27
|
useShortcut( 'core/edit-widgets/undo', ( event ) => {
|
|
28
|
+
if ( usesNativeUndo( event ) ) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
24
31
|
undo();
|
|
25
32
|
event.preventDefault();
|
|
26
33
|
} );
|
|
27
34
|
|
|
28
35
|
useShortcut( 'core/edit-widgets/redo', ( event ) => {
|
|
36
|
+
if ( usesNativeUndo( event ) ) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
29
39
|
redo();
|
|
30
40
|
event.preventDefault();
|
|
31
41
|
} );
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { InlineNotices, SnackbarNotices } from '@wordpress/notices';
|
|
5
|
+
import { ThemeProvider } from '@wordpress/theme';
|
|
5
6
|
|
|
6
7
|
function Notices() {
|
|
7
8
|
return (
|
|
8
|
-
|
|
9
|
+
<ThemeProvider cornerRadius="none">
|
|
9
10
|
<InlineNotices
|
|
11
|
+
className="edit-widgets-notices"
|
|
10
12
|
pinnedNoticesClassName="edit-widgets-notices__pinned"
|
|
11
13
|
dismissibleNoticesClassName="edit-widgets-notices__dismissible"
|
|
12
14
|
/>
|
|
13
15
|
<SnackbarNotices className="edit-widgets-notices__snackbar" />
|
|
14
|
-
|
|
16
|
+
</ThemeProvider>
|
|
15
17
|
);
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -5,3 +5,12 @@
|
|
|
5
5
|
@include snackbar-container();
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
9
|
+
.edit-widgets-notices .components-notice-list {
|
|
10
|
+
gap: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.edit-widgets-notices .components-notice {
|
|
14
|
+
border-top-width: 0;
|
|
15
|
+
border-inline-width: 0;
|
|
16
|
+
}
|
package/src/style.scss
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
@use "./components/widget-areas-block-editor-content/style.scss" as *;
|
|
16
16
|
@use "./components/secondary-sidebar/style.scss" as *;
|
|
17
17
|
|
|
18
|
+
// stylelint-disable selector-class-pattern -- WordPress admin body classes use underscores by convention.
|
|
18
19
|
body.js.appearance_page_gutenberg-widgets,
|
|
19
20
|
body.js.widgets-php {
|
|
20
21
|
@include wp-admin-reset( ".blocks-widgets-container" );
|
|
21
22
|
}
|
|
23
|
+
// stylelint-enable selector-class-pattern
|
|
22
24
|
|
|
23
25
|
.blocks-widgets-container {
|
|
24
26
|
@include reset;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
|
-
@use "@wordpress/base-styles/z-index" as *;
|
|
3
|
-
|
|
4
|
-
.edit-widgets-customizer-edit-widgets-initializer__content {
|
|
5
|
-
position: relative;
|
|
6
|
-
.edit-widgets-header {
|
|
7
|
-
margin-top: -16px;
|
|
8
|
-
border-top: 1px solid $gray-300;
|
|
9
|
-
background: #fff;
|
|
10
|
-
margin-left: -12px;
|
|
11
|
-
margin-right: -12px;
|
|
12
|
-
}
|
|
13
|
-
.edit-widgets-sidebar {
|
|
14
|
-
margin-left: -12px;
|
|
15
|
-
margin-right: -12px;
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
width: calc(100% + 24px);
|
|
19
|
-
z-index: z-index(".edit-widgets-sidebar");
|
|
20
|
-
}
|
|
21
|
-
}
|