@wordpress/edit-widgets 5.31.0 → 5.33.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/blocks/widget-area/edit/index.js.map +1 -1
  3. package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  4. package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  5. package/build/blocks/widget-area/index.js +1 -0
  6. package/build/blocks/widget-area/index.js.map +1 -1
  7. package/build/components/error-boundary/index.js.map +1 -1
  8. package/build/components/header/document-tools/index.js.map +1 -1
  9. package/build/components/header/index.js.map +1 -1
  10. package/build/components/header/undo-redo/redo.js.map +1 -1
  11. package/build/components/header/undo-redo/undo.js.map +1 -1
  12. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  13. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  14. package/build/components/keyboard-shortcut-help-modal/index.js +3 -0
  15. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  16. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  17. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  18. package/build/components/layout/index.js.map +1 -1
  19. package/build/components/layout/interface.js +1 -1
  20. package/build/components/layout/interface.js.map +1 -1
  21. package/build/components/layout/unsaved-changes-warning.js.map +1 -1
  22. package/build/components/more-menu/index.js.map +1 -1
  23. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  24. package/build/components/notices/index.js.map +1 -1
  25. package/build/components/save-button/index.js.map +1 -1
  26. package/build/components/secondary-sidebar/index.js.map +1 -1
  27. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  28. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  29. package/build/components/sidebar/index.js.map +1 -1
  30. package/build/components/sidebar/widget-areas.js.map +1 -1
  31. package/build/components/welcome-guide/index.js.map +1 -1
  32. package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
  33. package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
  34. package/build/constants.js.map +1 -1
  35. package/build/filters/index.js.map +1 -1
  36. package/build/filters/move-to-widget-area.js.map +1 -1
  37. package/build/filters/replace-media-upload.js.map +1 -1
  38. package/build/hooks/use-last-selected-widget-area.js.map +1 -1
  39. package/build/hooks/use-widget-library-insertion-point.js.map +1 -1
  40. package/build/index.js +1 -1
  41. package/build/index.js.map +1 -1
  42. package/build/lock-unlock.js.map +1 -1
  43. package/build/store/actions.js.map +1 -1
  44. package/build/store/constants.js.map +1 -1
  45. package/build/store/index.js +1 -1
  46. package/build/store/index.js.map +1 -1
  47. package/build/store/private-selectors.js.map +1 -1
  48. package/build/store/reducer.js.map +1 -1
  49. package/build/store/resolvers.js.map +1 -1
  50. package/build/store/selectors.js.map +1 -1
  51. package/build/store/transformers.js.map +1 -1
  52. package/build/store/utils.js.map +1 -1
  53. package/build-module/blocks/widget-area/edit/index.js.map +1 -1
  54. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  55. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  56. package/build-module/blocks/widget-area/index.js +1 -0
  57. package/build-module/blocks/widget-area/index.js.map +1 -1
  58. package/build-module/components/error-boundary/index.js.map +1 -1
  59. package/build-module/components/header/document-tools/index.js.map +1 -1
  60. package/build-module/components/header/index.js.map +1 -1
  61. package/build-module/components/header/undo-redo/redo.js.map +1 -1
  62. package/build-module/components/header/undo-redo/undo.js.map +1 -1
  63. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  64. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  65. package/build-module/components/keyboard-shortcut-help-modal/index.js +3 -0
  66. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  67. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  68. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  69. package/build-module/components/layout/index.js.map +1 -1
  70. package/build-module/components/layout/interface.js +1 -1
  71. package/build-module/components/layout/interface.js.map +1 -1
  72. package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
  73. package/build-module/components/more-menu/index.js.map +1 -1
  74. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  75. package/build-module/components/notices/index.js.map +1 -1
  76. package/build-module/components/save-button/index.js.map +1 -1
  77. package/build-module/components/secondary-sidebar/index.js.map +1 -1
  78. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  79. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  80. package/build-module/components/sidebar/index.js.map +1 -1
  81. package/build-module/components/sidebar/widget-areas.js.map +1 -1
  82. package/build-module/components/welcome-guide/index.js.map +1 -1
  83. package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
  84. package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
  85. package/build-module/constants.js.map +1 -1
  86. package/build-module/filters/index.js.map +1 -1
  87. package/build-module/filters/move-to-widget-area.js.map +1 -1
  88. package/build-module/filters/replace-media-upload.js.map +1 -1
  89. package/build-module/hooks/use-last-selected-widget-area.js.map +1 -1
  90. package/build-module/hooks/use-widget-library-insertion-point.js.map +1 -1
  91. package/build-module/index.js.map +1 -1
  92. package/build-module/lock-unlock.js.map +1 -1
  93. package/build-module/store/actions.js.map +1 -1
  94. package/build-module/store/constants.js.map +1 -1
  95. package/build-module/store/index.js.map +1 -1
  96. package/build-module/store/private-selectors.js.map +1 -1
  97. package/build-module/store/reducer.js.map +1 -1
  98. package/build-module/store/resolvers.js.map +1 -1
  99. package/build-module/store/selectors.js.map +1 -1
  100. package/build-module/store/transformers.js.map +1 -1
  101. package/build-module/store/utils.js.map +1 -1
  102. package/build-style/style-rtl.css +7 -5
  103. package/build-style/style.css +7 -5
  104. package/package.json +29 -30
  105. package/src/blocks/widget-area/block.json +1 -0
  106. package/src/components/keyboard-shortcut-help-modal/index.js +4 -0
  107. package/src/components/layout/interface.js +1 -5
@@ -1 +1 @@
1
- {"version":3,"names":["createBlock","parse","serialize","addWidgetIdToBlock","transformWidgetToBlock","widget","id_base","parsedBlocks","instance","raw","content","__unstableSkipAutop","length","id","attributes","_embedded","about","is_multi","idBase","transformBlockToWidget","block","relatedWidget","isValidLegacyWidgetBlock","name","_block$attributes$id","_block$attributes$idB","_block$attributes$ins","rendered","rendered_form"],"sources":["@wordpress/edit-widgets/src/store/transformers.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock, parse, serialize } from '@wordpress/blocks';\nimport { addWidgetIdToBlock } from '@wordpress/widgets';\n\n/**\n * Converts a widget entity record into a block.\n *\n * @param {Object} widget The widget entity record.\n * @return {Object} a block (converted from the entity record).\n */\nexport function transformWidgetToBlock( widget ) {\n\tif ( widget.id_base === 'block' ) {\n\t\tconst parsedBlocks = parse( widget.instance.raw.content, {\n\t\t\t__unstableSkipAutop: true,\n\t\t} );\n\t\tif ( ! parsedBlocks.length ) {\n\t\t\treturn addWidgetIdToBlock(\n\t\t\t\tcreateBlock( 'core/paragraph', {}, [] ),\n\t\t\t\twidget.id\n\t\t\t);\n\t\t}\n\t\treturn addWidgetIdToBlock( parsedBlocks[ 0 ], widget.id );\n\t}\n\n\tlet attributes;\n\tif ( widget._embedded.about[ 0 ].is_multi ) {\n\t\tattributes = {\n\t\t\tidBase: widget.id_base,\n\t\t\tinstance: widget.instance,\n\t\t};\n\t} else {\n\t\tattributes = {\n\t\t\tid: widget.id,\n\t\t};\n\t}\n\n\treturn addWidgetIdToBlock(\n\t\tcreateBlock( 'core/legacy-widget', attributes, [] ),\n\t\twidget.id\n\t);\n}\n\n/**\n * Converts a block to a widget entity record.\n *\n * @param {Object} block The block.\n * @param {Object?} relatedWidget A related widget entity record from the API (optional).\n * @return {Object} the widget object (converted from block).\n */\nexport function transformBlockToWidget( block, relatedWidget = {} ) {\n\tlet widget;\n\n\tconst isValidLegacyWidgetBlock =\n\t\tblock.name === 'core/legacy-widget' &&\n\t\t( block.attributes.id || block.attributes.instance );\n\n\tif ( isValidLegacyWidgetBlock ) {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid: block.attributes.id ?? relatedWidget.id,\n\t\t\tid_base: block.attributes.idBase ?? relatedWidget.id_base,\n\t\t\tinstance: block.attributes.instance ?? relatedWidget.instance,\n\t\t};\n\t} else {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid_base: 'block',\n\t\t\tinstance: {\n\t\t\t\traw: {\n\t\t\t\t\tcontent: serialize( block ),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\t// Delete read-only properties.\n\tdelete widget.rendered;\n\tdelete widget.rendered_form;\n\n\treturn widget;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,KAAK,EAAEC,SAAS,QAAQ,mBAAmB;AACjE,SAASC,kBAAkB,QAAQ,oBAAoB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAEC,MAAM,EAAG;EAChD,IAAKA,MAAM,CAACC,OAAO,KAAK,OAAO,EAAG;IACjC,MAAMC,YAAY,GAAGN,KAAK,CAAEI,MAAM,CAACG,QAAQ,CAACC,GAAG,CAACC,OAAO,EAAE;MACxDC,mBAAmB,EAAE;IACtB,CAAE,CAAC;IACH,IAAK,CAAEJ,YAAY,CAACK,MAAM,EAAG;MAC5B,OAAOT,kBAAkB,CACxBH,WAAW,CAAE,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAG,CAAC,EACvCK,MAAM,CAACQ,EACR,CAAC;IACF;IACA,OAAOV,kBAAkB,CAAEI,YAAY,CAAE,CAAC,CAAE,EAAEF,MAAM,CAACQ,EAAG,CAAC;EAC1D;EAEA,IAAIC,UAAU;EACd,IAAKT,MAAM,CAACU,SAAS,CAACC,KAAK,CAAE,CAAC,CAAE,CAACC,QAAQ,EAAG;IAC3CH,UAAU,GAAG;MACZI,MA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EA;EACA,OAAOf,MAAM,CAACsB,QAAQ;EACtB,OAAOtB,MAAM,CAACuB,aAAa;EAE3B,OAAOvB,MAAM;AACd"}
1
+ {"version":3,"names":["createBlock","parse","serialize","addWidgetIdToBlock","transformWidgetToBlock","widget","id_base","parsedBlocks","instance","raw","content","__unstableSkipAutop","length","id","attributes","_embedded","about","is_multi","idBase","transformBlockToWidget","block","relatedWidget","isValidLegacyWidgetBlock","name","_block$attributes$id","_block$attributes$idB","_block$attributes$ins","rendered","rendered_form"],"sources":["@wordpress/edit-widgets/src/store/transformers.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock, parse, serialize } from '@wordpress/blocks';\nimport { addWidgetIdToBlock } from '@wordpress/widgets';\n\n/**\n * Converts a widget entity record into a block.\n *\n * @param {Object} widget The widget entity record.\n * @return {Object} a block (converted from the entity record).\n */\nexport function transformWidgetToBlock( widget ) {\n\tif ( widget.id_base === 'block' ) {\n\t\tconst parsedBlocks = parse( widget.instance.raw.content, {\n\t\t\t__unstableSkipAutop: true,\n\t\t} );\n\t\tif ( ! parsedBlocks.length ) {\n\t\t\treturn addWidgetIdToBlock(\n\t\t\t\tcreateBlock( 'core/paragraph', {}, [] ),\n\t\t\t\twidget.id\n\t\t\t);\n\t\t}\n\t\treturn addWidgetIdToBlock( parsedBlocks[ 0 ], widget.id );\n\t}\n\n\tlet attributes;\n\tif ( widget._embedded.about[ 0 ].is_multi ) {\n\t\tattributes = {\n\t\t\tidBase: widget.id_base,\n\t\t\tinstance: widget.instance,\n\t\t};\n\t} else {\n\t\tattributes = {\n\t\t\tid: widget.id,\n\t\t};\n\t}\n\n\treturn addWidgetIdToBlock(\n\t\tcreateBlock( 'core/legacy-widget', attributes, [] ),\n\t\twidget.id\n\t);\n}\n\n/**\n * Converts a block to a widget entity record.\n *\n * @param {Object} block The block.\n * @param {Object?} relatedWidget A related widget entity record from the API (optional).\n * @return {Object} the widget object (converted from block).\n */\nexport function transformBlockToWidget( block, relatedWidget = {} ) {\n\tlet widget;\n\n\tconst isValidLegacyWidgetBlock =\n\t\tblock.name === 'core/legacy-widget' &&\n\t\t( block.attributes.id || block.attributes.instance );\n\n\tif ( isValidLegacyWidgetBlock ) {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid: block.attributes.id ?? relatedWidget.id,\n\t\t\tid_base: block.attributes.idBase ?? relatedWidget.id_base,\n\t\t\tinstance: block.attributes.instance ?? relatedWidget.instance,\n\t\t};\n\t} else {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid_base: 'block',\n\t\t\tinstance: {\n\t\t\t\traw: {\n\t\t\t\t\tcontent: serialize( block ),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\t// Delete read-only properties.\n\tdelete widget.rendered;\n\tdelete widget.rendered_form;\n\n\treturn widget;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,KAAK,EAAEC,SAAS,QAAQ,mBAAmB;AACjE,SAASC,kBAAkB,QAAQ,oBAAoB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAEC,MAAM,EAAG;EAChD,IAAKA,MAAM,CAACC,OAAO,KAAK,OAAO,EAAG;IACjC,MAAMC,YAAY,GAAGN,KAAK,CAAEI,MAAM,CAACG,QAAQ,CAACC,GAAG,CAACC,OAAO,EAAE;MACxDC,mBAAmB,EAAE;IACtB,CAAE,CAAC;IACH,IAAK,CAAEJ,YAAY,CAACK,MAAM,EAAG;MAC5B,OAAOT,kBAAkB,CACxBH,WAAW,CAAE,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAG,CAAC,EACvCK,MAAM,CAACQ,EACR,CAAC;IACF;IACA,OAAOV,kBAAkB,CAAEI,YAAY,CAAE,CAAC,CAAE,EAAEF,MAAM,CAACQ,EAAG,CAAC;EAC1D;EAEA,IAAIC,UAAU;EACd,IAAKT,MAAM,CAACU,SAAS,CAACC,KAAK,CAAE,CAAC,CAAE,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S,CAAEkB,KAAM;QAC3B;MACD;IACD,CAAC;EACF;;EAEA;EACA,OAAOf,MAAM,CAACsB,QAAQ;EACtB,OAAOtB,MAAM,CAACuB,aAAa;EAE3B,OAAOvB,MAAM;AACd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","buildWidgetAreasPostId","buildWidgetAreasQuery","per_page","buildWidgetsQuery","_embed","createStubPost","id","blocks","slug","status","type","meta"],"sources":["@wordpress/edit-widgets/src/store/utils.js"],"sourcesContent":["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,IAAI,GAAG,MAAM;;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAS;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAKC,YAAY,IACjD,eAAeA,YAAc,EAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAO,cAAa;;AAE1D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,OAAO;IACNC,QAAQ,EAAE,CAAC;EACZ,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OAAO;IACND,QAAQ,EAAE,CAAC,CAAC;IACZE,MAAM,EAAE;EACT,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAEC,EAAE,EAAEC,MAAM,MAAQ;EACjDD,EAAE;EACFE,IAAI,EAAEF,EAAE;EACRG,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE,MAAM;EACZH,MAAM;EACNI,IAAI,EAAE;IACLZ,YAAY,EAAEO;EACf;AACD,CAAC,CAAE"}
1
+ {"version":3,"names":["KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","buildWidgetAreasPostId","buildWidgetAreasQuery","per_page","buildWidgetsQuery","_embed","createStubPost","id","blocks","slug","status","type","meta"],"sources":["@wordpress/edit-widgets/src/store/utils.js"],"sourcesContent":["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,IAAI,GAAG,MAAM;;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAS;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAKC,YAAY,IACjD,eAAeA,YAAc,EAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAO,cAAa;;AAE1D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,OAAO;IACNC,QAAQ,EAAE,CAAC;EACZ,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OAAO;IACND,QAAQ,EAAE,CAAC,CAAC;IACZE,MAAM,EAAE;EACT,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAEC,EAAE,EAAEC,MAAM,MAAQ;EACjDD,EAAE;EACFE,IAAI,EAAEF,EAAE;EACRG,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE,MAAM;EACZH,MAAM;EACNI,IAAI,EAAE;IACLZ,YAAY,EAAEO;EACf;AACD,CAAC,CAAE","ignoreList":[]}
@@ -96,7 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
- --wp-bound-block-color: #9747ff;
99
+ --wp-bound-block-color: var(--wp-block-synced-color);
100
100
  }
101
101
  @media (min-resolution: 192dpi) {
102
102
  :root {
@@ -337,17 +337,16 @@ body.is-fullscreen-mode .interface-interface-skeleton {
337
337
  position: absolute;
338
338
  z-index: 100000;
339
339
  top: 0;
340
- left: 0;
341
- bottom: 0;
342
340
  right: 0;
341
+ bottom: 0;
343
342
  background: #fff;
344
343
  color: #1e1e1e;
344
+ width: auto;
345
345
  }
346
346
  @media (min-width: 782px) {
347
347
  .interface-interface-skeleton__secondary-sidebar,
348
348
  .interface-interface-skeleton__sidebar {
349
349
  position: relative !important;
350
- width: auto;
351
350
  }
352
351
  .is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,
353
352
  .is-sidebar-opened .interface-interface-skeleton__sidebar {
@@ -364,6 +363,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
364
363
  }
365
364
  }
366
365
 
366
+ .interface-interface-skeleton__secondary-sidebar {
367
+ left: 0;
368
+ }
367
369
  @media (min-width: 782px) {
368
370
  .interface-interface-skeleton__secondary-sidebar {
369
371
  border-left: 1px solid #e0e0e0;
@@ -447,7 +449,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
447
449
  display: none;
448
450
  margin: 0;
449
451
  }
450
- .interface-pinned-items .components-button[aria-controls="edit-post:document"], .interface-pinned-items .components-button[aria-controls="edit-post:block"], .interface-pinned-items .components-button[aria-controls="edit-site:template"], .interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"], .interface-pinned-items .components-button[aria-controls="edit-site:global-styles"] {
452
+ .interface-pinned-items .components-button[aria-controls="edit-post:document"], .interface-pinned-items .components-button[aria-controls="edit-post:block"], .interface-pinned-items .components-button[aria-controls="edit-site:template"], .interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"] {
451
453
  display: flex;
452
454
  }
453
455
  .interface-pinned-items .components-button svg {
@@ -96,7 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
- --wp-bound-block-color: #9747ff;
99
+ --wp-bound-block-color: var(--wp-block-synced-color);
100
100
  }
101
101
  @media (min-resolution: 192dpi) {
102
102
  :root {
@@ -337,17 +337,16 @@ body.is-fullscreen-mode .interface-interface-skeleton {
337
337
  position: absolute;
338
338
  z-index: 100000;
339
339
  top: 0;
340
- right: 0;
341
- bottom: 0;
342
340
  left: 0;
341
+ bottom: 0;
343
342
  background: #fff;
344
343
  color: #1e1e1e;
344
+ width: auto;
345
345
  }
346
346
  @media (min-width: 782px) {
347
347
  .interface-interface-skeleton__secondary-sidebar,
348
348
  .interface-interface-skeleton__sidebar {
349
349
  position: relative !important;
350
- width: auto;
351
350
  }
352
351
  .is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,
353
352
  .is-sidebar-opened .interface-interface-skeleton__sidebar {
@@ -364,6 +363,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
364
363
  }
365
364
  }
366
365
 
366
+ .interface-interface-skeleton__secondary-sidebar {
367
+ right: 0;
368
+ }
367
369
  @media (min-width: 782px) {
368
370
  .interface-interface-skeleton__secondary-sidebar {
369
371
  border-right: 1px solid #e0e0e0;
@@ -447,7 +449,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
447
449
  display: none;
448
450
  margin: 0;
449
451
  }
450
- .interface-pinned-items .components-button[aria-controls="edit-post:document"], .interface-pinned-items .components-button[aria-controls="edit-post:block"], .interface-pinned-items .components-button[aria-controls="edit-site:template"], .interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"], .interface-pinned-items .components-button[aria-controls="edit-site:global-styles"] {
452
+ .interface-pinned-items .components-button[aria-controls="edit-post:document"], .interface-pinned-items .components-button[aria-controls="edit-post:block"], .interface-pinned-items .components-button[aria-controls="edit-site:template"], .interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"] {
451
453
  display: flex;
452
454
  }
453
455
  .interface-pinned-items .components-button svg {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "5.31.0",
3
+ "version": "5.33.0",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,34 +27,33 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/api-fetch": "^6.51.0",
31
- "@wordpress/block-editor": "^12.22.0",
32
- "@wordpress/block-library": "^8.31.0",
33
- "@wordpress/blocks": "^12.31.0",
34
- "@wordpress/components": "^27.2.0",
35
- "@wordpress/compose": "^6.31.0",
36
- "@wordpress/core-data": "^6.31.0",
37
- "@wordpress/data": "^9.24.0",
38
- "@wordpress/deprecated": "^3.54.0",
39
- "@wordpress/dom": "^3.54.0",
40
- "@wordpress/element": "^5.31.0",
41
- "@wordpress/hooks": "^3.54.0",
42
- "@wordpress/i18n": "^4.54.0",
43
- "@wordpress/icons": "^9.45.0",
44
- "@wordpress/interface": "^5.31.0",
45
- "@wordpress/keyboard-shortcuts": "^4.31.0",
46
- "@wordpress/keycodes": "^3.54.0",
47
- "@wordpress/media-utils": "^4.45.0",
48
- "@wordpress/notices": "^4.22.0",
49
- "@wordpress/patterns": "^1.15.0",
50
- "@wordpress/plugins": "^6.22.0",
51
- "@wordpress/preferences": "^3.31.0",
52
- "@wordpress/private-apis": "^0.36.0",
53
- "@wordpress/reusable-blocks": "^4.31.0",
54
- "@wordpress/url": "^3.55.0",
55
- "@wordpress/widgets": "^3.31.0",
56
- "classnames": "^2.3.1",
57
- "rememo": "^4.0.2"
30
+ "@wordpress/api-fetch": "^6.53.0",
31
+ "@wordpress/block-editor": "^12.24.0",
32
+ "@wordpress/block-library": "^8.33.0",
33
+ "@wordpress/blocks": "^12.33.0",
34
+ "@wordpress/components": "^27.4.0",
35
+ "@wordpress/compose": "^6.33.0",
36
+ "@wordpress/core-data": "^6.33.0",
37
+ "@wordpress/data": "^9.26.0",
38
+ "@wordpress/deprecated": "^3.56.0",
39
+ "@wordpress/dom": "^3.56.0",
40
+ "@wordpress/element": "^5.33.0",
41
+ "@wordpress/hooks": "^3.56.0",
42
+ "@wordpress/i18n": "^4.56.0",
43
+ "@wordpress/icons": "^9.47.0",
44
+ "@wordpress/interface": "^5.33.0",
45
+ "@wordpress/keyboard-shortcuts": "^4.33.0",
46
+ "@wordpress/keycodes": "^3.56.0",
47
+ "@wordpress/media-utils": "^4.47.0",
48
+ "@wordpress/notices": "^4.24.0",
49
+ "@wordpress/patterns": "^1.17.0",
50
+ "@wordpress/plugins": "^6.24.0",
51
+ "@wordpress/preferences": "^3.33.0",
52
+ "@wordpress/private-apis": "^0.38.0",
53
+ "@wordpress/reusable-blocks": "^4.33.0",
54
+ "@wordpress/url": "^3.57.0",
55
+ "@wordpress/widgets": "^3.33.0",
56
+ "classnames": "^2.3.1"
58
57
  },
59
58
  "peerDependencies": {
60
59
  "react": "^18.0.0",
@@ -63,5 +62,5 @@
63
62
  "publishConfig": {
64
63
  "access": "public"
65
64
  },
66
- "gitHead": "ffc07735d0abfb3f69e91d48f25b7fe8d1ef92d2"
65
+ "gitHead": "280403b4c1cf6cc2c55a6c4d56f9ef91145e4191"
67
66
  }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "$schema": "https://schemas.wp.org/trunk/block.json",
3
3
  "name": "core/widget-area",
4
+ "title": "Widget Area",
4
5
  "category": "widgets",
5
6
  "attributes": {
6
7
  "id": {
@@ -135,6 +135,10 @@ export default function KeyboardShortcutHelpModal( {
135
135
  title={ __( 'Text formatting' ) }
136
136
  shortcuts={ textFormattingShortcuts }
137
137
  />
138
+ <ShortcutCategorySection
139
+ title={ __( 'List View shortcuts' ) }
140
+ categoryName="list-view"
141
+ />
138
142
  </Modal>
139
143
  );
140
144
  }
@@ -96,11 +96,7 @@ function Interface( { blockEditorSettings } ) {
96
96
  } }
97
97
  header={ <Header /> }
98
98
  secondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }
99
- sidebar={
100
- hasSidebarEnabled && (
101
- <ComplementaryArea.Slot scope="core/edit-widgets" />
102
- )
103
- }
99
+ sidebar={ <ComplementaryArea.Slot scope="core/edit-widgets" /> }
104
100
  content={
105
101
  <>
106
102
  <WidgetAreasBlockEditorContent