@wordpress/editor 14.32.0 → 14.32.1-next.ff1cebbba.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/bindings/api.js +45 -33
- package/build/bindings/api.js.map +7 -1
- package/build/bindings/entity.js +78 -0
- package/build/bindings/entity.js.map +7 -0
- package/build/bindings/pattern-overrides.js +58 -65
- package/build/bindings/pattern-overrides.js.map +7 -1
- package/build/bindings/post-data.js +71 -91
- package/build/bindings/post-data.js.map +7 -1
- package/build/bindings/post-meta.js +74 -106
- package/build/bindings/post-meta.js.map +7 -1
- package/build/components/autocompleters/index.js +36 -11
- package/build/components/autocompleters/index.js.map +7 -1
- package/build/components/autocompleters/user.js +66 -54
- package/build/components/autocompleters/user.js.map +7 -1
- package/build/components/autosave-monitor/index.js +59 -73
- package/build/components/autosave-monitor/index.js.map +7 -1
- package/build/components/block-removal-warnings/index.js +81 -57
- package/build/components/block-removal-warnings/index.js.map +7 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +161 -121
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +42 -99
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
- package/build/components/block-visibility/index.js +123 -0
- package/build/components/block-visibility/index.js.map +7 -0
- package/build/components/blog-title/index.js +127 -108
- package/build/components/blog-title/index.js.map +7 -1
- package/build/components/character-count/index.js +30 -23
- package/build/components/character-count/index.js.map +7 -1
- package/build/components/collab-sidebar/add-comment.js +89 -70
- package/build/components/collab-sidebar/add-comment.js.map +7 -1
- package/build/components/collab-sidebar/comment-author-info.js +72 -84
- package/build/components/collab-sidebar/comment-author-info.js.map +7 -1
- package/build/components/collab-sidebar/comment-form.js +92 -81
- package/build/components/collab-sidebar/comment-form.js.map +7 -1
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +96 -83
- package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
- package/build/components/collab-sidebar/comment-menu-item.js +46 -0
- package/build/components/collab-sidebar/comment-menu-item.js.map +7 -0
- package/build/components/collab-sidebar/comments.js +544 -317
- package/build/components/collab-sidebar/comments.js.map +7 -1
- package/build/components/collab-sidebar/constants.js +30 -7
- package/build/components/collab-sidebar/constants.js.map +7 -1
- package/build/components/collab-sidebar/hooks.js +312 -58
- package/build/components/collab-sidebar/hooks.js.map +7 -1
- package/build/components/collab-sidebar/index.js +183 -252
- package/build/components/collab-sidebar/index.js.map +7 -1
- package/build/components/collab-sidebar/utils.js +94 -79
- package/build/components/collab-sidebar/utils.js.map +7 -1
- package/build/components/collapsible-block-toolbar/index.js +70 -60
- package/build/components/collapsible-block-toolbar/index.js.map +7 -1
- package/build/components/commands/index.js +218 -268
- package/build/components/commands/index.js.map +7 -1
- package/build/components/deprecated.js +328 -248
- package/build/components/deprecated.js.map +7 -1
- package/build/components/document-bar/index.js +145 -153
- package/build/components/document-bar/index.js.map +7 -1
- package/build/components/document-outline/check.js +28 -27
- package/build/components/document-outline/check.js.map +7 -1
- package/build/components/document-outline/index.js +169 -207
- package/build/components/document-outline/index.js.map +7 -1
- package/build/components/document-outline/item.js +68 -35
- package/build/components/document-outline/item.js.map +7 -1
- package/build/components/document-tools/index.js +145 -133
- package/build/components/document-tools/index.js.map +7 -1
- package/build/components/editor/index.js +99 -63
- package/build/components/editor/index.js.map +7 -1
- package/build/components/editor-history/redo.js +51 -54
- package/build/components/editor-history/redo.js.map +7 -1
- package/build/components/editor-history/undo.js +50 -53
- package/build/components/editor-history/undo.js.map +7 -1
- package/build/components/editor-interface/content-slot-fill.js +27 -12
- package/build/components/editor-interface/content-slot-fill.js.map +7 -1
- package/build/components/editor-interface/index.js +142 -127
- package/build/components/editor-interface/index.js.map +7 -1
- package/build/components/editor-notices/index.js +74 -58
- package/build/components/editor-notices/index.js.map +7 -1
- package/build/components/editor-snackbars/index.js +40 -32
- package/build/components/editor-snackbars/index.js.map +7 -1
- package/build/components/entities-saved-states/entity-record-item.js +70 -70
- package/build/components/entities-saved-states/entity-record-item.js.map +7 -1
- package/build/components/entities-saved-states/entity-type-list.js +108 -78
- package/build/components/entities-saved-states/entity-type-list.js.map +7 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +62 -61
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
- package/build/components/entities-saved-states/index.js +177 -161
- package/build/components/entities-saved-states/index.js.map +7 -1
- package/build/components/error-boundary/index.js +59 -85
- package/build/components/error-boundary/index.js.map +7 -1
- package/build/components/global-keyboard-shortcuts/index.js +58 -71
- package/build/components/global-keyboard-shortcuts/index.js.map +7 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +106 -93
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
- package/build/components/global-styles-provider/index.js +173 -146
- package/build/components/global-styles-provider/index.js.map +7 -1
- package/build/components/header/back-button.js +40 -26
- package/build/components/header/back-button.js.map +7 -1
- package/build/components/header/index.js +175 -162
- package/build/components/header/index.js.map +7 -1
- package/build/components/index.js +311 -780
- package/build/components/index.js.map +7 -1
- package/build/components/inserter-sidebar/index.js +62 -71
- package/build/components/inserter-sidebar/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +74 -70
- package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -43
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +165 -111
- package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -55
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build/components/list-view-sidebar/index.js +117 -121
- package/build/components/list-view-sidebar/index.js.map +7 -1
- package/build/components/list-view-sidebar/list-view-outline.js +56 -41
- package/build/components/list-view-sidebar/list-view-outline.js.map +7 -1
- package/build/components/local-autosave-monitor/index.js +118 -148
- package/build/components/local-autosave-monitor/index.js.map +7 -1
- package/build/components/media-categories/index.js +160 -144
- package/build/components/media-categories/index.js.map +7 -1
- package/build/components/mode-switcher/index.js +68 -63
- package/build/components/mode-switcher/index.js.map +7 -1
- package/build/components/more-menu/copy-content-menu-item.js +46 -43
- package/build/components/more-menu/copy-content-menu-item.js.map +7 -1
- package/build/components/more-menu/index.js +174 -119
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/more-menu/tools-more-menu-group.js +27 -21
- package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build/components/more-menu/view-more-menu-group.js +30 -22
- package/build/components/more-menu/view-more-menu-group.js.map +7 -1
- package/build/components/page-attributes/check.js +37 -40
- package/build/components/page-attributes/check.js.map +7 -1
- package/build/components/page-attributes/order.js +66 -64
- package/build/components/page-attributes/order.js.map +7 -1
- package/build/components/page-attributes/panel.js +45 -43
- package/build/components/page-attributes/panel.js.map +7 -1
- package/build/components/page-attributes/parent.js +224 -207
- package/build/components/page-attributes/parent.js.map +7 -1
- package/build/components/pattern-duplicate-modal/index.js +58 -48
- package/build/components/pattern-duplicate-modal/index.js.map +7 -1
- package/build/components/pattern-overrides-panel/index.js +33 -23
- package/build/components/pattern-overrides-panel/index.js.map +7 -1
- package/build/components/pattern-rename-modal/index.js +51 -47
- package/build/components/pattern-rename-modal/index.js.map +7 -1
- package/build/components/plugin-document-setting-panel/index.js +74 -114
- package/build/components/plugin-document-setting-panel/index.js.map +7 -1
- package/build/components/plugin-more-menu-item/index.js +37 -78
- package/build/components/plugin-more-menu-item/index.js.map +7 -1
- package/build/components/plugin-post-publish-panel/index.js +37 -59
- package/build/components/plugin-post-publish-panel/index.js.map +7 -1
- package/build/components/plugin-post-status-info/index.js +27 -73
- package/build/components/plugin-post-status-info/index.js.map +7 -1
- package/build/components/plugin-pre-publish-panel/index.js +37 -62
- package/build/components/plugin-pre-publish-panel/index.js.map +7 -1
- package/build/components/plugin-preview-menu-item/index.js +37 -57
- package/build/components/plugin-preview-menu-item/index.js.map +7 -1
- package/build/components/plugin-sidebar/index.js +34 -86
- package/build/components/plugin-sidebar/index.js.map +7 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +33 -67
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
- package/build/components/post-actions/actions.js +111 -103
- package/build/components/post-actions/actions.js.map +7 -1
- package/build/components/post-actions/index.js +126 -131
- package/build/components/post-actions/index.js.map +7 -1
- package/build/components/post-actions/set-as-homepage.js +123 -123
- package/build/components/post-actions/set-as-homepage.js.map +7 -1
- package/build/components/post-actions/set-as-posts-page.js +118 -120
- package/build/components/post-actions/set-as-posts-page.js.map +7 -1
- package/build/components/post-author/check.js +41 -38
- package/build/components/post-author/check.js.map +7 -1
- package/build/components/post-author/combobox.js +50 -52
- package/build/components/post-author/combobox.js.map +7 -1
- package/build/components/post-author/constants.js +34 -10
- package/build/components/post-author/constants.js.map +7 -1
- package/build/components/post-author/hook.js +71 -71
- package/build/components/post-author/hook.js.map +7 -1
- package/build/components/post-author/index.js +43 -31
- package/build/components/post-author/index.js.map +7 -1
- package/build/components/post-author/panel.js +106 -95
- package/build/components/post-author/panel.js.map +7 -1
- package/build/components/post-author/select.js +45 -40
- package/build/components/post-author/select.js.map +7 -1
- package/build/components/post-card-panel/index.js +128 -113
- package/build/components/post-card-panel/index.js.map +7 -1
- package/build/components/post-comments/index.js +60 -55
- package/build/components/post-comments/index.js.map +7 -1
- package/build/components/post-content-information/index.js +64 -65
- package/build/components/post-content-information/index.js.map +7 -1
- package/build/components/post-discussion/panel.js +114 -128
- package/build/components/post-discussion/panel.js.map +7 -1
- package/build/components/post-excerpt/check.js +37 -27
- package/build/components/post-excerpt/check.js.map +7 -1
- package/build/components/post-excerpt/index.js +75 -71
- package/build/components/post-excerpt/index.js.map +7 -1
- package/build/components/post-excerpt/panel.js +152 -141
- package/build/components/post-excerpt/panel.js.map +7 -1
- package/build/components/post-excerpt/plugin.js +28 -70
- package/build/components/post-excerpt/plugin.js.map +7 -1
- package/build/components/post-featured-image/check.js +38 -32
- package/build/components/post-featured-image/check.js.map +7 -1
- package/build/components/post-featured-image/index.js +224 -211
- package/build/components/post-featured-image/index.js.map +7 -1
- package/build/components/post-featured-image/panel.js +55 -59
- package/build/components/post-featured-image/panel.js.map +7 -1
- package/build/components/post-fields/index.js +55 -56
- package/build/components/post-fields/index.js.map +7 -1
- package/build/components/post-format/check.js +42 -33
- package/build/components/post-format/check.js.map +7 -1
- package/build/components/post-format/index.js +100 -113
- package/build/components/post-format/index.js.map +7 -1
- package/build/components/post-format/panel.js +91 -82
- package/build/components/post-format/panel.js.map +7 -1
- package/build/components/post-last-edited-panel/index.js +38 -29
- package/build/components/post-last-edited-panel/index.js.map +7 -1
- package/build/components/post-last-revision/check.js +41 -41
- package/build/components/post-last-revision/check.js.map +7 -1
- package/build/components/post-last-revision/index.js +75 -66
- package/build/components/post-last-revision/index.js.map +7 -1
- package/build/components/post-last-revision/panel.js +39 -30
- package/build/components/post-last-revision/panel.js.map +7 -1
- package/build/components/post-locked-modal/index.js +148 -145
- package/build/components/post-locked-modal/index.js.map +7 -1
- package/build/components/post-panel-row/index.js +49 -35
- package/build/components/post-panel-row/index.js.map +7 -1
- package/build/components/post-panel-section/index.js +38 -26
- package/build/components/post-panel-section/index.js.map +7 -1
- package/build/components/post-pending-status/check.js +34 -40
- package/build/components/post-pending-status/check.js.map +7 -1
- package/build/components/post-pending-status/index.js +58 -41
- package/build/components/post-pending-status/index.js.map +7 -1
- package/build/components/post-pingbacks/index.js +52 -44
- package/build/components/post-pingbacks/index.js.map +7 -1
- package/build/components/post-preview-button/index.js +90 -120
- package/build/components/post-preview-button/index.js.map +7 -1
- package/build/components/post-publish-button/index.js +125 -137
- package/build/components/post-publish-button/index.js.map +7 -1
- package/build/components/post-publish-button/label.js +39 -40
- package/build/components/post-publish-button/label.js.map +7 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +62 -68
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
- package/build/components/post-publish-panel/index.js +136 -135
- package/build/components/post-publish-panel/index.js.map +7 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +71 -67
- package/build/components/post-publish-panel/maybe-category-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +72 -63
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +86 -80
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +172 -214
- package/build/components/post-publish-panel/maybe-upload-media.js.map +7 -1
- package/build/components/post-publish-panel/media-util.js +63 -72
- package/build/components/post-publish-panel/media-util.js.map +7 -1
- package/build/components/post-publish-panel/postpublish.js +135 -130
- package/build/components/post-publish-panel/postpublish.js.map +7 -1
- package/build/components/post-publish-panel/prepublish.js +137 -103
- package/build/components/post-publish-panel/prepublish.js.map +7 -1
- package/build/components/post-saved-state/index.js +115 -131
- package/build/components/post-saved-state/index.js.map +7 -1
- package/build/components/post-schedule/check.js +27 -29
- package/build/components/post-schedule/check.js.map +7 -1
- package/build/components/post-schedule/index.js +96 -93
- package/build/components/post-schedule/index.js.map +7 -1
- package/build/components/post-schedule/label.js +79 -86
- package/build/components/post-schedule/label.js.map +7 -1
- package/build/components/post-schedule/panel.js +88 -73
- package/build/components/post-schedule/panel.js.map +7 -1
- package/build/components/post-status/index.js +238 -202
- package/build/components/post-status/index.js.map +7 -1
- package/build/components/post-sticky/check.js +30 -35
- package/build/components/post-sticky/check.js.map +7 -1
- package/build/components/post-sticky/index.js +50 -40
- package/build/components/post-sticky/index.js.map +7 -1
- package/build/components/post-sticky/panel.js +43 -21
- package/build/components/post-sticky/panel.js.map +7 -1
- package/build/components/post-switch-to-draft-button/index.js +80 -75
- package/build/components/post-switch-to-draft-button/index.js.map +7 -1
- package/build/components/post-sync-status/index.js +45 -44
- package/build/components/post-sync-status/index.js.map +7 -1
- package/build/components/post-taxonomies/check.js +36 -33
- package/build/components/post-taxonomies/check.js.map +7 -1
- package/build/components/post-taxonomies/flat-term-selector.js +189 -189
- package/build/components/post-taxonomies/flat-term-selector.js.map +7 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +244 -280
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
- package/build/components/post-taxonomies/index.js +68 -58
- package/build/components/post-taxonomies/index.js.map +7 -1
- package/build/components/post-taxonomies/most-used-terms.js +73 -56
- package/build/components/post-taxonomies/most-used-terms.js.map +7 -1
- package/build/components/post-taxonomies/panel.js +66 -69
- package/build/components/post-taxonomies/panel.js.map +7 -1
- package/build/components/post-template/block-theme.js +165 -123
- package/build/components/post-template/block-theme.js.map +7 -1
- package/build/components/post-template/classic-theme.js +193 -187
- package/build/components/post-template/classic-theme.js.map +7 -1
- package/build/components/post-template/create-new-template-modal.js +139 -110
- package/build/components/post-template/create-new-template-modal.js.map +7 -1
- package/build/components/post-template/create-new-template.js +65 -46
- package/build/components/post-template/create-new-template.js.map +7 -1
- package/build/components/post-template/hooks.js +116 -84
- package/build/components/post-template/hooks.js.map +7 -1
- package/build/components/post-template/panel.js +56 -52
- package/build/components/post-template/panel.js.map +7 -1
- package/build/components/post-template/reset-default-template.js +49 -43
- package/build/components/post-template/reset-default-template.js.map +7 -1
- package/build/components/post-template/swap-template-button.js +109 -91
- package/build/components/post-template/swap-template-button.js.map +7 -1
- package/build/components/post-text-editor/index.js +80 -81
- package/build/components/post-text-editor/index.js.map +7 -1
- package/build/components/post-title/constants.js +30 -7
- package/build/components/post-title/constants.js.map +7 -1
- package/build/components/post-title/index.js +99 -126
- package/build/components/post-title/index.js.map +7 -1
- package/build/components/post-title/post-title-raw.js +74 -78
- package/build/components/post-title/post-title-raw.js.map +7 -1
- package/build/components/post-title/use-post-title-focus.js +35 -52
- package/build/components/post-title/use-post-title-focus.js.map +7 -1
- package/build/components/post-title/use-post-title.js +30 -37
- package/build/components/post-title/use-post-title.js.map +7 -1
- package/build/components/post-transform-panel/hooks.js +70 -67
- package/build/components/post-transform-panel/hooks.js.map +7 -1
- package/build/components/post-transform-panel/index.js +69 -75
- package/build/components/post-transform-panel/index.js.map +7 -1
- package/build/components/post-trash/check.js +33 -42
- package/build/components/post-trash/check.js.map +7 -1
- package/build/components/post-trash/index.js +78 -67
- package/build/components/post-trash/index.js.map +7 -1
- package/build/components/post-type-support-check/index.js +34 -47
- package/build/components/post-type-support-check/index.js.map +7 -1
- package/build/components/post-url/check.js +31 -32
- package/build/components/post-url/check.js.map +7 -1
- package/build/components/post-url/index.js +155 -156
- package/build/components/post-url/index.js.map +7 -1
- package/build/components/post-url/label.js +35 -30
- package/build/components/post-url/label.js.map +7 -1
- package/build/components/post-url/panel.js +111 -112
- package/build/components/post-url/panel.js.map +7 -1
- package/build/components/post-view-link/index.js +48 -47
- package/build/components/post-view-link/index.js.map +7 -1
- package/build/components/post-visibility/check.js +28 -33
- package/build/components/post-visibility/check.js.map +7 -1
- package/build/components/post-visibility/index.js +83 -84
- package/build/components/post-visibility/index.js.map +7 -1
- package/build/components/post-visibility/label.js +35 -30
- package/build/components/post-visibility/label.js.map +7 -1
- package/build/components/post-visibility/utils.js +44 -23
- package/build/components/post-visibility/utils.js.map +7 -1
- package/build/components/posts-per-page/index.js +110 -98
- package/build/components/posts-per-page/index.js.map +7 -1
- package/build/components/preferences-modal/enable-panel.js +47 -42
- package/build/components/preferences-modal/enable-panel.js.map +7 -1
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +40 -31
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +39 -32
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
- package/build/components/preferences-modal/index.js +391 -231
- package/build/components/preferences-modal/index.js.map +7 -1
- package/build/components/preview-dropdown/index.js +165 -151
- package/build/components/preview-dropdown/index.js.map +7 -1
- package/build/components/provider/disable-non-page-content-blocks.js +67 -82
- package/build/components/provider/disable-non-page-content-blocks.js.map +7 -1
- package/build/components/provider/index.js +283 -325
- package/build/components/provider/index.js.map +7 -1
- package/build/components/provider/navigation-block-editing-mode.js +32 -29
- package/build/components/provider/navigation-block-editing-mode.js.map +7 -1
- package/build/components/provider/use-auto-switch-editor-sidebars.js +48 -39
- package/build/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
- package/build/components/provider/use-block-editor-settings.js +249 -178
- package/build/components/provider/use-block-editor-settings.js.map +7 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js +87 -46
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
- package/build/components/provider/use-post-content-blocks.js +48 -29
- package/build/components/provider/use-post-content-blocks.js.map +7 -1
- package/build/components/provider/with-registry-provider.js +52 -46
- package/build/components/provider/with-registry-provider.js.map +7 -1
- package/build/components/resizable-editor/index.js +99 -86
- package/build/components/resizable-editor/index.js.map +7 -1
- package/build/components/resizable-editor/resize-handle.js +42 -36
- package/build/components/resizable-editor/resize-handle.js.map +7 -1
- package/build/components/save-publish-panels/index.js +88 -69
- package/build/components/save-publish-panels/index.js.map +7 -1
- package/build/components/sidebar/constants.js +29 -8
- package/build/components/sidebar/constants.js.map +7 -1
- package/build/components/sidebar/header.js +56 -50
- package/build/components/sidebar/header.js.map +7 -1
- package/build/components/sidebar/index.js +156 -136
- package/build/components/sidebar/index.js.map +7 -1
- package/build/components/sidebar/post-summary.js +114 -91
- package/build/components/sidebar/post-summary.js.map +7 -1
- package/build/components/site-discussion/index.js +132 -113
- package/build/components/site-discussion/index.js.map +7 -1
- package/build/components/start-page-options/index.js +136 -146
- package/build/components/start-page-options/index.js.map +7 -1
- package/build/components/start-template-options/index.js +168 -157
- package/build/components/start-template-options/index.js.map +7 -1
- package/build/components/table-of-contents/index.js +78 -69
- package/build/components/table-of-contents/index.js.map +7 -1
- package/build/components/table-of-contents/panel.js +101 -94
- package/build/components/table-of-contents/panel.js.map +7 -1
- package/build/components/template-content-panel/index.js +74 -58
- package/build/components/template-content-panel/index.js.map +7 -1
- package/build/components/template-part-content-panel/index.js +51 -54
- package/build/components/template-part-content-panel/index.js.map +7 -1
- package/build/components/template-part-menu-items/convert-to-regular.js +44 -32
- package/build/components/template-part-menu-items/convert-to-regular.js.map +7 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js +76 -68
- package/build/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
- package/build/components/template-part-menu-items/index.js +62 -52
- package/build/components/template-part-menu-items/index.js.map +7 -1
- package/build/components/template-validation-notice/index.js +71 -47
- package/build/components/template-validation-notice/index.js.map +7 -1
- package/build/components/text-editor/index.js +68 -62
- package/build/components/text-editor/index.js.map +7 -1
- package/build/components/theme-support-check/index.js +32 -43
- package/build/components/theme-support-check/index.js.map +7 -1
- package/build/components/time-to-read/index.js +54 -51
- package/build/components/time-to-read/index.js.map +7 -1
- package/build/components/unsaved-changes-warning/index.js +34 -38
- package/build/components/unsaved-changes-warning/index.js.map +7 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +64 -68
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
- package/build/components/visual-editor/index.js +286 -247
- package/build/components/visual-editor/index.js.map +7 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js +75 -68
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -46
- package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
- package/build/components/word-count/index.js +34 -35
- package/build/components/word-count/index.js.map +7 -1
- package/build/components/zoom-out-toggle/index.js +88 -72
- package/build/components/zoom-out-toggle/index.js.map +7 -1
- package/build/dataviews/api.js +47 -80
- package/build/dataviews/api.js.map +7 -1
- package/build/dataviews/fields/content-preview/content-preview-view.js +81 -89
- package/build/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
- package/build/dataviews/fields/content-preview/index.js +39 -21
- package/build/dataviews/fields/content-preview/index.js.map +7 -1
- package/build/dataviews/store/private-actions.js +122 -56
- package/build/dataviews/store/private-actions.js.map +7 -1
- package/build/dataviews/store/private-selectors.js +32 -15
- package/build/dataviews/store/private-selectors.js.map +7 -1
- package/build/dataviews/store/reducer.js +50 -31
- package/build/dataviews/store/reducer.js.map +7 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +70 -83
- package/build/hooks/custom-sources-backwards-compatibility.js.map +7 -1
- package/build/hooks/default-autocompleters.js +9 -17
- package/build/hooks/default-autocompleters.js.map +7 -1
- package/build/hooks/index.js +7 -7
- package/build/hooks/index.js.map +7 -1
- package/build/hooks/media-upload.js +8 -9
- package/build/hooks/media-upload.js.map +7 -1
- package/build/hooks/navigation-link-view-button.js +44 -66
- package/build/hooks/navigation-link-view-button.js.map +7 -1
- package/build/hooks/pattern-overrides.js +51 -70
- package/build/hooks/pattern-overrides.js.map +7 -1
- package/build/hooks/template-part-navigation-edit-button.js +91 -0
- package/build/hooks/template-part-navigation-edit-button.js.map +7 -0
- package/build/index.js +41 -77
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/private-apis.js +76 -59
- package/build/private-apis.js.map +7 -1
- package/build/store/actions.js +516 -931
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +70 -31
- package/build/store/constants.js.map +7 -1
- package/build/store/defaults.js +31 -33
- package/build/store/defaults.js.map +7 -1
- package/build/store/index.js +52 -41
- package/build/store/index.js.map +7 -1
- package/build/store/local-autosave.js +39 -27
- package/build/store/local-autosave.js.map +7 -1
- package/build/store/private-actions.js +290 -299
- package/build/store/private-actions.js.map +7 -1
- package/build/store/private-selectors.js +189 -188
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +128 -280
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +819 -1470
- package/build/store/selectors.js.map +7 -1
- package/build/store/utils/is-template-revertable.js +24 -19
- package/build/store/utils/is-template-revertable.js.map +7 -1
- package/build/store/utils/notice-builder.js +73 -94
- package/build/store/utils/notice-builder.js.map +7 -1
- package/build/utils/get-item-title.js +34 -25
- package/build/utils/get-item-title.js.map +7 -1
- package/build/utils/get-template-info.js +37 -46
- package/build/utils/get-template-info.js.map +7 -1
- package/build/utils/get-template-part-icon.js +34 -24
- package/build/utils/get-template-part-icon.js.map +7 -1
- package/build/utils/index.js +41 -24
- package/build/utils/index.js.map +7 -1
- package/build/utils/media-sideload/index.js +26 -19
- package/build/utils/media-sideload/index.js.map +7 -1
- package/build/utils/media-upload/index.js +46 -63
- package/build/utils/media-upload/index.js.map +7 -1
- package/build/utils/pageTypeBadge.js +33 -31
- package/build/utils/pageTypeBadge.js.map +7 -1
- package/build/utils/search-templates.js +45 -47
- package/build/utils/search-templates.js.map +7 -1
- package/build/utils/terms.js +57 -63
- package/build/utils/terms.js.map +7 -1
- package/build/utils/url.js +43 -33
- package/build/utils/url.js.map +7 -1
- package/build-module/bindings/api.js +11 -26
- package/build-module/bindings/api.js.map +7 -1
- package/build-module/bindings/entity.js +58 -0
- package/build-module/bindings/entity.js.map +7 -0
- package/build-module/bindings/pattern-overrides.js +39 -59
- package/build-module/bindings/pattern-overrides.js.map +7 -1
- package/build-module/bindings/post-data.js +53 -87
- package/build-module/bindings/post-data.js.map +7 -1
- package/build-module/bindings/post-meta.js +55 -101
- package/build-module/bindings/post-meta.js.map +7 -1
- package/build-module/components/autocompleters/index.js +5 -2
- package/build-module/components/autocompleters/index.js.map +7 -1
- package/build-module/components/autocompleters/user.js +45 -49
- package/build-module/components/autocompleters/user.js.map +7 -1
- package/build-module/components/autosave-monitor/index.js +37 -67
- package/build-module/components/autosave-monitor/index.js.map +7 -1
- package/build-module/components/block-removal-warnings/index.js +64 -54
- package/build-module/components/block-removal-warnings/index.js.map +7 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +136 -113
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +23 -93
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
- package/build-module/components/block-visibility/index.js +103 -0
- package/build-module/components/block-visibility/index.js.map +7 -0
- package/build-module/components/blog-title/index.js +102 -101
- package/build-module/components/blog-title/index.js.map +7 -1
- package/build-module/components/character-count/index.js +13 -20
- package/build-module/components/character-count/index.js.map +7 -1
- package/build-module/components/collab-sidebar/add-comment.js +64 -66
- package/build-module/components/collab-sidebar/add-comment.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-author-info.js +55 -77
- package/build-module/components/collab-sidebar/comment-author-info.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-form.js +68 -75
- package/build-module/components/collab-sidebar/comment-form.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +67 -76
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-menu-item.js +26 -0
- package/build-module/components/collab-sidebar/comment-menu-item.js.map +7 -0
- package/build-module/components/collab-sidebar/comments.js +521 -309
- package/build-module/components/collab-sidebar/comments.js.map +7 -1
- package/build-module/components/collab-sidebar/constants.js +7 -3
- package/build-module/components/collab-sidebar/constants.js.map +7 -1
- package/build-module/components/collab-sidebar/hooks.js +301 -54
- package/build-module/components/collab-sidebar/hooks.js.map +7 -1
- package/build-module/components/collab-sidebar/index.js +158 -245
- package/build-module/components/collab-sidebar/index.js.map +7 -1
- package/build-module/components/collab-sidebar/utils.js +71 -76
- package/build-module/components/collab-sidebar/utils.js.map +7 -1
- package/build-module/components/collapsible-block-toolbar/index.js +44 -52
- package/build-module/components/collapsible-block-toolbar/index.js.map +7 -1
- package/build-module/components/commands/index.js +188 -241
- package/build-module/components/commands/index.js.map +7 -1
- package/build-module/components/deprecated.js +297 -237
- package/build-module/components/deprecated.js.map +7 -1
- package/build-module/components/document-bar/index.js +114 -141
- package/build-module/components/document-bar/index.js.map +7 -1
- package/build-module/components/document-outline/check.js +10 -23
- package/build-module/components/document-outline/check.js.map +7 -1
- package/build-module/components/document-outline/index.js +141 -203
- package/build-module/components/document-outline/index.js.map +7 -1
- package/build-module/components/document-outline/item.js +40 -29
- package/build-module/components/document-outline/item.js.map +7 -1
- package/build-module/components/document-tools/index.js +115 -125
- package/build-module/components/document-tools/index.js.map +7 -1
- package/build-module/components/editor/index.js +71 -57
- package/build-module/components/editor/index.js.map +7 -1
- package/build-module/components/editor-history/redo.js +33 -49
- package/build-module/components/editor-history/redo.js.map +7 -1
- package/build-module/components/editor-history/undo.js +32 -48
- package/build-module/components/editor-history/undo.js.map +7 -1
- package/build-module/components/editor-interface/content-slot-fill.js +9 -7
- package/build-module/components/editor-interface/content-slot-fill.js.map +7 -1
- package/build-module/components/editor-interface/index.js +111 -118
- package/build-module/components/editor-interface/index.js.map +7 -1
- package/build-module/components/editor-notices/index.js +43 -53
- package/build-module/components/editor-notices/index.js.map +7 -1
- package/build-module/components/editor-snackbars/index.js +23 -29
- package/build-module/components/editor-snackbars/index.js.map +7 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +52 -65
- package/build-module/components/entities-saved-states/entity-record-item.js.map +7 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +81 -73
- package/build-module/components/entities-saved-states/entity-type-list.js.map +7 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +39 -55
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
- package/build-module/components/entities-saved-states/index.js +150 -152
- package/build-module/components/entities-saved-states/index.js.map +7 -1
- package/build-module/components/error-boundary/index.js +42 -77
- package/build-module/components/error-boundary/index.js.map +7 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +39 -66
- package/build-module/components/global-keyboard-shortcuts/index.js.map +7 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +86 -88
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
- package/build-module/components/global-styles-provider/index.js +135 -134
- package/build-module/components/global-styles-provider/index.js.map +7 -1
- package/build-module/components/header/back-button.js +20 -20
- package/build-module/components/header/back-button.js.map +7 -1
- package/build-module/components/header/index.js +148 -151
- package/build-module/components/header/index.js.map +7 -1
- package/build-module/components/index.js +192 -118
- package/build-module/components/index.js.map +7 -1
- package/build-module/components/inserter-sidebar/index.js +45 -64
- package/build-module/components/inserter-sidebar/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +140 -105
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build-module/components/list-view-sidebar/index.js +86 -109
- package/build-module/components/list-view-sidebar/index.js.map +7 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +29 -36
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +7 -1
- package/build-module/components/local-autosave-monitor/index.js +81 -130
- package/build-module/components/local-autosave-monitor/index.js.map +7 -1
- package/build-module/components/media-categories/index.js +139 -137
- package/build-module/components/media-categories/index.js.map +7 -1
- package/build-module/components/mode-switcher/index.js +50 -60
- package/build-module/components/mode-switcher/index.js.map +7 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +27 -37
- package/build-module/components/more-menu/copy-content-menu-item.js.map +7 -1
- package/build-module/components/more-menu/index.js +154 -113
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +9 -16
- package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build-module/components/more-menu/view-more-menu-group.js +12 -17
- package/build-module/components/more-menu/view-more-menu-group.js.map +7 -1
- package/build-module/components/page-attributes/check.js +15 -35
- package/build-module/components/page-attributes/check.js.map +7 -1
- package/build-module/components/page-attributes/order.js +42 -58
- package/build-module/components/page-attributes/order.js.map +7 -1
- package/build-module/components/page-attributes/panel.js +18 -37
- package/build-module/components/page-attributes/panel.js.map +7 -1
- package/build-module/components/page-attributes/parent.js +198 -197
- package/build-module/components/page-attributes/parent.js.map +7 -1
- package/build-module/components/pattern-duplicate-modal/index.js +36 -42
- package/build-module/components/pattern-duplicate-modal/index.js.map +7 -1
- package/build-module/components/pattern-overrides-panel/index.js +16 -19
- package/build-module/components/pattern-overrides-panel/index.js.map +7 -1
- package/build-module/components/pattern-rename-modal/index.js +29 -41
- package/build-module/components/pattern-rename-modal/index.js.map +7 -1
- package/build-module/components/plugin-document-setting-panel/index.js +46 -108
- package/build-module/components/plugin-document-setting-panel/index.js.map +7 -1
- package/build-module/components/plugin-more-menu-item/index.js +18 -74
- package/build-module/components/plugin-more-menu-item/index.js.map +7 -1
- package/build-module/components/plugin-post-publish-panel/index.js +19 -54
- package/build-module/components/plugin-post-publish-panel/index.js.map +7 -1
- package/build-module/components/plugin-post-status-info/index.js +9 -68
- package/build-module/components/plugin-post-status-info/index.js.map +7 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +19 -57
- package/build-module/components/plugin-pre-publish-panel/index.js.map +7 -1
- package/build-module/components/plugin-preview-menu-item/index.js +18 -53
- package/build-module/components/plugin-preview-menu-item/index.js.map +7 -1
- package/build-module/components/plugin-sidebar/index.js +16 -83
- package/build-module/components/plugin-sidebar/index.js.map +7 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +15 -64
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
- package/build-module/components/post-actions/actions.js +85 -94
- package/build-module/components/post-actions/actions.js.map +7 -1
- package/build-module/components/post-actions/index.js +104 -121
- package/build-module/components/post-actions/index.js.map +7 -1
- package/build-module/components/post-actions/set-as-homepage.js +104 -115
- package/build-module/components/post-actions/set-as-homepage.js.map +7 -1
- package/build-module/components/post-actions/set-as-posts-page.js +99 -112
- package/build-module/components/post-actions/set-as-posts-page.js.map +7 -1
- package/build-module/components/post-author/check.js +12 -33
- package/build-module/components/post-author/check.js.map +7 -1
- package/build-module/components/post-author/combobox.js +32 -47
- package/build-module/components/post-author/combobox.js.map +7 -1
- package/build-module/components/post-author/constants.js +11 -6
- package/build-module/components/post-author/constants.js.map +7 -1
- package/build-module/components/post-author/hook.js +48 -65
- package/build-module/components/post-author/hook.js.map +7 -1
- package/build-module/components/post-author/index.js +14 -24
- package/build-module/components/post-author/index.js.map +7 -1
- package/build-module/components/post-author/panel.js +73 -87
- package/build-module/components/post-author/panel.js.map +7 -1
- package/build-module/components/post-author/select.js +28 -36
- package/build-module/components/post-author/select.js.map +7 -1
- package/build-module/components/post-card-panel/index.js +107 -105
- package/build-module/components/post-card-panel/index.js.map +7 -1
- package/build-module/components/post-comments/index.js +45 -50
- package/build-module/components/post-comments/index.js.map +7 -1
- package/build-module/components/post-content-information/index.js +49 -61
- package/build-module/components/post-content-information/index.js.map +7 -1
- package/build-module/components/post-discussion/panel.js +90 -122
- package/build-module/components/post-discussion/panel.js.map +7 -1
- package/build-module/components/post-excerpt/check.js +9 -23
- package/build-module/components/post-excerpt/check.js.map +7 -1
- package/build-module/components/post-excerpt/index.js +57 -68
- package/build-module/components/post-excerpt/index.js.map +7 -1
- package/build-module/components/post-excerpt/panel.js +124 -134
- package/build-module/components/post-excerpt/panel.js.map +7 -1
- package/build-module/components/post-excerpt/plugin.js +10 -65
- package/build-module/components/post-excerpt/plugin.js.map +7 -1
- package/build-module/components/post-featured-image/check.js +10 -28
- package/build-module/components/post-featured-image/check.js.map +7 -1
- package/build-module/components/post-featured-image/index.js +203 -200
- package/build-module/components/post-featured-image/index.js.map +7 -1
- package/build-module/components/post-featured-image/panel.js +26 -52
- package/build-module/components/post-featured-image/panel.js.map +7 -1
- package/build-module/components/post-fields/index.js +36 -49
- package/build-module/components/post-fields/index.js.map +7 -1
- package/build-module/components/post-format/check.js +14 -29
- package/build-module/components/post-format/check.js.map +7 -1
- package/build-module/components/post-format/index.js +68 -107
- package/build-module/components/post-format/index.js.map +7 -1
- package/build-module/components/post-format/panel.js +60 -73
- package/build-module/components/post-format/panel.js.map +7 -1
- package/build-module/components/post-last-edited-panel/index.js +20 -24
- package/build-module/components/post-last-edited-panel/index.js.map +7 -1
- package/build-module/components/post-last-revision/check.js +13 -37
- package/build-module/components/post-last-revision/check.js.map +7 -1
- package/build-module/components/post-last-revision/index.js +43 -59
- package/build-module/components/post-last-revision/index.js.map +7 -1
- package/build-module/components/post-last-revision/panel.js +10 -25
- package/build-module/components/post-last-revision/panel.js.map +7 -1
- package/build-module/components/post-locked-modal/index.js +133 -137
- package/build-module/components/post-locked-modal/index.js.map +7 -1
- package/build-module/components/post-panel-row/index.js +21 -29
- package/build-module/components/post-panel-row/index.js.map +7 -1
- package/build-module/components/post-panel-section/index.js +10 -20
- package/build-module/components/post-panel-section/index.js.map +7 -1
- package/build-module/components/post-pending-status/check.js +12 -35
- package/build-module/components/post-pending-status/check.js.map +7 -1
- package/build-module/components/post-pending-status/index.js +27 -36
- package/build-module/components/post-pending-status/index.js.map +7 -1
- package/build-module/components/post-pingbacks/index.js +34 -39
- package/build-module/components/post-pingbacks/index.js.map +7 -1
- package/build-module/components/post-preview-button/index.js +71 -114
- package/build-module/components/post-preview-button/index.js.map +7 -1
- package/build-module/components/post-publish-button/index.js +93 -130
- package/build-module/components/post-publish-button/index.js.map +7 -1
- package/build-module/components/post-publish-button/label.js +20 -35
- package/build-module/components/post-publish-button/label.js.map +7 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +28 -56
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
- package/build-module/components/post-publish-panel/index.js +108 -126
- package/build-module/components/post-publish-panel/index.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +40 -58
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +55 -59
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +57 -73
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +158 -207
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +7 -1
- package/build-module/components/post-publish-panel/media-util.js +42 -69
- package/build-module/components/post-publish-panel/media-util.js.map +7 -1
- package/build-module/components/post-publish-panel/postpublish.js +109 -120
- package/build-module/components/post-publish-panel/postpublish.js.map +7 -1
- package/build-module/components/post-publish-panel/prepublish.js +108 -96
- package/build-module/components/post-publish-panel/prepublish.js.map +7 -1
- package/build-module/components/post-saved-state/index.js +87 -124
- package/build-module/components/post-saved-state/index.js.map +7 -1
- package/build-module/components/post-schedule/check.js +9 -25
- package/build-module/components/post-schedule/check.js.map +7 -1
- package/build-module/components/post-schedule/index.js +75 -88
- package/build-module/components/post-schedule/index.js.map +7 -1
- package/build-module/components/post-schedule/label.js +49 -73
- package/build-module/components/post-schedule/label.js.map +7 -1
- package/build-module/components/post-schedule/panel.js +63 -65
- package/build-module/components/post-schedule/panel.js.map +7 -1
- package/build-module/components/post-status/index.js +223 -194
- package/build-module/components/post-status/index.js.map +7 -1
- package/build-module/components/post-sticky/check.js +10 -29
- package/build-module/components/post-sticky/check.js.map +7 -1
- package/build-module/components/post-sticky/index.js +22 -36
- package/build-module/components/post-sticky/index.js.map +7 -1
- package/build-module/components/post-sticky/panel.js +12 -15
- package/build-module/components/post-sticky/panel.js.map +7 -1
- package/build-module/components/post-switch-to-draft-button/index.js +54 -70
- package/build-module/components/post-switch-to-draft-button/index.js.map +7 -1
- package/build-module/components/post-sync-status/index.js +17 -40
- package/build-module/components/post-sync-status/index.js.map +7 -1
- package/build-module/components/post-taxonomies/check.js +17 -28
- package/build-module/components/post-taxonomies/check.js.map +7 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +154 -177
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +7 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +232 -270
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
- package/build-module/components/post-taxonomies/index.js +34 -49
- package/build-module/components/post-taxonomies/index.js.map +7 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +54 -50
- package/build-module/components/post-taxonomies/most-used-terms.js.map +7 -1
- package/build-module/components/post-taxonomies/panel.js +39 -66
- package/build-module/components/post-taxonomies/panel.js.map +7 -1
- package/build-module/components/post-template/block-theme.js +134 -114
- package/build-module/components/post-template/block-theme.js.map +7 -1
- package/build-module/components/post-template/classic-theme.js +161 -177
- package/build-module/components/post-template/classic-theme.js.map +7 -1
- package/build-module/components/post-template/create-new-template-modal.js +126 -104
- package/build-module/components/post-template/create-new-template-modal.js.map +7 -1
- package/build-module/components/post-template/create-new-template.js +36 -39
- package/build-module/components/post-template/create-new-template.js.map +7 -1
- package/build-module/components/post-template/hooks.js +95 -80
- package/build-module/components/post-template/hooks.js.map +7 -1
- package/build-module/components/post-template/panel.js +25 -45
- package/build-module/components/post-template/panel.js.map +7 -1
- package/build-module/components/post-template/reset-default-template.js +33 -36
- package/build-module/components/post-template/reset-default-template.js.map +7 -1
- package/build-module/components/post-template/swap-template-button.js +86 -81
- package/build-module/components/post-template/swap-template-button.js.map +7 -1
- package/build-module/components/post-text-editor/index.js +49 -74
- package/build-module/components/post-text-editor/index.js.map +7 -1
- package/build-module/components/post-title/constants.js +7 -3
- package/build-module/components/post-title/constants.js.map +7 -1
- package/build-module/components/post-title/index.js +67 -111
- package/build-module/components/post-title/index.js.map +7 -1
- package/build-module/components/post-title/post-title-raw.js +43 -71
- package/build-module/components/post-title/post-title-raw.js.map +7 -1
- package/build-module/components/post-title/use-post-title-focus.js +15 -46
- package/build-module/components/post-title/use-post-title-focus.js.map +7 -1
- package/build-module/components/post-title/use-post-title.js +13 -33
- package/build-module/components/post-title/use-post-title.js.map +7 -1
- package/build-module/components/post-transform-panel/hooks.js +44 -58
- package/build-module/components/post-transform-panel/hooks.js.map +7 -1
- package/build-module/components/post-transform-panel/index.js +53 -69
- package/build-module/components/post-transform-panel/index.js.map +7 -1
- package/build-module/components/post-trash/check.js +14 -37
- package/build-module/components/post-trash/check.js.map +7 -1
- package/build-module/components/post-trash/index.js +49 -59
- package/build-module/components/post-trash/index.js.map +7 -1
- package/build-module/components/post-type-support-check/index.js +16 -42
- package/build-module/components/post-type-support-check/index.js.map +7 -1
- package/build-module/components/post-url/check.js +9 -24
- package/build-module/components/post-url/check.js.map +7 -1
- package/build-module/components/post-url/index.js +137 -146
- package/build-module/components/post-url/index.js.map +7 -1
- package/build-module/components/post-url/label.js +14 -26
- package/build-module/components/post-url/label.js.map +7 -1
- package/build-module/components/post-url/panel.js +80 -105
- package/build-module/components/post-url/panel.js.map +7 -1
- package/build-module/components/post-view-link/index.js +27 -39
- package/build-module/components/post-view-link/index.js.map +7 -1
- package/build-module/components/post-visibility/check.js +10 -29
- package/build-module/components/post-visibility/check.js.map +7 -1
- package/build-module/components/post-visibility/index.js +66 -78
- package/build-module/components/post-visibility/index.js.map +7 -1
- package/build-module/components/post-visibility/label.js +15 -27
- package/build-module/components/post-visibility/label.js.map +7 -1
- package/build-module/components/post-visibility/utils.js +22 -18
- package/build-module/components/post-visibility/utils.js.map +7 -1
- package/build-module/components/posts-per-page/index.js +85 -91
- package/build-module/components/posts-per-page/index.js.map +7 -1
- package/build-module/components/preferences-modal/enable-panel.js +30 -38
- package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +12 -25
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +21 -27
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
- package/build-module/components/preferences-modal/index.js +365 -225
- package/build-module/components/preferences-modal/index.js.map +7 -1
- package/build-module/components/preview-dropdown/index.js +140 -141
- package/build-module/components/preview-dropdown/index.js.map +7 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +34 -72
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +7 -1
- package/build-module/components/provider/index.js +257 -317
- package/build-module/components/provider/index.js.map +7 -1
- package/build-module/components/provider/navigation-block-editing-mode.js +14 -25
- package/build-module/components/provider/navigation-block-editing-mode.js.map +7 -1
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js +28 -33
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
- package/build-module/components/provider/use-block-editor-settings.js +223 -166
- package/build-module/components/provider/use-block-editor-settings.js.map +7 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js +65 -42
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
- package/build-module/components/provider/use-post-content-blocks.js +31 -25
- package/build-module/components/provider/use-post-content-blocks.js.map +7 -1
- package/build-module/components/provider/with-registry-provider.js +34 -41
- package/build-module/components/provider/with-registry-provider.js.map +7 -1
- package/build-module/components/resizable-editor/index.js +70 -80
- package/build-module/components/resizable-editor/index.js.map +7 -1
- package/build-module/components/resizable-editor/resize-handle.js +27 -30
- package/build-module/components/resizable-editor/resize-handle.js.map +7 -1
- package/build-module/components/save-publish-panels/index.js +56 -62
- package/build-module/components/save-publish-panels/index.js.map +7 -1
- package/build-module/components/sidebar/constants.js +7 -4
- package/build-module/components/sidebar/constants.js.map +7 -1
- package/build-module/components/sidebar/header.js +38 -45
- package/build-module/components/sidebar/header.js.map +7 -1
- package/build-module/components/sidebar/index.js +136 -125
- package/build-module/components/sidebar/index.js.map +7 -1
- package/build-module/components/sidebar/post-summary.js +86 -87
- package/build-module/components/sidebar/post-summary.js.map +7 -1
- package/build-module/components/site-discussion/index.js +110 -107
- package/build-module/components/site-discussion/index.js.map +7 -1
- package/build-module/components/start-page-options/index.js +114 -137
- package/build-module/components/start-page-options/index.js.map +7 -1
- package/build-module/components/start-template-options/index.js +148 -150
- package/build-module/components/start-template-options/index.js.map +7 -1
- package/build-module/components/table-of-contents/index.js +50 -63
- package/build-module/components/table-of-contents/index.js.map +7 -1
- package/build-module/components/table-of-contents/panel.js +73 -88
- package/build-module/components/table-of-contents/panel.js.map +7 -1
- package/build-module/components/template-content-panel/index.js +57 -54
- package/build-module/components/template-content-panel/index.js.map +7 -1
- package/build-module/components/template-part-content-panel/index.js +35 -48
- package/build-module/components/template-part-content-panel/index.js.map +7 -1
- package/build-module/components/template-part-menu-items/convert-to-regular.js +26 -27
- package/build-module/components/template-part-menu-items/convert-to-regular.js.map +7 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +56 -61
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
- package/build-module/components/template-part-menu-items/index.js +38 -47
- package/build-module/components/template-part-menu-items/index.js.map +7 -1
- package/build-module/components/template-validation-notice/index.js +55 -41
- package/build-module/components/template-validation-notice/index.js.map +7 -1
- package/build-module/components/text-editor/index.js +38 -54
- package/build-module/components/text-editor/index.js.map +7 -1
- package/build-module/components/theme-support-check/index.js +13 -38
- package/build-module/components/theme-support-check/index.js.map +7 -1
- package/build-module/components/time-to-read/index.js +36 -48
- package/build-module/components/time-to-read/index.js.map +7 -1
- package/build-module/components/unsaved-changes-warning/index.js +16 -34
- package/build-module/components/unsaved-changes-warning/index.js.map +7 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +44 -63
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
- package/build-module/components/visual-editor/index.js +256 -225
- package/build-module/components/visual-editor/index.js.map +7 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js +58 -64
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +31 -43
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
- package/build-module/components/word-count/index.js +16 -32
- package/build-module/components/word-count/index.js.map +7 -1
- package/build-module/components/zoom-out-toggle/index.js +72 -66
- package/build-module/components/zoom-out-toggle/index.js.map +7 -1
- package/build-module/dataviews/api.js +26 -77
- package/build-module/dataviews/api.js.map +7 -1
- package/build-module/dataviews/fields/content-preview/content-preview-view.js +66 -85
- package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
- package/build-module/dataviews/fields/content-preview/index.js +10 -15
- package/build-module/dataviews/fields/content-preview/index.js.map +7 -1
- package/build-module/dataviews/store/private-actions.js +113 -43
- package/build-module/dataviews/store/private-actions.js.map +7 -1
- package/build-module/dataviews/store/private-selectors.js +11 -12
- package/build-module/dataviews/store/private-selectors.js.map +7 -1
- package/build-module/dataviews/store/reducer.js +32 -26
- package/build-module/dataviews/store/reducer.js.map +7 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +70 -83
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +7 -1
- package/build-module/hooks/default-autocompleters.js +9 -15
- package/build-module/hooks/default-autocompleters.js.map +7 -1
- package/build-module/hooks/index.js +7 -9
- package/build-module/hooks/index.js.map +7 -1
- package/build-module/hooks/media-upload.js +8 -7
- package/build-module/hooks/media-upload.js.map +7 -1
- package/build-module/hooks/navigation-link-view-button.js +46 -63
- package/build-module/hooks/navigation-link-view-button.js.map +7 -1
- package/build-module/hooks/pattern-overrides.js +48 -67
- package/build-module/hooks/pattern-overrides.js.map +7 -1
- package/build-module/hooks/template-part-navigation-edit-button.js +97 -0
- package/build-module/hooks/template-part-navigation-edit-button.js.map +7 -0
- package/build-module/index.js +13 -15
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/private-apis.js +31 -31
- package/build-module/private-apis.js.map +7 -1
- package/build-module/store/actions.js +424 -872
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +36 -27
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/defaults.js +8 -28
- package/build-module/store/defaults.js.map +7 -1
- package/build-module/store/index.js +15 -30
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/local-autosave.js +18 -24
- package/build-module/store/local-autosave.js.map +7 -1
- package/build-module/store/private-actions.js +242 -257
- package/build-module/store/private-actions.js.map +7 -1
- package/build-module/store/private-selectors.js +157 -174
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +89 -267
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +712 -1433
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/store/utils/is-template-revertable.js +6 -15
- package/build-module/store/utils/is-template-revertable.js.map +7 -1
- package/build-module/store/utils/notice-builder.js +52 -91
- package/build-module/store/utils/notice-builder.js.map +7 -1
- package/build-module/utils/get-item-title.js +10 -19
- package/build-module/utils/get-item-title.js.map +7 -1
- package/build-module/utils/get-template-info.js +14 -38
- package/build-module/utils/get-template-info.js.map +7 -1
- package/build-module/utils/get-template-part-icon.js +14 -16
- package/build-module/utils/get-template-part-icon.js.map +7 -1
- package/build-module/utils/index.js +9 -8
- package/build-module/utils/index.js.map +7 -1
- package/build-module/utils/media-sideload/index.js +8 -14
- package/build-module/utils/media-sideload/index.js.map +7 -1
- package/build-module/utils/media-upload/index.js +26 -56
- package/build-module/utils/media-upload/index.js.map +7 -1
- package/build-module/utils/pageTypeBadge.js +16 -28
- package/build-module/utils/pageTypeBadge.js.map +7 -1
- package/build-module/utils/search-templates.js +12 -41
- package/build-module/utils/search-templates.js.map +7 -1
- package/build-module/utils/terms.js +32 -55
- package/build-module/utils/terms.js.map +7 -1
- package/build-module/utils/url.js +11 -28
- package/build-module/utils/url.js.map +7 -1
- package/build-style/style-rtl.css +327 -136
- package/build-style/style.css +327 -136
- package/build-types/bindings/entity.d.ts +16 -0
- package/build-types/bindings/entity.d.ts.map +1 -0
- package/build-types/bindings/post-data.d.ts +16 -0
- package/build-types/bindings/post-meta.d.ts +13 -0
- package/build-types/components/{preferences-modal/block-visibility.d.ts → block-visibility/index.d.ts} +1 -1
- package/build-types/components/block-visibility/index.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-comment.d.ts +6 -14
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts +9 -18
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts +5 -0
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +10 -1
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts +33 -0
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/utils.d.ts +20 -0
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/document-tools/index.d.ts.map +1 -1
- package/build-types/components/header/index.d.ts.map +1 -1
- package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
- package/build-types/components/post-template/block-theme.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
- package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/hooks/template-part-navigation-edit-button.d.ts +2 -0
- package/build-types/hooks/template-part-navigation-edit-button.d.ts.map +1 -0
- package/build-types/store/actions.d.ts.map +1 -1
- package/package.json +59 -39
- package/src/bindings/api.js +2 -2
- package/src/bindings/entity.js +89 -0
- package/src/bindings/post-data.js +23 -0
- package/src/bindings/post-meta.js +19 -0
- package/src/components/autocompleters/style.scss +2 -0
- package/src/components/block-settings-menu/style.scss +2 -0
- package/src/components/{preferences-modal/block-visibility.js → block-visibility/index.js} +37 -5
- package/src/components/block-visibility/style.scss +25 -0
- package/src/components/blog-title/style.scss +2 -0
- package/src/components/collab-sidebar/add-comment.js +18 -17
- package/src/components/collab-sidebar/comment-author-info.js +2 -2
- package/src/components/collab-sidebar/comment-form.js +15 -17
- package/src/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
- package/src/components/collab-sidebar/{comment-button.js → comment-menu-item.js} +4 -4
- package/src/components/collab-sidebar/comments.js +413 -183
- package/src/components/collab-sidebar/hooks.js +343 -22
- package/src/components/collab-sidebar/index.js +94 -190
- package/src/components/collab-sidebar/style.scss +44 -26
- package/src/components/collab-sidebar/utils.js +55 -0
- package/src/components/collapsible-block-toolbar/style.scss +5 -1
- package/src/components/commands/index.js +2 -2
- package/src/components/document-bar/style.scss +5 -0
- package/src/components/document-outline/style.scss +3 -0
- package/src/components/document-tools/index.js +1 -20
- package/src/components/document-tools/style.scss +4 -0
- package/src/components/editor-help/style.scss +3 -0
- package/src/components/editor-interface/style.scss +2 -0
- package/src/components/editor-notices/style.scss +3 -0
- package/src/components/entities-saved-states/style.scss +3 -0
- package/src/components/error-boundary/style.scss +3 -0
- package/src/components/header/index.js +3 -8
- package/src/components/header/style.scss +6 -0
- package/src/components/inserter-sidebar/style.scss +2 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
- package/src/components/list-view-sidebar/style.scss +4 -1
- package/src/components/page-attributes/style.scss +2 -0
- package/src/components/post-actions/style.scss +2 -0
- package/src/components/post-author/style.scss +2 -0
- package/src/components/post-card-panel/style.scss +4 -0
- package/src/components/post-content-information/style.scss +2 -0
- package/src/components/post-discussion/style.scss +2 -0
- package/src/components/post-excerpt/panel.js +12 -6
- package/src/components/post-excerpt/style.scss +2 -0
- package/src/components/post-featured-image/style.scss +7 -0
- package/src/components/post-format/style.scss +2 -0
- package/src/components/post-last-edited-panel/style.scss +2 -0
- package/src/components/post-last-revision/style.scss +3 -0
- package/src/components/post-locked-modal/style.scss +2 -0
- package/src/components/post-panel-row/style.scss +2 -0
- package/src/components/post-panel-section/style.scss +2 -0
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
- package/src/components/post-publish-panel/style.scss +5 -0
- package/src/components/post-saved-state/style.scss +4 -0
- package/src/components/post-schedule/style.scss +2 -0
- package/src/components/post-status/style.scss +3 -0
- package/src/components/post-sticky/style.scss +3 -0
- package/src/components/post-sync-status/style.scss +2 -0
- package/src/components/post-taxonomies/style.scss +2 -0
- package/src/components/post-template/block-theme.js +45 -3
- package/src/components/post-template/hooks.js +48 -21
- package/src/components/post-template/style.scss +5 -0
- package/src/components/post-text-editor/style.scss +4 -0
- package/src/components/post-title/style.scss +2 -0
- package/src/components/post-url/style.scss +2 -0
- package/src/components/posts-per-page/style.scss +2 -0
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/provider/disable-non-page-content-blocks.js +7 -13
- package/src/components/provider/use-hide-blocks-from-inserter.js +37 -6
- package/src/components/resizable-editor/style.scss +4 -0
- package/src/components/save-publish-panels/style.scss +4 -0
- package/src/components/sidebar/style.scss +3 -0
- package/src/components/site-discussion/style.scss +2 -1
- package/src/components/start-page-options/style.scss +5 -0
- package/src/components/start-template-options/style.scss +5 -0
- package/src/components/table-of-contents/style.scss +5 -0
- package/src/components/text-editor/style.scss +6 -0
- package/src/components/visual-editor/index.js +11 -21
- package/src/components/visual-editor/style.scss +3 -1
- package/src/dataviews/fields/content-preview/style.scss +2 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/template-part-navigation-edit-button.js +145 -0
- package/src/store/actions.js +6 -1
- package/src/style.scss +57 -56
- package/tsconfig.tsbuildinfo +1 -1
- package/build/bindings/term-data.js +0 -171
- package/build/bindings/term-data.js.map +0 -1
- package/build/components/block-settings-menu/content-only-settings-menu.native.js +0 -11
- package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
- package/build/components/collab-sidebar/comment-button.js +0 -42
- package/build/components/collab-sidebar/comment-button.js.map +0 -1
- package/build/components/commands/index.native.js +0 -9
- package/build/components/commands/index.native.js.map +0 -1
- package/build/components/deprecated.native.js +0 -121
- package/build/components/deprecated.native.js.map +0 -1
- package/build/components/editor-help/add-blocks.native.js +0 -41
- package/build/components/editor-help/add-blocks.native.js.map +0 -1
- package/build/components/editor-help/customize-blocks.native.js +0 -41
- package/build/components/editor-help/customize-blocks.native.js.map +0 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +0 -69
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
- package/build/components/editor-help/help-get-support-button.native.js +0 -41
- package/build/components/editor-help/help-get-support-button.native.js.map +0 -1
- package/build/components/editor-help/help-section-title.native.js +0 -37
- package/build/components/editor-help/help-section-title.native.js.map +0 -1
- package/build/components/editor-help/help-topic-row.native.js +0 -42
- package/build/components/editor-help/help-topic-row.native.js.map +0 -1
- package/build/components/editor-help/icon-move-blocks.native.js +0 -19
- package/build/components/editor-help/icon-move-blocks.native.js.map +0 -1
- package/build/components/editor-help/index.native.js +0 -173
- package/build/components/editor-help/index.native.js.map +0 -1
- package/build/components/editor-help/intro-to-blocks.native.js +0 -70
- package/build/components/editor-help/intro-to-blocks.native.js.map +0 -1
- package/build/components/editor-help/move-blocks.native.js +0 -52
- package/build/components/editor-help/move-blocks.native.js.map +0 -1
- package/build/components/editor-help/remove-blocks.native.js +0 -39
- package/build/components/editor-help/remove-blocks.native.js.map +0 -1
- package/build/components/editor-help/view-sections.native.js +0 -80
- package/build/components/editor-help/view-sections.native.js.map +0 -1
- package/build/components/error-boundary/index.native.js +0 -143
- package/build/components/error-boundary/index.native.js.map +0 -1
- package/build/components/index.native.js +0 -85
- package/build/components/index.native.js.map +0 -1
- package/build/components/offline-status/index.native.js +0 -83
- package/build/components/offline-status/index.native.js.map +0 -1
- package/build/components/post-title/index.native.js +0 -251
- package/build/components/post-title/index.native.js.map +0 -1
- package/build/components/preferences-modal/block-visibility.js +0 -88
- package/build/components/preferences-modal/block-visibility.js.map +0 -1
- package/build/components/provider/index.native.js +0 -426
- package/build/components/provider/index.native.js.map +0 -1
- package/build/components/provider/use-block-editor-settings.native.js +0 -46
- package/build/components/provider/use-block-editor-settings.native.js.map +0 -1
- package/build/components/template-part-menu-items/index.native.js +0 -10
- package/build/components/template-part-menu-items/index.native.js.map +0 -1
- package/build/hooks/index.native.js +0 -2
- package/build/hooks/index.native.js.map +0 -1
- package/build/index.native.js +0 -56
- package/build/index.native.js.map +0 -1
- package/build/private-apis.native.js +0 -44
- package/build/private-apis.native.js.map +0 -1
- package/build/store/actions.native.js +0 -51
- package/build/store/actions.native.js.map +0 -1
- package/build/store/reducer.native.js +0 -105
- package/build/store/reducer.native.js.map +0 -1
- package/build/store/selectors.native.js +0 -70
- package/build/store/selectors.native.js.map +0 -1
- package/build/utils/index.native.js +0 -14
- package/build/utils/index.native.js.map +0 -1
- package/build/utils/media-sideload/index.native.js +0 -8
- package/build/utils/media-sideload/index.native.js.map +0 -1
- package/build/utils/media-upload/index.native.js +0 -8
- package/build/utils/media-upload/index.native.js.map +0 -1
- package/build-module/bindings/term-data.js +0 -165
- package/build-module/bindings/term-data.js.map +0 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +0 -5
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
- package/build-module/components/collab-sidebar/comment-button.js +0 -35
- package/build-module/components/collab-sidebar/comment-button.js.map +0 -1
- package/build-module/components/commands/index.native.js +0 -3
- package/build-module/components/commands/index.native.js.map +0 -1
- package/build-module/components/deprecated.native.js +0 -7
- package/build-module/components/deprecated.native.js.map +0 -1
- package/build-module/components/editor-help/add-blocks.native.js +0 -33
- package/build-module/components/editor-help/add-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/customize-blocks.native.js +0 -33
- package/build-module/components/editor-help/customize-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +0 -61
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +0 -33
- package/build-module/components/editor-help/help-get-support-button.native.js.map +0 -1
- package/build-module/components/editor-help/help-section-title.native.js +0 -29
- package/build-module/components/editor-help/help-section-title.native.js.map +0 -1
- package/build-module/components/editor-help/help-topic-row.native.js +0 -35
- package/build-module/components/editor-help/help-topic-row.native.js.map +0 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +0 -13
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/index.native.js +0 -165
- package/build-module/components/editor-help/index.native.js.map +0 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +0 -62
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/move-blocks.native.js +0 -44
- package/build-module/components/editor-help/move-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/remove-blocks.native.js +0 -31
- package/build-module/components/editor-help/remove-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/view-sections.native.js +0 -69
- package/build-module/components/editor-help/view-sections.native.js.map +0 -1
- package/build-module/components/error-boundary/index.native.js +0 -135
- package/build-module/components/error-boundary/index.native.js.map +0 -1
- package/build-module/components/index.native.js +0 -15
- package/build-module/components/index.native.js.map +0 -1
- package/build-module/components/offline-status/index.native.js +0 -77
- package/build-module/components/offline-status/index.native.js.map +0 -1
- package/build-module/components/post-title/index.native.js +0 -243
- package/build-module/components/post-title/index.native.js.map +0 -1
- package/build-module/components/preferences-modal/block-visibility.js +0 -81
- package/build-module/components/preferences-modal/block-visibility.js.map +0 -1
- package/build-module/components/provider/index.native.js +0 -416
- package/build-module/components/provider/index.native.js.map +0 -1
- package/build-module/components/provider/use-block-editor-settings.native.js +0 -38
- package/build-module/components/provider/use-block-editor-settings.native.js.map +0 -1
- package/build-module/components/template-part-menu-items/index.native.js +0 -4
- package/build-module/components/template-part-menu-items/index.native.js.map +0 -1
- package/build-module/hooks/index.native.js +0 -2
- package/build-module/hooks/index.native.js.map +0 -1
- package/build-module/index.native.js +0 -16
- package/build-module/index.native.js.map +0 -1
- package/build-module/private-apis.native.js +0 -34
- package/build-module/private-apis.native.js.map +0 -1
- package/build-module/store/actions.native.js +0 -27
- package/build-module/store/actions.native.js.map +0 -1
- package/build-module/store/reducer.native.js +0 -81
- package/build-module/store/reducer.native.js.map +0 -1
- package/build-module/store/selectors.native.js +0 -49
- package/build-module/store/selectors.native.js.map +0 -1
- package/build-module/utils/index.native.js +0 -6
- package/build-module/utils/index.native.js.map +0 -1
- package/build-module/utils/media-sideload/index.native.js +0 -2
- package/build-module/utils/media-sideload/index.native.js.map +0 -1
- package/build-module/utils/media-upload/index.native.js +0 -2
- package/build-module/utils/media-upload/index.native.js.map +0 -1
- package/build-types/bindings/term-data.d.ts +0 -25
- package/build-types/bindings/term-data.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-button.d.ts +0 -5
- package/build-types/components/collab-sidebar/comment-button.d.ts.map +0 -1
- package/build-types/components/preferences-modal/block-visibility.d.ts.map +0 -1
- package/src/bindings/term-data.js +0 -159
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/post-template/hooks.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function useEditedPostContext() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n}\nexport function useAllowSwitchingTemplates() {\n\tconst { postType, postId } = useEditedPostContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getEntityRecord, getEntityRecords } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tconst isPostsPage = +postId === siteSettings?.page_for_posts;\n\t\t\tconst isFrontPage =\n\t\t\t\tpostType === 'page' && +postId === siteSettings?.page_on_front;\n\t\t\t// If current page is set front page or posts page, we also need\n\t\t\t// to check if the current theme has a template for it. If not\n\t\t\tconst templates = isFrontPage\n\t\t\t\t? getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t } )\n\t\t\t\t: [];\n\t\t\tconst hasFrontPage =\n\t\t\t\tisFrontPage &&\n\t\t\t\t!! templates?.some( ( { slug } ) => slug === 'front-page' );\n\t\t\treturn ! isPostsPage && ! hasFrontPage;\n\t\t},\n\t\t[ postId, postType ]\n\t);\n}\n\nfunction useTemplates( postType ) {\n\t// To do: create a new selector to checks if templates exist at all instead\n\t// of and unbound request. In the modal, the user templates should be\n\t// paginated and we should not make an unbound request.\n\tconst { defaultTemplateTypes, registeredTemplates, userTemplates } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\treturn {\n\t\t\t\t\tdefaultTemplateTypes:\n\t\t\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t\t\t?.default_template_types,\n\t\t\t\t\tregisteredTemplates: select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'wp_registered_template',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t\t\tpost_type: postType,\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tuserTemplates: select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'wp_template',\n\t\t\t\t\t\t{ per_page: -1, combinedTemplates: false }\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ postType ]\n\t\t);\n\n\treturn useMemo( () => {\n\t\tif (\n\t\t\t! defaultTemplateTypes ||\n\t\t\t! registeredTemplates ||\n\t\t\t! userTemplates\n\t\t) {\n\t\t\treturn [];\n\t\t}\n\t\treturn [\n\t\t\t...registeredTemplates,\n\t\t\t...userTemplates.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\t// Only give \"custom\" templates as an option, which\n\t\t\t\t\t// means the is_wp_suggestion meta field is not set and\n\t\t\t\t\t// the slug is not found in the default template types.\n\t\t\t\t\t// https://github.com/WordPress/wordpress-develop/blob/97382397b2bd7c85aef6d4cd1c10bafd397957fc/src/wp-includes/block-template-utils.php#L858-L867\n\t\t\t\t\t! template.meta.is_wp_suggestion &&\n\t\t\t\t\t! defaultTemplateTypes.find(\n\t\t\t\t\t\t( type ) => type.slug === template.slug\n\t\t\t\t\t)\n\t\t\t),\n\t\t];\n\t}, [ registeredTemplates, userTemplates, defaultTemplateTypes ] );\n}\n\nexport function useAvailableTemplates( postType ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst templates = useTemplates( postType );\n\treturn useMemo(\n\t\t() =>\n\t\t\tallowSwitchingTemplate &&\n\t\t\ttemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\t( template.is_custom || template.type === 'wp_template' ) &&\n\t\t\t\t\ttemplate.slug !== currentTemplateSlug &&\n\t\t\t\t\t!! template.content.raw // Skip empty templates.\n\t\t\t),\n\t\t[ templates, currentTemplateSlug, allowSwitchingTemplate ]\n\t);\n}\n\nexport function useCurrentTemplateSlug() {\n\tconst { postType, postId } = useEditedPostContext();\n\tconst templates = useTemplates( postType );\n\tconst entityTemplate = useSelect(\n\t\t( select ) => {\n\t\t\tconst post = select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\treturn post?.template;\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tif ( ! entityTemplate ) {\n\t\treturn;\n\t}\n\t// If a page has a `template` set and is not included in the list\n\t// of the theme's templates, do not return it, in order to resolve\n\t// to the current theme's default template.\n\treturn templates?.find( ( template ) => template.slug === entityTemplate )\n\t\t?.slug;\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,SAAS,iBAAiB;AAKnC,SAAS,SAAS,mBAAmB;AAE9B,SAAS,uBAAuB;AACtC,SAAO,UAAW,CAAE,WAAY;AAC/B,UAAM,EAAE,kBAAkB,mBAAmB,IAAI,OAAQ,WAAY;AACrE,WAAO;AAAA,MACN,QAAQ,iBAAiB;AAAA,MACzB,UAAU,mBAAmB;AAAA,IAC9B;AAAA,EACD,GAAG,CAAC,CAAE;AACP;AACO,SAAS,6BAA6B;AAC5C,QAAM,EAAE,UAAU,OAAO,IAAI,qBAAqB;AAClD,SAAO;AAAA,IACN,CAAE,WAAY;AACb,YAAM,EAAE,SAAS,iBAAiB,iBAAiB,IAClD,OAAQ,SAAU;AACnB,YAAM,eAAe,QAAS,QAAQ;AAAA,QACrC,MAAM;AAAA,QACN,MAAM;AAAA,MACP,CAAE,IACC,gBAAiB,QAAQ,MAAO,IAChC;AAEH,YAAM,cAAc,CAAC,WAAW,cAAc;AAC9C,YAAM,cACL,aAAa,UAAU,CAAC,WAAW,cAAc;AAGlD,YAAM,YAAY,cACf,iBAAkB,YAAY,eAAe;AAAA,QAC7C,UAAU;AAAA,MACV,CAAE,IACF,CAAC;AACJ,YAAM,eACL,eACA,CAAC,CAAE,WAAW,KAAM,CAAE,EAAE,KAAK,MAAO,SAAS,YAAa;AAC3D,aAAO,CAAE,eAAe,CAAE;AAAA,IAC3B;AAAA,IACA,CAAE,QAAQ,QAAS;AAAA,EACpB;AACD;AAEA,SAAS,aAAc,UAAW;AAIjC,QAAM,EAAE,sBAAsB,qBAAqB,cAAc,IAChE;AAAA,IACC,CAAE,WAAY;AACb,aAAO;AAAA,QACN,sBACC,OAAQ,SAAU,EAAE,gBAAgB,GACjC;AAAA,QACJ,qBAAqB,OAAQ,SAAU,EAAE;AAAA,UACxC;AAAA,UACA;AAAA,UACA;AAAA,YACC,UAAU;AAAA,YACV,WAAW;AAAA,UACZ;AAAA,QACD;AAAA,QACA,eAAe,OAAQ,SAAU,EAAE;AAAA,UAClC;AAAA,UACA;AAAA,UACA,EAAE,UAAU,IAAI,mBAAmB,MAAM;AAAA,QAC1C;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAED,SAAO,QAAS,MAAM;AACrB,QACC,CAAE,wBACF,CAAE,uBACF,CAAE,eACD;AACD,aAAO,CAAC;AAAA,IACT;AACA,WAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG,cAAc;AAAA,QAChB,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA,UAKD,CAAE,SAAS,KAAK,oBAChB,CAAE,qBAAqB;AAAA,YACtB,CAAE,SAAU,KAAK,SAAS,SAAS;AAAA,UACpC;AAAA;AAAA,MACF;AAAA,IACD;AAAA,EACD,GAAG,CAAE,qBAAqB,eAAe,oBAAqB,CAAE;AACjE;AAEO,SAAS,sBAAuB,UAAW;AACjD,QAAM,sBAAsB,uBAAuB;AACnD,QAAM,yBAAyB,2BAA2B;AAC1D,QAAM,YAAY,aAAc,QAAS;AACzC,SAAO;AAAA,IACN,MACC,0BACA,WAAW;AAAA,MACV,CAAE,cACC,SAAS,aAAa,SAAS,SAAS,kBAC1C,SAAS,SAAS,uBAClB,CAAC,CAAE,SAAS,QAAQ;AAAA;AAAA,IACtB;AAAA,IACD,CAAE,WAAW,qBAAqB,sBAAuB;AAAA,EAC1D;AACD;AAEO,SAAS,yBAAyB;AACxC,QAAM,EAAE,UAAU,OAAO,IAAI,qBAAqB;AAClD,QAAM,YAAY,aAAc,QAAS;AACzC,QAAM,iBAAiB;AAAA,IACtB,CAAE,WAAY;AACb,YAAM,OAAO,OAAQ,SAAU,EAAE;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,aAAO,MAAM;AAAA,IACd;AAAA,IACA,CAAE,UAAU,MAAO;AAAA,EACpB;AAEA,MAAK,CAAE,gBAAiB;AACvB;AAAA,EACD;AAIA,SAAO,WAAW,KAAM,CAAE,aAAc,SAAS,SAAS,cAAe,GACtE;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { store as editorStore } from '../../store';
|
|
11
|
-
import ClassicThemeControl from './classic-theme';
|
|
12
|
-
import BlockThemeControl from './block-theme';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Displays the template controls based on the current editor settings and user permissions.
|
|
16
|
-
*
|
|
17
|
-
* @return {React.ReactNode} The rendered PostTemplatePanel component.
|
|
18
|
-
*/
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
export default function PostTemplatePanel() {
|
|
21
|
-
const {
|
|
22
|
-
templateId,
|
|
23
|
-
isBlockTheme
|
|
24
|
-
} = useSelect(select => {
|
|
25
|
-
const {
|
|
26
|
-
getCurrentTemplateId,
|
|
27
|
-
getEditorSettings
|
|
28
|
-
} = select(editorStore);
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSelect } from "@wordpress/data";
|
|
3
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
4
|
+
import { store as editorStore } from "../../store";
|
|
5
|
+
import ClassicThemeControl from "./classic-theme";
|
|
6
|
+
import BlockThemeControl from "./block-theme";
|
|
7
|
+
function PostTemplatePanel() {
|
|
8
|
+
const { templateId, isBlockTheme } = useSelect((select) => {
|
|
9
|
+
const { getCurrentTemplateId, getEditorSettings } = select(editorStore);
|
|
29
10
|
return {
|
|
30
11
|
templateId: getCurrentTemplateId(),
|
|
31
12
|
isBlockTheme: getEditorSettings().__unstableIsBlockBasedTheme
|
|
32
13
|
};
|
|
33
14
|
}, []);
|
|
34
|
-
const isVisible = useSelect(select => {
|
|
35
|
-
var _select$canUser;
|
|
15
|
+
const isVisible = useSelect((select) => {
|
|
36
16
|
const postTypeSlug = select(editorStore).getCurrentPostType();
|
|
37
17
|
const postType = select(coreStore).getPostType(postTypeSlug);
|
|
38
18
|
if (!postType?.viewable) {
|
|
@@ -46,27 +26,27 @@ export default function PostTemplatePanel() {
|
|
|
46
26
|
if (!settings.supportsTemplateMode) {
|
|
47
27
|
return false;
|
|
48
28
|
}
|
|
49
|
-
const canCreateTemplates =
|
|
50
|
-
kind:
|
|
51
|
-
name:
|
|
52
|
-
})
|
|
29
|
+
const canCreateTemplates = select(coreStore).canUser("create", {
|
|
30
|
+
kind: "postType",
|
|
31
|
+
name: "wp_template"
|
|
32
|
+
}) ?? false;
|
|
53
33
|
return canCreateTemplates;
|
|
54
34
|
}, []);
|
|
55
|
-
const canViewTemplates = useSelect(select => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})) !== null && _select$canUser2 !== void 0 ? _select$canUser2 : false;
|
|
35
|
+
const canViewTemplates = useSelect((select) => {
|
|
36
|
+
return select(coreStore).canUser("read", {
|
|
37
|
+
kind: "postType",
|
|
38
|
+
name: "wp_template"
|
|
39
|
+
}) ?? false;
|
|
61
40
|
}, []);
|
|
62
41
|
if ((!isBlockTheme || !canViewTemplates) && isVisible) {
|
|
63
|
-
return
|
|
42
|
+
return /* @__PURE__ */ jsx(ClassicThemeControl, {});
|
|
64
43
|
}
|
|
65
44
|
if (isBlockTheme && !!templateId) {
|
|
66
|
-
return
|
|
67
|
-
id: templateId
|
|
68
|
-
});
|
|
45
|
+
return /* @__PURE__ */ jsx(BlockThemeControl, { id: templateId });
|
|
69
46
|
}
|
|
70
47
|
return null;
|
|
71
48
|
}
|
|
72
|
-
|
|
49
|
+
export {
|
|
50
|
+
PostTemplatePanel as default
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/post-template/panel.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport ClassicThemeControl from './classic-theme';\nimport BlockThemeControl from './block-theme';\n\n/**\n * Displays the template controls based on the current editor settings and user permissions.\n *\n * @return {React.ReactNode} The rendered PostTemplatePanel component.\n */\nexport default function PostTemplatePanel() {\n\tconst { templateId, isBlockTheme } = useSelect( ( select ) => {\n\t\tconst { getCurrentTemplateId, getEditorSettings } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\tisBlockTheme: getEditorSettings().__unstableIsBlockBasedTheme,\n\t\t};\n\t}, [] );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst settings = select( editorStore ).getEditorSettings();\n\t\tconst hasTemplates =\n\t\t\t!! settings.availableTemplates &&\n\t\t\tObject.keys( settings.availableTemplates ).length > 0;\n\t\tif ( hasTemplates ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! settings.supportsTemplateMode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst canCreateTemplates =\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) ?? false;\n\t\treturn canCreateTemplates;\n\t}, [] );\n\n\tconst canViewTemplates = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( coreStore ).canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) ?? false\n\t\t);\n\t}, [] );\n\n\tif ( ( ! isBlockTheme || ! canViewTemplates ) && isVisible ) {\n\t\treturn <ClassicThemeControl />;\n\t}\n\n\tif ( isBlockTheme && !! templateId ) {\n\t\treturn <BlockThemeControl id={ templateId } />;\n\t}\n\treturn null;\n}\n"],
|
|
5
|
+
"mappings": "AAiES;AA9DT,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAKnC,SAAS,SAAS,mBAAmB;AACrC,OAAO,yBAAyB;AAChC,OAAO,uBAAuB;AAOf,SAAR,oBAAqC;AAC3C,QAAM,EAAE,YAAY,aAAa,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,sBAAsB,kBAAkB,IAC/C,OAAQ,WAAY;AACrB,WAAO;AAAA,MACN,YAAY,qBAAqB;AAAA,MACjC,cAAc,kBAAkB,EAAE;AAAA,IACnC;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,QAAM,YAAY,UAAW,CAAE,WAAY;AAC1C,UAAM,eAAe,OAAQ,WAAY,EAAE,mBAAmB;AAC9D,UAAM,WAAW,OAAQ,SAAU,EAAE,YAAa,YAAa;AAC/D,QAAK,CAAE,UAAU,UAAW;AAC3B,aAAO;AAAA,IACR;AAEA,UAAM,WAAW,OAAQ,WAAY,EAAE,kBAAkB;AACzD,UAAM,eACL,CAAC,CAAE,SAAS,sBACZ,OAAO,KAAM,SAAS,kBAAmB,EAAE,SAAS;AACrD,QAAK,cAAe;AACnB,aAAO;AAAA,IACR;AAEA,QAAK,CAAE,SAAS,sBAAuB;AACtC,aAAO;AAAA,IACR;AAEA,UAAM,qBACL,OAAQ,SAAU,EAAE,QAAS,UAAU;AAAA,MACtC,MAAM;AAAA,MACN,MAAM;AAAA,IACP,CAAE,KAAK;AACR,WAAO;AAAA,EACR,GAAG,CAAC,CAAE;AAEN,QAAM,mBAAmB,UAAW,CAAE,WAAY;AACjD,WACC,OAAQ,SAAU,EAAE,QAAS,QAAQ;AAAA,MACpC,MAAM;AAAA,MACN,MAAM;AAAA,IACP,CAAE,KAAK;AAAA,EAET,GAAG,CAAC,CAAE;AAEN,OAAO,CAAE,gBAAgB,CAAE,qBAAsB,WAAY;AAC5D,WAAO,oBAAC,uBAAoB;AAAA,EAC7B;AAEA,MAAK,gBAAgB,CAAC,CAAE,YAAa;AACpC,WAAO,oBAAC,qBAAkB,IAAK,YAAa;AAAA,EAC7C;AACA,SAAO;AACR;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { useAllowSwitchingTemplates, useCurrentTemplateSlug, useEditedPostContext } from './hooks';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
export default function ResetDefaultTemplate({
|
|
15
|
-
onClick
|
|
16
|
-
}) {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem } from "@wordpress/components";
|
|
3
|
+
import { __ } from "@wordpress/i18n";
|
|
4
|
+
import { useDispatch } from "@wordpress/data";
|
|
5
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
6
|
+
import {
|
|
7
|
+
useAllowSwitchingTemplates,
|
|
8
|
+
useCurrentTemplateSlug,
|
|
9
|
+
useEditedPostContext
|
|
10
|
+
} from "./hooks";
|
|
11
|
+
function ResetDefaultTemplate({ onClick }) {
|
|
17
12
|
const currentTemplateSlug = useCurrentTemplateSlug();
|
|
18
13
|
const allowSwitchingTemplate = useAllowSwitchingTemplates();
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
postId
|
|
22
|
-
} = useEditedPostContext();
|
|
23
|
-
const {
|
|
24
|
-
editEntityRecord
|
|
25
|
-
} = useDispatch(coreStore);
|
|
26
|
-
// The default template in a post is indicated by an empty string.
|
|
14
|
+
const { postType, postId } = useEditedPostContext();
|
|
15
|
+
const { editEntityRecord } = useDispatch(coreStore);
|
|
27
16
|
if (!currentTemplateSlug || !allowSwitchingTemplate) {
|
|
28
17
|
return null;
|
|
29
18
|
}
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
MenuItem,
|
|
21
|
+
{
|
|
22
|
+
onClick: () => {
|
|
23
|
+
editEntityRecord(
|
|
24
|
+
"postType",
|
|
25
|
+
postType,
|
|
26
|
+
postId,
|
|
27
|
+
{ template: "" },
|
|
28
|
+
{ undoIgnore: true }
|
|
29
|
+
);
|
|
30
|
+
onClick();
|
|
31
|
+
},
|
|
32
|
+
children: __("Use default template")
|
|
33
|
+
}
|
|
34
|
+
);
|
|
41
35
|
}
|
|
42
|
-
|
|
36
|
+
export {
|
|
37
|
+
ResetDefaultTemplate as default
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=reset-default-template.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/post-template/reset-default-template.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseAllowSwitchingTemplates,\n\tuseCurrentTemplateSlug,\n\tuseEditedPostContext,\n} from './hooks';\n\nexport default function ResetDefaultTemplate( { onClick } ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst { postType, postId } = useEditedPostContext();\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// The default template in a post is indicated by an empty string.\n\tif ( ! currentTemplateSlug || ! allowSwitchingTemplate ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ template: '' },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Use default template' ) }\n\t\t</MenuItem>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AA2BE;AAxBF,SAAS,gBAAgB;AACzB,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,SAAS,iBAAiB;AAKnC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEQ,SAAR,qBAAuC,EAAE,QAAQ,GAAI;AAC3D,QAAM,sBAAsB,uBAAuB;AACnD,QAAM,yBAAyB,2BAA2B;AAC1D,QAAM,EAAE,UAAU,OAAO,IAAI,qBAAqB;AAClD,QAAM,EAAE,iBAAiB,IAAI,YAAa,SAAU;AAEpD,MAAK,CAAE,uBAAuB,CAAE,wBAAyB;AACxD,WAAO;AAAA,EACR;AACA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAU,MAAM;AACf;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,EAAE,UAAU,GAAG;AAAA,UACf,EAAE,YAAY,KAAK;AAAA,QACpB;AACA,gBAAQ;AAAA,MACT;AAAA,MAEE,aAAI,sBAAuB;AAAA;AAAA,EAC9B;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,91 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
|
-
import { useAvailableTemplates, useEditedPostContext } from './hooks';
|
|
17
|
-
import { searchTemplates } from '../../utils/search-templates';
|
|
18
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
-
export default function SwapTemplateButton({
|
|
20
|
-
onClick
|
|
21
|
-
}) {
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "@wordpress/element";
|
|
3
|
+
import { decodeEntities } from "@wordpress/html-entities";
|
|
4
|
+
import { __experimentalBlockPatternsList as BlockPatternsList } from "@wordpress/block-editor";
|
|
5
|
+
import { MenuItem, Modal, SearchControl } from "@wordpress/components";
|
|
6
|
+
import { __ } from "@wordpress/i18n";
|
|
7
|
+
import { useDispatch } from "@wordpress/data";
|
|
8
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
9
|
+
import { parse } from "@wordpress/blocks";
|
|
10
|
+
import { useAvailableTemplates, useEditedPostContext } from "./hooks";
|
|
11
|
+
import { searchTemplates } from "../../utils/search-templates";
|
|
12
|
+
function SwapTemplateButton({ onClick }) {
|
|
22
13
|
const [showModal, setShowModal] = useState(false);
|
|
23
|
-
const {
|
|
24
|
-
postType,
|
|
25
|
-
postId
|
|
26
|
-
} = useEditedPostContext();
|
|
14
|
+
const { postType, postId } = useEditedPostContext();
|
|
27
15
|
const availableTemplates = useAvailableTemplates(postType);
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
undoIgnore: true
|
|
36
|
-
|
|
37
|
-
setShowModal(false);
|
|
16
|
+
const { editEntityRecord } = useDispatch(coreStore);
|
|
17
|
+
const onTemplateSelect = async (template) => {
|
|
18
|
+
editEntityRecord(
|
|
19
|
+
"postType",
|
|
20
|
+
postType,
|
|
21
|
+
postId,
|
|
22
|
+
{ template: template.name },
|
|
23
|
+
{ undoIgnore: true }
|
|
24
|
+
);
|
|
25
|
+
setShowModal(false);
|
|
38
26
|
onClick();
|
|
39
27
|
};
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
28
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
MenuItem,
|
|
31
|
+
{
|
|
32
|
+
disabled: !availableTemplates?.length,
|
|
33
|
+
accessibleWhenDisabled: true,
|
|
34
|
+
onClick: () => setShowModal(true),
|
|
35
|
+
children: __("Change template")
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
showModal && /* @__PURE__ */ jsx(
|
|
39
|
+
Modal,
|
|
40
|
+
{
|
|
41
|
+
title: __("Choose a template"),
|
|
42
|
+
onRequestClose: () => setShowModal(false),
|
|
43
|
+
overlayClassName: "editor-post-template__swap-template-modal",
|
|
44
|
+
isFullScreen: true,
|
|
45
|
+
children: /* @__PURE__ */ jsx("div", { className: "editor-post-template__swap-template-modal-content", children: /* @__PURE__ */ jsx(
|
|
46
|
+
TemplatesList,
|
|
47
|
+
{
|
|
48
|
+
postType,
|
|
49
|
+
onSelect: onTemplateSelect
|
|
50
|
+
}
|
|
51
|
+
) })
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
60
55
|
}
|
|
61
|
-
function TemplatesList({
|
|
62
|
-
|
|
63
|
-
onSelect
|
|
64
|
-
}) {
|
|
65
|
-
const [searchValue, setSearchValue] = useState('');
|
|
56
|
+
function TemplatesList({ postType, onSelect }) {
|
|
57
|
+
const [searchValue, setSearchValue] = useState("");
|
|
66
58
|
const availableTemplates = useAvailableTemplates(postType);
|
|
67
|
-
const templatesAsPatterns = useMemo(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
59
|
+
const templatesAsPatterns = useMemo(
|
|
60
|
+
() => availableTemplates.map((template) => ({
|
|
61
|
+
name: template.slug,
|
|
62
|
+
blocks: parse(template.content.raw),
|
|
63
|
+
title: decodeEntities(template.title.rendered),
|
|
64
|
+
id: template.id
|
|
65
|
+
})),
|
|
66
|
+
[availableTemplates]
|
|
67
|
+
);
|
|
73
68
|
const filteredBlockTemplates = useMemo(() => {
|
|
74
69
|
return searchTemplates(templatesAsPatterns, searchValue);
|
|
75
70
|
}, [templatesAsPatterns, searchValue]);
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
SearchControl,
|
|
74
|
+
{
|
|
75
|
+
__nextHasNoMarginBottom: true,
|
|
76
|
+
onChange: setSearchValue,
|
|
77
|
+
value: searchValue,
|
|
78
|
+
label: __("Search"),
|
|
79
|
+
placeholder: __("Search"),
|
|
80
|
+
className: "editor-post-template__swap-template-search"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
BlockPatternsList,
|
|
85
|
+
{
|
|
86
|
+
label: __("Templates"),
|
|
87
|
+
blockPatterns: filteredBlockTemplates,
|
|
88
|
+
onClickPattern: onSelect
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
90
92
|
}
|
|
91
|
-
|
|
93
|
+
export {
|
|
94
|
+
SwapTemplateButton as default
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=swap-template-button.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/post-template/swap-template-button.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { MenuItem, Modal, SearchControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { parse } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useAvailableTemplates, useEditedPostContext } from './hooks';\nimport { searchTemplates } from '../../utils/search-templates';\n\nexport default function SwapTemplateButton( { onClick } ) {\n\tconst [ showModal, setShowModal ] = useState( false );\n\tconst { postType, postId } = useEditedPostContext();\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst onTemplateSelect = async ( template ) => {\n\t\teditEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\t{ template: template.name },\n\t\t\t{ undoIgnore: true }\n\t\t);\n\t\tsetShowModal( false ); // Close the template suggestions modal first.\n\t\tonClick();\n\t};\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tdisabled={ ! availableTemplates?.length }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tonClick={ () => setShowModal( true ) }\n\t\t\t>\n\t\t\t\t{ __( 'Change template' ) }\n\t\t\t</MenuItem>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Choose a template' ) }\n\t\t\t\t\tonRequestClose={ () => setShowModal( false ) }\n\t\t\t\t\toverlayClassName=\"editor-post-template__swap-template-modal\"\n\t\t\t\t\tisFullScreen\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-post-template__swap-template-modal-content\">\n\t\t\t\t\t\t<TemplatesList\n\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\tonSelect={ onTemplateSelect }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction TemplatesList( { postType, onSelect } ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst templatesAsPatterns = useMemo(\n\t\t() =>\n\t\t\tavailableTemplates.map( ( template ) => ( {\n\t\t\t\tname: template.slug,\n\t\t\t\tblocks: parse( template.content.raw ),\n\t\t\t\ttitle: decodeEntities( template.title.rendered ),\n\t\t\t\tid: template.id,\n\t\t\t} ) ),\n\t\t[ availableTemplates ]\n\t);\n\n\tconst filteredBlockTemplates = useMemo( () => {\n\t\treturn searchTemplates( templatesAsPatterns, searchValue );\n\t}, [ templatesAsPatterns, searchValue ] );\n\n\treturn (\n\t\t<>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tonChange={ setSearchValue }\n\t\t\t\tvalue={ searchValue }\n\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\tclassName=\"editor-post-template__swap-template-search\"\n\t\t\t/>\n\t\t\t<BlockPatternsList\n\t\t\t\tlabel={ __( 'Templates' ) }\n\t\t\t\tblockPatterns={ filteredBlockTemplates }\n\t\t\t\tonClickPattern={ onSelect }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAoCE,mBACC,KADD;AAjCF,SAAS,SAAS,gBAAgB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC,yBAAyB;AACrE,SAAS,UAAU,OAAO,qBAAqB;AAC/C,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,SAAS,iBAAiB;AACnC,SAAS,aAAa;AAKtB,SAAS,uBAAuB,4BAA4B;AAC5D,SAAS,uBAAuB;AAEjB,SAAR,mBAAqC,EAAE,QAAQ,GAAI;AACzD,QAAM,CAAE,WAAW,YAAa,IAAI,SAAU,KAAM;AACpD,QAAM,EAAE,UAAU,OAAO,IAAI,qBAAqB;AAClD,QAAM,qBAAqB,sBAAuB,QAAS;AAC3D,QAAM,EAAE,iBAAiB,IAAI,YAAa,SAAU;AAEpD,QAAM,mBAAmB,OAAQ,aAAc;AAC9C;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,EAAE,UAAU,SAAS,KAAK;AAAA,MAC1B,EAAE,YAAY,KAAK;AAAA,IACpB;AACA,iBAAc,KAAM;AACpB,YAAQ;AAAA,EACT;AACA,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,UAAW,CAAE,oBAAoB;AAAA,QACjC,wBAAsB;AAAA,QACtB,SAAU,MAAM,aAAc,IAAK;AAAA,QAEjC,aAAI,iBAAkB;AAAA;AAAA,IACzB;AAAA,IACE,aACD;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ,GAAI,mBAAoB;AAAA,QAChC,gBAAiB,MAAM,aAAc,KAAM;AAAA,QAC3C,kBAAiB;AAAA,QACjB,cAAY;AAAA,QAEZ,8BAAC,SAAI,WAAU,qDACd;AAAA,UAAC;AAAA;AAAA,YACA;AAAA,YACA,UAAW;AAAA;AAAA,QACZ,GACD;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEA,SAAS,cAAe,EAAE,UAAU,SAAS,GAAI;AAChD,QAAM,CAAE,aAAa,cAAe,IAAI,SAAU,EAAG;AACrD,QAAM,qBAAqB,sBAAuB,QAAS;AAC3D,QAAM,sBAAsB;AAAA,IAC3B,MACC,mBAAmB,IAAK,CAAE,cAAgB;AAAA,MACzC,MAAM,SAAS;AAAA,MACf,QAAQ,MAAO,SAAS,QAAQ,GAAI;AAAA,MACpC,OAAO,eAAgB,SAAS,MAAM,QAAS;AAAA,MAC/C,IAAI,SAAS;AAAA,IACd,EAAI;AAAA,IACL,CAAE,kBAAmB;AAAA,EACtB;AAEA,QAAM,yBAAyB,QAAS,MAAM;AAC7C,WAAO,gBAAiB,qBAAqB,WAAY;AAAA,EAC1D,GAAG,CAAE,qBAAqB,WAAY,CAAE;AAExC,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,yBAAuB;AAAA,QACvB,UAAW;AAAA,QACX,OAAQ;AAAA,QACR,OAAQ,GAAI,QAAS;AAAA,QACrB,aAAc,GAAI,QAAS;AAAA,QAC3B,WAAU;AAAA;AAAA,IACX;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ,GAAI,WAAY;AAAA,QACxB,eAAgB;AAAA,QAChB,gBAAiB;AAAA;AAAA,IAClB;AAAA,KACD;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,48 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import { store as
|
|
11
|
-
|
|
12
|
-
import { __unstableSerializeAndClean } from '@wordpress/blocks';
|
|
13
|
-
import { useDispatch, useSelect } from '@wordpress/data';
|
|
14
|
-
import { useInstanceId } from '@wordpress/compose';
|
|
15
|
-
import { VisuallyHidden } from '@wordpress/components';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
import { store as editorStore } from '../../store';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Displays the Post Text Editor along with content in Visual and Text mode.
|
|
24
|
-
*
|
|
25
|
-
* @return {React.ReactNode} The rendered PostTextEditor component.
|
|
26
|
-
*/
|
|
27
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
export default function PostTextEditor() {
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Textarea from "react-autosize-textarea";
|
|
3
|
+
import { __ } from "@wordpress/i18n";
|
|
4
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
5
|
+
import { useMemo } from "@wordpress/element";
|
|
6
|
+
import { __unstableSerializeAndClean } from "@wordpress/blocks";
|
|
7
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
8
|
+
import { useInstanceId } from "@wordpress/compose";
|
|
9
|
+
import { VisuallyHidden } from "@wordpress/components";
|
|
10
|
+
import { store as editorStore } from "../../store";
|
|
11
|
+
function PostTextEditor() {
|
|
29
12
|
const instanceId = useInstanceId(PostTextEditor);
|
|
30
|
-
const {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type,
|
|
34
|
-
id
|
|
35
|
-
} = useSelect(select => {
|
|
36
|
-
const {
|
|
37
|
-
getEditedEntityRecord
|
|
38
|
-
} = select(coreStore);
|
|
39
|
-
const {
|
|
40
|
-
getCurrentPostType,
|
|
41
|
-
getCurrentPostId
|
|
42
|
-
} = select(editorStore);
|
|
13
|
+
const { content, blocks, type, id } = useSelect((select) => {
|
|
14
|
+
const { getEditedEntityRecord } = select(coreStore);
|
|
15
|
+
const { getCurrentPostType, getCurrentPostId } = select(editorStore);
|
|
43
16
|
const _type = getCurrentPostType();
|
|
44
17
|
const _id = getCurrentPostId();
|
|
45
|
-
const editedRecord = getEditedEntityRecord(
|
|
18
|
+
const editedRecord = getEditedEntityRecord("postType", _type, _id);
|
|
46
19
|
return {
|
|
47
20
|
content: editedRecord?.content,
|
|
48
21
|
blocks: editedRecord?.blocks,
|
|
@@ -50,43 +23,45 @@ export default function PostTextEditor() {
|
|
|
50
23
|
id: _id
|
|
51
24
|
};
|
|
52
25
|
}, []);
|
|
53
|
-
const {
|
|
54
|
-
editEntityRecord
|
|
55
|
-
} = useDispatch(coreStore);
|
|
56
|
-
// Replicates the logic found in getEditedPostContent().
|
|
26
|
+
const { editEntityRecord } = useDispatch(coreStore);
|
|
57
27
|
const value = useMemo(() => {
|
|
58
28
|
if (content instanceof Function) {
|
|
59
|
-
return content({
|
|
60
|
-
blocks
|
|
61
|
-
});
|
|
29
|
+
return content({ blocks });
|
|
62
30
|
} else if (blocks) {
|
|
63
|
-
// If we have parsed blocks already, they should be our source of truth.
|
|
64
|
-
// Parsing applies block deprecations and legacy block conversions that
|
|
65
|
-
// unparsed content will not have.
|
|
66
31
|
return __unstableSerializeAndClean(blocks);
|
|
67
32
|
}
|
|
68
33
|
return content;
|
|
69
34
|
}, [content, blocks]);
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
VisuallyHidden,
|
|
38
|
+
{
|
|
39
|
+
as: "label",
|
|
40
|
+
htmlFor: `post-content-${instanceId}`,
|
|
41
|
+
children: __("Type text or HTML")
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Textarea,
|
|
46
|
+
{
|
|
47
|
+
autoComplete: "off",
|
|
48
|
+
dir: "auto",
|
|
49
|
+
value,
|
|
50
|
+
onChange: (event) => {
|
|
51
|
+
editEntityRecord("postType", type, id, {
|
|
52
|
+
content: event.target.value,
|
|
53
|
+
blocks: void 0,
|
|
54
|
+
selection: void 0
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
className: "editor-post-text-editor",
|
|
58
|
+
id: `post-content-${instanceId}`,
|
|
59
|
+
placeholder: __("Start writing with text or HTML")
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
91
63
|
}
|
|
92
|
-
|
|
64
|
+
export {
|
|
65
|
+
PostTextEditor as default
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=index.js.map
|