@wordpress/edit-post 8.9.0 → 8.11.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 +4 -0
- package/build/components/init-pattern-modal/index.js +1 -1
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +176 -171
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/use-padding-appender.js +19 -16
- package/build/components/layout/use-padding-appender.js.map +1 -1
- package/build/components/layout/use-should-iframe.js +16 -8
- package/build/components/layout/use-should-iframe.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/deprecated.js.map +1 -1
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/store/actions.js +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +1 -2
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js +2 -4
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +178 -175
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +1 -3
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/layout/use-padding-appender.js +20 -16
- package/build-module/components/layout/use-padding-appender.js.map +1 -1
- package/build-module/components/layout/use-should-iframe.js +16 -8
- package/build-module/components/layout/use-should-iframe.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +1 -3
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -3
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-custom-fields.js +1 -3
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +1 -3
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +1 -2
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -3
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js.map +1 -1
- package/build-module/index.js +2 -4
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/style-rtl.css +65 -29
- package/build-style/style.css +65 -29
- package/package.json +33 -32
- package/src/components/init-pattern-modal/index.js +2 -2
- package/src/components/keyboard-shortcuts/index.js +1 -1
- package/src/components/layout/index.js +170 -174
- package/src/components/layout/style.scss +83 -43
- package/src/components/layout/use-padding-appender.js +21 -18
- package/src/components/layout/use-should-iframe.js +18 -7
- package/src/index.js +0 -2
- package/src/store/actions.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createSelector","createRegistrySelector","store","preferencesStore","coreStore","editorStore","privateApis","editorPrivateApis","deprecated","unlock","getEditedPostTemplateId","interfaceStore","EMPTY_ARRAY","EMPTY_OBJECT","getEditorMode","select","_select$get","get","isEditorSidebarOpened","activeGeneralSidebar","getActiveComplementaryArea","includes","isPluginSidebarOpened","getActiveGeneralSidebarName","convertPanelsToOldFormat","inactivePanels","openPanels","_ref","panelsWithEnabledState","reduce","accumulatedPanels","panelName","enabled","panels","currentPanelState","opened","getPreferences","since","alternative","corePreferences","accumulatedPrefs","preferenceKey","value","getPreference","state","defaultValue","preferences","undefined","getHiddenBlockTypes","_select$get2","isPublishSidebarOpened","isEditorPanelRemoved","isEditorPanelEnabled","isEditorPanelOpened","isModalActive","modalName","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","some","id","length","getAllMetaBoxes","values","flat","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","version","getDeviceType","isInserterOpened","__experimentalGetInsertionPoint","getInserter","isListViewOpened","isEditingTemplate","getCurrentPostType","areMetaBoxesInitialized","initialized","getEditedPostTemplate","templateId","getEditedEntityRecord"],"sources":["@wordpress/edit-post/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { getEditedPostTemplateId } from './private-selectors';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\nconst EMPTY_ARRAY = [];\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t}\n);\n\n/**\n * Converts panels from the new preferences store format to the old format\n * that the post editor previously used.\n *\n * The resultant converted data should look like this:\n * {\n * panelName: {\n * enabled: false,\n * opened: true,\n * },\n * anotherPanelName: {\n * opened: true\n * },\n * }\n *\n * @param {string[] | undefined} inactivePanels An array of inactive panel names.\n * @param {string[] | undefined} openPanels An array of open panel names.\n *\n * @return {Object} The converted panel data.\n */\nfunction convertPanelsToOldFormat( inactivePanels, openPanels ) {\n\t// First reduce the inactive panels.\n\tconst panelsWithEnabledState = inactivePanels?.reduce(\n\t\t( accumulatedPanels, panelName ) => ( {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t} ),\n\t\t{}\n\t);\n\n\t// Then reduce the open panels, passing in the result of the previous\n\t// reduction as the initial value so that both open and inactive\n\t// panel state is combined.\n\tconst panels = openPanels?.reduce( ( accumulatedPanels, panelName ) => {\n\t\tconst currentPanelState = accumulatedPanels?.[ panelName ];\n\t\treturn {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\t...currentPanelState,\n\t\t\t\topened: true,\n\t\t\t},\n\t\t};\n\t}, panelsWithEnabledState ?? {} );\n\n\t// The panels variable will only be set if openPanels wasn't `undefined`.\n\t// If it isn't set just return `panelsWithEnabledState`, and if that isn't\n\t// set return an empty object.\n\treturn panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;\n}\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport const getPreferences = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).getPreferences`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\tconst corePreferences = [ 'editorMode', 'hiddenBlockTypes' ].reduce(\n\t\t( accumulatedPrefs, preferenceKey ) => {\n\t\t\tconst value = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\tpreferenceKey\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...accumulatedPrefs,\n\t\t\t\t[ preferenceKey ]: value,\n\t\t\t};\n\t\t},\n\t\t{}\n\t);\n\n\t// Panels were a preference, but the data structure changed when the state\n\t// was migrated to the preferences store. They need to be converted from\n\t// the new preferences store format to old format to ensure no breaking\n\t// changes for plugins.\n\tconst inactivePanels = select( preferencesStore ).get(\n\t\t'core',\n\t\t'inactivePanels'\n\t);\n\tconst openPanels = select( preferencesStore ).get( 'core', 'openPanels' );\n\tconst panels = convertPanelsToOldFormat( inactivePanels, openPanels );\n\n\treturn {\n\t\t...corePreferences,\n\t\tpanels,\n\t};\n} );\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tdeprecated( `select( 'core/edit-post' ).getPreference`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\t// Avoid using the `getPreferences` registry selector where possible.\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns an array of blocks that are hidden.\n *\n * @return {Array} A list of the hidden block types\n */\nexport const getHiddenBlockTypes = createRegistrySelector( ( select ) => () => {\n\treturn (\n\t\tselect( preferencesStore ).get( 'core', 'hiddenBlockTypes' ) ??\n\t\tEMPTY_ARRAY\n\t);\n} );\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport const isPublishSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated( `select( 'core/edit-post' ).isPublishSidebarOpened`, {\n\t\t\tsince: '6.6',\n\t\t\talternative: `select( 'core/editor' ).isPublishSidebarOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isPublishSidebarOpened();\n\t}\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport const isEditorPanelRemoved = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelRemoved`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelRemoved`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelRemoved( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelEnabled`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelEnabled`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelEnabled( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelOpened`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelOpened( panelName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport const isModalActive = createRegistrySelector(\n\t( select ) => ( state, modalName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isModalActive`, {\n\t\t\tsince: '6.3',\n\t\t\talternative: `select( 'core/interface' ).isModalActive`,\n\t\t} );\n\t\treturn !! select( interfaceStore ).isModalActive( modalName );\n\t}\n);\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, feature ) => {\n\t\treturn !! select( preferencesStore ).get( 'core/edit-post', feature );\n\t}\n);\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( state, pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned( 'core', pluginName );\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport const isMetaBoxLocationVisible = createRegistrySelector(\n\t( select ) => ( state, location ) => {\n\t\treturn (\n\t\t\tisMetaBoxLocationActive( state, location ) &&\n\t\t\tgetMetaBoxesPerLocation( state, location )?.some( ( { id } ) => {\n\t\t\t\treturn select( editorStore ).isEditorPanelEnabled(\n\t\t\t\t\t`meta-box-${ id }`\n\t\t\t\t);\n\t\t\t} )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn Object.values( state.metaBoxes.locations ).flat();\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\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 __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-post' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @deprecated\n */\nexport const isEditingTemplate = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isEditingTemplate`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).getRenderingMode`,\n\t} );\n\treturn select( editorStore ).getCurrentPostType() === 'wp_template';\n} );\n\n/**\n * Returns true if meta boxes are initialized.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether meta boxes are initialized.\n */\nexport function areMetaBoxesInitialized( state ) {\n\treturn state.metaBoxes.initialized;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateId = getEditedPostTemplateId( state );\n\t\tif ( ! templateId ) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\t}\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,sBAAsB,QAAQ,iBAAiB;AACxE,SAAS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4C,OAAO,EAAE;EACV,CACD,CAAC;EACD,OAAOxE,MAAM,CAAEM,MAAM,CAAEV,WAAY,CAAE,CAAC,CAACgF,WAAW,CAAC,CAAC;AACrD,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGrF,sBAAsB,CAAIc,MAAM,IAAM,MAAM;EAC3EP,UAAU,CAAG,6CAA4C,EAAE;IAC1D6B,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CAAE,CAAC;EACH,OAAOvB,MAAM,CAAEV,WAAY,CAAC,CAACiF,gBAAgB,CAAC,CAAC;AAChD,CAAE,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGtF,sBAAsB,CAAIc,MAAM,IAAM,MAAM;EAC5EP,UAAU,CAAG,8CAA6C,EAAE;IAC3D6B,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CAAE,CAAC;EACH,OAAOvB,MAAM,CAAEV,WAAY,CAAC,CAACmF,kBAAkB,CAAC,CAAC,KAAK,aAAa;AACpE,CAAE,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAAE7C,KAAK,EAAG;EAChD,OAAOA,KAAK,CAACoB,SAAS,CAAC0B,WAAW;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG1F,sBAAsB,CACxDc,MAAM,IAAQ6B,KAAK,IAAM;EAC1B,MAAMgD,UAAU,GAAGlF,uBAAuB,CAAEkC,KAAM,CAAC;EACnD,IAAK,CAAEgD,UAAU,EAAG;IACnB,OAAO7C,SAAS;EACjB;EACA,OAAOhC,MAAM,CAAEX,SAAU,CAAC,CAACyF,qBAAqB,CAC/C,UAAU,EACV,aAAa,EACbD,UACD,CAAC;AACF,CACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createSelector","createRegistrySelector","store","preferencesStore","coreStore","editorStore","privateApis","editorPrivateApis","deprecated","unlock","getEditedPostTemplateId","interfaceStore","EMPTY_ARRAY","EMPTY_OBJECT","getEditorMode","select","_select$get","get","isEditorSidebarOpened","activeGeneralSidebar","getActiveComplementaryArea","includes","isPluginSidebarOpened","getActiveGeneralSidebarName","convertPanelsToOldFormat","inactivePanels","openPanels","_ref","panelsWithEnabledState","reduce","accumulatedPanels","panelName","enabled","panels","currentPanelState","opened","getPreferences","since","alternative","corePreferences","accumulatedPrefs","preferenceKey","value","getPreference","state","defaultValue","preferences","undefined","getHiddenBlockTypes","_select$get2","isPublishSidebarOpened","isEditorPanelRemoved","isEditorPanelEnabled","isEditorPanelOpened","isModalActive","modalName","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","some","id","length","getAllMetaBoxes","values","flat","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","version","getDeviceType","isInserterOpened","__experimentalGetInsertionPoint","getInserter","isListViewOpened","isEditingTemplate","getCurrentPostType","areMetaBoxesInitialized","initialized","getEditedPostTemplate","templateId","getEditedEntityRecord"],"sources":["@wordpress/edit-post/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { getEditedPostTemplateId } from './private-selectors';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\nconst EMPTY_ARRAY = [];\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t}\n);\n\n/**\n * Converts panels from the new preferences store format to the old format\n * that the post editor previously used.\n *\n * The resultant converted data should look like this:\n * {\n * panelName: {\n * enabled: false,\n * opened: true,\n * },\n * anotherPanelName: {\n * opened: true\n * },\n * }\n *\n * @param {string[] | undefined} inactivePanels An array of inactive panel names.\n * @param {string[] | undefined} openPanels An array of open panel names.\n *\n * @return {Object} The converted panel data.\n */\nfunction convertPanelsToOldFormat( inactivePanels, openPanels ) {\n\t// First reduce the inactive panels.\n\tconst panelsWithEnabledState = inactivePanels?.reduce(\n\t\t( accumulatedPanels, panelName ) => ( {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t} ),\n\t\t{}\n\t);\n\n\t// Then reduce the open panels, passing in the result of the previous\n\t// reduction as the initial value so that both open and inactive\n\t// panel state is combined.\n\tconst panels = openPanels?.reduce( ( accumulatedPanels, panelName ) => {\n\t\tconst currentPanelState = accumulatedPanels?.[ panelName ];\n\t\treturn {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\t...currentPanelState,\n\t\t\t\topened: true,\n\t\t\t},\n\t\t};\n\t}, panelsWithEnabledState ?? {} );\n\n\t// The panels variable will only be set if openPanels wasn't `undefined`.\n\t// If it isn't set just return `panelsWithEnabledState`, and if that isn't\n\t// set return an empty object.\n\treturn panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;\n}\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport const getPreferences = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).getPreferences`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\tconst corePreferences = [ 'editorMode', 'hiddenBlockTypes' ].reduce(\n\t\t( accumulatedPrefs, preferenceKey ) => {\n\t\t\tconst value = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\tpreferenceKey\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...accumulatedPrefs,\n\t\t\t\t[ preferenceKey ]: value,\n\t\t\t};\n\t\t},\n\t\t{}\n\t);\n\n\t// Panels were a preference, but the data structure changed when the state\n\t// was migrated to the preferences store. They need to be converted from\n\t// the new preferences store format to old format to ensure no breaking\n\t// changes for plugins.\n\tconst inactivePanels = select( preferencesStore ).get(\n\t\t'core',\n\t\t'inactivePanels'\n\t);\n\tconst openPanels = select( preferencesStore ).get( 'core', 'openPanels' );\n\tconst panels = convertPanelsToOldFormat( inactivePanels, openPanels );\n\n\treturn {\n\t\t...corePreferences,\n\t\tpanels,\n\t};\n} );\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tdeprecated( `select( 'core/edit-post' ).getPreference`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\t// Avoid using the `getPreferences` registry selector where possible.\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns an array of blocks that are hidden.\n *\n * @return {Array} A list of the hidden block types\n */\nexport const getHiddenBlockTypes = createRegistrySelector( ( select ) => () => {\n\treturn (\n\t\tselect( preferencesStore ).get( 'core', 'hiddenBlockTypes' ) ??\n\t\tEMPTY_ARRAY\n\t);\n} );\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport const isPublishSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated( `select( 'core/edit-post' ).isPublishSidebarOpened`, {\n\t\t\tsince: '6.6',\n\t\t\talternative: `select( 'core/editor' ).isPublishSidebarOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isPublishSidebarOpened();\n\t}\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport const isEditorPanelRemoved = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelRemoved`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelRemoved`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelRemoved( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelEnabled`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelEnabled`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelEnabled( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelOpened`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelOpened( panelName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport const isModalActive = createRegistrySelector(\n\t( select ) => ( state, modalName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isModalActive`, {\n\t\t\tsince: '6.3',\n\t\t\talternative: `select( 'core/interface' ).isModalActive`,\n\t\t} );\n\t\treturn !! select( interfaceStore ).isModalActive( modalName );\n\t}\n);\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, feature ) => {\n\t\treturn !! select( preferencesStore ).get( 'core/edit-post', feature );\n\t}\n);\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( state, pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned( 'core', pluginName );\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport const isMetaBoxLocationVisible = createRegistrySelector(\n\t( select ) => ( state, location ) => {\n\t\treturn (\n\t\t\tisMetaBoxLocationActive( state, location ) &&\n\t\t\tgetMetaBoxesPerLocation( state, location )?.some( ( { id } ) => {\n\t\t\t\treturn select( editorStore ).isEditorPanelEnabled(\n\t\t\t\t\t`meta-box-${ id }`\n\t\t\t\t);\n\t\t\t} )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn Object.values( state.metaBoxes.locations ).flat();\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\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 __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-post' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @deprecated\n */\nexport const isEditingTemplate = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isEditingTemplate`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).getRenderingMode`,\n\t} );\n\treturn select( editorStore ).getCurrentPostType() === 'wp_template';\n} );\n\n/**\n * Returns true if meta boxes are initialized.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether meta boxes are initialized.\n */\nexport function areMetaBoxesInitialized( state ) {\n\treturn state.metaBoxes.initialized;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateId = getEditedPostTemplateId( state );\n\t\tif ( ! templateId ) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn select( coreStore ).getEditedEntityRecord(\n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AAEX,SAAU,CAAC,CAACyF,qBAAqB,CAC/C,UAAU,EACV,aAAa,EACbD,UACD,CAAC;AACF,CACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getMetaBoxContainer","location","area","document","querySelector"],"sources":["@wordpress/edit-post/src/utils/meta-boxes.js"],"sourcesContent":["/**\n * Function returning the current Meta Boxes DOM Node in the editor\n * whether the meta box area is opened or not.\n * If the MetaBox Area is visible returns it, and returns the original container instead.\n *\n * @param {string} location Meta Box location.\n *\n * @return {string} HTML content.\n */\nexport const getMetaBoxContainer = ( location ) => {\n\tconst area = document.querySelector(\n\t\t`.edit-post-meta-boxes-area.is-${ location } .metabox-location-${ location }`\n\t);\n\tif ( area ) {\n\t\treturn area;\n\t}\n\n\treturn document.querySelector( '#metaboxes .metabox-location-' + location );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,mBAAmB,GAAKC,QAAQ,IAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,
|
|
1
|
+
{"version":3,"names":["getMetaBoxContainer","location","area","document","querySelector"],"sources":["@wordpress/edit-post/src/utils/meta-boxes.js"],"sourcesContent":["/**\n * Function returning the current Meta Boxes DOM Node in the editor\n * whether the meta box area is opened or not.\n * If the MetaBox Area is visible returns it, and returns the original container instead.\n *\n * @param {string} location Meta Box location.\n *\n * @return {string} HTML content.\n */\nexport const getMetaBoxContainer = ( location ) => {\n\tconst area = document.querySelector(\n\t\t`.edit-post-meta-boxes-area.is-${ location } .metabox-location-${ location }`\n\t);\n\tif ( area ) {\n\t\treturn area;\n\t}\n\n\treturn document.querySelector( '#metaboxes .metabox-location-' + location );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,mBAAmB,GAAKC,QAAQ,IAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAClC,iCAAkCH,QAAQ,sBAAwBA,QAAQ,EAC3E,CAAC;EACD,IAAKC,IAAI,EAAG;IACX,OAAOA,IAAI;EACZ;EAEA,OAAOC,QAAQ,CAACC,aAAa,CAAE,+BAA+B,GAAGH,QAAS,CAAC;AAC5E,CAAC","ignoreList":[]}
|
|
@@ -192,65 +192,101 @@
|
|
|
192
192
|
|
|
193
193
|
.edit-post-meta-boxes-main {
|
|
194
194
|
filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
|
|
195
|
+
outline: 1px solid transparent;
|
|
195
196
|
background-color: #fff;
|
|
196
|
-
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
overflow: hidden;
|
|
197
200
|
}
|
|
198
|
-
.edit-post-meta-boxes-main
|
|
199
|
-
padding-
|
|
200
|
-
}
|
|
201
|
-
.edit-post-meta-boxes-main:is(details) > summary {
|
|
202
|
-
cursor: pointer;
|
|
203
|
-
color: #1e1e1e;
|
|
204
|
-
background-color: #fff;
|
|
205
|
-
height: 32px;
|
|
206
|
-
line-height: 32px;
|
|
207
|
-
font-size: 13px;
|
|
208
|
-
padding-right: 24px;
|
|
209
|
-
box-shadow: 0 1px #ddd;
|
|
210
|
-
}
|
|
211
|
-
.edit-post-meta-boxes-main:is(details)[open] > summary {
|
|
212
|
-
position: sticky;
|
|
213
|
-
top: 0;
|
|
214
|
-
z-index: 1;
|
|
201
|
+
.edit-post-meta-boxes-main.is-resizable {
|
|
202
|
+
padding-block-start: 24px;
|
|
215
203
|
}
|
|
216
204
|
|
|
217
|
-
.edit-post-meta-boxes-
|
|
205
|
+
.edit-post-meta-boxes-main__presenter {
|
|
218
206
|
display: flex;
|
|
219
|
-
inset: 0 0 auto 0;
|
|
220
|
-
height: 24px;
|
|
221
207
|
box-shadow: 0 1px #ddd;
|
|
208
|
+
outline: 1px solid transparent;
|
|
209
|
+
position: relative;
|
|
210
|
+
z-index: 1;
|
|
222
211
|
}
|
|
223
|
-
.edit-post-meta-boxes-
|
|
212
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter, .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
224
213
|
appearance: none;
|
|
225
|
-
cursor: inherit;
|
|
226
|
-
margin: auto;
|
|
227
214
|
padding: 0;
|
|
228
215
|
border: none;
|
|
229
216
|
outline: none;
|
|
230
|
-
background-color:
|
|
217
|
+
background-color: transparent;
|
|
218
|
+
}
|
|
219
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter {
|
|
220
|
+
flex-shrink: 0;
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
height: 32px;
|
|
223
|
+
justify-content: space-between;
|
|
224
|
+
align-items: center;
|
|
225
|
+
padding-inline: 24px 12px;
|
|
226
|
+
}
|
|
227
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter:is(:hover, :focus-visible) {
|
|
228
|
+
color: var(--wp-admin-theme-color);
|
|
229
|
+
}
|
|
230
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter:focus-visible::after {
|
|
231
|
+
content: "";
|
|
232
|
+
position: absolute;
|
|
233
|
+
inset: var(--wp-admin-border-width-focus);
|
|
234
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
235
|
+
outline: 2px solid transparent;
|
|
236
|
+
}
|
|
237
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter > svg {
|
|
238
|
+
fill: currentColor;
|
|
239
|
+
}
|
|
240
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter {
|
|
241
|
+
inset: 0 0 auto;
|
|
242
|
+
}
|
|
243
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
244
|
+
cursor: inherit;
|
|
231
245
|
width: 64px;
|
|
246
|
+
height: 24px;
|
|
247
|
+
margin: auto;
|
|
248
|
+
}
|
|
249
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
|
|
250
|
+
content: "";
|
|
251
|
+
background-color: #ddd;
|
|
252
|
+
outline: 2px solid transparent;
|
|
253
|
+
outline-offset: -2px;
|
|
254
|
+
position: absolute;
|
|
255
|
+
inset-block: calc(50% - 4px / 2) auto;
|
|
256
|
+
transform: translateX(50%);
|
|
257
|
+
width: inherit;
|
|
232
258
|
height: 4px;
|
|
233
259
|
border-radius: 2px;
|
|
234
260
|
transition: width 0.3s ease-out;
|
|
235
261
|
}
|
|
236
262
|
@media (prefers-reduced-motion: reduce) {
|
|
237
|
-
.edit-post-meta-boxes-
|
|
263
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
|
|
238
264
|
transition-duration: 0s;
|
|
239
265
|
transition-delay: 0s;
|
|
240
266
|
}
|
|
241
267
|
}
|
|
242
|
-
.edit-post-meta-boxes-
|
|
243
|
-
.edit-post-meta-boxes-main__resize-handle > button:focus {
|
|
268
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter:is(:hover, :focus-within) > button::before {
|
|
244
269
|
background-color: var(--wp-admin-theme-color);
|
|
245
270
|
width: 80px;
|
|
246
271
|
}
|
|
247
272
|
|
|
273
|
+
@media (pointer: coarse) {
|
|
274
|
+
.is-resizable.edit-post-meta-boxes-main {
|
|
275
|
+
padding-block-start: 32px;
|
|
276
|
+
}
|
|
277
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
278
|
+
height: 32px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
248
281
|
.edit-post-meta-boxes-main__liner {
|
|
249
282
|
overflow: auto;
|
|
250
|
-
max-height: 100%;
|
|
251
283
|
isolation: isolate;
|
|
252
284
|
}
|
|
253
285
|
|
|
286
|
+
.edit-post-layout__metaboxes {
|
|
287
|
+
clear: both;
|
|
288
|
+
}
|
|
289
|
+
|
|
254
290
|
.has-metaboxes .editor-visual-editor {
|
|
255
291
|
flex: 1;
|
|
256
292
|
}
|
package/build-style/style.css
CHANGED
|
@@ -192,65 +192,101 @@
|
|
|
192
192
|
|
|
193
193
|
.edit-post-meta-boxes-main {
|
|
194
194
|
filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
|
|
195
|
+
outline: 1px solid transparent;
|
|
195
196
|
background-color: #fff;
|
|
196
|
-
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
overflow: hidden;
|
|
197
200
|
}
|
|
198
|
-
.edit-post-meta-boxes-main
|
|
199
|
-
padding-
|
|
200
|
-
}
|
|
201
|
-
.edit-post-meta-boxes-main:is(details) > summary {
|
|
202
|
-
cursor: pointer;
|
|
203
|
-
color: #1e1e1e;
|
|
204
|
-
background-color: #fff;
|
|
205
|
-
height: 32px;
|
|
206
|
-
line-height: 32px;
|
|
207
|
-
font-size: 13px;
|
|
208
|
-
padding-left: 24px;
|
|
209
|
-
box-shadow: 0 1px #ddd;
|
|
210
|
-
}
|
|
211
|
-
.edit-post-meta-boxes-main:is(details)[open] > summary {
|
|
212
|
-
position: sticky;
|
|
213
|
-
top: 0;
|
|
214
|
-
z-index: 1;
|
|
201
|
+
.edit-post-meta-boxes-main.is-resizable {
|
|
202
|
+
padding-block-start: 24px;
|
|
215
203
|
}
|
|
216
204
|
|
|
217
|
-
.edit-post-meta-boxes-
|
|
205
|
+
.edit-post-meta-boxes-main__presenter {
|
|
218
206
|
display: flex;
|
|
219
|
-
inset: 0 0 auto 0;
|
|
220
|
-
height: 24px;
|
|
221
207
|
box-shadow: 0 1px #ddd;
|
|
208
|
+
outline: 1px solid transparent;
|
|
209
|
+
position: relative;
|
|
210
|
+
z-index: 1;
|
|
222
211
|
}
|
|
223
|
-
.edit-post-meta-boxes-
|
|
212
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter, .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
224
213
|
appearance: none;
|
|
225
|
-
cursor: inherit;
|
|
226
|
-
margin: auto;
|
|
227
214
|
padding: 0;
|
|
228
215
|
border: none;
|
|
229
216
|
outline: none;
|
|
230
|
-
background-color:
|
|
217
|
+
background-color: transparent;
|
|
218
|
+
}
|
|
219
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter {
|
|
220
|
+
flex-shrink: 0;
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
height: 32px;
|
|
223
|
+
justify-content: space-between;
|
|
224
|
+
align-items: center;
|
|
225
|
+
padding-inline: 24px 12px;
|
|
226
|
+
}
|
|
227
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter:is(:hover, :focus-visible) {
|
|
228
|
+
color: var(--wp-admin-theme-color);
|
|
229
|
+
}
|
|
230
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter:focus-visible::after {
|
|
231
|
+
content: "";
|
|
232
|
+
position: absolute;
|
|
233
|
+
inset: var(--wp-admin-border-width-focus);
|
|
234
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
235
|
+
outline: 2px solid transparent;
|
|
236
|
+
}
|
|
237
|
+
.is-toggle-only > .edit-post-meta-boxes-main__presenter > svg {
|
|
238
|
+
fill: currentColor;
|
|
239
|
+
}
|
|
240
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter {
|
|
241
|
+
inset: 0 0 auto;
|
|
242
|
+
}
|
|
243
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
244
|
+
cursor: inherit;
|
|
231
245
|
width: 64px;
|
|
246
|
+
height: 24px;
|
|
247
|
+
margin: auto;
|
|
248
|
+
}
|
|
249
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
|
|
250
|
+
content: "";
|
|
251
|
+
background-color: #ddd;
|
|
252
|
+
outline: 2px solid transparent;
|
|
253
|
+
outline-offset: -2px;
|
|
254
|
+
position: absolute;
|
|
255
|
+
inset-block: calc(50% - 4px / 2) auto;
|
|
256
|
+
transform: translateX(-50%);
|
|
257
|
+
width: inherit;
|
|
232
258
|
height: 4px;
|
|
233
259
|
border-radius: 2px;
|
|
234
260
|
transition: width 0.3s ease-out;
|
|
235
261
|
}
|
|
236
262
|
@media (prefers-reduced-motion: reduce) {
|
|
237
|
-
.edit-post-meta-boxes-
|
|
263
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
|
|
238
264
|
transition-duration: 0s;
|
|
239
265
|
transition-delay: 0s;
|
|
240
266
|
}
|
|
241
267
|
}
|
|
242
|
-
.edit-post-meta-boxes-
|
|
243
|
-
.edit-post-meta-boxes-main__resize-handle > button:focus {
|
|
268
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter:is(:hover, :focus-within) > button::before {
|
|
244
269
|
background-color: var(--wp-admin-theme-color);
|
|
245
270
|
width: 80px;
|
|
246
271
|
}
|
|
247
272
|
|
|
273
|
+
@media (pointer: coarse) {
|
|
274
|
+
.is-resizable.edit-post-meta-boxes-main {
|
|
275
|
+
padding-block-start: 32px;
|
|
276
|
+
}
|
|
277
|
+
.is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
|
|
278
|
+
height: 32px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
248
281
|
.edit-post-meta-boxes-main__liner {
|
|
249
282
|
overflow: auto;
|
|
250
|
-
max-height: 100%;
|
|
251
283
|
isolation: isolate;
|
|
252
284
|
}
|
|
253
285
|
|
|
286
|
+
.edit-post-layout__metaboxes {
|
|
287
|
+
clear: both;
|
|
288
|
+
}
|
|
289
|
+
|
|
254
290
|
.has-metaboxes .editor-visual-editor {
|
|
255
291
|
flex: 1;
|
|
256
292
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,36 +27,36 @@
|
|
|
27
27
|
"module": "build-module/index.js",
|
|
28
28
|
"react-native": "src/index",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "
|
|
31
|
-
"@wordpress/a11y": "
|
|
32
|
-
"@wordpress/api-fetch": "
|
|
33
|
-
"@wordpress/block-editor": "
|
|
34
|
-
"@wordpress/block-library": "
|
|
35
|
-
"@wordpress/blocks": "
|
|
36
|
-
"@wordpress/commands": "
|
|
37
|
-
"@wordpress/components": "
|
|
38
|
-
"@wordpress/compose": "
|
|
39
|
-
"@wordpress/core-commands": "
|
|
40
|
-
"@wordpress/core-data": "
|
|
41
|
-
"@wordpress/data": "
|
|
42
|
-
"@wordpress/deprecated": "
|
|
43
|
-
"@wordpress/dom": "
|
|
44
|
-
"@wordpress/editor": "
|
|
45
|
-
"@wordpress/element": "
|
|
46
|
-
"@wordpress/hooks": "
|
|
47
|
-
"@wordpress/html-entities": "
|
|
48
|
-
"@wordpress/i18n": "
|
|
49
|
-
"@wordpress/icons": "
|
|
50
|
-
"@wordpress/keyboard-shortcuts": "
|
|
51
|
-
"@wordpress/keycodes": "
|
|
52
|
-
"@wordpress/notices": "
|
|
53
|
-
"@wordpress/plugins": "
|
|
54
|
-
"@wordpress/preferences": "
|
|
55
|
-
"@wordpress/private-apis": "
|
|
56
|
-
"@wordpress/url": "
|
|
57
|
-
"@wordpress/viewport": "
|
|
58
|
-
"@wordpress/warning": "
|
|
59
|
-
"@wordpress/widgets": "
|
|
30
|
+
"@babel/runtime": "7.25.7",
|
|
31
|
+
"@wordpress/a11y": "*",
|
|
32
|
+
"@wordpress/api-fetch": "*",
|
|
33
|
+
"@wordpress/block-editor": "*",
|
|
34
|
+
"@wordpress/block-library": "*",
|
|
35
|
+
"@wordpress/blocks": "*",
|
|
36
|
+
"@wordpress/commands": "*",
|
|
37
|
+
"@wordpress/components": "*",
|
|
38
|
+
"@wordpress/compose": "*",
|
|
39
|
+
"@wordpress/core-commands": "*",
|
|
40
|
+
"@wordpress/core-data": "*",
|
|
41
|
+
"@wordpress/data": "*",
|
|
42
|
+
"@wordpress/deprecated": "*",
|
|
43
|
+
"@wordpress/dom": "*",
|
|
44
|
+
"@wordpress/editor": "*",
|
|
45
|
+
"@wordpress/element": "*",
|
|
46
|
+
"@wordpress/hooks": "*",
|
|
47
|
+
"@wordpress/html-entities": "*",
|
|
48
|
+
"@wordpress/i18n": "*",
|
|
49
|
+
"@wordpress/icons": "*",
|
|
50
|
+
"@wordpress/keyboard-shortcuts": "*",
|
|
51
|
+
"@wordpress/keycodes": "*",
|
|
52
|
+
"@wordpress/notices": "*",
|
|
53
|
+
"@wordpress/plugins": "*",
|
|
54
|
+
"@wordpress/preferences": "*",
|
|
55
|
+
"@wordpress/private-apis": "*",
|
|
56
|
+
"@wordpress/url": "*",
|
|
57
|
+
"@wordpress/viewport": "*",
|
|
58
|
+
"@wordpress/warning": "*",
|
|
59
|
+
"@wordpress/widgets": "*",
|
|
60
60
|
"clsx": "^2.1.1",
|
|
61
61
|
"memize": "^2.1.0"
|
|
62
62
|
},
|
|
@@ -67,5 +67,6 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"wpScript": true,
|
|
71
|
+
"gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
|
|
71
72
|
}
|
|
@@ -27,8 +27,8 @@ export default function InitPatternModal() {
|
|
|
27
27
|
isNewPost: isCleanNewPost(),
|
|
28
28
|
};
|
|
29
29
|
}, [] );
|
|
30
|
-
const [ isModalOpen, setIsModalOpen ] = useState(
|
|
31
|
-
isNewPost && postType === 'wp_block'
|
|
30
|
+
const [ isModalOpen, setIsModalOpen ] = useState(
|
|
31
|
+
() => isNewPost && postType === 'wp_block'
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
if ( postType !== 'wp_block' || ! isNewPost ) {
|
|
@@ -22,7 +22,7 @@ function KeyboardShortcuts() {
|
|
|
22
22
|
registerShortcut( {
|
|
23
23
|
name: 'core/edit-post/toggle-fullscreen',
|
|
24
24
|
category: 'global',
|
|
25
|
-
description: __( '
|
|
25
|
+
description: __( 'Enable or disable fullscreen mode.' ),
|
|
26
26
|
keyCombination: {
|
|
27
27
|
modifier: 'secondary',
|
|
28
28
|
character: 'f',
|