@wordpress/edit-post 8.36.1-next.6deb34194.0 → 8.36.1-next.738bb1424.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/{use-commands.js → use-commands.cjs} +1 -1
- package/build/components/back-button/{fullscreen-mode-close.js → fullscreen-mode-close.cjs} +2 -2
- package/build/components/back-button/{index.js → index.cjs} +3 -3
- package/build/components/browser-url/{index.js → index.cjs} +1 -1
- package/build/components/editor-initialization/{index.js → index.cjs} +2 -2
- package/build/components/editor-initialization/{listener-hooks.js → listener-hooks.cjs} +2 -2
- package/build/components/init-pattern-modal/{index.js → index.cjs} +1 -3
- package/build/components/init-pattern-modal/{index.js.map → index.cjs.map} +2 -2
- package/build/components/keyboard-shortcuts/{index.js → index.cjs} +2 -2
- package/build/components/layout/{index.js → index.cjs} +19 -17
- package/build/components/layout/{index.js.map → index.cjs.map} +2 -2
- package/build/components/layout/{use-should-iframe.js → use-should-iframe.cjs} +2 -2
- package/build/components/meta-boxes/{index.js → index.cjs} +4 -4
- package/build/components/meta-boxes/{meta-box-visibility.js → meta-box-visibility.cjs} +1 -1
- package/build/components/meta-boxes/meta-boxes-area/{index.js → index.cjs} +3 -3
- package/build/components/meta-boxes/{use-meta-box-initialization.js → use-meta-box-initialization.cjs} +2 -2
- package/build/components/more-menu/{index.js → index.cjs} +5 -5
- package/build/components/more-menu/{manage-patterns-menu-item.js → manage-patterns-menu-item.cjs} +1 -1
- package/build/components/more-menu/{welcome-guide-menu-item.js → welcome-guide-menu-item.cjs} +1 -1
- package/build/components/preferences-modal/{enable-custom-fields.js → enable-custom-fields.cjs} +2 -2
- package/build/components/preferences-modal/{enable-panel.js → enable-panel.cjs} +2 -2
- package/build/components/preferences-modal/{index.js → index.cjs} +3 -3
- package/build/components/preferences-modal/{meta-boxes-section.js → meta-boxes-section.cjs} +5 -5
- package/build/components/welcome-guide/{default.js → default.cjs} +3 -3
- package/build/components/welcome-guide/{image.js → image.cjs} +1 -1
- package/build/components/welcome-guide/{index.js → index.cjs} +4 -4
- package/build/components/welcome-guide/{template.js → template.cjs} +3 -3
- package/build/{deprecated.js → deprecated.cjs} +3 -3
- package/build/hooks/{use-navigate-to-entity-record.js → use-navigate-to-entity-record.cjs} +28 -8
- package/build/hooks/use-navigate-to-entity-record.cjs.map +7 -0
- package/build/{index.js → index.cjs} +8 -8
- package/build/{index.js.map → index.cjs.map} +1 -1
- package/build/{lock-unlock.js → lock-unlock.cjs} +1 -1
- package/build/store/{actions.js → actions.cjs} +5 -5
- package/build/store/{constants.js → constants.cjs} +1 -1
- package/build/store/{index.js → index.cjs} +5 -5
- package/build/store/{reducer.js → reducer.cjs} +1 -1
- package/build/store/{selectors.js → selectors.cjs} +3 -3
- package/build/utils/{meta-boxes.js → meta-boxes.cjs} +1 -1
- package/build-module/components/back-button/index.js +2 -2
- package/build-module/components/editor-initialization/index.js +1 -1
- package/build-module/components/editor-initialization/listener-hooks.js +1 -1
- package/build-module/components/init-pattern-modal/index.js +0 -2
- package/build-module/components/init-pattern-modal/index.js.map +2 -2
- package/build-module/components/keyboard-shortcuts/index.js +1 -1
- package/build-module/components/layout/index.js +17 -15
- package/build-module/components/layout/index.js.map +2 -2
- package/build-module/components/layout/use-should-iframe.js +1 -1
- package/build-module/components/meta-boxes/index.js +3 -3
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -1
- package/build-module/components/meta-boxes/use-meta-box-initialization.js +1 -1
- package/build-module/components/more-menu/index.js +4 -4
- package/build-module/components/preferences-modal/enable-custom-fields.js +1 -1
- package/build-module/components/preferences-modal/enable-panel.js +1 -1
- package/build-module/components/preferences-modal/index.js +2 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js +4 -4
- package/build-module/components/welcome-guide/default.js +2 -2
- package/build-module/components/welcome-guide/index.js +3 -3
- package/build-module/components/welcome-guide/template.js +2 -2
- package/build-module/deprecated.js +1 -1
- package/build-module/hooks/use-navigate-to-entity-record.js +28 -8
- package/build-module/hooks/use-navigate-to-entity-record.js.map +3 -3
- package/build-module/index.js +5 -5
- package/build-module/store/actions.js +2 -2
- package/build-module/store/index.js +4 -4
- package/build-module/store/selectors.js +1 -1
- package/build-style/style-rtl.css +1 -120
- package/build-style/style.css +1 -120
- package/package.json +44 -35
- package/src/components/init-pattern-modal/index.js +0 -2
- package/src/components/layout/index.js +2 -0
- package/src/hooks/use-navigate-to-entity-record.js +40 -8
- package/src/style.scss +0 -2
- package/build/hooks/use-navigate-to-entity-record.js.map +0 -7
- /package/build/commands/{use-commands.js.map → use-commands.cjs.map} +0 -0
- /package/build/components/back-button/{fullscreen-mode-close.js.map → fullscreen-mode-close.cjs.map} +0 -0
- /package/build/components/back-button/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/browser-url/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/editor-initialization/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/editor-initialization/{listener-hooks.js.map → listener-hooks.cjs.map} +0 -0
- /package/build/components/keyboard-shortcuts/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/layout/{use-should-iframe.js.map → use-should-iframe.cjs.map} +0 -0
- /package/build/components/meta-boxes/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/meta-boxes/{meta-box-visibility.js.map → meta-box-visibility.cjs.map} +0 -0
- /package/build/components/meta-boxes/meta-boxes-area/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/meta-boxes/{use-meta-box-initialization.js.map → use-meta-box-initialization.cjs.map} +0 -0
- /package/build/components/more-menu/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/more-menu/{manage-patterns-menu-item.js.map → manage-patterns-menu-item.cjs.map} +0 -0
- /package/build/components/more-menu/{welcome-guide-menu-item.js.map → welcome-guide-menu-item.cjs.map} +0 -0
- /package/build/components/preferences-modal/{enable-custom-fields.js.map → enable-custom-fields.cjs.map} +0 -0
- /package/build/components/preferences-modal/{enable-panel.js.map → enable-panel.cjs.map} +0 -0
- /package/build/components/preferences-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/preferences-modal/{meta-boxes-section.js.map → meta-boxes-section.cjs.map} +0 -0
- /package/build/components/welcome-guide/{default.js.map → default.cjs.map} +0 -0
- /package/build/components/welcome-guide/{image.js.map → image.cjs.map} +0 -0
- /package/build/components/welcome-guide/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/welcome-guide/{template.js.map → template.cjs.map} +0 -0
- /package/build/{deprecated.js.map → deprecated.cjs.map} +0 -0
- /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
- /package/build/store/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/store/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/store/{index.js.map → index.cjs.map} +0 -0
- /package/build/store/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/store/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/utils/{meta-boxes.js.map → meta-boxes.cjs.map} +0 -0
package/build-style/style.css
CHANGED
|
@@ -203,6 +203,7 @@
|
|
|
203
203
|
background: #fff;
|
|
204
204
|
position: sticky;
|
|
205
205
|
top: 0;
|
|
206
|
+
z-index: 1;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
.admin-ui-page__sidebar-toggle-slot:empty {
|
|
@@ -714,124 +715,4 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
|
|
|
714
715
|
.block-editor__container img {
|
|
715
716
|
max-width: 100%;
|
|
716
717
|
height: auto;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
body.admin-color-light {
|
|
720
|
-
--wp-admin-theme-color: #0085ba;
|
|
721
|
-
--wp-admin-theme-color--rgb: 0, 133, 186;
|
|
722
|
-
--wp-admin-theme-color-darker-10: rgb(0, 114.7661290323, 160.5);
|
|
723
|
-
--wp-admin-theme-color-darker-10--rgb: 0, 114.7661290323, 160.5;
|
|
724
|
-
--wp-admin-theme-color-darker-20: rgb(0, 96.5322580645, 135);
|
|
725
|
-
--wp-admin-theme-color-darker-20--rgb: 0, 96.5322580645, 135;
|
|
726
|
-
--wp-admin-border-width-focus: 2px;
|
|
727
|
-
}
|
|
728
|
-
@media (min-resolution: 192dpi) {
|
|
729
|
-
body.admin-color-light {
|
|
730
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
body.admin-color-modern {
|
|
735
|
-
--wp-admin-theme-color: #3858e9;
|
|
736
|
-
--wp-admin-theme-color--rgb: 56, 88, 233;
|
|
737
|
-
--wp-admin-theme-color-darker-10: rgb(33.0384615385, 68.7307692308, 230.4615384615);
|
|
738
|
-
--wp-admin-theme-color-darker-10--rgb: 33.0384615385, 68.7307692308, 230.4615384615;
|
|
739
|
-
--wp-admin-theme-color-darker-20: rgb(23.6923076923, 58.1538461538, 214.3076923077);
|
|
740
|
-
--wp-admin-theme-color-darker-20--rgb: 23.6923076923, 58.1538461538, 214.3076923077;
|
|
741
|
-
--wp-admin-border-width-focus: 2px;
|
|
742
|
-
}
|
|
743
|
-
@media (min-resolution: 192dpi) {
|
|
744
|
-
body.admin-color-modern {
|
|
745
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
body.admin-color-blue {
|
|
750
|
-
--wp-admin-theme-color: #096484;
|
|
751
|
-
--wp-admin-theme-color--rgb: 9, 100, 132;
|
|
752
|
-
--wp-admin-theme-color-darker-10: rgb(7.3723404255, 81.914893617, 108.1276595745);
|
|
753
|
-
--wp-admin-theme-color-darker-10--rgb: 7.3723404255, 81.914893617, 108.1276595745;
|
|
754
|
-
--wp-admin-theme-color-darker-20: rgb(5.7446808511, 63.829787234, 84.2553191489);
|
|
755
|
-
--wp-admin-theme-color-darker-20--rgb: 5.7446808511, 63.829787234, 84.2553191489;
|
|
756
|
-
--wp-admin-border-width-focus: 2px;
|
|
757
|
-
}
|
|
758
|
-
@media (min-resolution: 192dpi) {
|
|
759
|
-
body.admin-color-blue {
|
|
760
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
body.admin-color-coffee {
|
|
765
|
-
--wp-admin-theme-color: #46403c;
|
|
766
|
-
--wp-admin-theme-color--rgb: 70, 64, 60;
|
|
767
|
-
--wp-admin-theme-color-darker-10: rgb(56.2692307692, 51.4461538462, 48.2307692308);
|
|
768
|
-
--wp-admin-theme-color-darker-10--rgb: 56.2692307692, 51.4461538462, 48.2307692308;
|
|
769
|
-
--wp-admin-theme-color-darker-20: rgb(42.5384615385, 38.8923076923, 36.4615384615);
|
|
770
|
-
--wp-admin-theme-color-darker-20--rgb: 42.5384615385, 38.8923076923, 36.4615384615;
|
|
771
|
-
--wp-admin-border-width-focus: 2px;
|
|
772
|
-
}
|
|
773
|
-
@media (min-resolution: 192dpi) {
|
|
774
|
-
body.admin-color-coffee {
|
|
775
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
body.admin-color-ectoplasm {
|
|
780
|
-
--wp-admin-theme-color: #523f6d;
|
|
781
|
-
--wp-admin-theme-color--rgb: 82, 63, 109;
|
|
782
|
-
--wp-admin-theme-color-darker-10: rgb(69.8430232558, 53.6598837209, 92.8401162791);
|
|
783
|
-
--wp-admin-theme-color-darker-10--rgb: 69.8430232558, 53.6598837209, 92.8401162791;
|
|
784
|
-
--wp-admin-theme-color-darker-20: rgb(57.6860465116, 44.3197674419, 76.6802325581);
|
|
785
|
-
--wp-admin-theme-color-darker-20--rgb: 57.6860465116, 44.3197674419, 76.6802325581;
|
|
786
|
-
--wp-admin-border-width-focus: 2px;
|
|
787
|
-
}
|
|
788
|
-
@media (min-resolution: 192dpi) {
|
|
789
|
-
body.admin-color-ectoplasm {
|
|
790
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
body.admin-color-midnight {
|
|
795
|
-
--wp-admin-theme-color: #e14d43;
|
|
796
|
-
--wp-admin-theme-color--rgb: 225, 77, 67;
|
|
797
|
-
--wp-admin-theme-color-darker-10: rgb(221.4908256881, 56.1788990826, 45.0091743119);
|
|
798
|
-
--wp-admin-theme-color-darker-10--rgb: 221.4908256881, 56.1788990826, 45.0091743119;
|
|
799
|
-
--wp-admin-theme-color-darker-20: rgb(207.8348623853, 44.2201834862, 33.1651376147);
|
|
800
|
-
--wp-admin-theme-color-darker-20--rgb: 207.8348623853, 44.2201834862, 33.1651376147;
|
|
801
|
-
--wp-admin-border-width-focus: 2px;
|
|
802
|
-
}
|
|
803
|
-
@media (min-resolution: 192dpi) {
|
|
804
|
-
body.admin-color-midnight {
|
|
805
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
body.admin-color-ocean {
|
|
810
|
-
--wp-admin-theme-color: #627c83;
|
|
811
|
-
--wp-admin-theme-color--rgb: 98, 124, 131;
|
|
812
|
-
--wp-admin-theme-color-darker-10: rgb(87.0873362445, 110.192139738, 116.4126637555);
|
|
813
|
-
--wp-admin-theme-color-darker-10--rgb: 87.0873362445, 110.192139738, 116.4126637555;
|
|
814
|
-
--wp-admin-theme-color-darker-20: rgb(76.1746724891, 96.384279476, 101.8253275109);
|
|
815
|
-
--wp-admin-theme-color-darker-20--rgb: 76.1746724891, 96.384279476, 101.8253275109;
|
|
816
|
-
--wp-admin-border-width-focus: 2px;
|
|
817
|
-
}
|
|
818
|
-
@media (min-resolution: 192dpi) {
|
|
819
|
-
body.admin-color-ocean {
|
|
820
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
body.admin-color-sunrise {
|
|
825
|
-
--wp-admin-theme-color: #dd823b;
|
|
826
|
-
--wp-admin-theme-color--rgb: 221, 130, 59;
|
|
827
|
-
--wp-admin-theme-color-darker-10: rgb(216.8782608696, 116.1847826087, 37.6217391304);
|
|
828
|
-
--wp-admin-theme-color-darker-10--rgb: 216.8782608696, 116.1847826087, 37.6217391304;
|
|
829
|
-
--wp-admin-theme-color-darker-20: rgb(195.147826087, 104.5434782609, 33.852173913);
|
|
830
|
-
--wp-admin-theme-color-darker-20--rgb: 195.147826087, 104.5434782609, 33.852173913;
|
|
831
|
-
--wp-admin-border-width-focus: 2px;
|
|
832
|
-
}
|
|
833
|
-
@media (min-resolution: 192dpi) {
|
|
834
|
-
body.admin-color-sunrise {
|
|
835
|
-
--wp-admin-border-width-focus: 1.5px;
|
|
836
|
-
}
|
|
837
718
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "8.36.1-next.
|
|
3
|
+
"version": "8.36.1-next.738bb1424.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -23,12 +23,21 @@
|
|
|
23
23
|
"node": ">=18.12.0",
|
|
24
24
|
"npm": ">=8.19.2"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"files": [
|
|
27
|
+
"src",
|
|
28
|
+
"build",
|
|
29
|
+
"build-module",
|
|
30
|
+
"build-style",
|
|
31
|
+
"build-types",
|
|
32
|
+
"*.md"
|
|
33
|
+
],
|
|
34
|
+
"type": "module",
|
|
35
|
+
"main": "build/index.cjs",
|
|
27
36
|
"module": "build-module/index.js",
|
|
28
37
|
"exports": {
|
|
29
38
|
".": {
|
|
30
39
|
"import": "./build-module/index.js",
|
|
31
|
-
"default": "./build/index.
|
|
40
|
+
"default": "./build/index.cjs"
|
|
32
41
|
},
|
|
33
42
|
"./package.json": "./package.json"
|
|
34
43
|
},
|
|
@@ -40,37 +49,37 @@
|
|
|
40
49
|
"postbox"
|
|
41
50
|
],
|
|
42
51
|
"dependencies": {
|
|
43
|
-
"@wordpress/a11y": "^4.36.1-next.
|
|
44
|
-
"@wordpress/admin-ui": "^1.4.1-next.
|
|
45
|
-
"@wordpress/api-fetch": "^7.36.1-next.
|
|
46
|
-
"@wordpress/base-styles": "^6.12.1-next.
|
|
47
|
-
"@wordpress/block-editor": "^15.9.1-next.
|
|
48
|
-
"@wordpress/block-library": "^9.36.1-next.
|
|
49
|
-
"@wordpress/blocks": "^15.9.1-next.
|
|
50
|
-
"@wordpress/commands": "^1.36.1-next.
|
|
51
|
-
"@wordpress/components": "^31.0.1-next.
|
|
52
|
-
"@wordpress/compose": "^7.36.1-next.
|
|
53
|
-
"@wordpress/core-data": "^7.36.1-next.
|
|
54
|
-
"@wordpress/data": "^10.36.1-next.
|
|
55
|
-
"@wordpress/deprecated": "^4.36.1-next.
|
|
56
|
-
"@wordpress/dom": "^4.36.1-next.
|
|
57
|
-
"@wordpress/editor": "^14.36.1-next.
|
|
58
|
-
"@wordpress/element": "^6.36.1-next.
|
|
59
|
-
"@wordpress/global-styles-engine": "^1.3.1-next.
|
|
60
|
-
"@wordpress/hooks": "^4.36.1-next.
|
|
61
|
-
"@wordpress/html-entities": "^4.36.1-next.
|
|
62
|
-
"@wordpress/i18n": "^6.9.1-next.
|
|
63
|
-
"@wordpress/icons": "^11.3.1-next.
|
|
64
|
-
"@wordpress/keyboard-shortcuts": "^5.36.1-next.
|
|
65
|
-
"@wordpress/keycodes": "^4.36.1-next.
|
|
66
|
-
"@wordpress/notices": "^5.36.1-next.
|
|
67
|
-
"@wordpress/plugins": "^7.36.1-next.
|
|
68
|
-
"@wordpress/preferences": "^4.36.1-next.
|
|
69
|
-
"@wordpress/private-apis": "^1.36.1-next.
|
|
70
|
-
"@wordpress/url": "^4.36.1-next.
|
|
71
|
-
"@wordpress/viewport": "^6.36.1-next.
|
|
72
|
-
"@wordpress/warning": "^3.36.1-next.
|
|
73
|
-
"@wordpress/widgets": "^4.36.1-next.
|
|
52
|
+
"@wordpress/a11y": "^4.36.1-next.738bb1424.0",
|
|
53
|
+
"@wordpress/admin-ui": "^1.4.1-next.738bb1424.0",
|
|
54
|
+
"@wordpress/api-fetch": "^7.36.1-next.738bb1424.0",
|
|
55
|
+
"@wordpress/base-styles": "^6.12.1-next.738bb1424.0",
|
|
56
|
+
"@wordpress/block-editor": "^15.9.1-next.738bb1424.0",
|
|
57
|
+
"@wordpress/block-library": "^9.36.1-next.738bb1424.0",
|
|
58
|
+
"@wordpress/blocks": "^15.9.1-next.738bb1424.0",
|
|
59
|
+
"@wordpress/commands": "^1.36.1-next.738bb1424.0",
|
|
60
|
+
"@wordpress/components": "^31.0.1-next.738bb1424.0",
|
|
61
|
+
"@wordpress/compose": "^7.36.1-next.738bb1424.0",
|
|
62
|
+
"@wordpress/core-data": "^7.36.1-next.738bb1424.0",
|
|
63
|
+
"@wordpress/data": "^10.36.1-next.738bb1424.0",
|
|
64
|
+
"@wordpress/deprecated": "^4.36.1-next.738bb1424.0",
|
|
65
|
+
"@wordpress/dom": "^4.36.1-next.738bb1424.0",
|
|
66
|
+
"@wordpress/editor": "^14.36.1-next.738bb1424.0",
|
|
67
|
+
"@wordpress/element": "^6.36.1-next.738bb1424.0",
|
|
68
|
+
"@wordpress/global-styles-engine": "^1.3.1-next.738bb1424.0",
|
|
69
|
+
"@wordpress/hooks": "^4.36.1-next.738bb1424.0",
|
|
70
|
+
"@wordpress/html-entities": "^4.36.1-next.738bb1424.0",
|
|
71
|
+
"@wordpress/i18n": "^6.9.1-next.738bb1424.0",
|
|
72
|
+
"@wordpress/icons": "^11.3.1-next.738bb1424.0",
|
|
73
|
+
"@wordpress/keyboard-shortcuts": "^5.36.1-next.738bb1424.0",
|
|
74
|
+
"@wordpress/keycodes": "^4.36.1-next.738bb1424.0",
|
|
75
|
+
"@wordpress/notices": "^5.36.1-next.738bb1424.0",
|
|
76
|
+
"@wordpress/plugins": "^7.36.1-next.738bb1424.0",
|
|
77
|
+
"@wordpress/preferences": "^4.36.1-next.738bb1424.0",
|
|
78
|
+
"@wordpress/private-apis": "^1.36.1-next.738bb1424.0",
|
|
79
|
+
"@wordpress/url": "^4.36.1-next.738bb1424.0",
|
|
80
|
+
"@wordpress/viewport": "^6.36.1-next.738bb1424.0",
|
|
81
|
+
"@wordpress/warning": "^3.36.1-next.738bb1424.0",
|
|
82
|
+
"@wordpress/widgets": "^4.36.1-next.738bb1424.0",
|
|
74
83
|
"clsx": "^2.1.1",
|
|
75
84
|
"memize": "^2.1.0"
|
|
76
85
|
},
|
|
@@ -81,5 +90,5 @@
|
|
|
81
90
|
"publishConfig": {
|
|
82
91
|
"access": "public"
|
|
83
92
|
},
|
|
84
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "ab1b004c0d61c295aa34bc86ea07f979343983ce"
|
|
85
94
|
}
|
|
@@ -59,11 +59,9 @@ export default function InitPatternModal() {
|
|
|
59
59
|
onChange={ setTitle }
|
|
60
60
|
placeholder={ __( 'My pattern' ) }
|
|
61
61
|
className="patterns-create-modal__name-input"
|
|
62
|
-
__nextHasNoMarginBottom
|
|
63
62
|
__next40pxDefaultSize
|
|
64
63
|
/>
|
|
65
64
|
<ToggleControl
|
|
66
|
-
__nextHasNoMarginBottom
|
|
67
65
|
label={ _x( 'Synced', 'pattern (singular)' ) }
|
|
68
66
|
help={ __(
|
|
69
67
|
'Sync this pattern across multiple locations.'
|
|
@@ -412,6 +412,7 @@ function Layout( {
|
|
|
412
412
|
currentPost: { postId: currentPostId, postType: currentPostType },
|
|
413
413
|
onNavigateToEntityRecord,
|
|
414
414
|
onNavigateToPreviousEntityRecord,
|
|
415
|
+
previousSelectedBlockPath,
|
|
415
416
|
} = useNavigateToEntityRecord(
|
|
416
417
|
initialPostId,
|
|
417
418
|
initialPostType,
|
|
@@ -627,6 +628,7 @@ function Layout( {
|
|
|
627
628
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
628
629
|
autoFocus={ ! isWelcomeGuideVisible }
|
|
629
630
|
onActionPerformed={ onActionPerformed }
|
|
631
|
+
initialSelection={ previousSelectedBlockPath }
|
|
630
632
|
extraSidebarPanels={
|
|
631
633
|
showMetaBoxes && <MetaBoxes location="side" />
|
|
632
634
|
}
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useCallback, useReducer } from '@wordpress/element';
|
|
5
5
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
-
import { store as editorStore } from '@wordpress/editor';
|
|
6
|
+
import { store as editorStore, privateApis } from '@wordpress/editor';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { unlock } from '../lock-unlock';
|
|
12
|
+
|
|
13
|
+
const { useGenerateBlockPath } = unlock( privateApis );
|
|
7
14
|
|
|
8
15
|
/**
|
|
9
16
|
* A hook that records the 'entity' history in the post editor as a user
|
|
@@ -25,13 +32,24 @@ export default function useNavigateToEntityRecord(
|
|
|
25
32
|
initialPostType,
|
|
26
33
|
defaultRenderingMode
|
|
27
34
|
) {
|
|
35
|
+
const generateBlockPath = useGenerateBlockPath();
|
|
28
36
|
const [ postHistory, dispatch ] = useReducer(
|
|
29
|
-
(
|
|
37
|
+
(
|
|
38
|
+
historyState,
|
|
39
|
+
{ type, post, previousRenderingMode, selectedBlockPath }
|
|
40
|
+
) => {
|
|
30
41
|
if ( type === 'push' ) {
|
|
31
|
-
|
|
42
|
+
// Update the current item with the selected block path before pushing new item
|
|
43
|
+
const updatedHistory = [ ...historyState ];
|
|
44
|
+
const currentIndex = updatedHistory.length - 1;
|
|
45
|
+
updatedHistory[ currentIndex ] = {
|
|
46
|
+
...updatedHistory[ currentIndex ],
|
|
47
|
+
selectedBlockPath,
|
|
48
|
+
};
|
|
49
|
+
return [ ...updatedHistory, { post, previousRenderingMode } ];
|
|
32
50
|
}
|
|
33
51
|
if ( type === 'pop' ) {
|
|
34
|
-
//
|
|
52
|
+
// Remove the current item from history
|
|
35
53
|
if ( historyState.length > 1 ) {
|
|
36
54
|
return historyState.slice( 0, -1 );
|
|
37
55
|
}
|
|
@@ -44,8 +62,7 @@ export default function useNavigateToEntityRecord(
|
|
|
44
62
|
},
|
|
45
63
|
]
|
|
46
64
|
);
|
|
47
|
-
|
|
48
|
-
const { post, previousRenderingMode } =
|
|
65
|
+
const { post, previousRenderingMode, selectedBlockPath } =
|
|
49
66
|
postHistory[ postHistory.length - 1 ];
|
|
50
67
|
|
|
51
68
|
const { getRenderingMode } = useSelect( editorStore );
|
|
@@ -53,19 +70,32 @@ export default function useNavigateToEntityRecord(
|
|
|
53
70
|
|
|
54
71
|
const onNavigateToEntityRecord = useCallback(
|
|
55
72
|
( params ) => {
|
|
73
|
+
// Generate block path from clientId if provided
|
|
74
|
+
const blockPath = params.selectedBlockClientId
|
|
75
|
+
? generateBlockPath( params.selectedBlockClientId )
|
|
76
|
+
: null;
|
|
77
|
+
|
|
56
78
|
dispatch( {
|
|
57
79
|
type: 'push',
|
|
58
80
|
post: { postId: params.postId, postType: params.postType },
|
|
59
81
|
// Save the current rendering mode so we can restore it when navigating back.
|
|
60
82
|
previousRenderingMode: getRenderingMode(),
|
|
83
|
+
selectedBlockPath: blockPath,
|
|
61
84
|
} );
|
|
62
85
|
setRenderingMode( defaultRenderingMode );
|
|
63
86
|
},
|
|
64
|
-
[
|
|
87
|
+
[
|
|
88
|
+
getRenderingMode,
|
|
89
|
+
setRenderingMode,
|
|
90
|
+
defaultRenderingMode,
|
|
91
|
+
generateBlockPath,
|
|
92
|
+
]
|
|
65
93
|
);
|
|
66
94
|
|
|
67
95
|
const onNavigateToPreviousEntityRecord = useCallback( () => {
|
|
68
|
-
dispatch( {
|
|
96
|
+
dispatch( {
|
|
97
|
+
type: 'pop',
|
|
98
|
+
} );
|
|
69
99
|
if ( previousRenderingMode ) {
|
|
70
100
|
setRenderingMode( previousRenderingMode );
|
|
71
101
|
}
|
|
@@ -78,5 +108,7 @@ export default function useNavigateToEntityRecord(
|
|
|
78
108
|
postHistory.length > 1
|
|
79
109
|
? onNavigateToPreviousEntityRecord
|
|
80
110
|
: undefined,
|
|
111
|
+
// Return the selected block path from the current history item
|
|
112
|
+
previousSelectedBlockPath: selectedBlockPath,
|
|
81
113
|
};
|
|
82
114
|
}
|
package/src/style.scss
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/use-navigate-to-entity-record.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback, useReducer } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * A hook that records the 'entity' history in the post editor as a user\n * navigates between editing a post and editing the post template or patterns.\n *\n * Implemented as a stack, so a little similar to the browser history API.\n *\n * Used to control displaying UI elements like the back button.\n *\n * @param {number} initialPostId The post id of the post when the editor loaded.\n * @param {string} initialPostType The post type of the post when the editor loaded.\n * @param {string} defaultRenderingMode The rendering mode to switch to when navigating.\n *\n * @return {Object} An object containing the `currentPost` variable and\n * `onNavigateToEntityRecord` and `onNavigateToPreviousEntityRecord` functions.\n */\nexport default function useNavigateToEntityRecord(\n\tinitialPostId,\n\tinitialPostType,\n\tdefaultRenderingMode\n) {\n\tconst [ postHistory, dispatch ] = useReducer(\n\t\t( historyState, { type, post, previousRenderingMode } ) => {\n\t\t\tif ( type === 'push' ) {\n\t\t\t\treturn [ ...historyState, { post, previousRenderingMode } ];\n\t\t\t}\n\t\t\tif ( type === 'pop' ) {\n\t\t\t\t// Try to leave one item in the history.\n\t\t\t\tif ( historyState.length > 1 ) {\n\t\t\t\t\treturn historyState.slice( 0, -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn historyState;\n\t\t},\n\t\t[\n\t\t\t{\n\t\t\t\tpost: { postId: initialPostId, postType: initialPostType },\n\t\t\t},\n\t\t]\n\t);\n\n\tconst { post, previousRenderingMode } =\n\t\tpostHistory[ postHistory.length - 1 ];\n\n\tconst { getRenderingMode } = useSelect( editorStore );\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tconst onNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'push',\n\t\t\t\tpost: { postId: params.postId, postType: params.postType },\n\t\t\t\t// Save the current rendering mode so we can restore it when navigating back.\n\t\t\t\tpreviousRenderingMode: getRenderingMode(),\n\t\t\t} );\n\t\t\tsetRenderingMode( defaultRenderingMode );\n\t\t},\n\t\t[ getRenderingMode, setRenderingMode, defaultRenderingMode ]\n\t);\n\n\tconst onNavigateToPreviousEntityRecord = useCallback( () => {\n\t\tdispatch( { type: 'pop' } );\n\t\tif ( previousRenderingMode ) {\n\t\t\tsetRenderingMode( previousRenderingMode );\n\t\t}\n\t}, [ setRenderingMode, previousRenderingMode ] );\n\n\treturn {\n\t\tcurrentPost: post,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord:\n\t\t\tpostHistory.length > 1\n\t\t\t\t? onNavigateToPreviousEntityRecord\n\t\t\t\t: undefined,\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwC;AACxC,kBAAuC;AACvC,oBAAqC;AAiBtB,SAAR,0BACN,eACA,iBACA,sBACC;AACD,QAAM,CAAE,aAAa,QAAS,QAAI;AAAA,IACjC,CAAE,cAAc,EAAE,MAAM,MAAAA,OAAM,uBAAAC,uBAAsB,MAAO;AAC1D,UAAK,SAAS,QAAS;AACtB,eAAO,CAAE,GAAG,cAAc,EAAE,MAAAD,OAAM,uBAAAC,uBAAsB,CAAE;AAAA,MAC3D;AACA,UAAK,SAAS,OAAQ;AAErB,YAAK,aAAa,SAAS,GAAI;AAC9B,iBAAO,aAAa,MAAO,GAAG,EAAG;AAAA,QAClC;AAAA,MACD;AACA,aAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC;AAAA,QACC,MAAM,EAAE,QAAQ,eAAe,UAAU,gBAAgB;AAAA,MAC1D;AAAA,IACD;AAAA,EACD;AAEA,QAAM,EAAE,MAAM,sBAAsB,IACnC,YAAa,YAAY,SAAS,CAAE;AAErC,QAAM,EAAE,iBAAiB,QAAI,uBAAW,cAAAC,KAAY;AACpD,QAAM,EAAE,iBAAiB,QAAI,yBAAa,cAAAA,KAAY;AAEtD,QAAM,+BAA2B;AAAA,IAChC,CAAE,WAAY;AACb,eAAU;AAAA,QACT,MAAM;AAAA,QACN,MAAM,EAAE,QAAQ,OAAO,QAAQ,UAAU,OAAO,SAAS;AAAA;AAAA,QAEzD,uBAAuB,iBAAiB;AAAA,MACzC,CAAE;AACF,uBAAkB,oBAAqB;AAAA,IACxC;AAAA,IACA,CAAE,kBAAkB,kBAAkB,oBAAqB;AAAA,EAC5D;AAEA,QAAM,uCAAmC,4BAAa,MAAM;AAC3D,aAAU,EAAE,MAAM,MAAM,CAAE;AAC1B,QAAK,uBAAwB;AAC5B,uBAAkB,qBAAsB;AAAA,IACzC;AAAA,EACD,GAAG,CAAE,kBAAkB,qBAAsB,CAAE;AAE/C,SAAO;AAAA,IACN,aAAa;AAAA,IACb;AAAA,IACA,kCACC,YAAY,SAAS,IAClB,mCACA;AAAA,EACL;AACD;",
|
|
6
|
-
"names": ["post", "previousRenderingMode", "editorStore"]
|
|
7
|
-
}
|
|
File without changes
|
/package/build/components/back-button/{fullscreen-mode-close.js.map → fullscreen-mode-close.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/components/editor-initialization/{listener-hooks.js.map → listener-hooks.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/components/meta-boxes/{meta-box-visibility.js.map → meta-box-visibility.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/components/preferences-modal/{meta-boxes-section.js.map → meta-boxes-section.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|