@wordpress/editor 14.15.1 → 14.16.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/CHANGELOG.md +2 -0
- package/README.md +1 -1
- package/build/bindings/pattern-overrides.js +1 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/components/collab-sidebar/index.js +1 -4
- package/build/components/collab-sidebar/index.js.map +1 -1
- package/build/components/document-outline/index.js +2 -2
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/header/index.js +3 -2
- package/build/components/header/index.js.map +1 -1
- package/build/components/post-excerpt/index.js +1 -1
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +7 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +2 -2
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/post-schedule/index.js +1 -1
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +1 -1
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/provider/index.js +25 -17
- package/build/components/provider/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +1 -1
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/visual-editor/index.js +2 -2
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/dataviews/fields/content-preview/content-preview-view.js +101 -0
- package/build/dataviews/fields/content-preview/content-preview-view.js.map +1 -0
- package/build/dataviews/fields/content-preview/index.js +26 -0
- package/build/dataviews/fields/content-preview/index.js.map +1 -0
- package/build/dataviews/store/private-actions.js +3 -1
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/store/private-actions.js +1 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +7 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +1 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/components/collab-sidebar/index.js +1 -4
- package/build-module/components/collab-sidebar/index.js.map +1 -1
- package/build-module/components/document-outline/index.js +2 -2
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/header/index.js +3 -2
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +1 -1
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +7 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +2 -2
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/post-schedule/index.js +1 -1
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +1 -1
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/provider/index.js +25 -17
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +1 -1
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/visual-editor/index.js +2 -2
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/dataviews/fields/content-preview/content-preview-view.js +95 -0
- package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +1 -0
- package/build-module/dataviews/fields/content-preview/index.js +19 -0
- package/build-module/dataviews/fields/content-preview/index.js.map +1 -0
- package/build-module/dataviews/store/private-actions.js +2 -1
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/store/private-actions.js +1 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +7 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-style/style-rtl.css +24 -8
- package/build-style/style.css +24 -8
- package/build-types/components/autocompleters/user.d.ts +5 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/header/index.d.ts.map +1 -1
- package/build-types/components/post-author/hook.d.ts +1 -1
- package/build-types/components/post-preview-button/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/index.d.ts +1 -1
- package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts +9 -9
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +1 -1
- package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts +5 -0
- package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -0
- package/build-types/dataviews/fields/content-preview/index.d.ts +8 -0
- package/build-types/dataviews/fields/content-preview/index.d.ts.map +1 -0
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +1 -1
- package/package.json +37 -37
- package/src/bindings/pattern-overrides.js +1 -1
- package/src/components/autocompleters/style.scss +1 -1
- package/src/components/collab-sidebar/index.js +1 -4
- package/src/components/document-outline/index.js +2 -2
- package/src/components/header/index.js +8 -2
- package/src/components/post-excerpt/index.js +1 -1
- package/src/components/post-preview-button/index.js +5 -1
- package/src/components/post-publish-button/index.js +2 -2
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
- package/src/components/post-schedule/index.js +1 -1
- package/src/components/post-template/swap-template-button.js +1 -1
- package/src/components/provider/index.js +32 -20
- package/src/components/sidebar/post-summary.js +1 -1
- package/src/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/src/components/visual-editor/index.js +2 -2
- package/src/dataviews/fields/content-preview/content-preview-view.tsx +108 -0
- package/src/dataviews/fields/content-preview/index.tsx +21 -0
- package/src/dataviews/fields/content-preview/style.scss +21 -0
- package/src/dataviews/store/private-actions.ts +4 -0
- package/src/store/private-actions.js +1 -1
- package/src/store/private-selectors.js +15 -8
- package/src/style.scss +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fastDeepEqual","store","blockEditorStore","createSelector","createRegistrySelector","layout","symbol","navigation","page","pageIcon","verse","coreStore","getRenderingMode","getCurrentPost","getEntityActions","_getEntityActions","getEntityFields","_getEntityFields","isEntityReady","_isEntityReady","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInserter","select","state","blockInserterPanel","postContentClientId","getBlocksByName","getListViewToggleRef","listViewToggleRef","getInserterSidebarToggleRef","inserterSidebarToggleRef","CARD_ICONS","wp_block","wp_navigation","post","getPostIcon","postType","options","getEntityRecord","default_template_part_areas","find","item","area","icon","postTypeEntity","getPostType","startsWith","slice","hasPostMetaChanges","postId","type","currentPostType","id","currentPostId","edits","getEntityRecordNonTransientEdits","meta","originalPostMeta","footnotes","args","dataviews","getPostBlocksByName","blockNames","Array","isArray","getBlockParents","getBlockName","filter","clientId","every","parentClientId","parentBlockName","includes","getBlocks"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode, getCurrentPost } from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tgetEntityFields as _getEntityFields,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\treturn (\n\t\t\t\t\t(\n\t\t\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t\t)?.default_template_part_areas || []\n\t\t\t\t\t).find( ( item ) => options.area === item.area )?.icon ||\n\t\t\t\t\tlayout\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\nexport function getEntityFields( state, ...args ) {\n\treturn _getEntityFields( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,iBAAiB;AACxE,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D,sBAAsB,CAAIsB,MAAM,IAClEvB,cAAc,CACb,CAAEwB,KAAK,EAAEuC,UAAU,KAAM;EACxBA,UAAU,GAAGC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GACrCA,UAAU,GACV,CAAEA,UAAU,CAAE;EACjB,MAAM;IAAEpC,eAAe;IAAEuC,eAAe;IAAEC;EAAa,CAAC,GACvD5C,MAAM,CAAExB,gBAAiB,CAAC;EAC3B,OAAO4B,eAAe,CAAEoC,UAAW,CAAC,CAACK,MAAM,CAAIC,QAAQ,IACtDH,eAAe,CAAEG,QAAS,CAAC,CAACC,KAAK,CAAIC,cAAc,IAAM;IACxD,MAAMC,eAAe,GAAGL,YAAY,CAAEI,cAAe,CAAC;IACtD;MACC;MACAC,eAAe,KAAK,YAAY;MAChC;MACA,CAAET,UAAU,CAACU,QAAQ,CAAED,eAAgB;IAAC;EAE1C,CAAE,CACH,CAAC;AACF,CAAC,EACD,MAAM,CAAEjD,MAAM,CAAExB,gBAAiB,CAAC,CAAC2E,SAAS,CAAC,CAAC,CAC/C,CACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["fastDeepEqual","store","blockEditorStore","createSelector","createRegistrySelector","layout","symbol","navigation","page","pageIcon","verse","coreStore","getRenderingMode","getCurrentPost","getEntityActions","_getEntityActions","getEntityFields","_getEntityFields","isEntityReady","_isEntityReady","getTemplatePartIcon","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInserter","select","state","blockInserterPanel","postContentClientId","getBlocksByName","getListViewToggleRef","listViewToggleRef","getInserterSidebarToggleRef","inserterSidebarToggleRef","CARD_ICONS","wp_block","wp_navigation","post","getPostIcon","postType","options","templateAreas","getEntityRecord","default_template_part_areas","areaData","find","item","area","icon","postTypeEntity","getPostType","startsWith","slice","hasPostMetaChanges","postId","type","currentPostType","id","currentPostId","edits","getEntityRecordNonTransientEdits","meta","originalPostMeta","footnotes","args","dataviews","getPostBlocksByName","blockNames","Array","isArray","getBlockParents","getBlockName","filter","clientId","every","parentClientId","parentBlockName","includes","getBlocks"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode, getCurrentPost } from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tgetEntityFields as _getEntityFields,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\nimport { getTemplatePartIcon } from '../utils';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\tconst templateAreas =\n\t\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t)?.default_template_part_areas || [];\n\n\t\t\t\tconst areaData = templateAreas.find(\n\t\t\t\t\t( item ) => options.area === item.area\n\t\t\t\t);\n\n\t\t\t\tif ( areaData?.icon ) {\n\t\t\t\t\treturn getTemplatePartIcon( areaData.icon );\n\t\t\t\t}\n\n\t\t\t\treturn layout;\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\nexport function getEntityFields( state, ...args ) {\n\treturn _getEntityFields( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,iBAAiB;AACxE,SACCC,MAAM,EACNC,MAAM,EACNC,UAAU,EACVC,IAAI,IAAIC,QAAQ,EAChBC,KAAK,QACC,kBAAkB;AACzB,SAAST,KAAK,IAAIU,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,cAAc,QAAQ,aAAa;AAC9D,SACCC,gBAAgB,IAAIC,iBAAiB,EACrCC,eAAe,IAAIC,gBAAgB,EACnCC,aAAa,IAAIC,cAAc,QACzB,sCAAsC;AAC7C,SAASC,mBAAmB,QAAQ,UAAU;AAE9C,MAAMC,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED,SAAS;EACzBE,WAAW,EAAEF;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,WAAW,GAAGtB,sBAAsB,CAAIuB,MAAM,IAC1DxB,cAAc,CACXyB,KAAK,IAAM;EACZ,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,QAAQ,EAAG;IACnD,OAAOD,KAAK,C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K,YAAY;MAChC;MACA,CAAET,UAAU,CAACU,QAAQ,CAAED,eAAgB;IAAC;EAE1C,CAAE,CACH,CAAC;AACF,CAAC,EACD,MAAM,CAAEnD,MAAM,CAAEzB,gBAAiB,CAAC,CAAC8E,SAAS,CAAC,CAAC,CAC/C,CACD,CAAC","ignoreList":[]}
|
|
@@ -2163,7 +2163,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2163
2163
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
2164
2164
|
padding: 6px 8px;
|
|
2165
2165
|
box-shadow: 0 0 0 transparent;
|
|
2166
|
-
transition: box-shadow 0.1s linear;
|
|
2167
2166
|
border-radius: 2px;
|
|
2168
2167
|
border: 1px solid #949494;
|
|
2169
2168
|
/* Fonts smaller than 16px causes mobile safari to zoom. */
|
|
@@ -2181,10 +2180,9 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2181
2180
|
position: relative;
|
|
2182
2181
|
margin-top: 2px;
|
|
2183
2182
|
}
|
|
2184
|
-
@media (prefers-reduced-motion
|
|
2183
|
+
@media not (prefers-reduced-motion) {
|
|
2185
2184
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
2186
|
-
transition
|
|
2187
|
-
transition-delay: 0s;
|
|
2185
|
+
transition: box-shadow 0.1s linear;
|
|
2188
2186
|
}
|
|
2189
2187
|
}
|
|
2190
2188
|
@media (min-width: 600px) {
|
|
@@ -2260,7 +2258,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2260
2258
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
2261
2259
|
padding: 6px 8px;
|
|
2262
2260
|
box-shadow: 0 0 0 transparent;
|
|
2263
|
-
transition: box-shadow 0.1s linear;
|
|
2264
2261
|
border-radius: 2px;
|
|
2265
2262
|
border: 1px solid #949494;
|
|
2266
2263
|
/* Fonts smaller than 16px causes mobile safari to zoom. */
|
|
@@ -2270,10 +2267,9 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2270
2267
|
margin-right: 32px;
|
|
2271
2268
|
width: calc(100% - 32px);
|
|
2272
2269
|
}
|
|
2273
|
-
@media (prefers-reduced-motion
|
|
2270
|
+
@media not (prefers-reduced-motion) {
|
|
2274
2271
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text] {
|
|
2275
|
-
transition
|
|
2276
|
-
transition-delay: 0s;
|
|
2272
|
+
transition: box-shadow 0.1s linear;
|
|
2277
2273
|
}
|
|
2278
2274
|
}
|
|
2279
2275
|
@media (min-width: 600px) {
|
|
@@ -2652,4 +2648,24 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2652
2648
|
.editor-visual-editor.is-scrollable .block-editor-block-canvas > .block-editor-iframe__container > .block-editor-iframe__scale-container {
|
|
2653
2649
|
flex: 1 0 fit-content;
|
|
2654
2650
|
display: flow-root;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
.editor-fields-content-preview {
|
|
2654
|
+
display: flex;
|
|
2655
|
+
flex-direction: column;
|
|
2656
|
+
height: 100%;
|
|
2657
|
+
border-radius: 4px;
|
|
2658
|
+
}
|
|
2659
|
+
.dataviews-view-table .editor-fields-content-preview {
|
|
2660
|
+
width: 96px;
|
|
2661
|
+
flex-grow: 0;
|
|
2662
|
+
}
|
|
2663
|
+
.editor-fields-content-preview .block-editor-block-preview__container,
|
|
2664
|
+
.editor-fields-content-preview .editor-fields-content-preview__empty {
|
|
2665
|
+
margin-top: auto;
|
|
2666
|
+
margin-bottom: auto;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
.editor-fields-content-preview__empty {
|
|
2670
|
+
text-align: center;
|
|
2655
2671
|
}
|
package/build-style/style.css
CHANGED
|
@@ -2167,7 +2167,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2167
2167
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
2168
2168
|
padding: 6px 8px;
|
|
2169
2169
|
box-shadow: 0 0 0 transparent;
|
|
2170
|
-
transition: box-shadow 0.1s linear;
|
|
2171
2170
|
border-radius: 2px;
|
|
2172
2171
|
border: 1px solid #949494;
|
|
2173
2172
|
/* Fonts smaller than 16px causes mobile safari to zoom. */
|
|
@@ -2185,10 +2184,9 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2185
2184
|
position: relative;
|
|
2186
2185
|
margin-top: 2px;
|
|
2187
2186
|
}
|
|
2188
|
-
@media (prefers-reduced-motion
|
|
2187
|
+
@media not (prefers-reduced-motion) {
|
|
2189
2188
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio] {
|
|
2190
|
-
transition
|
|
2191
|
-
transition-delay: 0s;
|
|
2189
|
+
transition: box-shadow 0.1s linear;
|
|
2192
2190
|
}
|
|
2193
2191
|
}
|
|
2194
2192
|
@media (min-width: 600px) {
|
|
@@ -2264,7 +2262,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2264
2262
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
2265
2263
|
padding: 6px 8px;
|
|
2266
2264
|
box-shadow: 0 0 0 transparent;
|
|
2267
|
-
transition: box-shadow 0.1s linear;
|
|
2268
2265
|
border-radius: 2px;
|
|
2269
2266
|
border: 1px solid #949494;
|
|
2270
2267
|
/* Fonts smaller than 16px causes mobile safari to zoom. */
|
|
@@ -2274,10 +2271,9 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2274
2271
|
margin-left: 32px;
|
|
2275
2272
|
width: calc(100% - 32px);
|
|
2276
2273
|
}
|
|
2277
|
-
@media (prefers-reduced-motion
|
|
2274
|
+
@media not (prefers-reduced-motion) {
|
|
2278
2275
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text] {
|
|
2279
|
-
transition
|
|
2280
|
-
transition-delay: 0s;
|
|
2276
|
+
transition: box-shadow 0.1s linear;
|
|
2281
2277
|
}
|
|
2282
2278
|
}
|
|
2283
2279
|
@media (min-width: 600px) {
|
|
@@ -2656,4 +2652,24 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2656
2652
|
.editor-visual-editor.is-scrollable .block-editor-block-canvas > .block-editor-iframe__container > .block-editor-iframe__scale-container {
|
|
2657
2653
|
flex: 1 0 fit-content;
|
|
2658
2654
|
display: flow-root;
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
.editor-fields-content-preview {
|
|
2658
|
+
display: flex;
|
|
2659
|
+
flex-direction: column;
|
|
2660
|
+
height: 100%;
|
|
2661
|
+
border-radius: 4px;
|
|
2662
|
+
}
|
|
2663
|
+
.dataviews-view-table .editor-fields-content-preview {
|
|
2664
|
+
width: 96px;
|
|
2665
|
+
flex-grow: 0;
|
|
2666
|
+
}
|
|
2667
|
+
.editor-fields-content-preview .block-editor-block-preview__container,
|
|
2668
|
+
.editor-fields-content-preview .editor-fields-content-preview__empty {
|
|
2669
|
+
margin-top: auto;
|
|
2670
|
+
margin-bottom: auto;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
.editor-fields-content-preview__empty {
|
|
2674
|
+
text-align: center;
|
|
2659
2675
|
}
|
|
@@ -3,7 +3,11 @@ declare const _default: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
className: string;
|
|
5
5
|
triggerPrefix: string;
|
|
6
|
-
useItems(filterValue: any):
|
|
6
|
+
useItems(filterValue: any): {
|
|
7
|
+
key: string;
|
|
8
|
+
value: import("@wordpress/core-data").User<"edit">;
|
|
9
|
+
label: import("react").JSX.Element;
|
|
10
|
+
}[][];
|
|
7
11
|
getOptionCompletion(user: any): string;
|
|
8
12
|
};
|
|
9
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AAwNA;;GAEG;AACH,4EAuJC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.js"],"names":[],"mappings":";AAqDA;;;;;;gCA6JC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-preview-button/index.js"],"names":[],"mappings":"AAqGA;;;;;;;;;;;;;;GAcG;AACH,6GARG;IAAwB,SAAS,EAAzB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,mBAAmB,EAAnC,OAAO;IACS,IAAI,EAApB,MAAM;IACU,SAAS;CAEjC,GAAS,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-preview-button/index.js"],"names":[],"mappings":"AAqGA;;;;;;;;;;;;;;GAcG;AACH,6GARG;IAAwB,SAAS,EAAzB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,mBAAmB,EAAnC,OAAO;IACS,IAAI,EAApB,MAAM;IACU,SAAS;CAEjC,GAAS,KAAK,CAAC,SAAS,CA8F1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/index.js"],"names":[],"mappings":"AAgBA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/index.js"],"names":[],"mappings":"AAgBA;;kCAkCC"}
|
|
@@ -3,6 +3,6 @@ export function useEditedPostContext(): {
|
|
|
3
3
|
postType: string;
|
|
4
4
|
};
|
|
5
5
|
export function useAllowSwitchingTemplates(): boolean;
|
|
6
|
-
export function useAvailableTemplates(postType: any): false | (import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any> | Partial<import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any>>)[] | undefined;
|
|
6
|
+
export function useAvailableTemplates(postType: any): false | (import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any> | Partial<import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any>>)[] | undefined;
|
|
7
7
|
export function useCurrentTemplateSlug(): any;
|
|
8
8
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA0BC;AAaD
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA0BC;AAaD,mpEAeC;AAED,8CAuBC"}
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
* All modification and changes are performed to the `@wordpress/core-data` store.
|
|
8
8
|
*
|
|
9
|
-
* @param {Object}
|
|
10
|
-
* @param {Object}
|
|
11
|
-
* @param {Object}
|
|
12
|
-
*
|
|
13
|
-
* @param {Object}
|
|
14
|
-
*
|
|
15
|
-
* @param {
|
|
16
|
-
*
|
|
9
|
+
* @param {Object} props The component props.
|
|
10
|
+
* @param {Object} [props.post] The post object to edit. This is required.
|
|
11
|
+
* @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.
|
|
12
|
+
* This is optional and can only be used when the post type supports templates (like posts and pages).
|
|
13
|
+
* @param {Object} [props.settings] The settings object to use for the editor.
|
|
14
|
+
* This is optional and can be used to override the default settings.
|
|
15
|
+
* @param {React.ReactNode} [props.children] Children elements for which the BlockEditorProvider context should apply.
|
|
16
|
+
* This is optional.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
@@ -32,7 +32,7 @@ export function EditorProvider(props: {
|
|
|
32
32
|
post?: Object | undefined;
|
|
33
33
|
__unstableTemplate?: Object | undefined;
|
|
34
34
|
settings?: Object | undefined;
|
|
35
|
-
children?:
|
|
35
|
+
children?: React.ReactNode;
|
|
36
36
|
}): React.ReactNode;
|
|
37
37
|
/**
|
|
38
38
|
* This component provides the editor context and manages the state of the block editor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AA6YA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAgC,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ,GAAhC,KAAK,CAAC,SAAS;CAGvB,GAWS,KAAK,CAAC,SAAS,CAW1B;AA9SD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GA2OE"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* user is focusing on editing page content and clicks on a disabled template
|
|
6
6
|
* block.
|
|
7
7
|
* - Displays a 'Edit your template to edit this block' dialog when the user
|
|
8
|
-
* is focusing on editing page
|
|
8
|
+
* is focusing on editing page content and double clicks on a disabled
|
|
9
9
|
* template block.
|
|
10
10
|
*
|
|
11
11
|
* @param {Object} props
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-preview-view.d.ts","sourceRoot":"","sources":["../../../../src/dataviews/fields/content-preview/content-preview-view.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAuDlD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,+BA2CpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dataviews/fields/content-preview/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQlD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAE,QAAQ,CAMtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAuC1D,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;;;EAQhB;AAED,wBAAgB,mBAAmB,CAAE,IAAI,EACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE;;;;;EAQrB;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM;;;;;EAQf;AAED,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;EAMrD;AAED,eAAO,MAAM,sBAAsB,aACtB,MAAM,oBACI;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,kBA6GtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"AAgFA,sDAEC;AACD,6DAEC;AAwFD,2GAEC;AAED,mEAEC;AAED,yGAEC;AAnJD;;;;;;GAMG;AACH;;;;EAmCE;AAeF;;;;EAuCE;AAEF;;;;;;;;;GASG;AACH;;;;EA2BE;AAcF;;;;;;;;GAQG;AACH;;;;EAsBE"}
|
|
@@ -1142,7 +1142,7 @@ export const __experimentalGetTemplateInfo: {
|
|
|
1142
1142
|
* @return {string|undefined} The post type label if available, otherwise undefined.
|
|
1143
1143
|
*/
|
|
1144
1144
|
export const getPostTypeLabel: {
|
|
1145
|
-
(state?: any):
|
|
1145
|
+
(state?: any): string | undefined;
|
|
1146
1146
|
isRegistrySelector?: boolean;
|
|
1147
1147
|
registry?: any;
|
|
1148
1148
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.16.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,41 +34,41 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "7.25.7",
|
|
37
|
-
"@wordpress/a11y": "^4.
|
|
38
|
-
"@wordpress/api-fetch": "^7.
|
|
39
|
-
"@wordpress/blob": "^4.
|
|
40
|
-
"@wordpress/block-editor": "^14.
|
|
41
|
-
"@wordpress/blocks": "^14.
|
|
42
|
-
"@wordpress/commands": "^1.
|
|
43
|
-
"@wordpress/components": "^29.
|
|
44
|
-
"@wordpress/compose": "^7.
|
|
45
|
-
"@wordpress/core-data": "^7.
|
|
46
|
-
"@wordpress/data": "^10.
|
|
47
|
-
"@wordpress/dataviews": "^4.
|
|
48
|
-
"@wordpress/date": "^5.
|
|
49
|
-
"@wordpress/deprecated": "^4.
|
|
50
|
-
"@wordpress/dom": "^4.
|
|
51
|
-
"@wordpress/element": "^6.
|
|
52
|
-
"@wordpress/fields": "^0.
|
|
53
|
-
"@wordpress/hooks": "^4.
|
|
54
|
-
"@wordpress/html-entities": "^4.
|
|
55
|
-
"@wordpress/i18n": "^5.
|
|
56
|
-
"@wordpress/icons": "^10.
|
|
57
|
-
"@wordpress/interface": "^9.0
|
|
58
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
59
|
-
"@wordpress/keycodes": "^4.
|
|
60
|
-
"@wordpress/media-utils": "^5.
|
|
61
|
-
"@wordpress/notices": "^5.
|
|
62
|
-
"@wordpress/patterns": "^2.
|
|
63
|
-
"@wordpress/plugins": "^7.
|
|
64
|
-
"@wordpress/preferences": "^4.
|
|
65
|
-
"@wordpress/private-apis": "^1.
|
|
66
|
-
"@wordpress/reusable-blocks": "^5.
|
|
67
|
-
"@wordpress/rich-text": "^7.
|
|
68
|
-
"@wordpress/server-side-render": "^5.
|
|
69
|
-
"@wordpress/url": "^4.
|
|
70
|
-
"@wordpress/warning": "^3.
|
|
71
|
-
"@wordpress/wordcount": "^4.
|
|
37
|
+
"@wordpress/a11y": "^4.16.0",
|
|
38
|
+
"@wordpress/api-fetch": "^7.16.0",
|
|
39
|
+
"@wordpress/blob": "^4.16.0",
|
|
40
|
+
"@wordpress/block-editor": "^14.11.0",
|
|
41
|
+
"@wordpress/blocks": "^14.5.0",
|
|
42
|
+
"@wordpress/commands": "^1.16.0",
|
|
43
|
+
"@wordpress/components": "^29.2.0",
|
|
44
|
+
"@wordpress/compose": "^7.16.0",
|
|
45
|
+
"@wordpress/core-data": "^7.16.0",
|
|
46
|
+
"@wordpress/data": "^10.16.0",
|
|
47
|
+
"@wordpress/dataviews": "^4.12.0",
|
|
48
|
+
"@wordpress/date": "^5.16.0",
|
|
49
|
+
"@wordpress/deprecated": "^4.16.0",
|
|
50
|
+
"@wordpress/dom": "^4.16.0",
|
|
51
|
+
"@wordpress/element": "^6.16.0",
|
|
52
|
+
"@wordpress/fields": "^0.8.0",
|
|
53
|
+
"@wordpress/hooks": "^4.16.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.16.0",
|
|
55
|
+
"@wordpress/i18n": "^5.16.0",
|
|
56
|
+
"@wordpress/icons": "^10.16.0",
|
|
57
|
+
"@wordpress/interface": "^9.1.0",
|
|
58
|
+
"@wordpress/keyboard-shortcuts": "^5.16.0",
|
|
59
|
+
"@wordpress/keycodes": "^4.16.0",
|
|
60
|
+
"@wordpress/media-utils": "^5.16.0",
|
|
61
|
+
"@wordpress/notices": "^5.16.0",
|
|
62
|
+
"@wordpress/patterns": "^2.16.0",
|
|
63
|
+
"@wordpress/plugins": "^7.16.0",
|
|
64
|
+
"@wordpress/preferences": "^4.16.0",
|
|
65
|
+
"@wordpress/private-apis": "^1.16.0",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.16.0",
|
|
67
|
+
"@wordpress/rich-text": "^7.16.0",
|
|
68
|
+
"@wordpress/server-side-render": "^5.16.0",
|
|
69
|
+
"@wordpress/url": "^4.16.0",
|
|
70
|
+
"@wordpress/warning": "^3.16.0",
|
|
71
|
+
"@wordpress/wordcount": "^4.16.0",
|
|
72
72
|
"change-case": "^4.1.2",
|
|
73
73
|
"client-zip": "^2.4.5",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "f48b9f56629e400891abb5ae491504de475237ff"
|
|
92
92
|
}
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
currentBlockAttributes?.metadata?.name
|
|
20
20
|
]?.[ attributeName ];
|
|
21
21
|
|
|
22
|
-
// If it has not been
|
|
22
|
+
// If it has not been overridden, return the original value.
|
|
23
23
|
// Check undefined because empty string is a valid value.
|
|
24
24
|
if ( overridableValue === undefined ) {
|
|
25
25
|
overridesValues[ attributeName ] =
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
flex-grow: 0;
|
|
12
12
|
flex-shrink: 0;
|
|
13
13
|
max-width: none; // we must override the gutenberg default of 100%
|
|
14
|
-
width: 24px; // avoid jarring resize by
|
|
14
|
+
width: 24px; // avoid jarring resize by setting the size upfront
|
|
15
15
|
height: 24px;
|
|
16
16
|
}
|
|
17
17
|
.editor-autocompleters__user-name {
|
|
@@ -29,8 +29,6 @@ import AddCommentToolbarButton from './comment-button-toolbar';
|
|
|
29
29
|
import { useGlobalStylesContext } from '../global-styles-provider';
|
|
30
30
|
import { getCommentIdsFromBlocks } from './utils';
|
|
31
31
|
|
|
32
|
-
const isBlockCommentExperimentEnabled =
|
|
33
|
-
window?.__experimentalEnableBlockComment;
|
|
34
32
|
const modifyBlockCommentAttributes = ( settings ) => {
|
|
35
33
|
if ( ! settings.attributes.blockCommentId ) {
|
|
36
34
|
settings.attributes = {
|
|
@@ -329,8 +327,7 @@ export default function CollabSidebar() {
|
|
|
329
327
|
} );
|
|
330
328
|
}
|
|
331
329
|
|
|
332
|
-
|
|
333
|
-
if ( ! isBlockCommentExperimentEnabled || postStatus === 'publish' ) {
|
|
330
|
+
if ( postStatus === 'publish' ) {
|
|
334
331
|
return null; // or maybe return some message indicating no threads are available.
|
|
335
332
|
}
|
|
336
333
|
|
|
@@ -168,7 +168,7 @@ export default function DocumentOutline( {
|
|
|
168
168
|
{ title }
|
|
169
169
|
</DocumentOutlineItem>
|
|
170
170
|
) }
|
|
171
|
-
{ headings.map( ( item
|
|
171
|
+
{ headings.map( ( item ) => {
|
|
172
172
|
// Headings remain the same, go up by one, or down by any amount.
|
|
173
173
|
// Otherwise there are missing levels.
|
|
174
174
|
const isIncorrectLevel =
|
|
@@ -184,7 +184,7 @@ export default function DocumentOutline( {
|
|
|
184
184
|
|
|
185
185
|
return (
|
|
186
186
|
<DocumentOutlineItem
|
|
187
|
-
key={
|
|
187
|
+
key={ item.clientId }
|
|
188
188
|
level={ `H${ item.level }` }
|
|
189
189
|
isValid={ isValid }
|
|
190
190
|
isDisabled={ hasOutlineItemsDisabled }
|
|
@@ -32,6 +32,9 @@ import {
|
|
|
32
32
|
} from '../../store/constants';
|
|
33
33
|
import { unlock } from '../../lock-unlock';
|
|
34
34
|
|
|
35
|
+
const isBlockCommentExperimentEnabled =
|
|
36
|
+
window?.__experimentalEnableBlockComment;
|
|
37
|
+
|
|
35
38
|
const toolbarVariations = {
|
|
36
39
|
distractionFreeDisabled: { y: '-50px' },
|
|
37
40
|
distractionFreeHover: { y: 0 },
|
|
@@ -111,7 +114,7 @@ function Header( {
|
|
|
111
114
|
);
|
|
112
115
|
|
|
113
116
|
/*
|
|
114
|
-
* The edit-post-header classname is only kept for backward
|
|
117
|
+
* The edit-post-header classname is only kept for backward compatibility
|
|
115
118
|
* as some plugins might be relying on its presence.
|
|
116
119
|
*/
|
|
117
120
|
return (
|
|
@@ -195,7 +198,10 @@ function Header( {
|
|
|
195
198
|
}
|
|
196
199
|
/>
|
|
197
200
|
) }
|
|
198
|
-
|
|
201
|
+
|
|
202
|
+
{ isBlockCommentExperimentEnabled ? (
|
|
203
|
+
<CollabSidebar />
|
|
204
|
+
) : undefined }
|
|
199
205
|
|
|
200
206
|
{ customSaveButton }
|
|
201
207
|
<MoreMenu />
|
|
@@ -32,7 +32,7 @@ export default function PostExcerpt( {
|
|
|
32
32
|
select( editorStore );
|
|
33
33
|
const postType = getCurrentPostType();
|
|
34
34
|
// This special case is unfortunate, but the REST API of wp_template and wp_template_part
|
|
35
|
-
// support the excerpt field
|
|
35
|
+
// support the excerpt field through the "description" field rather than "excerpt".
|
|
36
36
|
const _usedAttribute = [
|
|
37
37
|
'wp_template',
|
|
38
38
|
'wp_template_part',
|
|
@@ -129,13 +129,17 @@ export default function PostPreviewButton( {
|
|
|
129
129
|
const postType = core.getPostType(
|
|
130
130
|
editor.getCurrentPostType( 'type' )
|
|
131
131
|
);
|
|
132
|
+
const canView = postType?.viewable ?? false;
|
|
133
|
+
if ( ! canView ) {
|
|
134
|
+
return { isViewable: canView };
|
|
135
|
+
}
|
|
132
136
|
|
|
133
137
|
return {
|
|
134
138
|
postId: editor.getCurrentPostId(),
|
|
135
139
|
currentPostLink: editor.getCurrentPostAttribute( 'link' ),
|
|
136
140
|
previewLink: editor.getEditedPostPreviewLink(),
|
|
137
141
|
isSaveable: editor.isEditedPostSaveable(),
|
|
138
|
-
isViewable:
|
|
142
|
+
isViewable: canView,
|
|
139
143
|
};
|
|
140
144
|
}, [] );
|
|
141
145
|
|
|
@@ -114,10 +114,10 @@ export class PostPublishButton extends Component {
|
|
|
114
114
|
( ! isPublishable && ! forceIsDirty ) ) &&
|
|
115
115
|
( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges );
|
|
116
116
|
|
|
117
|
-
// If the new status has not changed
|
|
117
|
+
// If the new status has not changed explicitly, we derive it from
|
|
118
118
|
// other factors, like having a publish action, etc.. We need to preserve
|
|
119
119
|
// this because it affects when to show the pre and post publish panels.
|
|
120
|
-
// If it has changed though
|
|
120
|
+
// If it has changed though explicitly, we need to respect that.
|
|
121
121
|
let publishStatus = 'publish';
|
|
122
122
|
if ( postStatusHasChanged ) {
|
|
123
123
|
publishStatus = postStatus;
|
|
@@ -58,7 +58,7 @@ export default function PostPublishButtonOrToggle( {
|
|
|
58
58
|
* for a particular role (see https://wordpress.org/documentation/article/post-status/):
|
|
59
59
|
*
|
|
60
60
|
* - is published
|
|
61
|
-
* - post status has changed
|
|
61
|
+
* - post status has changed explicitly to something different than 'future' or 'publish'
|
|
62
62
|
* - is scheduled to be published
|
|
63
63
|
* - is pending and can't be published (but only for viewports >= medium).
|
|
64
64
|
* Originally, we considered showing a button for pending posts that couldn't be published
|
|
@@ -59,7 +59,7 @@ export function PrivatePostSchedule( {
|
|
|
59
59
|
startOfMonth( new Date( postDate ) )
|
|
60
60
|
);
|
|
61
61
|
|
|
62
|
-
// Pick up published and
|
|
62
|
+
// Pick up published and scheduled site posts.
|
|
63
63
|
const eventsByPostType = useSelect(
|
|
64
64
|
( select ) =>
|
|
65
65
|
select( coreStore ).getEntityRecords( 'postType', postType, {
|