@wordpress/edit-site 6.6.0 → 6.7.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 (175) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/add-custom-template-modal-content.js +6 -7
  3. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  4. package/build/components/add-new-template/index.js +7 -10
  5. package/build/components/add-new-template/index.js.map +1 -1
  6. package/build/components/block-editor/use-site-editor-settings.js +0 -24
  7. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  8. package/build/components/editor/index.js +6 -3
  9. package/build/components/editor/index.js.map +1 -1
  10. package/build/components/editor-canvas-container/index.js +4 -1
  11. package/build/components/editor-canvas-container/index.js.map +1 -1
  12. package/build/components/error-boundary/warning.js +4 -1
  13. package/build/components/error-boundary/warning.js.map +1 -1
  14. package/build/components/global-styles/font-library-modal/font-card.js +5 -2
  15. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  16. package/build/components/global-styles/font-library-modal/font-collection.js +27 -19
  17. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/installed-fonts.js +21 -8
  19. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/upload-fonts.js +4 -1
  21. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  22. package/build/components/global-styles/font-sizes/font-size.js +10 -11
  23. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  24. package/build/components/global-styles/font-sizes/font-sizes.js +4 -6
  25. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  26. package/build/components/global-styles/header.js +1 -8
  27. package/build/components/global-styles/header.js.map +1 -1
  28. package/build/components/global-styles/navigation-button.js +1 -1
  29. package/build/components/global-styles/navigation-button.js.map +1 -1
  30. package/build/components/global-styles/palette.js +4 -1
  31. package/build/components/global-styles/palette.js.map +1 -1
  32. package/build/components/global-styles/preset-colors.js +1 -1
  33. package/build/components/global-styles/preset-colors.js.map +1 -1
  34. package/build/components/global-styles/screen-revisions/revisions-buttons.js +4 -1
  35. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  36. package/build/components/global-styles/shadows-edit-panel.js +20 -10
  37. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  38. package/build/components/global-styles/typeset-button.js +5 -4
  39. package/build/components/global-styles/typeset-button.js.map +1 -1
  40. package/build/components/layout/index.js +1 -2
  41. package/build/components/layout/index.js.map +1 -1
  42. package/build/components/page-patterns/fields.js +5 -2
  43. package/build/components/page-patterns/fields.js.map +1 -1
  44. package/build/components/pagination/index.js +4 -4
  45. package/build/components/pagination/index.js.map +1 -1
  46. package/build/components/save-panel/index.js +4 -1
  47. package/build/components/save-panel/index.js.map +1 -1
  48. package/build/components/sidebar-button/index.js +4 -1
  49. package/build/components/sidebar-button/index.js.map +1 -1
  50. package/build/components/sidebar-dataviews/add-new-view.js +8 -2
  51. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  52. package/build/components/site-hub/index.js +30 -14
  53. package/build/components/site-hub/index.js.map +1 -1
  54. package/build/components/style-book/index.js +1 -5
  55. package/build/components/style-book/index.js.map +1 -1
  56. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -4
  57. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  58. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +12 -12
  59. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  60. package/build/components/welcome-guide/template.js +20 -9
  61. package/build/components/welcome-guide/template.js.map +1 -1
  62. package/build/hooks/commands/use-common-commands.js +2 -4
  63. package/build/hooks/commands/use-common-commands.js.map +1 -1
  64. package/build-module/components/add-new-template/add-custom-template-modal-content.js +6 -7
  65. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  66. package/build-module/components/add-new-template/index.js +7 -10
  67. package/build-module/components/add-new-template/index.js.map +1 -1
  68. package/build-module/components/block-editor/use-site-editor-settings.js +0 -23
  69. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  70. package/build-module/components/editor/index.js +6 -3
  71. package/build-module/components/editor/index.js.map +1 -1
  72. package/build-module/components/editor-canvas-container/index.js +4 -1
  73. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  74. package/build-module/components/error-boundary/warning.js +4 -1
  75. package/build-module/components/error-boundary/warning.js.map +1 -1
  76. package/build-module/components/global-styles/font-library-modal/font-card.js +7 -4
  77. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  78. package/build-module/components/global-styles/font-library-modal/font-collection.js +29 -21
  79. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  80. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +24 -11
  81. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  82. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +4 -1
  83. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  84. package/build-module/components/global-styles/font-sizes/font-size.js +15 -16
  85. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  86. package/build-module/components/global-styles/font-sizes/font-sizes.js +4 -6
  87. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  88. package/build-module/components/global-styles/header.js +2 -9
  89. package/build-module/components/global-styles/header.js.map +1 -1
  90. package/build-module/components/global-styles/navigation-button.js +2 -2
  91. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  92. package/build-module/components/global-styles/palette.js +4 -1
  93. package/build-module/components/global-styles/palette.js.map +1 -1
  94. package/build-module/components/global-styles/preset-colors.js +1 -1
  95. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  96. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +4 -1
  97. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  98. package/build-module/components/global-styles/shadows-edit-panel.js +20 -10
  99. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  100. package/build-module/components/global-styles/typeset-button.js +6 -5
  101. package/build-module/components/global-styles/typeset-button.js.map +1 -1
  102. package/build-module/components/layout/index.js +1 -2
  103. package/build-module/components/layout/index.js.map +1 -1
  104. package/build-module/components/page-patterns/fields.js +5 -2
  105. package/build-module/components/page-patterns/fields.js.map +1 -1
  106. package/build-module/components/pagination/index.js +5 -5
  107. package/build-module/components/pagination/index.js.map +1 -1
  108. package/build-module/components/save-panel/index.js +4 -1
  109. package/build-module/components/save-panel/index.js.map +1 -1
  110. package/build-module/components/sidebar-button/index.js +4 -1
  111. package/build-module/components/sidebar-button/index.js.map +1 -1
  112. package/build-module/components/sidebar-dataviews/add-new-view.js +8 -2
  113. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  114. package/build-module/components/site-hub/index.js +30 -14
  115. package/build-module/components/site-hub/index.js.map +1 -1
  116. package/build-module/components/style-book/index.js +1 -5
  117. package/build-module/components/style-book/index.js.map +1 -1
  118. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -4
  119. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  120. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +12 -12
  121. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  122. package/build-module/components/welcome-guide/template.js +19 -9
  123. package/build-module/components/welcome-guide/template.js.map +1 -1
  124. package/build-module/hooks/commands/use-common-commands.js +2 -4
  125. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  126. package/build-style/posts-rtl.css +90 -83
  127. package/build-style/posts.css +90 -83
  128. package/build-style/style-rtl.css +94 -99
  129. package/build-style/style.css +94 -99
  130. package/package.json +41 -41
  131. package/src/components/add-new-template/add-custom-template-modal-content.js +6 -7
  132. package/src/components/add-new-template/index.js +6 -8
  133. package/src/components/add-new-template/style.scss +1 -2
  134. package/src/components/block-editor/use-site-editor-settings.js +0 -18
  135. package/src/components/editor/index.js +4 -2
  136. package/src/components/editor-canvas-container/index.js +2 -0
  137. package/src/components/editor-canvas-container/style.scss +1 -1
  138. package/src/components/error-boundary/warning.js +6 -1
  139. package/src/components/global-styles/font-library-modal/font-card.js +5 -3
  140. package/src/components/global-styles/font-library-modal/font-collection.js +45 -27
  141. package/src/components/global-styles/font-library-modal/installed-fonts.js +36 -14
  142. package/src/components/global-styles/font-library-modal/upload-fonts.js +2 -0
  143. package/src/components/global-styles/font-sizes/font-size.js +18 -18
  144. package/src/components/global-styles/font-sizes/font-sizes.js +9 -11
  145. package/src/components/global-styles/header.js +2 -7
  146. package/src/components/global-styles/navigation-button.js +2 -4
  147. package/src/components/global-styles/palette.js +2 -0
  148. package/src/components/global-styles/preset-colors.js +1 -1
  149. package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -0
  150. package/src/components/global-styles/screen-revisions/style.scss +1 -1
  151. package/src/components/global-styles/shadows-edit-panel.js +23 -13
  152. package/src/components/global-styles/style.scss +5 -5
  153. package/src/components/global-styles/typeset-button.js +10 -3
  154. package/src/components/global-styles/variations/style.scss +1 -2
  155. package/src/components/layout/index.js +0 -2
  156. package/src/components/layout/style.scss +2 -24
  157. package/src/components/page/style.scss +5 -1
  158. package/src/components/page-patterns/fields.js +3 -1
  159. package/src/components/page-patterns/style.scss +2 -11
  160. package/src/components/page-templates/style.scss +1 -2
  161. package/src/components/pagination/index.js +5 -5
  162. package/src/components/post-list/style.scss +1 -1
  163. package/src/components/save-panel/index.js +2 -0
  164. package/src/components/sidebar-button/index.js +2 -0
  165. package/src/components/sidebar-dataviews/add-new-view.js +4 -0
  166. package/src/components/sidebar-dataviews/style.scss +1 -1
  167. package/src/components/sidebar-navigation-item/style.scss +0 -1
  168. package/src/components/sidebar-navigation-screen/style.scss +0 -1
  169. package/src/components/site-hub/index.js +18 -12
  170. package/src/components/style-book/index.js +1 -4
  171. package/src/components/style-book/style.scss +2 -2
  172. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -4
  173. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +15 -12
  174. package/src/components/welcome-guide/template.js +12 -18
  175. package/src/hooks/commands/use-common-commands.js +3 -5
@@ -23,38 +23,38 @@ export default function useSyncCanvasModeWithURL() {
23
23
  const {
24
24
  setCanvasMode
25
25
  } = unlock(useDispatch(editSiteStore));
26
- const currentCanvasMode = useRef(canvasMode);
26
+ const currentCanvasModeRef = useRef(canvasMode);
27
27
  const {
28
28
  canvas: canvasInUrl
29
29
  } = params;
30
- const currentCanvasInUrl = useRef(canvasInUrl);
31
- const currentUrlParams = useRef(params);
30
+ const currentCanvasInUrlRef = useRef(canvasInUrl);
31
+ const currentUrlParamsRef = useRef(params);
32
32
  useEffect(() => {
33
- currentUrlParams.current = params;
33
+ currentUrlParamsRef.current = params;
34
34
  }, [params]);
35
35
  useEffect(() => {
36
- currentCanvasMode.current = canvasMode;
36
+ currentCanvasModeRef.current = canvasMode;
37
37
  if (canvasMode === 'init') {
38
38
  return;
39
39
  }
40
- if (canvasMode === 'edit' && currentCanvasInUrl.current !== canvasMode) {
40
+ if (canvasMode === 'edit' && currentCanvasInUrlRef.current !== canvasMode) {
41
41
  history.push({
42
- ...currentUrlParams.current,
42
+ ...currentUrlParamsRef.current,
43
43
  canvas: 'edit'
44
44
  });
45
45
  }
46
- if (canvasMode === 'view' && currentCanvasInUrl.current !== undefined) {
46
+ if (canvasMode === 'view' && currentCanvasInUrlRef.current !== undefined) {
47
47
  history.push({
48
- ...currentUrlParams.current,
48
+ ...currentUrlParamsRef.current,
49
49
  canvas: undefined
50
50
  });
51
51
  }
52
52
  }, [canvasMode, history]);
53
53
  useEffect(() => {
54
- currentCanvasInUrl.current = canvasInUrl;
55
- if (canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view') {
54
+ currentCanvasInUrlRef.current = canvasInUrl;
55
+ if (canvasInUrl !== 'edit' && currentCanvasModeRef.current !== 'view') {
56
56
  setCanvasMode('view');
57
- } else if (canvasInUrl === 'edit' && currentCanvasMode.current !== 'edit') {
57
+ } else if (canvasInUrl === 'edit' && currentCanvasModeRef.current !== 'edit') {
58
58
  setCanvasMode('edit');
59
59
  }
60
60
  }, [canvasInUrl, setCanvasMode]);
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useRef","useSelect","useDispatch","privateApis","routerPrivateApis","store","editSiteStore","unlock","useLocation","useHistory","useSyncCanvasModeWithURL","history","params","canvasMode","select","getCanvasMode","setCanvasMode","currentCanvasMode","canvas","canvasInUrl","currentCanvasInUrl","currentUrlParams","current","push","undefined"],"sources":["@wordpress/edit-site/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function useSyncCanvasModeWithURL() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tconst canvasMode = useSelect(\n\t\t( select ) => unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst currentCanvasMode = useRef( canvasMode );\n\tconst { canvas: canvasInUrl } = params;\n\tconst currentCanvasInUrl = useRef( canvasInUrl );\n\tconst currentUrlParams = useRef( params );\n\tuseEffect( () => {\n\t\tcurrentUrlParams.current = params;\n\t}, [ params ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasMode.current = canvasMode;\n\t\tif ( canvasMode === 'init' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'edit' &&\n\t\t\tcurrentCanvasInUrl.current !== canvasMode\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'view' &&\n\t\t\tcurrentCanvasInUrl.current !== undefined\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ canvasMode, history ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasInUrl.current = canvasInUrl;\n\t\tif ( canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view' ) {\n\t\t\tsetCanvasMode( 'view' );\n\t\t} else if (\n\t\t\tcanvasInUrl === 'edit' &&\n\t\t\tcurrentCanvasMode.current !== 'edit'\n\t\t) {\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t}, [ canvasInUrl, setCanvasMode ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAGF,MAAM,CAAEH,iBAAkB,CAAC;AAE/D,eAAe,SAASM,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,OAAO,GAAGF,UAAU,CAAC,CAAC;EAC5B,MAAM;IAAEG;EAAO,CAAC,GAAGJ,WAAW,CAAC,CAAC;EAChC,MAAMK,UAAU,GAAGZ,SAAS,CACzBa,MAAM,IAAMP,MAAM,CAAEO,MAAM,CAAER,aAAc,CAAE,CAAC,CAACS,aAAa,CAAC,CAAC,EAC/D,EACD,CAAC;EACD,MAAM;IAAEC;EAAc,CAAC,GAAGT,MAAM,CAAEL,WAAW,CAAEI,aAAc,CAAE,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AG,CAAC;AACpC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useRef","useSelect","useDispatch","privateApis","routerPrivateApis","store","editSiteStore","unlock","useLocation","useHistory","useSyncCanvasModeWithURL","history","params","canvasMode","select","getCanvasMode","setCanvasMode","currentCanvasModeRef","canvas","canvasInUrl","currentCanvasInUrlRef","currentUrlParamsRef","current","push","undefined"],"sources":["@wordpress/edit-site/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function useSyncCanvasModeWithURL() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tconst canvasMode = useSelect(\n\t\t( select ) => unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst currentCanvasModeRef = useRef( canvasMode );\n\tconst { canvas: canvasInUrl } = params;\n\tconst currentCanvasInUrlRef = useRef( canvasInUrl );\n\tconst currentUrlParamsRef = useRef( params );\n\tuseEffect( () => {\n\t\tcurrentUrlParamsRef.current = params;\n\t}, [ params ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasModeRef.current = canvasMode;\n\t\tif ( canvasMode === 'init' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'edit' &&\n\t\t\tcurrentCanvasInUrlRef.current !== canvasMode\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParamsRef.current,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'view' &&\n\t\t\tcurrentCanvasInUrlRef.current !== undefined\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParamsRef.current,\n\t\t\t\tcanvas: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ canvasMode, history ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasInUrlRef.current = canvasInUrl;\n\t\tif (\n\t\t\tcanvasInUrl !== 'edit' &&\n\t\t\tcurrentCanvasModeRef.current !== 'view'\n\t\t) {\n\t\t\tsetCanvasMode( 'view' );\n\t\t} else if (\n\t\t\tcanvasInUrl === 'edit' &&\n\t\t\tcurrentCanvasModeRef.current !== 'edit'\n\t\t) {\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t}, [ canvasInUrl, setCanvasMode ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAGF,MAAM,CAAEH,iBAAkB,CAAC;AAE/D,eAAe,SAASM,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,OAAO,GAAGF,UAAU,CAAC,CAAC;EAC5B,MAAM;IAAEG;EAAO,CAAC,GAAGJ,WAAW,CAAC,CAAC;EAChC,MAAMK,UAAU,GAAGZ,SAAS,CACzBa,MAAM,IAAMP,MAAM,CAAEO,MAAM,CAAER,aAAc,CAAE,CAAC,CAACS,aAAa,CAAC,CAAC,EAC/D,EACD,CAAC;EACD,MAAM;IAAEC;EAAc,CAAC,GAAGT,MAAM,CAAEL,WAAW,CAAEI,aAAc,CAAE,CAAC;EAChE,MAAMW,oBAAoB,GAAGjB,MAAM,CAAEa,UAAW,CAAC;EACjD,MAAM;IAAEK,M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**
11
11
  * Internal dependencies
12
12
  */
13
- import { store as editSiteStore } from '../../store';
13
+ import useEditedEntityRecord from '../use-edited-entity-record';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  import { Fragment as _Fragment } from "react/jsx-runtime";
16
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -18,17 +18,27 @@ export default function WelcomeGuideTemplate() {
18
18
  const {
19
19
  toggle
20
20
  } = useDispatch(preferencesStore);
21
- const isVisible = useSelect(select => {
22
- const isTemplateActive = !!select(preferencesStore).get('core/edit-site', 'welcomeGuideTemplate');
23
- const isEditorActive = !!select(preferencesStore).get('core/edit-site', 'welcomeGuide');
24
- const {
25
- isPage
26
- } = select(editSiteStore);
21
+ const {
22
+ isLoaded,
23
+ record
24
+ } = useEditedEntityRecord();
25
+ const isPostTypeTemplate = isLoaded && record.type === 'wp_template';
26
+ const {
27
+ isActive,
28
+ hasPreviousEntity
29
+ } = useSelect(select => {
27
30
  const {
28
- getCurrentPostType
31
+ getEditorSettings
29
32
  } = select(editorStore);
30
- return isTemplateActive && !isEditorActive && isPage() && getCurrentPostType() === 'wp_template';
33
+ const {
34
+ get
35
+ } = select(preferencesStore);
36
+ return {
37
+ isActive: get('core/edit-site', 'welcomeGuideTemplate'),
38
+ hasPreviousEntity: !!getEditorSettings().onNavigateToPreviousEntityRecord
39
+ };
31
40
  }, []);
41
+ const isVisible = isActive && isPostTypeTemplate && hasPreviousEntity;
32
42
  if (!isVisible) {
33
43
  return null;
34
44
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useSelect","Guide","__","store","preferencesStore","editorStore","editSiteStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggle","isVisible","select","isTemplateActive","get","isEditorActive","isPage","getCurrentPostType","heading","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","type","content"],"sources":["@wordpress/edit-site/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isTemplateActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuideTemplate'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\tconst { isPage } = select( editSiteStore );\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn (\n\t\t\tisTemplateActive &&\n\t\t\t! isEditorActive &&\n\t\t\tisPage() &&\n\t\t\tgetCurrentPostType() === 'wp_template'\n\t\t);\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASF,KAAK,IAAIG,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAGf,WAAW,CAAEK,gBAAiB,CAAC;EAElD,MAAMW,SAAS,GAAGf,SAAS,CAAIgB,MAAM,IAAM;IAC1C,MAAMC,gBAAgB,GAAG,CAAC,CAAED,MAAM,CAAEZ,gBAAiB,CAAC,CAACc,GAAG,CACzD,gBAAgB,EAChB,sBACD,CAAC;IACD,MAAMC,cAAc,GAAG,CAAC,CAAE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ispatch","useSelect","Guide","__","store","preferencesStore","editorStore","useEditedEntityRecord","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggle","isLoaded","record","isPostTypeTemplate","type","isActive","hasPreviousEntity","select","getEditorSettings","get","onNavigateToPreviousEntityRecord","isVisible","heading","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","content"],"sources":["@wordpress/edit-site/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isLoaded, record } = useEditedEntityRecord();\n\tconst isPostTypeTemplate = isLoaded && record.type === 'wp_template';\n\tconst { isActive, hasPreviousEntity } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\treturn {\n\t\t\tisActive: get( 'core/edit-site', 'welcomeGuideTemplate' ),\n\t\t\thasPreviousEntity:\n\t\t\t\t!! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\tconst isVisible = isActive && isPostTypeTemplate && hasPreviousEntity;\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEhE,eAAe,SAASC,oBAA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ACnErB,IAAI,EAAC;QAAW,CAChB;MAAC,CACI,CACP;MACDsB,OAAO,eACN5B,KAAA,CAAAF,SAAA;QAAA4B,QAAA,gBACC9B,IAAA;UAAImB,SAAS,EAAC,kCAAkC;UAAAW,QAAA,EAC7CZ;QAAO,CACN,CAAC,eACLlB,IAAA;UAAGmB,SAAS,EAAC,+BAA+B;UAAAW,QAAA,EACzCpC,EAAE,CACH,4MACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -257,10 +257,8 @@ function useGlobalStylesOpenRevisionsCommands() {
257
257
  }
258
258
  export function useCommonCommands() {
259
259
  const homeUrl = useSelect(select => {
260
- const {
261
- getUnstableBase // Site index.
262
- } = select(coreStore);
263
- return getUnstableBase()?.home;
260
+ // Site index.
261
+ return select(coreStore).getEntityRecord('root', '__unstableBase')?.home;
264
262
  }, []);
265
263
  useCommand({
266
264
  name: 'core/edit-site/view-site',
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useDispatch","useSelect","__","isRTL","rotateLeft","rotateRight","backup","help","styles","external","brush","useCommandLoader","useCommand","privateApis","blockEditorPrivateApis","routerPrivateApis","store","preferencesStore","coreStore","unlock","editSiteStore","useGlobalStylesReset","useHistory","useLocation","useGlobalStylesOpenStylesCommands","openGeneralSidebar","setCanvasMode","params","getCanvasMode","history","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","commands","name","label","callback","close","postId","push","path","canvas","icon","isLoading","useGlobalStylesToggleWelcomeGuideCommands","set","setTimeout","useGlobalStylesResetCommands","canReset","onReset","useGlobalStylesOpenCssCommands","setEditorCanvasContainerView","canEditCSS","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","useGlobalStylesOpenRevisionsCommands","hasRevisions","count","useCommonCommands","homeUrl","getUnstableBase","home","window","open","hook"],"sources":["@wordpress/edit-site/src/hooks/commands/use-common-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\trotateLeft,\n\trotateRight,\n\tbackup,\n\thelp,\n\tstyles,\n\texternal,\n\tbrush,\n} from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nfunction useGlobalStylesOpenStylesCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst history = useHistory();\n\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles',\n\t\t\t\tlabel: __( 'Open styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t},\n\t\t\t\ticon: styles,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { set } = useDispatch( preferencesStore );\n\n\tconst history = useHistory();\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t}, 500 );\n\t\t\t\t},\n\t\t\t\ticon: help,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tset,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesResetCommands() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst commands = useMemo( () => {\n\t\tif ( ! canReset ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tonReset();\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ canReset, onReset ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenCssCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! canEditCSS ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\tlabel: __( 'Customize CSS' ),\n\t\t\t\ticon: brush,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanEditCSS,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenRevisionsCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst hasRevisions = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! hasRevisions ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\t\t\tlabel: __( 'Style revisions' ),\n\t\t\t\ticon: backup,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thasRevisions,\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useCommonCommands() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn getUnstableBase()?.home;\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles',\n\t\thook: useGlobalStylesOpenStylesCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: useGlobalStylesToggleWelcomeGuideCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: useGlobalStylesResetCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: useGlobalStylesOpenCssCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: useGlobalStylesOpenRevisionsCommands,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SACCC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,MAAM,EACNC,QAAQ,EACRC,KAAK,QACC,kBAAkB;AACzB,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,qBAAqB;AAClE,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASD,WAAW,IAAIE,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASH,KAAK,IAAII,aAAa,QAAQ,aAAa;AAEpD,MAAM;EAAEC;AAAqB,CAAC,GAAGF,MAAM,CAAEL,sBAAuB,CAAC;AACjE,MAAM;EAAEQ,UAAU;EAAEC;AAAY,CAAC,GAAGJ,MAAM,CAAEJ,iBAAkB,CAAC;AAE/D,SAASS,iCAAiCA,CAAA,EAAG;EAC5C,MAAM;IAAEC,kBAAkB;IAAEC;EAAc,CAAC,GAAGP,MAAM,CACnDnB,WAAW,CAAEoB,aAAc,CAC5B,CAAC;EACD,MAAM;IAAEO;EAAO,CAAC,GAAGJ,WAAW,CAAC,CAAC;EAChC,MAAM;IAAEK;EAAc,CAAC,GAAGT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,IAAI,EAAET;EACP,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","useDispatch","useSelect","__","isRTL","rotateLeft","rotateRight","backup","help","styles","external","brush","useCommandLoader","useCommand","privateApis","blockEditorPrivateApis","routerPrivateApis","store","preferencesStore","coreStore","unlock","editSiteStore","useGlobalStylesReset","useHistory","useLocation","useGlobalStylesOpenStylesCommands","openGeneralSidebar","setCanvasMode","params","getCanvasMode","history","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","commands","name","label","callback","close","postId","push","path","canvas","icon","isLoading","useGlobalStylesToggleWelcomeGuideCommands","set","setTimeout","useGlobalStylesResetCommands","canReset","onReset","useGlobalStylesOpenCssCommands","setEditorCanvasContainerView","canEditCSS","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","useGlobalStylesOpenRevisionsCommands","hasRevisions","count","useCommonCommands","homeUrl","home","window","open","hook"],"sources":["@wordpress/edit-site/src/hooks/commands/use-common-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\trotateLeft,\n\trotateRight,\n\tbackup,\n\thelp,\n\tstyles,\n\texternal,\n\tbrush,\n} from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nfunction useGlobalStylesOpenStylesCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst history = useHistory();\n\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles',\n\t\t\t\tlabel: __( 'Open styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t},\n\t\t\t\ticon: styles,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { set } = useDispatch( preferencesStore );\n\n\tconst history = useHistory();\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t}, 500 );\n\t\t\t\t},\n\t\t\t\ticon: help,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tset,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesResetCommands() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst commands = useMemo( () => {\n\t\tif ( ! canReset ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tonReset();\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ canReset, onReset ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenCssCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! canEditCSS ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\tlabel: __( 'Customize CSS' ),\n\t\t\t\ticon: brush,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanEditCSS,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenRevisionsCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst hasRevisions = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! hasRevisions ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\t\t\tlabel: __( 'Style revisions' ),\n\t\t\t\ticon: backup,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thasRevisions,\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useCommonCommands() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles',\n\t\thook: useGlobalStylesOpenStylesCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: useGlobalStylesToggleWelcomeGuideCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: useGlobalStylesResetCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: useGlobalStylesOpenCssCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: useGlobalStylesOpenRevisionsCommands,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SACCC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,MAAM,EACNC,QAAQ,EACRC,KAAK,QACC,kBAAkB;AACzB,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,qBAAqB;AAClE,SAASC,WAAW,IAAIC,sBAAsB,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Y,CAAC;IACxBmC,QAAQ,EAAEA,CAAE;MAAEC;IAAM,CAAC,KAAM;MAC1BA,KAAK,CAAC,CAAC;MACP4B,MAAM,CAACC,IAAI,CAAEH,OAAO,EAAE,QAAS,CAAC;IACjC,CAAC;IACDrB,IAAI,EAAElC;EACP,CAAE,CAAC;EAEHE,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,4BAA4B;IAClCiC,IAAI,EAAE5C;EACP,CAAE,CAAC;EAEHb,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,4CAA4C;IAClDiC,IAAI,EAAEvB;EACP,CAAE,CAAC;EAEHlC,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,oCAAoC;IAC1CiC,IAAI,EAAEpB;EACP,CAAE,CAAC;EAEHrC,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,gCAAgC;IACtCiC,IAAI,EAAEjB;EACP,CAAE,CAAC;EAEHxC,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,sCAAsC;IAC5CiC,IAAI,EAAER;EACP,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -117,6 +117,8 @@
117
117
  container: dataviews-wrapper/inline-size;
118
118
  display: flex;
119
119
  flex-direction: column;
120
+ font-size: 13px;
121
+ line-height: 1.4;
120
122
  }
121
123
 
122
124
  .dataviews__view-actions,
@@ -218,53 +220,16 @@
218
220
  padding-left: 24px;
219
221
  }
220
222
  }
221
- .dataviews-bulk-actions__modal {
222
- z-index: 1000001;
223
- }
224
-
225
- .dataviews-bulk-actions__edit-button.components-button {
226
- flex-shrink: 0;
223
+ .dataviews-bulk-actions-footer__item-count {
224
+ color: #1e1e1e;
225
+ font-weight: 500;
226
+ font-size: 11px;
227
+ text-transform: uppercase;
227
228
  }
228
229
 
229
- .dataviews-bulk-actions-toolbar {
230
- position: sticky;
231
- display: flex;
232
- flex-direction: column;
233
- align-content: center;
234
- flex-wrap: wrap;
235
- width: -moz-fit-content;
236
- width: fit-content;
237
- margin-right: auto;
230
+ .dataviews-bulk-actions-footer__container {
238
231
  margin-left: auto;
239
- bottom: 24px;
240
- z-index: 2;
241
- }
242
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar {
243
- border-color: #ddd;
244
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
245
- }
246
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar .components-toolbar-group {
247
- border-color: #e0e0e0;
248
- }
249
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar .components-toolbar-group:last-child {
250
- border: 0;
251
- }
252
- .dataviews-bulk-actions-toolbar .dataviews-bulk-actions-toolbar__selection-count {
253
- display: flex;
254
- align-items: center;
255
- margin: 0 8px 0 8px;
256
- }
257
-
258
- .dataviews-bulk-actions-toolbar__wrapper {
259
- display: flex;
260
- flex-grow: 1;
261
- width: 100%;
262
- }
263
- .dataviews-bulk-actions-toolbar__wrapper .components-toolbar-group {
264
- align-items: center;
265
- }
266
- .dataviews-bulk-actions-toolbar__wrapper .components-button.is-busy {
267
- max-height: 36px;
232
+ min-height: 32px;
268
233
  }
269
234
 
270
235
  .dataviews-filters__button {
@@ -282,11 +247,17 @@
282
247
  opacity: 1;
283
248
  }
284
249
 
250
+ .dataviews-filters__summary-popover {
251
+ font-size: 13px;
252
+ line-height: 1.4;
253
+ }
285
254
  .dataviews-filters__summary-popover .components-popover__content {
286
255
  width: 230px;
287
- padding: 0;
288
256
  border-radius: 4px;
289
257
  }
258
+ .dataviews-filters__summary-popover.components-dropdown__content .components-popover__content {
259
+ padding: 0;
260
+ }
290
261
 
291
262
  .dataviews-filters__summary-operators-container {
292
263
  padding: 8px 8px 0;
@@ -317,6 +288,7 @@
317
288
  position: relative;
318
289
  display: flex;
319
290
  align-items: center;
291
+ box-sizing: border-box;
320
292
  }
321
293
  .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset {
322
294
  padding-inline-end: 28px;
@@ -528,6 +500,7 @@
528
500
  font-size: 11px;
529
501
  outline: var(--wp-admin-border-width-focus) solid #fff;
530
502
  color: #fff;
503
+ box-sizing: border-box;
531
504
  }
532
505
 
533
506
  .dataviews-search {
@@ -535,7 +508,7 @@
535
508
  width: fit-content;
536
509
  }
537
510
 
538
- .dataviews-pagination {
511
+ .dataviews-footer {
539
512
  position: sticky;
540
513
  bottom: 0;
541
514
  right: 0;
@@ -544,14 +517,37 @@
544
517
  border-top: 1px solid #f0f0f0;
545
518
  flex-shrink: 0;
546
519
  transition: padding ease-out 0.1s;
520
+ z-index: 2;
547
521
  }
548
522
  @media (prefers-reduced-motion: reduce) {
549
- .dataviews-pagination {
523
+ .dataviews-footer {
550
524
  transition-duration: 0s;
551
525
  transition-delay: 0s;
552
526
  }
553
527
  }
554
528
 
529
+ /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
530
+ @container (max-width: 430px) {
531
+ .dataviews-footer {
532
+ padding: 12px 24px;
533
+ }
534
+ }
535
+ /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
536
+ @container (max-width: 560px) {
537
+ .dataviews-footer {
538
+ flex-direction: column !important;
539
+ }
540
+ .dataviews-footer .dataviews-bulk-actions-footer__container {
541
+ width: 100%;
542
+ }
543
+ .dataviews-footer .dataviews-bulk-actions-footer__item-count {
544
+ flex-grow: 1;
545
+ }
546
+ .dataviews-footer .dataviews-pagination {
547
+ width: 100%;
548
+ justify-content: space-between;
549
+ }
550
+ }
555
551
  .dataviews-pagination__page-select {
556
552
  font-size: 11px;
557
553
  font-weight: 500;
@@ -564,12 +560,6 @@
564
560
  }
565
561
  }
566
562
 
567
- /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
568
- @container (max-width: 430px) {
569
- .dataviews-pagination {
570
- padding: 12px 24px;
571
- }
572
- }
573
563
  .dataviews-action-modal {
574
564
  z-index: 1000001;
575
565
  }
@@ -593,6 +583,8 @@
593
583
  /* stylelint-disable-next-line property-no-unknown -- the linter needs to be updated to accepted the container-type property */
594
584
  container-type: inline-size;
595
585
  padding: 16px;
586
+ font-size: 13px;
587
+ line-height: 1.4;
596
588
  }
597
589
 
598
590
  .dataviews-view-config__sort-direction .components-toggle-group-control-option-base {
@@ -620,6 +612,10 @@
620
612
  grid-column: span 4;
621
613
  }
622
614
 
615
+ .dataviews-settings-section:has(.dataviews-settings-section__content:empty) {
616
+ display: none;
617
+ }
618
+
623
619
  /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
624
620
  @container (max-width: 500px) {
625
621
  .dataviews-settings-section.dataviews-settings-section {
@@ -632,6 +628,25 @@
632
628
  grid-column: span 2;
633
629
  }
634
630
  }
631
+ .dataviews-field-control__field {
632
+ height: 32px;
633
+ }
634
+
635
+ .dataviews-field-control__actions {
636
+ position: absolute;
637
+ top: -9999em;
638
+ }
639
+
640
+ .dataviews-field-control__actions.dataviews-field-control__actions {
641
+ gap: 4px;
642
+ }
643
+
644
+ .dataviews-field-control__field:hover .dataviews-field-control__actions,
645
+ .dataviews-field-control__field:focus-within .dataviews-field-control__actions {
646
+ position: unset;
647
+ top: unset;
648
+ }
649
+
635
650
  .dataviews-view-grid {
636
651
  margin-bottom: auto;
637
652
  grid-template-rows: max-content;
@@ -781,6 +796,10 @@
781
796
  top: 8px;
782
797
  }
783
798
 
799
+ ul.dataviews-view-list {
800
+ list-style-type: none;
801
+ }
802
+
784
803
  .dataviews-view-list {
785
804
  margin: 0 0 auto;
786
805
  }
@@ -834,12 +853,13 @@
834
853
  .dataviews-view-list li:not(.is-selected) .dataviews-view-list__primary-field {
835
854
  color: #1e1e1e;
836
855
  }
837
- .dataviews-view-list li:not(.is-selected):hover, .dataviews-view-list li:not(.is-selected):focus-within {
856
+ .dataviews-view-list li:not(.is-selected):hover, .dataviews-view-list li:not(.is-selected).is-hovered, .dataviews-view-list li:not(.is-selected):focus-within {
838
857
  color: var(--wp-admin-theme-color);
839
858
  background-color: #f8f8f8;
840
859
  }
841
860
  .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__primary-field,
842
- .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__primary-field,
861
+ .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected).is-hovered .dataviews-view-list__primary-field,
862
+ .dataviews-view-list li:not(.is-selected).is-hovered .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__primary-field,
843
863
  .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__fields {
844
864
  color: var(--wp-admin-theme-color);
845
865
  }
@@ -855,6 +875,7 @@
855
875
  color: var(--wp-admin-theme-color);
856
876
  }
857
877
  .dataviews-view-list .dataviews-view-list__item {
878
+ box-sizing: border-box;
858
879
  padding: 16px 24px;
859
880
  width: 100%;
860
881
  scroll-margin: 8px 0;
@@ -862,7 +883,7 @@
862
883
  .dataviews-view-list .dataviews-view-list__item:focus-visible::before {
863
884
  position: absolute;
864
885
  content: "";
865
- top: calc(var(--wp-admin-border-width-focus) + 1px);
886
+ top: var(--wp-admin-border-width-focus);
866
887
  left: var(--wp-admin-border-width-focus);
867
888
  bottom: var(--wp-admin-border-width-focus);
868
889
  right: var(--wp-admin-border-width-focus);
@@ -899,8 +920,8 @@
899
920
  border-radius: 4px;
900
921
  }
901
922
  .dataviews-view-list .dataviews-view-list__media-placeholder {
902
- min-width: 32px;
903
- height: 32px;
923
+ width: 52px;
924
+ height: 52px;
904
925
  background-color: #e0e0e0;
905
926
  }
906
927
  .dataviews-view-list .dataviews-view-list__field-wrapper {
@@ -939,11 +960,6 @@
939
960
  color: #757575;
940
961
  margin-bottom: auto;
941
962
  }
942
- .dataviews-view-table a {
943
- text-decoration: none;
944
- color: #1e1e1e;
945
- font-weight: 500;
946
- }
947
963
  .dataviews-view-table th {
948
964
  text-align: right;
949
965
  color: #1e1e1e;
@@ -1404,24 +1420,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1404
1420
  padding-left: 16px;
1405
1421
  }
1406
1422
 
1407
- .edit-site-layout.is-full-canvas .edit-site-layout__view-mode-toggle.components-button:focus-visible, .edit-site-layout.is-full-canvas .edit-site-layout__view-mode-toggle.components-button:focus {
1408
- box-shadow: none;
1409
- outline: none;
1410
- outline-offset: 0;
1411
- }
1412
- .edit-site-layout.is-full-canvas .edit-site-layout__view-mode-toggle.components-button:focus-visible .edit-site-site-icon svg, .edit-site-layout.is-full-canvas .edit-site-layout__view-mode-toggle.components-button:focus .edit-site-site-icon svg {
1413
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #3858e9);
1414
- outline: 3px solid #0000;
1415
- height: 40px;
1416
- width: 40px;
1417
- padding: 2px;
1418
- border-radius: 2px;
1419
- }
1420
-
1421
1423
  .edit-site-page {
1422
1424
  color: #2f2f2f;
1423
1425
  background: #fff;
1424
- height: 100%;
1426
+ height: calc(100% - 60px);
1425
1427
  /* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
1426
1428
  container: edit-site-page/inline-size;
1427
1429
  transition: width ease-out 0.2s;
@@ -1432,6 +1434,11 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1432
1434
  transition-delay: 0s;
1433
1435
  }
1434
1436
  }
1437
+ @media (min-width: 782px) {
1438
+ .edit-site-page {
1439
+ height: 100%;
1440
+ }
1441
+ }
1435
1442
 
1436
1443
  .edit-site-page-header {
1437
1444
  padding: 16px 48px;
@@ -1513,7 +1520,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1513
1520
  contain: content;
1514
1521
  }
1515
1522
 
1516
- @keyframes _qeulx_slide-from-right {
1523
+ @keyframes _ng7tj_slide-from-right {
1517
1524
  from {
1518
1525
  transform: translateX(-50px);
1519
1526
  opacity: 0;
@@ -1523,7 +1530,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1523
1530
  opacity: 1;
1524
1531
  }
1525
1532
  }
1526
- @keyframes _qeulx_slide-from-left {
1533
+ @keyframes _ng7tj_slide-from-left {
1527
1534
  from {
1528
1535
  transform: translateX(50px);
1529
1536
  opacity: 0;
@@ -1579,10 +1586,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1579
1586
  }
1580
1587
  }
1581
1588
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1582
- animation-name: _qeulx_slide-from-left;
1589
+ animation-name: _ng7tj_slide-from-left;
1583
1590
  }
1584
1591
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1585
- animation-name: _qeulx_slide-from-right;
1592
+ animation-name: _ng7tj_slide-from-right;
1586
1593
  }
1587
1594
 
1588
1595
  .edit-site-site-hub {
@@ -1691,7 +1698,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1691
1698
 
1692
1699
  .edit-site-editor-canvas-container__section {
1693
1700
  background: #fff;
1694
- border-radius: 2px;
1701
+ border-radius: 8px;
1695
1702
  bottom: 0;
1696
1703
  right: 0;
1697
1704
  overflow: hidden;