@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,189 +1,187 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Internal dependencies
|
|
14
|
-
*/
|
|
15
|
-
import { store as editorStore } from '../../store';
|
|
16
|
-
import { TEMPLATE_POST_TYPE } from '../../store/constants';
|
|
17
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Modal, Flex, FlexItem, Button } from "@wordpress/components";
|
|
3
|
+
import { __ } from "@wordpress/i18n";
|
|
4
|
+
import { useState, useMemo, useEffect } from "@wordpress/element";
|
|
5
|
+
import { __experimentalBlockPatternsList as BlockPatternsList } from "@wordpress/block-editor";
|
|
6
|
+
import { useSelect } from "@wordpress/data";
|
|
7
|
+
import { parse } from "@wordpress/blocks";
|
|
8
|
+
import { store as coreStore, useEntityBlockEditor } from "@wordpress/core-data";
|
|
9
|
+
import { store as editorStore } from "../../store";
|
|
10
|
+
import { TEMPLATE_POST_TYPE } from "../../store/constants";
|
|
18
11
|
function useFallbackTemplateContent(slug, isCustom = false) {
|
|
19
|
-
return useSelect(
|
|
20
|
-
|
|
21
|
-
getEntityRecord,
|
|
22
|
-
getDefaultTemplateId
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
return useSelect(
|
|
13
|
+
(select) => {
|
|
14
|
+
const { getEntityRecord, getDefaultTemplateId } = select(coreStore);
|
|
15
|
+
const templateId = getDefaultTemplateId({
|
|
16
|
+
slug,
|
|
17
|
+
is_custom: isCustom,
|
|
18
|
+
ignore_empty: true
|
|
19
|
+
});
|
|
20
|
+
return templateId ? getEntityRecord("postType", TEMPLATE_POST_TYPE, templateId)?.content?.raw : void 0;
|
|
21
|
+
},
|
|
22
|
+
[slug, isCustom]
|
|
23
|
+
);
|
|
31
24
|
}
|
|
32
25
|
function useStartPatterns(fallbackContent) {
|
|
33
|
-
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = useSelect(select => {
|
|
37
|
-
const {
|
|
38
|
-
getCurrentPostType,
|
|
39
|
-
getCurrentPostId
|
|
40
|
-
} = select(editorStore);
|
|
41
|
-
const {
|
|
42
|
-
getEntityRecord,
|
|
43
|
-
getBlockPatterns
|
|
44
|
-
} = select(coreStore);
|
|
26
|
+
const { slug, patterns } = useSelect((select) => {
|
|
27
|
+
const { getCurrentPostType, getCurrentPostId } = select(editorStore);
|
|
28
|
+
const { getEntityRecord, getBlockPatterns } = select(coreStore);
|
|
45
29
|
const postId = getCurrentPostId();
|
|
46
30
|
const postType = getCurrentPostType();
|
|
47
|
-
const record = getEntityRecord(
|
|
31
|
+
const record = getEntityRecord("postType", postType, postId);
|
|
48
32
|
return {
|
|
49
33
|
slug: record.slug,
|
|
50
34
|
patterns: getBlockPatterns()
|
|
51
35
|
};
|
|
52
36
|
}, []);
|
|
53
|
-
const currentThemeStylesheet = useSelect(
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
const currentThemeStylesheet = useSelect(
|
|
38
|
+
(select) => select(coreStore).getCurrentTheme().stylesheet
|
|
39
|
+
);
|
|
56
40
|
function injectThemeAttributeInBlockTemplateContent(block) {
|
|
57
|
-
if (block.innerBlocks.find(
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
if (block.innerBlocks.find(
|
|
42
|
+
(innerBlock) => innerBlock.name === "core/template-part"
|
|
43
|
+
)) {
|
|
44
|
+
block.innerBlocks = block.innerBlocks.map((innerBlock) => {
|
|
45
|
+
if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
|
|
60
46
|
innerBlock.attributes.theme = currentThemeStylesheet;
|
|
61
47
|
}
|
|
62
48
|
return innerBlock;
|
|
63
49
|
});
|
|
64
50
|
}
|
|
65
|
-
if (block.name ===
|
|
51
|
+
if (block.name === "core/template-part" && block.attributes.theme === void 0) {
|
|
66
52
|
block.attributes.theme = currentThemeStylesheet;
|
|
67
53
|
}
|
|
68
54
|
return block;
|
|
69
55
|
}
|
|
70
56
|
return useMemo(() => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
name: "fallback",
|
|
60
|
+
blocks: parse(fallbackContent),
|
|
61
|
+
title: __("Fallback content")
|
|
62
|
+
},
|
|
63
|
+
...patterns.filter((pattern) => {
|
|
64
|
+
return Array.isArray(pattern.templateTypes) && pattern.templateTypes.some(
|
|
65
|
+
(templateType) => slug.startsWith(templateType)
|
|
66
|
+
);
|
|
67
|
+
}).map((pattern) => {
|
|
68
|
+
return {
|
|
69
|
+
...pattern,
|
|
70
|
+
blocks: parse(pattern.content).map(
|
|
71
|
+
(block) => injectThemeAttributeInBlockTemplateContent(block)
|
|
72
|
+
)
|
|
73
|
+
};
|
|
74
|
+
})
|
|
75
|
+
];
|
|
84
76
|
}, [fallbackContent, slug, patterns]);
|
|
85
77
|
}
|
|
86
|
-
function PatternSelection({
|
|
87
|
-
|
|
88
|
-
onChoosePattern,
|
|
89
|
-
postType
|
|
90
|
-
}) {
|
|
91
|
-
const [,, onChange] = useEntityBlockEditor('postType', postType);
|
|
78
|
+
function PatternSelection({ fallbackContent, onChoosePattern, postType }) {
|
|
79
|
+
const [, , onChange] = useEntityBlockEditor("postType", postType);
|
|
92
80
|
const blockPatterns = useStartPatterns(fallbackContent);
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
BlockPatternsList,
|
|
83
|
+
{
|
|
84
|
+
blockPatterns,
|
|
85
|
+
onClickPattern: (pattern, blocks) => {
|
|
86
|
+
onChange(blocks, { selection: void 0 });
|
|
87
|
+
onChoosePattern();
|
|
88
|
+
}
|
|
100
89
|
}
|
|
101
|
-
|
|
90
|
+
);
|
|
102
91
|
}
|
|
103
|
-
function StartModal({
|
|
104
|
-
slug,
|
|
105
|
-
isCustom,
|
|
106
|
-
onClose,
|
|
107
|
-
postType
|
|
108
|
-
}) {
|
|
92
|
+
function StartModal({ slug, isCustom, onClose, postType }) {
|
|
109
93
|
const fallbackContent = useFallbackTemplateContent(slug, isCustom);
|
|
110
94
|
if (!fallbackContent) {
|
|
111
95
|
return null;
|
|
112
96
|
}
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
children:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
97
|
+
return /* @__PURE__ */ jsxs(
|
|
98
|
+
Modal,
|
|
99
|
+
{
|
|
100
|
+
className: "editor-start-template-options__modal",
|
|
101
|
+
title: __("Choose a pattern"),
|
|
102
|
+
closeLabel: __("Cancel"),
|
|
103
|
+
focusOnMount: "firstElement",
|
|
104
|
+
onRequestClose: onClose,
|
|
105
|
+
isFullScreen: true,
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx("div", { className: "editor-start-template-options__modal-content", children: /* @__PURE__ */ jsx(
|
|
108
|
+
PatternSelection,
|
|
109
|
+
{
|
|
110
|
+
fallbackContent,
|
|
111
|
+
slug,
|
|
112
|
+
isCustom,
|
|
113
|
+
postType,
|
|
114
|
+
onChoosePattern: () => {
|
|
115
|
+
onClose();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
) }),
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
Flex,
|
|
121
|
+
{
|
|
122
|
+
className: "editor-start-template-options__modal__actions",
|
|
123
|
+
justify: "flex-end",
|
|
124
|
+
expanded: false,
|
|
125
|
+
children: /* @__PURE__ */ jsx(FlexItem, { children: /* @__PURE__ */ jsx(
|
|
126
|
+
Button,
|
|
127
|
+
{
|
|
128
|
+
__next40pxDefaultSize: true,
|
|
129
|
+
variant: "tertiary",
|
|
130
|
+
onClick: onClose,
|
|
131
|
+
children: __("Skip")
|
|
132
|
+
}
|
|
133
|
+
) })
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
);
|
|
145
139
|
}
|
|
146
|
-
|
|
140
|
+
function StartTemplateOptions() {
|
|
147
141
|
const [isClosed, setIsClosed] = useState(false);
|
|
148
|
-
const {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, []);
|
|
142
|
+
const { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(
|
|
143
|
+
(select) => {
|
|
144
|
+
const { getCurrentPostType, getCurrentPostId } = select(editorStore);
|
|
145
|
+
const _postType = getCurrentPostType();
|
|
146
|
+
const _postId = getCurrentPostId();
|
|
147
|
+
const { getEditedEntityRecord, hasEditsForEntityRecord } = select(coreStore);
|
|
148
|
+
const templateRecord = getEditedEntityRecord(
|
|
149
|
+
"postType",
|
|
150
|
+
_postType,
|
|
151
|
+
_postId
|
|
152
|
+
);
|
|
153
|
+
const hasEdits = hasEditsForEntityRecord(
|
|
154
|
+
"postType",
|
|
155
|
+
_postType,
|
|
156
|
+
_postId
|
|
157
|
+
);
|
|
158
|
+
return {
|
|
159
|
+
shouldOpenModal: !hasEdits && "" === templateRecord.content && TEMPLATE_POST_TYPE === _postType,
|
|
160
|
+
slug: templateRecord.slug,
|
|
161
|
+
isCustom: templateRecord.is_custom,
|
|
162
|
+
postType: _postType,
|
|
163
|
+
postId: _postId
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
[]
|
|
167
|
+
);
|
|
175
168
|
useEffect(() => {
|
|
176
|
-
// Should reset the modal state when navigating to a new page/post.
|
|
177
169
|
setIsClosed(false);
|
|
178
170
|
}, [postType, postId]);
|
|
179
171
|
if (!shouldOpenModal || isClosed) {
|
|
180
172
|
return null;
|
|
181
173
|
}
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
174
|
+
return /* @__PURE__ */ jsx(
|
|
175
|
+
StartModal,
|
|
176
|
+
{
|
|
177
|
+
slug,
|
|
178
|
+
isCustom,
|
|
179
|
+
postType,
|
|
180
|
+
onClose: () => setIsClosed(true)
|
|
181
|
+
}
|
|
182
|
+
);
|
|
188
183
|
}
|
|
189
|
-
|
|
184
|
+
export {
|
|
185
|
+
StartTemplateOptions as default
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"names":["Modal","Flex","FlexItem","Button","__","useState","useMemo","useEffect","__experimentalBlockPatternsList","BlockPatternsList","useSelect","parse","store","coreStore","useEntityBlockEditor","editorStore","TEMPLATE_POST_TYPE","jsx","_jsx","jsxs","_jsxs","useFallbackTemplateContent","slug","isCustom","select","getEntityRecord","getDefaultTemplateId","templateId","is_custom","ignore_empty","content","raw","undefined","useStartPatterns","fallbackContent","patterns","getCurrentPostType","getCurrentPostId","getBlockPatterns","postId","postType","record","currentThemeStylesheet","getCurrentTheme","stylesheet","injectThemeAttributeInBlockTemplateContent","block","innerBlocks","find","innerBlock","name","map","attributes","theme","blocks","title","filter","pattern","Array","isArray","templateTypes","some","templateType","startsWith","PatternSelection","onChoosePattern","onChange","blockPatterns","onClickPattern","selection","StartModal","onClose","className","closeLabel","focusOnMount","onRequestClose","isFullScreen","children","justify","expanded","__next40pxDefaultSize","variant","onClick","StartTemplateOptions","isClosed","setIsClosed","shouldOpenModal","_postType","_postId","getEditedEntityRecord","hasEditsForEntityRecord","templateRecord","hasEdits"],"sources":["@wordpress/editor/src/components/start-template-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getDefaultTemplateId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateId = getDefaultTemplateId( {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} );\n\t\t\treturn templateId\n\t\t\t\t? getEntityRecord( 'postType', TEMPLATE_POST_TYPE, templateId )\n\t\t\t\t\t\t?.content?.raw\n\t\t\t\t: undefined;\n\t\t},\n\t\t[ slug, isCustom ]\n\t);\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEntityRecord, getBlockPatterns } = select( coreStore );\n\t\tconst postId = getCurrentPostId();\n\t\tconst postType = getCurrentPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getBlockPatterns(),\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"editor-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"editor-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartTemplateOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\tconst _postId = getCurrentPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType,\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t\tpostId: _postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldOpenModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () => setIsClosed( true ) }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACrE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,QAAQ,oBAAoB;AACjE,SAASC,+BAA+B,IAAIC,iBAAiB,QAAQ,yBAAyB;AAC9F,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,QAAQ,mBAAmB;AACzC,SAASC,KAAK,IAAIC,SAAS,EAAEC,oBAAoB,QAAQ,sBAAsB;;AAE/E;AACA;AACA;AACA,SAASF,KAAK,IAAIG,WAAW,QAAQ,aAAa;AAClD,SAASC,kBAAkB,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3D,SAASC,0BAA0BA,CAAEC,IAAI,EAA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/D,SAAS;MAClCY,QAAQ,EAAE+C,SAAS;MACnBhD,MAAM,EAAEiD;IACT,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAEDjF,SAAS,CAAE,MAAM;IAChB;IACA8E,WAAW,CAAE,KAAM,CAAC;EACrB,CAAC,EAAE,CAAE7C,QAAQ,EAAED,MAAM,CAAG,CAAC;EAEzB,IAAK,CAAE+C,eAAe,IAAIF,QAAQ,EAAG;IACpC,OAAO,IAAI;EACZ;EAEA,oBACClE,IAAA,CAACoD,UAAU;IACVhD,IAAI,EAAGA,IAAM;IACbC,QAAQ,EAAGA,QAAU;IACrBiB,QAAQ,EAAGA,QAAU;IACrB+B,OAAO,EAAGA,CAAA,KAAMc,WAAW,CAAE,IAAK;EAAG,CACrC,CAAC;AAEJ","ignoreList":[]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/start-template-options/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getDefaultTemplateId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateId = getDefaultTemplateId( {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} );\n\t\t\treturn templateId\n\t\t\t\t? getEntityRecord( 'postType', TEMPLATE_POST_TYPE, templateId )\n\t\t\t\t\t\t?.content?.raw\n\t\t\t\t: undefined;\n\t\t},\n\t\t[ slug, isCustom ]\n\t);\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEntityRecord, getBlockPatterns } = select( coreStore );\n\t\tconst postId = getCurrentPostId();\n\t\tconst postType = getCurrentPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getBlockPatterns(),\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"editor-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"editor-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartTemplateOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\tconst _postId = getCurrentPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType,\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t\tpostId: _postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldOpenModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () => setIsClosed( true ) }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAiHE,cAgBA,YAhBA;AA9GF,SAAS,OAAO,MAAM,UAAU,cAAc;AAC9C,SAAS,UAAU;AACnB,SAAS,UAAU,SAAS,iBAAiB;AAC7C,SAAS,mCAAmC,yBAAyB;AACrE,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,SAAS,WAAW,4BAA4B;AAKzD,SAAS,SAAS,mBAAmB;AACrC,SAAS,0BAA0B;AAEnC,SAAS,2BAA4B,MAAM,WAAW,OAAQ;AAC7D,SAAO;AAAA,IACN,CAAE,WAAY;AACb,YAAM,EAAE,iBAAiB,qBAAqB,IAC7C,OAAQ,SAAU;AACnB,YAAM,aAAa,qBAAsB;AAAA,QACxC;AAAA,QACA,WAAW;AAAA,QACX,cAAc;AAAA,MACf,CAAE;AACF,aAAO,aACJ,gBAAiB,YAAY,oBAAoB,UAAW,GAC1D,SAAS,MACX;AAAA,IACJ;AAAA,IACA,CAAE,MAAM,QAAS;AAAA,EAClB;AACD;AAEA,SAAS,iBAAkB,iBAAkB;AAC5C,QAAM,EAAE,MAAM,SAAS,IAAI,UAAW,CAAE,WAAY;AACnD,UAAM,EAAE,oBAAoB,iBAAiB,IAAI,OAAQ,WAAY;AACrE,UAAM,EAAE,iBAAiB,iBAAiB,IAAI,OAAQ,SAAU;AAChE,UAAM,SAAS,iBAAiB;AAChC,UAAM,WAAW,mBAAmB;AACpC,UAAM,SAAS,gBAAiB,YAAY,UAAU,MAAO;AAC7D,WAAO;AAAA,MACN,MAAM,OAAO;AAAA,MACb,UAAU,iBAAiB;AAAA,IAC5B;AAAA,EACD,GAAG,CAAC,CAAE;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AAiB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,YAAM,WAAW;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAEA,aAAO;AAAA,QACN,iBACC,CAAE,YACF,OAAO,eAAe,WACtB,uBAAuB;AAAA,QACxB,MAAM,eAAe;AAAA,QACrB,UAAU,eAAe;AAAA,QACzB,UAAU;AAAA,QACV,QAAQ;AAAA,MACT;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AAEA,YAAW,MAAM;AAEhB,gBAAa,KAAM;AAAA,EACpB,GAAG,CAAE,UAAU,MAAO,CAAE;AAExB,MAAK,CAAE,mBAAmB,UAAW;AACpC,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAU,MAAM,YAAa,IAAK;AAAA;AAAA,EACnC;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,64 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}) => /*#__PURE__*/_jsx(TableOfContentsPanel, {
|
|
47
|
-
onRequestClose: onClose,
|
|
48
|
-
hasOutlineItemsDisabled: hasOutlineItemsDisabled
|
|
49
|
-
})
|
|
50
|
-
});
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { Dropdown, Button } from "@wordpress/components";
|
|
4
|
+
import { useSelect } from "@wordpress/data";
|
|
5
|
+
import { info } from "@wordpress/icons";
|
|
6
|
+
import { forwardRef } from "@wordpress/element";
|
|
7
|
+
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
8
|
+
import TableOfContentsPanel from "./panel";
|
|
9
|
+
function TableOfContents({ hasOutlineItemsDisabled, repositionDropdown, ...props }, ref) {
|
|
10
|
+
const hasBlocks = useSelect(
|
|
11
|
+
(select) => !!select(blockEditorStore).getBlockCount(),
|
|
12
|
+
[]
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Dropdown,
|
|
16
|
+
{
|
|
17
|
+
popoverProps: {
|
|
18
|
+
placement: repositionDropdown ? "right" : "bottom"
|
|
19
|
+
},
|
|
20
|
+
className: "table-of-contents",
|
|
21
|
+
contentClassName: "table-of-contents__popover",
|
|
22
|
+
renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ jsx(
|
|
23
|
+
Button,
|
|
24
|
+
{
|
|
25
|
+
__next40pxDefaultSize: true,
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
onClick: hasBlocks ? onToggle : void 0,
|
|
29
|
+
icon: info,
|
|
30
|
+
"aria-expanded": isOpen,
|
|
31
|
+
"aria-haspopup": "true",
|
|
32
|
+
label: __("Details"),
|
|
33
|
+
tooltipPosition: "bottom",
|
|
34
|
+
"aria-disabled": !hasBlocks
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
renderContent: ({ onClose }) => /* @__PURE__ */ jsx(
|
|
38
|
+
TableOfContentsPanel,
|
|
39
|
+
{
|
|
40
|
+
onRequestClose: onClose,
|
|
41
|
+
hasOutlineItemsDisabled
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
51
46
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* @param {boolean} props.hasOutlineItemsDisabled Whether outline items are disabled.
|
|
58
|
-
* @param {boolean} props.repositionDropdown Whether to reposition the dropdown.
|
|
59
|
-
* @param {Element.ref} ref The component's ref.
|
|
60
|
-
*
|
|
61
|
-
* @return {React.ReactNode} The rendered table of contents component.
|
|
62
|
-
*/
|
|
63
|
-
export default forwardRef(TableOfContents);
|
|
64
|
-
//# sourceMappingURL=index.js.map
|
|
47
|
+
var table_of_contents_default = forwardRef(TableOfContents);
|
|
48
|
+
export {
|
|
49
|
+
table_of_contents_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/table-of-contents/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { info } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport TableOfContentsPanel from './panel';\n\nfunction TableOfContents(\n\t{ hasOutlineItemsDisabled, repositionDropdown, ...props },\n\tref\n) {\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ {\n\t\t\t\tplacement: repositionDropdown ? 'right' : 'bottom',\n\t\t\t} }\n\t\t\tclassName=\"table-of-contents\"\n\t\t\tcontentClassName=\"table-of-contents__popover\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tonClick={ hasBlocks ? onToggle : undefined }\n\t\t\t\t\ticon={ info }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Details' ) }\n\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\taria-disabled={ ! hasBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<TableOfContentsPanel\n\t\t\t\t\tonRequestClose={ onClose }\n\t\t\t\t\thasOutlineItemsDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a table of contents component.\n *\n * @param {Object} props The component props.\n * @param {boolean} props.hasOutlineItemsDisabled Whether outline items are disabled.\n * @param {boolean} props.repositionDropdown Whether to reposition the dropdown.\n * @param {Element.ref} ref The component's ref.\n *\n * @return {React.ReactNode} The rendered table of contents component.\n */\nexport default forwardRef( TableOfContents );\n"],
|
|
5
|
+
"mappings": "AA+BI;AA5BJ,SAAS,UAAU;AACnB,SAAS,UAAU,cAAc;AACjC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,SAAS,wBAAwB;AAK1C,OAAO,0BAA0B;AAEjC,SAAS,gBACR,EAAE,yBAAyB,oBAAoB,GAAG,MAAM,GACxD,KACC;AACD,QAAM,YAAY;AAAA,IACjB,CAAE,WAAY,CAAC,CAAE,OAAQ,gBAAiB,EAAE,cAAc;AAAA,IAC1D,CAAC;AAAA,EACF;AACA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,cAAe;AAAA,QACd,WAAW,qBAAqB,UAAU;AAAA,MAC3C;AAAA,MACA,WAAU;AAAA,MACV,kBAAiB;AAAA,MACjB,cAAe,CAAE,EAAE,QAAQ,SAAS,MACnC;AAAA,QAAC;AAAA;AAAA,UACA,uBAAqB;AAAA,UACnB,GAAG;AAAA,UACL;AAAA,UACA,SAAU,YAAY,WAAW;AAAA,UACjC,MAAO;AAAA,UACP,iBAAgB;AAAA,UAChB,iBAAc;AAAA,UAEd,OAAQ,GAAI,SAAU;AAAA,UACtB,iBAAgB;AAAA,UAChB,iBAAgB,CAAE;AAAA;AAAA,MACnB;AAAA,MAED,eAAgB,CAAE,EAAE,QAAQ,MAC3B;AAAA,QAAC;AAAA;AAAA,UACA,gBAAiB;AAAA,UACjB;AAAA;AAAA,MACD;AAAA;AAAA,EAEF;AAEF;AAYA,IAAO,4BAAQ,WAAY,eAAgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|